diff --git a/api/utss/module/v1/module.pulsar.go b/api/utss/module/v1/module.pulsar.go new file mode 100644 index 00000000..c3d0d9fc --- /dev/null +++ b/api/utss/module/v1/module.pulsar.go @@ -0,0 +1,500 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Module protoreflect.MessageDescriptor +) + +func init() { + file_utss_module_v1_module_proto_init() + md_Module = File_utss_module_v1_module_proto.Messages().ByName("Module") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_utss_module_v1_module_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// 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_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(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_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module 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_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.module.v1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Module) + 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: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/module/v1/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module is the app config object of the module. +// Learn more: https://docs.cosmos.network/main/building-modules/depinject +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_utss_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +var File_utss_module_v1_module_proto protoreflect.FileDescriptor + +var file_utss_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x36, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x2c, 0xba, 0xc0, 0x96, 0xda, 0x01, + 0x26, 0x0a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, + 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x42, 0xbd, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, + 0x75, 0x74, 0x73, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x55, 0x4d, 0x58, 0xaa, 0x02, 0x0e, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_utss_module_v1_module_proto_rawDescOnce sync.Once + file_utss_module_v1_module_proto_rawDescData = file_utss_module_v1_module_proto_rawDesc +) + +func file_utss_module_v1_module_proto_rawDescGZIP() []byte { + file_utss_module_v1_module_proto_rawDescOnce.Do(func() { + file_utss_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_module_v1_module_proto_rawDescData) + }) + return file_utss_module_v1_module_proto_rawDescData +} + +var file_utss_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_utss_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: utss.module.v1.Module +} +var file_utss_module_v1_module_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_utss_module_v1_module_proto_init() } +func file_utss_module_v1_module_proto_init() { + if File_utss_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_utss_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_utss_module_v1_module_proto_goTypes, + DependencyIndexes: file_utss_module_v1_module_proto_depIdxs, + MessageInfos: file_utss_module_v1_module_proto_msgTypes, + }.Build() + File_utss_module_v1_module_proto = out.File + file_utss_module_v1_module_proto_rawDesc = nil + file_utss_module_v1_module_proto_goTypes = nil + file_utss_module_v1_module_proto_depIdxs = nil +} diff --git a/api/utss/v1/genesis.pulsar.go b/api/utss/v1/genesis.pulsar.go new file mode 100644 index 00000000..954b2319 --- /dev/null +++ b/api/utss/v1/genesis.pulsar.go @@ -0,0 +1,591 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package utssv1 + +import ( + _ "cosmossdk.io/api/amino" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_genesis_proto_init() + md_GenesisState = File_utss_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// 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_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(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_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState 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_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState 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_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState 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_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState 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_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState 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_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState 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_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.GenesisState", 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_GenesisState) 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_GenesisState) 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_GenesisState) 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_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/v1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the module genesis state +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Params defines all the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_utss_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +var File_utss_v1_genesis_proto protoreflect.FileDescriptor + +var file_utss_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, + 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, + 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x91, 0x01, + 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, + 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_utss_v1_genesis_proto_rawDescOnce sync.Once + file_utss_v1_genesis_proto_rawDescData = file_utss_v1_genesis_proto_rawDesc +) + +func file_utss_v1_genesis_proto_rawDescGZIP() []byte { + file_utss_v1_genesis_proto_rawDescOnce.Do(func() { + file_utss_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_v1_genesis_proto_rawDescData) + }) + return file_utss_v1_genesis_proto_rawDescData +} + +var file_utss_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_utss_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: utss.v1.GenesisState + (*Params)(nil), // 1: utss.v1.Params +} +var file_utss_v1_genesis_proto_depIdxs = []int32{ + 1, // 0: utss.v1.GenesisState.params:type_name -> utss.v1.Params + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_utss_v1_genesis_proto_init() } +func file_utss_v1_genesis_proto_init() { + if File_utss_v1_genesis_proto != nil { + return + } + file_utss_v1_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_utss_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_utss_v1_genesis_proto_goTypes, + DependencyIndexes: file_utss_v1_genesis_proto_depIdxs, + MessageInfos: file_utss_v1_genesis_proto_msgTypes, + }.Build() + File_utss_v1_genesis_proto = out.File + file_utss_v1_genesis_proto_rawDesc = nil + file_utss_v1_genesis_proto_goTypes = nil + file_utss_v1_genesis_proto_depIdxs = nil +} diff --git a/api/utss/v1/query.pulsar.go b/api/utss/v1/query.pulsar.go new file mode 100644 index 00000000..7ae1d10f --- /dev/null +++ b/api/utss/v1/query.pulsar.go @@ -0,0 +1,6990 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package utssv1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryParamsRequest = File_utss_v1_query_proto.Messages().ByName("QueryParamsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) + +type fastReflection_QueryParamsRequest QueryParamsRequest + +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) +} + +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} + +type fastReflection_QueryParamsRequest_messageType struct{} + +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) +} +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryParamsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParamsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryParamsResponse = File_utss_v1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCurrentProcessRequest protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryCurrentProcessRequest = File_utss_v1_query_proto.Messages().ByName("QueryCurrentProcessRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryCurrentProcessRequest)(nil) + +type fastReflection_QueryCurrentProcessRequest QueryCurrentProcessRequest + +func (x *QueryCurrentProcessRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCurrentProcessRequest)(x) +} + +func (x *QueryCurrentProcessRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCurrentProcessRequest_messageType fastReflection_QueryCurrentProcessRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryCurrentProcessRequest_messageType{} + +type fastReflection_QueryCurrentProcessRequest_messageType struct{} + +func (x fastReflection_QueryCurrentProcessRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCurrentProcessRequest)(nil) +} +func (x fastReflection_QueryCurrentProcessRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCurrentProcessRequest) +} +func (x fastReflection_QueryCurrentProcessRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentProcessRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCurrentProcessRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentProcessRequest +} + +// 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_QueryCurrentProcessRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryCurrentProcessRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCurrentProcessRequest) New() protoreflect.Message { + return new(fastReflection_QueryCurrentProcessRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCurrentProcessRequest) Interface() protoreflect.ProtoMessage { + return (*QueryCurrentProcessRequest)(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_QueryCurrentProcessRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCurrentProcessRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest 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_QueryCurrentProcessRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest 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_QueryCurrentProcessRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest 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_QueryCurrentProcessRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest 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_QueryCurrentProcessRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest 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_QueryCurrentProcessRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest 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_QueryCurrentProcessRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryCurrentProcessRequest", 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_QueryCurrentProcessRequest) 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_QueryCurrentProcessRequest) 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_QueryCurrentProcessRequest) 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_QueryCurrentProcessRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCurrentProcessRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentProcessRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentProcessRequest) + 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: QueryCurrentProcessRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCurrentProcessResponse protoreflect.MessageDescriptor + fd_QueryCurrentProcessResponse_process protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryCurrentProcessResponse = File_utss_v1_query_proto.Messages().ByName("QueryCurrentProcessResponse") + fd_QueryCurrentProcessResponse_process = md_QueryCurrentProcessResponse.Fields().ByName("process") +} + +var _ protoreflect.Message = (*fastReflection_QueryCurrentProcessResponse)(nil) + +type fastReflection_QueryCurrentProcessResponse QueryCurrentProcessResponse + +func (x *QueryCurrentProcessResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCurrentProcessResponse)(x) +} + +func (x *QueryCurrentProcessResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCurrentProcessResponse_messageType fastReflection_QueryCurrentProcessResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryCurrentProcessResponse_messageType{} + +type fastReflection_QueryCurrentProcessResponse_messageType struct{} + +func (x fastReflection_QueryCurrentProcessResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCurrentProcessResponse)(nil) +} +func (x fastReflection_QueryCurrentProcessResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCurrentProcessResponse) +} +func (x fastReflection_QueryCurrentProcessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentProcessResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCurrentProcessResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentProcessResponse +} + +// 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_QueryCurrentProcessResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryCurrentProcessResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCurrentProcessResponse) New() protoreflect.Message { + return new(fastReflection_QueryCurrentProcessResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCurrentProcessResponse) Interface() protoreflect.ProtoMessage { + return (*QueryCurrentProcessResponse)(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_QueryCurrentProcessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Process != nil { + value := protoreflect.ValueOfMessage(x.Process.ProtoReflect()) + if !f(fd_QueryCurrentProcessResponse_process, 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_QueryCurrentProcessResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + return x.Process != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse 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_QueryCurrentProcessResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + x.Process = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse 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_QueryCurrentProcessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + value := x.Process + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse 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_QueryCurrentProcessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + x.Process = value.Message().Interface().(*TssKeyProcess) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse 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_QueryCurrentProcessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + if x.Process == nil { + x.Process = new(TssKeyProcess) + } + return protoreflect.ValueOfMessage(x.Process.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse 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_QueryCurrentProcessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + m := new(TssKeyProcess) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse 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_QueryCurrentProcessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryCurrentProcessResponse", 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_QueryCurrentProcessResponse) 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_QueryCurrentProcessResponse) 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_QueryCurrentProcessResponse) 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_QueryCurrentProcessResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCurrentProcessResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Process != nil { + l = options.Size(x.Process) + 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().(*QueryCurrentProcessResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Process != nil { + encoded, err := options.Marshal(x.Process) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentProcessResponse) + 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: QueryCurrentProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentProcessResponse: 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 Process", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Process == nil { + x.Process = &TssKeyProcess{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Process); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryProcessByIdRequest protoreflect.MessageDescriptor + fd_QueryProcessByIdRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryProcessByIdRequest = File_utss_v1_query_proto.Messages().ByName("QueryProcessByIdRequest") + fd_QueryProcessByIdRequest_id = md_QueryProcessByIdRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryProcessByIdRequest)(nil) + +type fastReflection_QueryProcessByIdRequest QueryProcessByIdRequest + +func (x *QueryProcessByIdRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryProcessByIdRequest)(x) +} + +func (x *QueryProcessByIdRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryProcessByIdRequest_messageType fastReflection_QueryProcessByIdRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryProcessByIdRequest_messageType{} + +type fastReflection_QueryProcessByIdRequest_messageType struct{} + +func (x fastReflection_QueryProcessByIdRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryProcessByIdRequest)(nil) +} +func (x fastReflection_QueryProcessByIdRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryProcessByIdRequest) +} +func (x fastReflection_QueryProcessByIdRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProcessByIdRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryProcessByIdRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProcessByIdRequest +} + +// 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_QueryProcessByIdRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryProcessByIdRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryProcessByIdRequest) New() protoreflect.Message { + return new(fastReflection_QueryProcessByIdRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryProcessByIdRequest) Interface() protoreflect.ProtoMessage { + return (*QueryProcessByIdRequest)(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_QueryProcessByIdRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_QueryProcessByIdRequest_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryProcessByIdRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest 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_QueryProcessByIdRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest 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_QueryProcessByIdRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest 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_QueryProcessByIdRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest 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_QueryProcessByIdRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + panic(fmt.Errorf("field id of message utss.v1.QueryProcessByIdRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest 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_QueryProcessByIdRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest 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_QueryProcessByIdRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryProcessByIdRequest", 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_QueryProcessByIdRequest) 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_QueryProcessByIdRequest) 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_QueryProcessByIdRequest) 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_QueryProcessByIdRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryProcessByIdRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryProcessByIdRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryProcessByIdRequest) + 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: QueryProcessByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProcessByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryProcessByIdResponse protoreflect.MessageDescriptor + fd_QueryProcessByIdResponse_process protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryProcessByIdResponse = File_utss_v1_query_proto.Messages().ByName("QueryProcessByIdResponse") + fd_QueryProcessByIdResponse_process = md_QueryProcessByIdResponse.Fields().ByName("process") +} + +var _ protoreflect.Message = (*fastReflection_QueryProcessByIdResponse)(nil) + +type fastReflection_QueryProcessByIdResponse QueryProcessByIdResponse + +func (x *QueryProcessByIdResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryProcessByIdResponse)(x) +} + +func (x *QueryProcessByIdResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryProcessByIdResponse_messageType fastReflection_QueryProcessByIdResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryProcessByIdResponse_messageType{} + +type fastReflection_QueryProcessByIdResponse_messageType struct{} + +func (x fastReflection_QueryProcessByIdResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryProcessByIdResponse)(nil) +} +func (x fastReflection_QueryProcessByIdResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryProcessByIdResponse) +} +func (x fastReflection_QueryProcessByIdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProcessByIdResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryProcessByIdResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProcessByIdResponse +} + +// 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_QueryProcessByIdResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryProcessByIdResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryProcessByIdResponse) New() protoreflect.Message { + return new(fastReflection_QueryProcessByIdResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryProcessByIdResponse) Interface() protoreflect.ProtoMessage { + return (*QueryProcessByIdResponse)(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_QueryProcessByIdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Process != nil { + value := protoreflect.ValueOfMessage(x.Process.ProtoReflect()) + if !f(fd_QueryProcessByIdResponse_process, 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_QueryProcessByIdResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + return x.Process != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse 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_QueryProcessByIdResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + x.Process = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse 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_QueryProcessByIdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + value := x.Process + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse 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_QueryProcessByIdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + x.Process = value.Message().Interface().(*TssKeyProcess) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse 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_QueryProcessByIdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + if x.Process == nil { + x.Process = new(TssKeyProcess) + } + return protoreflect.ValueOfMessage(x.Process.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse 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_QueryProcessByIdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + m := new(TssKeyProcess) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse 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_QueryProcessByIdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryProcessByIdResponse", 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_QueryProcessByIdResponse) 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_QueryProcessByIdResponse) 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_QueryProcessByIdResponse) 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_QueryProcessByIdResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryProcessByIdResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Process != nil { + l = options.Size(x.Process) + 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().(*QueryProcessByIdResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Process != nil { + encoded, err := options.Marshal(x.Process) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryProcessByIdResponse) + 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: QueryProcessByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProcessByIdResponse: 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 Process", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Process == nil { + x.Process = &TssKeyProcess{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Process); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAllProcessesRequest protoreflect.MessageDescriptor + fd_QueryAllProcessesRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllProcessesRequest = File_utss_v1_query_proto.Messages().ByName("QueryAllProcessesRequest") + fd_QueryAllProcessesRequest_pagination = md_QueryAllProcessesRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllProcessesRequest)(nil) + +type fastReflection_QueryAllProcessesRequest QueryAllProcessesRequest + +func (x *QueryAllProcessesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllProcessesRequest)(x) +} + +func (x *QueryAllProcessesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllProcessesRequest_messageType fastReflection_QueryAllProcessesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllProcessesRequest_messageType{} + +type fastReflection_QueryAllProcessesRequest_messageType struct{} + +func (x fastReflection_QueryAllProcessesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllProcessesRequest)(nil) +} +func (x fastReflection_QueryAllProcessesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllProcessesRequest) +} +func (x fastReflection_QueryAllProcessesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllProcessesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllProcessesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllProcessesRequest +} + +// 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_QueryAllProcessesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllProcessesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllProcessesRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllProcessesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllProcessesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllProcessesRequest)(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_QueryAllProcessesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllProcessesRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllProcessesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest 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_QueryAllProcessesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest 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_QueryAllProcessesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest 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_QueryAllProcessesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest 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_QueryAllProcessesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest 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_QueryAllProcessesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest 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_QueryAllProcessesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllProcessesRequest", 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_QueryAllProcessesRequest) 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_QueryAllProcessesRequest) 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_QueryAllProcessesRequest) 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_QueryAllProcessesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllProcessesRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllProcessesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllProcessesRequest) + 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: QueryAllProcessesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAllProcessesResponse_1_list)(nil) + +type _QueryAllProcessesResponse_1_list struct { + list *[]*TssKeyProcess +} + +func (x *_QueryAllProcessesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllProcessesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAllProcessesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*TssKeyProcess) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllProcessesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*TssKeyProcess) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllProcessesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(TssKeyProcess) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllProcessesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllProcessesResponse_1_list) NewElement() protoreflect.Value { + v := new(TssKeyProcess) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllProcessesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAllProcessesResponse protoreflect.MessageDescriptor + fd_QueryAllProcessesResponse_processes protoreflect.FieldDescriptor + fd_QueryAllProcessesResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllProcessesResponse = File_utss_v1_query_proto.Messages().ByName("QueryAllProcessesResponse") + fd_QueryAllProcessesResponse_processes = md_QueryAllProcessesResponse.Fields().ByName("processes") + fd_QueryAllProcessesResponse_pagination = md_QueryAllProcessesResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllProcessesResponse)(nil) + +type fastReflection_QueryAllProcessesResponse QueryAllProcessesResponse + +func (x *QueryAllProcessesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllProcessesResponse)(x) +} + +func (x *QueryAllProcessesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllProcessesResponse_messageType fastReflection_QueryAllProcessesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllProcessesResponse_messageType{} + +type fastReflection_QueryAllProcessesResponse_messageType struct{} + +func (x fastReflection_QueryAllProcessesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllProcessesResponse)(nil) +} +func (x fastReflection_QueryAllProcessesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllProcessesResponse) +} +func (x fastReflection_QueryAllProcessesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllProcessesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllProcessesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllProcessesResponse +} + +// 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_QueryAllProcessesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllProcessesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllProcessesResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllProcessesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllProcessesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllProcessesResponse)(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_QueryAllProcessesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Processes) != 0 { + value := protoreflect.ValueOfList(&_QueryAllProcessesResponse_1_list{list: &x.Processes}) + if !f(fd_QueryAllProcessesResponse_processes, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllProcessesResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllProcessesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + return len(x.Processes) != 0 + case "utss.v1.QueryAllProcessesResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse 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_QueryAllProcessesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + x.Processes = nil + case "utss.v1.QueryAllProcessesResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse 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_QueryAllProcessesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + if len(x.Processes) == 0 { + return protoreflect.ValueOfList(&_QueryAllProcessesResponse_1_list{}) + } + listValue := &_QueryAllProcessesResponse_1_list{list: &x.Processes} + return protoreflect.ValueOfList(listValue) + case "utss.v1.QueryAllProcessesResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse 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_QueryAllProcessesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + lv := value.List() + clv := lv.(*_QueryAllProcessesResponse_1_list) + x.Processes = *clv.list + case "utss.v1.QueryAllProcessesResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse 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_QueryAllProcessesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + if x.Processes == nil { + x.Processes = []*TssKeyProcess{} + } + value := &_QueryAllProcessesResponse_1_list{list: &x.Processes} + return protoreflect.ValueOfList(value) + case "utss.v1.QueryAllProcessesResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse 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_QueryAllProcessesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + list := []*TssKeyProcess{} + return protoreflect.ValueOfList(&_QueryAllProcessesResponse_1_list{list: &list}) + case "utss.v1.QueryAllProcessesResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse 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_QueryAllProcessesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllProcessesResponse", 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_QueryAllProcessesResponse) 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_QueryAllProcessesResponse) 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_QueryAllProcessesResponse) 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_QueryAllProcessesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllProcessesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Processes) > 0 { + for _, e := range x.Processes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllProcessesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Processes) > 0 { + for iNdEx := len(x.Processes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Processes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllProcessesResponse) + 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: QueryAllProcessesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllProcessesResponse: 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 Processes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Processes = append(x.Processes, &TssKeyProcess{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Processes[len(x.Processes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCurrentKeyRequest protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryCurrentKeyRequest = File_utss_v1_query_proto.Messages().ByName("QueryCurrentKeyRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryCurrentKeyRequest)(nil) + +type fastReflection_QueryCurrentKeyRequest QueryCurrentKeyRequest + +func (x *QueryCurrentKeyRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCurrentKeyRequest)(x) +} + +func (x *QueryCurrentKeyRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCurrentKeyRequest_messageType fastReflection_QueryCurrentKeyRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryCurrentKeyRequest_messageType{} + +type fastReflection_QueryCurrentKeyRequest_messageType struct{} + +func (x fastReflection_QueryCurrentKeyRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCurrentKeyRequest)(nil) +} +func (x fastReflection_QueryCurrentKeyRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCurrentKeyRequest) +} +func (x fastReflection_QueryCurrentKeyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentKeyRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCurrentKeyRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentKeyRequest +} + +// 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_QueryCurrentKeyRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryCurrentKeyRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCurrentKeyRequest) New() protoreflect.Message { + return new(fastReflection_QueryCurrentKeyRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCurrentKeyRequest) Interface() protoreflect.ProtoMessage { + return (*QueryCurrentKeyRequest)(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_QueryCurrentKeyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCurrentKeyRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest 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_QueryCurrentKeyRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest 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_QueryCurrentKeyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest 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_QueryCurrentKeyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest 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_QueryCurrentKeyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest 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_QueryCurrentKeyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest 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_QueryCurrentKeyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryCurrentKeyRequest", 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_QueryCurrentKeyRequest) 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_QueryCurrentKeyRequest) 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_QueryCurrentKeyRequest) 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_QueryCurrentKeyRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCurrentKeyRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentKeyRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentKeyRequest) + 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: QueryCurrentKeyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCurrentKeyResponse protoreflect.MessageDescriptor + fd_QueryCurrentKeyResponse_key protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryCurrentKeyResponse = File_utss_v1_query_proto.Messages().ByName("QueryCurrentKeyResponse") + fd_QueryCurrentKeyResponse_key = md_QueryCurrentKeyResponse.Fields().ByName("key") +} + +var _ protoreflect.Message = (*fastReflection_QueryCurrentKeyResponse)(nil) + +type fastReflection_QueryCurrentKeyResponse QueryCurrentKeyResponse + +func (x *QueryCurrentKeyResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCurrentKeyResponse)(x) +} + +func (x *QueryCurrentKeyResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCurrentKeyResponse_messageType fastReflection_QueryCurrentKeyResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryCurrentKeyResponse_messageType{} + +type fastReflection_QueryCurrentKeyResponse_messageType struct{} + +func (x fastReflection_QueryCurrentKeyResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCurrentKeyResponse)(nil) +} +func (x fastReflection_QueryCurrentKeyResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCurrentKeyResponse) +} +func (x fastReflection_QueryCurrentKeyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentKeyResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCurrentKeyResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentKeyResponse +} + +// 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_QueryCurrentKeyResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryCurrentKeyResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCurrentKeyResponse) New() protoreflect.Message { + return new(fastReflection_QueryCurrentKeyResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCurrentKeyResponse) Interface() protoreflect.ProtoMessage { + return (*QueryCurrentKeyResponse)(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_QueryCurrentKeyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Key != nil { + value := protoreflect.ValueOfMessage(x.Key.ProtoReflect()) + if !f(fd_QueryCurrentKeyResponse_key, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCurrentKeyResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + return x.Key != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse 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_QueryCurrentKeyResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + x.Key = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse 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_QueryCurrentKeyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + value := x.Key + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse 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_QueryCurrentKeyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + x.Key = value.Message().Interface().(*TssKey) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse 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_QueryCurrentKeyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + if x.Key == nil { + x.Key = new(TssKey) + } + return protoreflect.ValueOfMessage(x.Key.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse 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_QueryCurrentKeyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + m := new(TssKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse 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_QueryCurrentKeyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryCurrentKeyResponse", 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_QueryCurrentKeyResponse) 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_QueryCurrentKeyResponse) 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_QueryCurrentKeyResponse) 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_QueryCurrentKeyResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCurrentKeyResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Key != nil { + l = options.Size(x.Key) + 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().(*QueryCurrentKeyResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Key != nil { + encoded, err := options.Marshal(x.Key) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentKeyResponse) + 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: QueryCurrentKeyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentKeyResponse: 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 Key", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Key == nil { + x.Key = &TssKey{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Key); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryKeyByIdRequest protoreflect.MessageDescriptor + fd_QueryKeyByIdRequest_key_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryKeyByIdRequest = File_utss_v1_query_proto.Messages().ByName("QueryKeyByIdRequest") + fd_QueryKeyByIdRequest_key_id = md_QueryKeyByIdRequest.Fields().ByName("key_id") +} + +var _ protoreflect.Message = (*fastReflection_QueryKeyByIdRequest)(nil) + +type fastReflection_QueryKeyByIdRequest QueryKeyByIdRequest + +func (x *QueryKeyByIdRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryKeyByIdRequest)(x) +} + +func (x *QueryKeyByIdRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryKeyByIdRequest_messageType fastReflection_QueryKeyByIdRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryKeyByIdRequest_messageType{} + +type fastReflection_QueryKeyByIdRequest_messageType struct{} + +func (x fastReflection_QueryKeyByIdRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryKeyByIdRequest)(nil) +} +func (x fastReflection_QueryKeyByIdRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryKeyByIdRequest) +} +func (x fastReflection_QueryKeyByIdRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyByIdRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryKeyByIdRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyByIdRequest +} + +// 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_QueryKeyByIdRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryKeyByIdRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryKeyByIdRequest) New() protoreflect.Message { + return new(fastReflection_QueryKeyByIdRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryKeyByIdRequest) Interface() protoreflect.ProtoMessage { + return (*QueryKeyByIdRequest)(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_QueryKeyByIdRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.KeyId != "" { + value := protoreflect.ValueOfString(x.KeyId) + if !f(fd_QueryKeyByIdRequest_key_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryKeyByIdRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + return x.KeyId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest 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_QueryKeyByIdRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + x.KeyId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest 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_QueryKeyByIdRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + value := x.KeyId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest 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_QueryKeyByIdRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + x.KeyId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest 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_QueryKeyByIdRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + panic(fmt.Errorf("field key_id of message utss.v1.QueryKeyByIdRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest 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_QueryKeyByIdRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest 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_QueryKeyByIdRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryKeyByIdRequest", 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_QueryKeyByIdRequest) 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_QueryKeyByIdRequest) 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_QueryKeyByIdRequest) 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_QueryKeyByIdRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryKeyByIdRequest) + 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.KeyId) + 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().(*QueryKeyByIdRequest) + 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.KeyId) > 0 { + i -= len(x.KeyId) + copy(dAtA[i:], x.KeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyId))) + 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().(*QueryKeyByIdRequest) + 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: QueryKeyByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyByIdRequest: 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 KeyId", 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.KeyId = 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_QueryKeyByIdResponse protoreflect.MessageDescriptor + fd_QueryKeyByIdResponse_key protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryKeyByIdResponse = File_utss_v1_query_proto.Messages().ByName("QueryKeyByIdResponse") + fd_QueryKeyByIdResponse_key = md_QueryKeyByIdResponse.Fields().ByName("key") +} + +var _ protoreflect.Message = (*fastReflection_QueryKeyByIdResponse)(nil) + +type fastReflection_QueryKeyByIdResponse QueryKeyByIdResponse + +func (x *QueryKeyByIdResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryKeyByIdResponse)(x) +} + +func (x *QueryKeyByIdResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryKeyByIdResponse_messageType fastReflection_QueryKeyByIdResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryKeyByIdResponse_messageType{} + +type fastReflection_QueryKeyByIdResponse_messageType struct{} + +func (x fastReflection_QueryKeyByIdResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryKeyByIdResponse)(nil) +} +func (x fastReflection_QueryKeyByIdResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryKeyByIdResponse) +} +func (x fastReflection_QueryKeyByIdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyByIdResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryKeyByIdResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyByIdResponse +} + +// 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_QueryKeyByIdResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryKeyByIdResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryKeyByIdResponse) New() protoreflect.Message { + return new(fastReflection_QueryKeyByIdResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryKeyByIdResponse) Interface() protoreflect.ProtoMessage { + return (*QueryKeyByIdResponse)(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_QueryKeyByIdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Key != nil { + value := protoreflect.ValueOfMessage(x.Key.ProtoReflect()) + if !f(fd_QueryKeyByIdResponse_key, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryKeyByIdResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + return x.Key != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse 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_QueryKeyByIdResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + x.Key = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse 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_QueryKeyByIdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + value := x.Key + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse 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_QueryKeyByIdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + x.Key = value.Message().Interface().(*TssKey) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse 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_QueryKeyByIdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + if x.Key == nil { + x.Key = new(TssKey) + } + return protoreflect.ValueOfMessage(x.Key.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse 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_QueryKeyByIdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + m := new(TssKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse 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_QueryKeyByIdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryKeyByIdResponse", 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_QueryKeyByIdResponse) 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_QueryKeyByIdResponse) 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_QueryKeyByIdResponse) 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_QueryKeyByIdResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryKeyByIdResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Key != nil { + l = options.Size(x.Key) + 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().(*QueryKeyByIdResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Key != nil { + encoded, err := options.Marshal(x.Key) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryKeyByIdResponse) + 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: QueryKeyByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyByIdResponse: 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 Key", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Key == nil { + x.Key = &TssKey{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Key); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAllKeysRequest protoreflect.MessageDescriptor + fd_QueryAllKeysRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllKeysRequest = File_utss_v1_query_proto.Messages().ByName("QueryAllKeysRequest") + fd_QueryAllKeysRequest_pagination = md_QueryAllKeysRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllKeysRequest)(nil) + +type fastReflection_QueryAllKeysRequest QueryAllKeysRequest + +func (x *QueryAllKeysRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllKeysRequest)(x) +} + +func (x *QueryAllKeysRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllKeysRequest_messageType fastReflection_QueryAllKeysRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllKeysRequest_messageType{} + +type fastReflection_QueryAllKeysRequest_messageType struct{} + +func (x fastReflection_QueryAllKeysRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllKeysRequest)(nil) +} +func (x fastReflection_QueryAllKeysRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllKeysRequest) +} +func (x fastReflection_QueryAllKeysRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllKeysRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllKeysRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllKeysRequest +} + +// 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_QueryAllKeysRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllKeysRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllKeysRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllKeysRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllKeysRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllKeysRequest)(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_QueryAllKeysRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllKeysRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllKeysRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest 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_QueryAllKeysRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest 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_QueryAllKeysRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest 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_QueryAllKeysRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest 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_QueryAllKeysRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest 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_QueryAllKeysRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest 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_QueryAllKeysRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllKeysRequest", 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_QueryAllKeysRequest) 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_QueryAllKeysRequest) 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_QueryAllKeysRequest) 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_QueryAllKeysRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllKeysRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllKeysRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllKeysRequest) + 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: QueryAllKeysRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAllKeysResponse_1_list)(nil) + +type _QueryAllKeysResponse_1_list struct { + list *[]*TssKey +} + +func (x *_QueryAllKeysResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllKeysResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAllKeysResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*TssKey) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllKeysResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*TssKey) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllKeysResponse_1_list) AppendMutable() protoreflect.Value { + v := new(TssKey) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllKeysResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllKeysResponse_1_list) NewElement() protoreflect.Value { + v := new(TssKey) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllKeysResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAllKeysResponse protoreflect.MessageDescriptor + fd_QueryAllKeysResponse_keys protoreflect.FieldDescriptor + fd_QueryAllKeysResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllKeysResponse = File_utss_v1_query_proto.Messages().ByName("QueryAllKeysResponse") + fd_QueryAllKeysResponse_keys = md_QueryAllKeysResponse.Fields().ByName("keys") + fd_QueryAllKeysResponse_pagination = md_QueryAllKeysResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllKeysResponse)(nil) + +type fastReflection_QueryAllKeysResponse QueryAllKeysResponse + +func (x *QueryAllKeysResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllKeysResponse)(x) +} + +func (x *QueryAllKeysResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllKeysResponse_messageType fastReflection_QueryAllKeysResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllKeysResponse_messageType{} + +type fastReflection_QueryAllKeysResponse_messageType struct{} + +func (x fastReflection_QueryAllKeysResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllKeysResponse)(nil) +} +func (x fastReflection_QueryAllKeysResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllKeysResponse) +} +func (x fastReflection_QueryAllKeysResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllKeysResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllKeysResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllKeysResponse +} + +// 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_QueryAllKeysResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllKeysResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllKeysResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllKeysResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllKeysResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllKeysResponse)(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_QueryAllKeysResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Keys) != 0 { + value := protoreflect.ValueOfList(&_QueryAllKeysResponse_1_list{list: &x.Keys}) + if !f(fd_QueryAllKeysResponse_keys, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllKeysResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllKeysResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + return len(x.Keys) != 0 + case "utss.v1.QueryAllKeysResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse 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_QueryAllKeysResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + x.Keys = nil + case "utss.v1.QueryAllKeysResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse 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_QueryAllKeysResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + if len(x.Keys) == 0 { + return protoreflect.ValueOfList(&_QueryAllKeysResponse_1_list{}) + } + listValue := &_QueryAllKeysResponse_1_list{list: &x.Keys} + return protoreflect.ValueOfList(listValue) + case "utss.v1.QueryAllKeysResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse 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_QueryAllKeysResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + lv := value.List() + clv := lv.(*_QueryAllKeysResponse_1_list) + x.Keys = *clv.list + case "utss.v1.QueryAllKeysResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse 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_QueryAllKeysResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + if x.Keys == nil { + x.Keys = []*TssKey{} + } + value := &_QueryAllKeysResponse_1_list{list: &x.Keys} + return protoreflect.ValueOfList(value) + case "utss.v1.QueryAllKeysResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse 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_QueryAllKeysResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + list := []*TssKey{} + return protoreflect.ValueOfList(&_QueryAllKeysResponse_1_list{list: &list}) + case "utss.v1.QueryAllKeysResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse 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_QueryAllKeysResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllKeysResponse", 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_QueryAllKeysResponse) 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_QueryAllKeysResponse) 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_QueryAllKeysResponse) 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_QueryAllKeysResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllKeysResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Keys) > 0 { + for _, e := range x.Keys { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllKeysResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Keys) > 0 { + for iNdEx := len(x.Keys) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Keys[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllKeysResponse) + 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: QueryAllKeysResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllKeysResponse: 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 Keys", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Keys = append(x.Keys, &TssKey{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Keys[len(x.Keys)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/v1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Messages +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsRequest) ProtoMessage() {} + +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{0} +} + +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +type QueryCurrentProcessRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryCurrentProcessRequest) Reset() { + *x = QueryCurrentProcessRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCurrentProcessRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCurrentProcessRequest) ProtoMessage() {} + +// Deprecated: Use QueryCurrentProcessRequest.ProtoReflect.Descriptor instead. +func (*QueryCurrentProcessRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{2} +} + +type QueryCurrentProcessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Process *TssKeyProcess `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` +} + +func (x *QueryCurrentProcessResponse) Reset() { + *x = QueryCurrentProcessResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCurrentProcessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCurrentProcessResponse) ProtoMessage() {} + +// Deprecated: Use QueryCurrentProcessResponse.ProtoReflect.Descriptor instead. +func (*QueryCurrentProcessResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryCurrentProcessResponse) GetProcess() *TssKeyProcess { + if x != nil { + return x.Process + } + return nil +} + +type QueryProcessByIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryProcessByIdRequest) Reset() { + *x = QueryProcessByIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryProcessByIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryProcessByIdRequest) ProtoMessage() {} + +// Deprecated: Use QueryProcessByIdRequest.ProtoReflect.Descriptor instead. +func (*QueryProcessByIdRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryProcessByIdRequest) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +type QueryProcessByIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Process *TssKeyProcess `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` +} + +func (x *QueryProcessByIdResponse) Reset() { + *x = QueryProcessByIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryProcessByIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryProcessByIdResponse) ProtoMessage() {} + +// Deprecated: Use QueryProcessByIdResponse.ProtoReflect.Descriptor instead. +func (*QueryProcessByIdResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryProcessByIdResponse) GetProcess() *TssKeyProcess { + if x != nil { + return x.Process + } + return nil +} + +type QueryAllProcessesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllProcessesRequest) Reset() { + *x = QueryAllProcessesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllProcessesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllProcessesRequest) ProtoMessage() {} + +// Deprecated: Use QueryAllProcessesRequest.ProtoReflect.Descriptor instead. +func (*QueryAllProcessesRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryAllProcessesRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryAllProcessesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Processes []*TssKeyProcess `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllProcessesResponse) Reset() { + *x = QueryAllProcessesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllProcessesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllProcessesResponse) ProtoMessage() {} + +// Deprecated: Use QueryAllProcessesResponse.ProtoReflect.Descriptor instead. +func (*QueryAllProcessesResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryAllProcessesResponse) GetProcesses() []*TssKeyProcess { + if x != nil { + return x.Processes + } + return nil +} + +func (x *QueryAllProcessesResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryCurrentKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryCurrentKeyRequest) Reset() { + *x = QueryCurrentKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCurrentKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCurrentKeyRequest) ProtoMessage() {} + +// Deprecated: Use QueryCurrentKeyRequest.ProtoReflect.Descriptor instead. +func (*QueryCurrentKeyRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{8} +} + +type QueryCurrentKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *TssKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *QueryCurrentKeyResponse) Reset() { + *x = QueryCurrentKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCurrentKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCurrentKeyResponse) ProtoMessage() {} + +// Deprecated: Use QueryCurrentKeyResponse.ProtoReflect.Descriptor instead. +func (*QueryCurrentKeyResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryCurrentKeyResponse) GetKey() *TssKey { + if x != nil { + return x.Key + } + return nil +} + +type QueryKeyByIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` +} + +func (x *QueryKeyByIdRequest) Reset() { + *x = QueryKeyByIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryKeyByIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryKeyByIdRequest) ProtoMessage() {} + +// Deprecated: Use QueryKeyByIdRequest.ProtoReflect.Descriptor instead. +func (*QueryKeyByIdRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryKeyByIdRequest) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +type QueryKeyByIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *TssKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *QueryKeyByIdResponse) Reset() { + *x = QueryKeyByIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryKeyByIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryKeyByIdResponse) ProtoMessage() {} + +// Deprecated: Use QueryKeyByIdResponse.ProtoReflect.Descriptor instead. +func (*QueryKeyByIdResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryKeyByIdResponse) GetKey() *TssKey { + if x != nil { + return x.Key + } + return nil +} + +type QueryAllKeysRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllKeysRequest) Reset() { + *x = QueryAllKeysRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllKeysRequest) ProtoMessage() {} + +// Deprecated: Use QueryAllKeysRequest.ProtoReflect.Descriptor instead. +func (*QueryAllKeysRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{12} +} + +func (x *QueryAllKeysRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryAllKeysResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keys []*TssKey `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllKeysResponse) Reset() { + *x = QueryAllKeysResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllKeysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllKeysResponse) ProtoMessage() {} + +// Deprecated: Use QueryAllKeysResponse.ProtoReflect.Descriptor instead. +func (*QueryAllKeysResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryAllKeysResponse) GetKeys() []*TssKey { + if x != nil { + return x.Keys + } + return nil +} + +func (x *QueryAllKeysResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +var File_utss_v1_query_proto protoreflect.FileDescriptor + +var file_utss_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x13, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x27, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x29, 0x0a, 0x17, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x30, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x22, 0x62, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x18, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, + 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x2c, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x14, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x21, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x22, 0x5d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, + 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xfc, 0x05, 0x0a, 0x05, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, + 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x11, 0x12, 0x0f, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x7d, 0x0a, 0x0e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x71, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, + 0x12, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, + 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x6d, 0x0a, 0x0a, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, + 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x2f, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0x65, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x12, + 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, + 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, + 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, + 0x65, 0x79, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x5c, 0x0a, 0x07, 0x41, + 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x75, 0x74, + 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, + 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, + 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, + 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_utss_v1_query_proto_rawDescOnce sync.Once + file_utss_v1_query_proto_rawDescData = file_utss_v1_query_proto_rawDesc +) + +func file_utss_v1_query_proto_rawDescGZIP() []byte { + file_utss_v1_query_proto_rawDescOnce.Do(func() { + file_utss_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_v1_query_proto_rawDescData) + }) + return file_utss_v1_query_proto_rawDescData +} + +var file_utss_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_utss_v1_query_proto_goTypes = []interface{}{ + (*QueryParamsRequest)(nil), // 0: utss.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: utss.v1.QueryParamsResponse + (*QueryCurrentProcessRequest)(nil), // 2: utss.v1.QueryCurrentProcessRequest + (*QueryCurrentProcessResponse)(nil), // 3: utss.v1.QueryCurrentProcessResponse + (*QueryProcessByIdRequest)(nil), // 4: utss.v1.QueryProcessByIdRequest + (*QueryProcessByIdResponse)(nil), // 5: utss.v1.QueryProcessByIdResponse + (*QueryAllProcessesRequest)(nil), // 6: utss.v1.QueryAllProcessesRequest + (*QueryAllProcessesResponse)(nil), // 7: utss.v1.QueryAllProcessesResponse + (*QueryCurrentKeyRequest)(nil), // 8: utss.v1.QueryCurrentKeyRequest + (*QueryCurrentKeyResponse)(nil), // 9: utss.v1.QueryCurrentKeyResponse + (*QueryKeyByIdRequest)(nil), // 10: utss.v1.QueryKeyByIdRequest + (*QueryKeyByIdResponse)(nil), // 11: utss.v1.QueryKeyByIdResponse + (*QueryAllKeysRequest)(nil), // 12: utss.v1.QueryAllKeysRequest + (*QueryAllKeysResponse)(nil), // 13: utss.v1.QueryAllKeysResponse + (*Params)(nil), // 14: utss.v1.Params + (*TssKeyProcess)(nil), // 15: utss.v1.TssKeyProcess + (*v1beta1.PageRequest)(nil), // 16: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 17: cosmos.base.query.v1beta1.PageResponse + (*TssKey)(nil), // 18: utss.v1.TssKey +} +var file_utss_v1_query_proto_depIdxs = []int32{ + 14, // 0: utss.v1.QueryParamsResponse.params:type_name -> utss.v1.Params + 15, // 1: utss.v1.QueryCurrentProcessResponse.process:type_name -> utss.v1.TssKeyProcess + 15, // 2: utss.v1.QueryProcessByIdResponse.process:type_name -> utss.v1.TssKeyProcess + 16, // 3: utss.v1.QueryAllProcessesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 15, // 4: utss.v1.QueryAllProcessesResponse.processes:type_name -> utss.v1.TssKeyProcess + 17, // 5: utss.v1.QueryAllProcessesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 18, // 6: utss.v1.QueryCurrentKeyResponse.key:type_name -> utss.v1.TssKey + 18, // 7: utss.v1.QueryKeyByIdResponse.key:type_name -> utss.v1.TssKey + 16, // 8: utss.v1.QueryAllKeysRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 18, // 9: utss.v1.QueryAllKeysResponse.keys:type_name -> utss.v1.TssKey + 17, // 10: utss.v1.QueryAllKeysResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 11: utss.v1.Query.Params:input_type -> utss.v1.QueryParamsRequest + 2, // 12: utss.v1.Query.CurrentProcess:input_type -> utss.v1.QueryCurrentProcessRequest + 4, // 13: utss.v1.Query.ProcessById:input_type -> utss.v1.QueryProcessByIdRequest + 6, // 14: utss.v1.Query.AllProcesses:input_type -> utss.v1.QueryAllProcessesRequest + 8, // 15: utss.v1.Query.CurrentKey:input_type -> utss.v1.QueryCurrentKeyRequest + 10, // 16: utss.v1.Query.KeyById:input_type -> utss.v1.QueryKeyByIdRequest + 12, // 17: utss.v1.Query.AllKeys:input_type -> utss.v1.QueryAllKeysRequest + 1, // 18: utss.v1.Query.Params:output_type -> utss.v1.QueryParamsResponse + 3, // 19: utss.v1.Query.CurrentProcess:output_type -> utss.v1.QueryCurrentProcessResponse + 5, // 20: utss.v1.Query.ProcessById:output_type -> utss.v1.QueryProcessByIdResponse + 7, // 21: utss.v1.Query.AllProcesses:output_type -> utss.v1.QueryAllProcessesResponse + 9, // 22: utss.v1.Query.CurrentKey:output_type -> utss.v1.QueryCurrentKeyResponse + 11, // 23: utss.v1.Query.KeyById:output_type -> utss.v1.QueryKeyByIdResponse + 13, // 24: utss.v1.Query.AllKeys:output_type -> utss.v1.QueryAllKeysResponse + 18, // [18:25] is the sub-list for method output_type + 11, // [11:18] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_utss_v1_query_proto_init() } +func file_utss_v1_query_proto_init() { + if File_utss_v1_query_proto != nil { + return + } + file_utss_v1_genesis_proto_init() + file_utss_v1_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_utss_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCurrentProcessRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCurrentProcessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryProcessByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryProcessByIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllProcessesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllProcessesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCurrentKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCurrentKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryKeyByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryKeyByIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllKeysRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllKeysResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_utss_v1_query_proto_goTypes, + DependencyIndexes: file_utss_v1_query_proto_depIdxs, + MessageInfos: file_utss_v1_query_proto_msgTypes, + }.Build() + File_utss_v1_query_proto = out.File + file_utss_v1_query_proto_rawDesc = nil + file_utss_v1_query_proto_goTypes = nil + file_utss_v1_query_proto_depIdxs = nil +} diff --git a/api/utss/v1/query_grpc.pb.go b/api/utss/v1/query_grpc.pb.go new file mode 100644 index 00000000..e7f37f35 --- /dev/null +++ b/api/utss/v1/query_grpc.pb.go @@ -0,0 +1,345 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: utss/v1/query.proto + +package utssv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Query_Params_FullMethodName = "/utss.v1.Query/Params" + Query_CurrentProcess_FullMethodName = "/utss.v1.Query/CurrentProcess" + Query_ProcessById_FullMethodName = "/utss.v1.Query/ProcessById" + Query_AllProcesses_FullMethodName = "/utss.v1.Query/AllProcesses" + Query_CurrentKey_FullMethodName = "/utss.v1.Query/CurrentKey" + Query_KeyById_FullMethodName = "/utss.v1.Query/KeyById" + Query_AllKeys_FullMethodName = "/utss.v1.Query/AllKeys" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // Params queries module parameters. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Current TSS Process + CurrentProcess(ctx context.Context, in *QueryCurrentProcessRequest, opts ...grpc.CallOption) (*QueryCurrentProcessResponse, error) + // Process by ID + ProcessById(ctx context.Context, in *QueryProcessByIdRequest, opts ...grpc.CallOption) (*QueryProcessByIdResponse, error) + // List all processes (paginated) + AllProcesses(ctx context.Context, in *QueryAllProcessesRequest, opts ...grpc.CallOption) (*QueryAllProcessesResponse, error) + // Current TSS Key + CurrentKey(ctx context.Context, in *QueryCurrentKeyRequest, opts ...grpc.CallOption) (*QueryCurrentKeyResponse, error) + // Get finalized TSS key by key_id + KeyById(ctx context.Context, in *QueryKeyByIdRequest, opts ...grpc.CallOption) (*QueryKeyByIdResponse, error) + // List all finalized keys (paginated) + AllKeys(ctx context.Context, in *QueryAllKeysRequest, opts ...grpc.CallOption) (*QueryAllKeysResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CurrentProcess(ctx context.Context, in *QueryCurrentProcessRequest, opts ...grpc.CallOption) (*QueryCurrentProcessResponse, error) { + out := new(QueryCurrentProcessResponse) + err := c.cc.Invoke(ctx, Query_CurrentProcess_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProcessById(ctx context.Context, in *QueryProcessByIdRequest, opts ...grpc.CallOption) (*QueryProcessByIdResponse, error) { + out := new(QueryProcessByIdResponse) + err := c.cc.Invoke(ctx, Query_ProcessById_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllProcesses(ctx context.Context, in *QueryAllProcessesRequest, opts ...grpc.CallOption) (*QueryAllProcessesResponse, error) { + out := new(QueryAllProcessesResponse) + err := c.cc.Invoke(ctx, Query_AllProcesses_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CurrentKey(ctx context.Context, in *QueryCurrentKeyRequest, opts ...grpc.CallOption) (*QueryCurrentKeyResponse, error) { + out := new(QueryCurrentKeyResponse) + err := c.cc.Invoke(ctx, Query_CurrentKey_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) KeyById(ctx context.Context, in *QueryKeyByIdRequest, opts ...grpc.CallOption) (*QueryKeyByIdResponse, error) { + out := new(QueryKeyByIdResponse) + err := c.cc.Invoke(ctx, Query_KeyById_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllKeys(ctx context.Context, in *QueryAllKeysRequest, opts ...grpc.CallOption) (*QueryAllKeysResponse, error) { + out := new(QueryAllKeysResponse) + err := c.cc.Invoke(ctx, Query_AllKeys_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // Params queries module parameters. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Current TSS Process + CurrentProcess(context.Context, *QueryCurrentProcessRequest) (*QueryCurrentProcessResponse, error) + // Process by ID + ProcessById(context.Context, *QueryProcessByIdRequest) (*QueryProcessByIdResponse, error) + // List all processes (paginated) + AllProcesses(context.Context, *QueryAllProcessesRequest) (*QueryAllProcessesResponse, error) + // Current TSS Key + CurrentKey(context.Context, *QueryCurrentKeyRequest) (*QueryCurrentKeyResponse, error) + // Get finalized TSS key by key_id + KeyById(context.Context, *QueryKeyByIdRequest) (*QueryKeyByIdResponse, error) + // List all finalized keys (paginated) + AllKeys(context.Context, *QueryAllKeysRequest) (*QueryAllKeysResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) CurrentProcess(context.Context, *QueryCurrentProcessRequest) (*QueryCurrentProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentProcess not implemented") +} +func (UnimplementedQueryServer) ProcessById(context.Context, *QueryProcessByIdRequest) (*QueryProcessByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProcessById not implemented") +} +func (UnimplementedQueryServer) AllProcesses(context.Context, *QueryAllProcessesRequest) (*QueryAllProcessesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllProcesses not implemented") +} +func (UnimplementedQueryServer) CurrentKey(context.Context, *QueryCurrentKeyRequest) (*QueryCurrentKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentKey not implemented") +} +func (UnimplementedQueryServer) KeyById(context.Context, *QueryKeyByIdRequest) (*QueryKeyByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method KeyById not implemented") +} +func (UnimplementedQueryServer) AllKeys(context.Context, *QueryAllKeysRequest) (*QueryAllKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllKeys not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CurrentProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentProcessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CurrentProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_CurrentProcess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentProcess(ctx, req.(*QueryCurrentProcessRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ProcessById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProcessByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProcessById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ProcessById_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProcessById(ctx, req.(*QueryProcessByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllProcesses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllProcessesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllProcesses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllProcesses_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllProcesses(ctx, req.(*QueryAllProcessesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CurrentKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CurrentKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_CurrentKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentKey(ctx, req.(*QueryCurrentKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_KeyById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryKeyByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).KeyById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_KeyById_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).KeyById(ctx, req.(*QueryKeyByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllKeys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllKeys(ctx, req.(*QueryAllKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "utss.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "CurrentProcess", + Handler: _Query_CurrentProcess_Handler, + }, + { + MethodName: "ProcessById", + Handler: _Query_ProcessById_Handler, + }, + { + MethodName: "AllProcesses", + Handler: _Query_AllProcesses_Handler, + }, + { + MethodName: "CurrentKey", + Handler: _Query_CurrentKey_Handler, + }, + { + MethodName: "KeyById", + Handler: _Query_KeyById_Handler, + }, + { + MethodName: "AllKeys", + Handler: _Query_AllKeys_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utss/v1/query.proto", +} diff --git a/api/utss/v1/tx.pulsar.go b/api/utss/v1/tx.pulsar.go new file mode 100644 index 00000000..4bf5abef --- /dev/null +++ b/api/utss/v1/tx.pulsar.go @@ -0,0 +1,3061 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package utssv1 + +import ( + _ "cosmossdk.io/api/amino" + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgUpdateParams = File_utss_v1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) + +type fastReflection_MsgUpdateParams MsgUpdateParams + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) +} + +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} + +type fastReflection_MsgUpdateParams_messageType struct{} + +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) +} +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// 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_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(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_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.authority": + return x.Authority != "" + case "utss.v1.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams 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_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.authority": + x.Authority = "" + case "utss.v1.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams 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_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "utss.v1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams 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_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "utss.v1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams 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_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "utss.v1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message utss.v1.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams 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_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "utss.v1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams 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_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgUpdateParams", 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParams) + 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.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*MsgUpdateParams) + 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: 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 Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgUpdateParamsResponse = File_utss_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) + +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) +} + +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} + +type fastReflection_MsgUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// 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_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(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_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgUpdateParamsResponse", 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgInitiateTssKeyProcess protoreflect.MessageDescriptor + fd_MsgInitiateTssKeyProcess_signer protoreflect.FieldDescriptor + fd_MsgInitiateTssKeyProcess_process_type protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgInitiateTssKeyProcess = File_utss_v1_tx_proto.Messages().ByName("MsgInitiateTssKeyProcess") + fd_MsgInitiateTssKeyProcess_signer = md_MsgInitiateTssKeyProcess.Fields().ByName("signer") + fd_MsgInitiateTssKeyProcess_process_type = md_MsgInitiateTssKeyProcess.Fields().ByName("process_type") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitiateTssKeyProcess)(nil) + +type fastReflection_MsgInitiateTssKeyProcess MsgInitiateTssKeyProcess + +func (x *MsgInitiateTssKeyProcess) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitiateTssKeyProcess)(x) +} + +func (x *MsgInitiateTssKeyProcess) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgInitiateTssKeyProcess_messageType fastReflection_MsgInitiateTssKeyProcess_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitiateTssKeyProcess_messageType{} + +type fastReflection_MsgInitiateTssKeyProcess_messageType struct{} + +func (x fastReflection_MsgInitiateTssKeyProcess_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitiateTssKeyProcess)(nil) +} +func (x fastReflection_MsgInitiateTssKeyProcess_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitiateTssKeyProcess) +} +func (x fastReflection_MsgInitiateTssKeyProcess_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateTssKeyProcess +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitiateTssKeyProcess) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateTssKeyProcess +} + +// 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_MsgInitiateTssKeyProcess) Type() protoreflect.MessageType { + return _fastReflection_MsgInitiateTssKeyProcess_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitiateTssKeyProcess) New() protoreflect.Message { + return new(fastReflection_MsgInitiateTssKeyProcess) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitiateTssKeyProcess) Interface() protoreflect.ProtoMessage { + return (*MsgInitiateTssKeyProcess)(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_MsgInitiateTssKeyProcess) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgInitiateTssKeyProcess_signer, value) { + return + } + } + if x.ProcessType != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.ProcessType)) + if !f(fd_MsgInitiateTssKeyProcess_process_type, 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_MsgInitiateTssKeyProcess) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + return x.Signer != "" + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + return x.ProcessType != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess 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_MsgInitiateTssKeyProcess) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + x.Signer = "" + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + x.ProcessType = 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess 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_MsgInitiateTssKeyProcess) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + value := x.ProcessType + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess 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_MsgInitiateTssKeyProcess) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + x.Signer = value.Interface().(string) + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + x.ProcessType = (TssProcessType)(value.Enum()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess 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_MsgInitiateTssKeyProcess) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + panic(fmt.Errorf("field signer of message utss.v1.MsgInitiateTssKeyProcess is not mutable")) + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + panic(fmt.Errorf("field process_type of message utss.v1.MsgInitiateTssKeyProcess is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess 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_MsgInitiateTssKeyProcess) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + return protoreflect.ValueOfString("") + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + return protoreflect.ValueOfEnum(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess 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_MsgInitiateTssKeyProcess) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgInitiateTssKeyProcess", 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_MsgInitiateTssKeyProcess) 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_MsgInitiateTssKeyProcess) 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_MsgInitiateTssKeyProcess) 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_MsgInitiateTssKeyProcess) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitiateTssKeyProcess) + 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.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProcessType != 0 { + n += 1 + runtime.Sov(uint64(x.ProcessType)) + } + 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().(*MsgInitiateTssKeyProcess) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ProcessType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessType)) + i-- + dAtA[i] = 0x10 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + 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().(*MsgInitiateTssKeyProcess) + 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: MsgInitiateTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitiateTssKeyProcess: 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 Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + } + x.ProcessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ProcessType |= TssProcessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgInitiateTssKeyProcessResponse protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgInitiateTssKeyProcessResponse = File_utss_v1_tx_proto.Messages().ByName("MsgInitiateTssKeyProcessResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitiateTssKeyProcessResponse)(nil) + +type fastReflection_MsgInitiateTssKeyProcessResponse MsgInitiateTssKeyProcessResponse + +func (x *MsgInitiateTssKeyProcessResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitiateTssKeyProcessResponse)(x) +} + +func (x *MsgInitiateTssKeyProcessResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgInitiateTssKeyProcessResponse_messageType fastReflection_MsgInitiateTssKeyProcessResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitiateTssKeyProcessResponse_messageType{} + +type fastReflection_MsgInitiateTssKeyProcessResponse_messageType struct{} + +func (x fastReflection_MsgInitiateTssKeyProcessResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitiateTssKeyProcessResponse)(nil) +} +func (x fastReflection_MsgInitiateTssKeyProcessResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitiateTssKeyProcessResponse) +} +func (x fastReflection_MsgInitiateTssKeyProcessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateTssKeyProcessResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateTssKeyProcessResponse +} + +// 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_MsgInitiateTssKeyProcessResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitiateTssKeyProcessResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitiateTssKeyProcessResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitiateTssKeyProcessResponse)(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_MsgInitiateTssKeyProcessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse 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_MsgInitiateTssKeyProcessResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse 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_MsgInitiateTssKeyProcessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse 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_MsgInitiateTssKeyProcessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse 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_MsgInitiateTssKeyProcessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse 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_MsgInitiateTssKeyProcessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse 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_MsgInitiateTssKeyProcessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgInitiateTssKeyProcessResponse", 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_MsgInitiateTssKeyProcessResponse) 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_MsgInitiateTssKeyProcessResponse) 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_MsgInitiateTssKeyProcessResponse) 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_MsgInitiateTssKeyProcessResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitiateTssKeyProcessResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitiateTssKeyProcessResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitiateTssKeyProcessResponse) + 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: MsgInitiateTssKeyProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitiateTssKeyProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgVoteTssKeyProcess protoreflect.MessageDescriptor + fd_MsgVoteTssKeyProcess_signer protoreflect.FieldDescriptor + fd_MsgVoteTssKeyProcess_tss_pubkey protoreflect.FieldDescriptor + fd_MsgVoteTssKeyProcess_key_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgVoteTssKeyProcess = File_utss_v1_tx_proto.Messages().ByName("MsgVoteTssKeyProcess") + fd_MsgVoteTssKeyProcess_signer = md_MsgVoteTssKeyProcess.Fields().ByName("signer") + fd_MsgVoteTssKeyProcess_tss_pubkey = md_MsgVoteTssKeyProcess.Fields().ByName("tss_pubkey") + fd_MsgVoteTssKeyProcess_key_id = md_MsgVoteTssKeyProcess.Fields().ByName("key_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteTssKeyProcess)(nil) + +type fastReflection_MsgVoteTssKeyProcess MsgVoteTssKeyProcess + +func (x *MsgVoteTssKeyProcess) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcess)(x) +} + +func (x *MsgVoteTssKeyProcess) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgVoteTssKeyProcess_messageType fastReflection_MsgVoteTssKeyProcess_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteTssKeyProcess_messageType{} + +type fastReflection_MsgVoteTssKeyProcess_messageType struct{} + +func (x fastReflection_MsgVoteTssKeyProcess_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcess)(nil) +} +func (x fastReflection_MsgVoteTssKeyProcess_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcess) +} +func (x fastReflection_MsgVoteTssKeyProcess_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcess +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteTssKeyProcess) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcess +} + +// 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_MsgVoteTssKeyProcess) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteTssKeyProcess_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteTssKeyProcess) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcess) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteTssKeyProcess) Interface() protoreflect.ProtoMessage { + return (*MsgVoteTssKeyProcess)(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_MsgVoteTssKeyProcess) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgVoteTssKeyProcess_signer, value) { + return + } + } + if x.TssPubkey != "" { + value := protoreflect.ValueOfString(x.TssPubkey) + if !f(fd_MsgVoteTssKeyProcess_tss_pubkey, value) { + return + } + } + if x.KeyId != "" { + value := protoreflect.ValueOfString(x.KeyId) + if !f(fd_MsgVoteTssKeyProcess_key_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgVoteTssKeyProcess) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + return x.Signer != "" + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + return x.TssPubkey != "" + case "utss.v1.MsgVoteTssKeyProcess.key_id": + return x.KeyId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess 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_MsgVoteTssKeyProcess) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + x.Signer = "" + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + x.TssPubkey = "" + case "utss.v1.MsgVoteTssKeyProcess.key_id": + x.KeyId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess 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_MsgVoteTssKeyProcess) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + value := x.TssPubkey + return protoreflect.ValueOfString(value) + case "utss.v1.MsgVoteTssKeyProcess.key_id": + value := x.KeyId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess 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_MsgVoteTssKeyProcess) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + x.Signer = value.Interface().(string) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + x.TssPubkey = value.Interface().(string) + case "utss.v1.MsgVoteTssKeyProcess.key_id": + x.KeyId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess 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_MsgVoteTssKeyProcess) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + panic(fmt.Errorf("field signer of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + panic(fmt.Errorf("field tss_pubkey of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + case "utss.v1.MsgVoteTssKeyProcess.key_id": + panic(fmt.Errorf("field key_id of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess 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_MsgVoteTssKeyProcess) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + return protoreflect.ValueOfString("") + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + return protoreflect.ValueOfString("") + case "utss.v1.MsgVoteTssKeyProcess.key_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess 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_MsgVoteTssKeyProcess) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgVoteTssKeyProcess", 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_MsgVoteTssKeyProcess) 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_MsgVoteTssKeyProcess) 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_MsgVoteTssKeyProcess) 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_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteTssKeyProcess) + 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.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.TssPubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.KeyId) + 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().(*MsgVoteTssKeyProcess) + 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.KeyId) > 0 { + i -= len(x.KeyId) + copy(dAtA[i:], x.KeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyId))) + i-- + dAtA[i] = 0x1a + } + if len(x.TssPubkey) > 0 { + i -= len(x.TssPubkey) + copy(dAtA[i:], x.TssPubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TssPubkey))) + i-- + dAtA[i] = 0x12 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + 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().(*MsgVoteTssKeyProcess) + 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: MsgVoteTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcess: 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 Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", 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.TssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyId", 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.KeyId = 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_MsgVoteTssKeyProcessResponse protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgVoteTssKeyProcessResponse = File_utss_v1_tx_proto.Messages().ByName("MsgVoteTssKeyProcessResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteTssKeyProcessResponse)(nil) + +type fastReflection_MsgVoteTssKeyProcessResponse MsgVoteTssKeyProcessResponse + +func (x *MsgVoteTssKeyProcessResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcessResponse)(x) +} + +func (x *MsgVoteTssKeyProcessResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgVoteTssKeyProcessResponse_messageType fastReflection_MsgVoteTssKeyProcessResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteTssKeyProcessResponse_messageType{} + +type fastReflection_MsgVoteTssKeyProcessResponse_messageType struct{} + +func (x fastReflection_MsgVoteTssKeyProcessResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcessResponse)(nil) +} +func (x fastReflection_MsgVoteTssKeyProcessResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcessResponse) +} +func (x fastReflection_MsgVoteTssKeyProcessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcessResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcessResponse +} + +// 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_MsgVoteTssKeyProcessResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteTssKeyProcessResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcessResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Interface() protoreflect.ProtoMessage { + return (*MsgVoteTssKeyProcessResponse)(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_MsgVoteTssKeyProcessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse 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_MsgVoteTssKeyProcessResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse 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_MsgVoteTssKeyProcessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse 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_MsgVoteTssKeyProcessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse 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_MsgVoteTssKeyProcessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse 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_MsgVoteTssKeyProcessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse 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_MsgVoteTssKeyProcessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgVoteTssKeyProcessResponse", 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_MsgVoteTssKeyProcessResponse) 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_MsgVoteTssKeyProcessResponse) 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_MsgVoteTssKeyProcessResponse) 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_MsgVoteTssKeyProcessResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteTssKeyProcessResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteTssKeyProcessResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteTssKeyProcessResponse) + 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: MsgVoteTssKeyProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/v1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the parameters to update. + // + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{1} +} + +// Admin initiates new keygen/reshare process +type MsgInitiateTssKeyProcess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + ProcessType TssProcessType `protobuf:"varint,2,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` +} + +func (x *MsgInitiateTssKeyProcess) Reset() { + *x = MsgInitiateTssKeyProcess{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitiateTssKeyProcess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitiateTssKeyProcess) ProtoMessage() {} + +// Deprecated: Use MsgInitiateTssKeyProcess.ProtoReflect.Descriptor instead. +func (*MsgInitiateTssKeyProcess) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgInitiateTssKeyProcess) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgInitiateTssKeyProcess) GetProcessType() TssProcessType { + if x != nil { + return x.ProcessType + } + return TssProcessType_TSS_PROCESS_KEYGEN +} + +type MsgInitiateTssKeyProcessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgInitiateTssKeyProcessResponse) Reset() { + *x = MsgInitiateTssKeyProcessResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitiateTssKeyProcessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitiateTssKeyProcessResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitiateTssKeyProcessResponse.ProtoReflect.Descriptor instead. +func (*MsgInitiateTssKeyProcessResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{3} +} + +// Universal validator votes on an ongoing TSS key process +type MsgVoteTssKeyProcess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + TssPubkey string `protobuf:"bytes,2,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` +} + +func (x *MsgVoteTssKeyProcess) Reset() { + *x = MsgVoteTssKeyProcess{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteTssKeyProcess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteTssKeyProcess) ProtoMessage() {} + +// Deprecated: Use MsgVoteTssKeyProcess.ProtoReflect.Descriptor instead. +func (*MsgVoteTssKeyProcess) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgVoteTssKeyProcess) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgVoteTssKeyProcess) GetTssPubkey() string { + if x != nil { + return x.TssPubkey + } + return "" +} + +func (x *MsgVoteTssKeyProcess) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +type MsgVoteTssKeyProcessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgVoteTssKeyProcessResponse) Reset() { + *x = MsgVoteTssKeyProcessResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteTssKeyProcessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteTssKeyProcessResponse) ProtoMessage() {} + +// Deprecated: Use MsgVoteTssKeyProcessResponse.ProtoReflect.Descriptor instead. +func (*MsgVoteTssKeyProcessResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{5} +} + +var File_utss_v1_tx_proto protoreflect.FileDescriptor + +var file_utss_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x75, 0x74, 0x73, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, + 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, + 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x18, 0x4d, + 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0c, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x56, + 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x14, 0x4d, 0x73, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x73, 0x50, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x74, 0x73, 0x73, + 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, + 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9a, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, + 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x2e, + 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x15, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, + 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x59, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, + 0x2a, 0x01, 0x42, 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, + 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_utss_v1_tx_proto_rawDescOnce sync.Once + file_utss_v1_tx_proto_rawDescData = file_utss_v1_tx_proto_rawDesc +) + +func file_utss_v1_tx_proto_rawDescGZIP() []byte { + file_utss_v1_tx_proto_rawDescOnce.Do(func() { + file_utss_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_v1_tx_proto_rawDescData) + }) + return file_utss_v1_tx_proto_rawDescData +} + +var file_utss_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_utss_v1_tx_proto_goTypes = []interface{}{ + (*MsgUpdateParams)(nil), // 0: utss.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: utss.v1.MsgUpdateParamsResponse + (*MsgInitiateTssKeyProcess)(nil), // 2: utss.v1.MsgInitiateTssKeyProcess + (*MsgInitiateTssKeyProcessResponse)(nil), // 3: utss.v1.MsgInitiateTssKeyProcessResponse + (*MsgVoteTssKeyProcess)(nil), // 4: utss.v1.MsgVoteTssKeyProcess + (*MsgVoteTssKeyProcessResponse)(nil), // 5: utss.v1.MsgVoteTssKeyProcessResponse + (*Params)(nil), // 6: utss.v1.Params + (TssProcessType)(0), // 7: utss.v1.TssProcessType +} +var file_utss_v1_tx_proto_depIdxs = []int32{ + 6, // 0: utss.v1.MsgUpdateParams.params:type_name -> utss.v1.Params + 7, // 1: utss.v1.MsgInitiateTssKeyProcess.process_type:type_name -> utss.v1.TssProcessType + 0, // 2: utss.v1.Msg.UpdateParams:input_type -> utss.v1.MsgUpdateParams + 2, // 3: utss.v1.Msg.InitiateTssKeyProcess:input_type -> utss.v1.MsgInitiateTssKeyProcess + 4, // 4: utss.v1.Msg.VoteTssKeyProcess:input_type -> utss.v1.MsgVoteTssKeyProcess + 1, // 5: utss.v1.Msg.UpdateParams:output_type -> utss.v1.MsgUpdateParamsResponse + 3, // 6: utss.v1.Msg.InitiateTssKeyProcess:output_type -> utss.v1.MsgInitiateTssKeyProcessResponse + 5, // 7: utss.v1.Msg.VoteTssKeyProcess:output_type -> utss.v1.MsgVoteTssKeyProcessResponse + 5, // [5:8] is the sub-list for method output_type + 2, // [2:5] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_utss_v1_tx_proto_init() } +func file_utss_v1_tx_proto_init() { + if File_utss_v1_tx_proto != nil { + return + } + file_utss_v1_genesis_proto_init() + file_utss_v1_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_utss_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitiateTssKeyProcess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitiateTssKeyProcessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteTssKeyProcess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteTssKeyProcessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_utss_v1_tx_proto_goTypes, + DependencyIndexes: file_utss_v1_tx_proto_depIdxs, + MessageInfos: file_utss_v1_tx_proto_msgTypes, + }.Build() + File_utss_v1_tx_proto = out.File + file_utss_v1_tx_proto_rawDesc = nil + file_utss_v1_tx_proto_goTypes = nil + file_utss_v1_tx_proto_depIdxs = nil +} diff --git a/api/utss/v1/tx_grpc.pb.go b/api/utss/v1/tx_grpc.pb.go new file mode 100644 index 00000000..eb692345 --- /dev/null +++ b/api/utss/v1/tx_grpc.pb.go @@ -0,0 +1,193 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: utss/v1/tx.proto + +package utssv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_UpdateParams_FullMethodName = "/utss.v1.Msg/UpdateParams" + Msg_InitiateTssKeyProcess_FullMethodName = "/utss.v1.Msg/InitiateTssKeyProcess" + Msg_VoteTssKeyProcess_FullMethodName = "/utss.v1.Msg/VoteTssKeyProcess" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) { + out := new(MsgInitiateTssKeyProcessResponse) + err := c.cc.Invoke(ctx, Msg_InitiateTssKeyProcess_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) { + out := new(MsgVoteTssKeyProcessResponse) + err := c.cc.Invoke(ctx, Msg_VoteTssKeyProcess_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +type MsgServer interface { + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + InitiateTssKeyProcess(context.Context, *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + VoteTssKeyProcess(context.Context, *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) InitiateTssKeyProcess(context.Context, *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitiateTssKeyProcess not implemented") +} +func (UnimplementedMsgServer) VoteTssKeyProcess(context.Context, *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteTssKeyProcess not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_InitiateTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInitiateTssKeyProcess) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InitiateTssKeyProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_InitiateTssKeyProcess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InitiateTssKeyProcess(ctx, req.(*MsgInitiateTssKeyProcess)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_VoteTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteTssKeyProcess) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteTssKeyProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_VoteTssKeyProcess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteTssKeyProcess(ctx, req.(*MsgVoteTssKeyProcess)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "utss.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "InitiateTssKeyProcess", + Handler: _Msg_InitiateTssKeyProcess_Handler, + }, + { + MethodName: "VoteTssKeyProcess", + Handler: _Msg_VoteTssKeyProcess_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utss/v1/tx.proto", +} diff --git a/api/utss/v1/types.pulsar.go b/api/utss/v1/types.pulsar.go new file mode 100644 index 00000000..7925e893 --- /dev/null +++ b/api/utss/v1/types.pulsar.go @@ -0,0 +1,2372 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package utssv1 + +import ( + _ "cosmossdk.io/api/amino" + _ "cosmossdk.io/api/cosmos/base/v1beta1" + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_admin protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_types_proto_init() + md_Params = File_utss_v1_types_proto.Messages().ByName("Params") + fd_Params_admin = md_Params.Fields().ByName("admin") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// 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_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(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_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Admin != "" { + value := protoreflect.ValueOfString(x.Admin) + if !f(fd_Params_admin, 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_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.Params.admin": + return x.Admin != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params 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_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.Params.admin": + x.Admin = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params 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_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.Params.admin": + value := x.Admin + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params 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_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.Params.admin": + x.Admin = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params 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_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.Params.admin": + panic(fmt.Errorf("field admin of message utss.v1.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params 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_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.Params.admin": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params 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_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.Params", 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_Params) 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_Params) 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_Params) 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_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + 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.Admin) + 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().(*Params) + 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.Admin) > 0 { + i -= len(x.Admin) + copy(dAtA[i:], x.Admin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) + 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().(*Params) + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_TssKeyProcess_2_list)(nil) + +type _TssKeyProcess_2_list struct { + list *[]string +} + +func (x *_TssKeyProcess_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_TssKeyProcess_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_TssKeyProcess_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_TssKeyProcess_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_TssKeyProcess_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message TssKeyProcess at list field Participants as it is not of Message kind")) +} + +func (x *_TssKeyProcess_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_TssKeyProcess_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_TssKeyProcess_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_TssKeyProcess protoreflect.MessageDescriptor + fd_TssKeyProcess_status protoreflect.FieldDescriptor + fd_TssKeyProcess_participants protoreflect.FieldDescriptor + fd_TssKeyProcess_block_height protoreflect.FieldDescriptor + fd_TssKeyProcess_expiry_height protoreflect.FieldDescriptor + fd_TssKeyProcess_process_type protoreflect.FieldDescriptor + fd_TssKeyProcess_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_types_proto_init() + md_TssKeyProcess = File_utss_v1_types_proto.Messages().ByName("TssKeyProcess") + fd_TssKeyProcess_status = md_TssKeyProcess.Fields().ByName("status") + fd_TssKeyProcess_participants = md_TssKeyProcess.Fields().ByName("participants") + fd_TssKeyProcess_block_height = md_TssKeyProcess.Fields().ByName("block_height") + fd_TssKeyProcess_expiry_height = md_TssKeyProcess.Fields().ByName("expiry_height") + fd_TssKeyProcess_process_type = md_TssKeyProcess.Fields().ByName("process_type") + fd_TssKeyProcess_id = md_TssKeyProcess.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_TssKeyProcess)(nil) + +type fastReflection_TssKeyProcess TssKeyProcess + +func (x *TssKeyProcess) ProtoReflect() protoreflect.Message { + return (*fastReflection_TssKeyProcess)(x) +} + +func (x *TssKeyProcess) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_TssKeyProcess_messageType fastReflection_TssKeyProcess_messageType +var _ protoreflect.MessageType = fastReflection_TssKeyProcess_messageType{} + +type fastReflection_TssKeyProcess_messageType struct{} + +func (x fastReflection_TssKeyProcess_messageType) Zero() protoreflect.Message { + return (*fastReflection_TssKeyProcess)(nil) +} +func (x fastReflection_TssKeyProcess_messageType) New() protoreflect.Message { + return new(fastReflection_TssKeyProcess) +} +func (x fastReflection_TssKeyProcess_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TssKeyProcess +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TssKeyProcess) Descriptor() protoreflect.MessageDescriptor { + return md_TssKeyProcess +} + +// 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_TssKeyProcess) Type() protoreflect.MessageType { + return _fastReflection_TssKeyProcess_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TssKeyProcess) New() protoreflect.Message { + return new(fastReflection_TssKeyProcess) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TssKeyProcess) Interface() protoreflect.ProtoMessage { + return (*TssKeyProcess)(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_TssKeyProcess) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Status != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) + if !f(fd_TssKeyProcess_status, value) { + return + } + } + if len(x.Participants) != 0 { + value := protoreflect.ValueOfList(&_TssKeyProcess_2_list{list: &x.Participants}) + if !f(fd_TssKeyProcess_participants, value) { + return + } + } + if x.BlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.BlockHeight) + if !f(fd_TssKeyProcess_block_height, value) { + return + } + } + if x.ExpiryHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.ExpiryHeight) + if !f(fd_TssKeyProcess_expiry_height, value) { + return + } + } + if x.ProcessType != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.ProcessType)) + if !f(fd_TssKeyProcess_process_type, value) { + return + } + } + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_TssKeyProcess_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_TssKeyProcess) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.status": + return x.Status != 0 + case "utss.v1.TssKeyProcess.participants": + return len(x.Participants) != 0 + case "utss.v1.TssKeyProcess.block_height": + return x.BlockHeight != int64(0) + case "utss.v1.TssKeyProcess.expiry_height": + return x.ExpiryHeight != int64(0) + case "utss.v1.TssKeyProcess.process_type": + return x.ProcessType != 0 + case "utss.v1.TssKeyProcess.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess 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_TssKeyProcess) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.status": + x.Status = 0 + case "utss.v1.TssKeyProcess.participants": + x.Participants = nil + case "utss.v1.TssKeyProcess.block_height": + x.BlockHeight = int64(0) + case "utss.v1.TssKeyProcess.expiry_height": + x.ExpiryHeight = int64(0) + case "utss.v1.TssKeyProcess.process_type": + x.ProcessType = 0 + case "utss.v1.TssKeyProcess.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess 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_TssKeyProcess) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.TssKeyProcess.status": + value := x.Status + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "utss.v1.TssKeyProcess.participants": + if len(x.Participants) == 0 { + return protoreflect.ValueOfList(&_TssKeyProcess_2_list{}) + } + listValue := &_TssKeyProcess_2_list{list: &x.Participants} + return protoreflect.ValueOfList(listValue) + case "utss.v1.TssKeyProcess.block_height": + value := x.BlockHeight + return protoreflect.ValueOfInt64(value) + case "utss.v1.TssKeyProcess.expiry_height": + value := x.ExpiryHeight + return protoreflect.ValueOfInt64(value) + case "utss.v1.TssKeyProcess.process_type": + value := x.ProcessType + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "utss.v1.TssKeyProcess.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess 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_TssKeyProcess) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.status": + x.Status = (TssKeyProcessStatus)(value.Enum()) + case "utss.v1.TssKeyProcess.participants": + lv := value.List() + clv := lv.(*_TssKeyProcess_2_list) + x.Participants = *clv.list + case "utss.v1.TssKeyProcess.block_height": + x.BlockHeight = value.Int() + case "utss.v1.TssKeyProcess.expiry_height": + x.ExpiryHeight = value.Int() + case "utss.v1.TssKeyProcess.process_type": + x.ProcessType = (TssProcessType)(value.Enum()) + case "utss.v1.TssKeyProcess.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess 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_TssKeyProcess) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.participants": + if x.Participants == nil { + x.Participants = []string{} + } + value := &_TssKeyProcess_2_list{list: &x.Participants} + return protoreflect.ValueOfList(value) + case "utss.v1.TssKeyProcess.status": + panic(fmt.Errorf("field status of message utss.v1.TssKeyProcess is not mutable")) + case "utss.v1.TssKeyProcess.block_height": + panic(fmt.Errorf("field block_height of message utss.v1.TssKeyProcess is not mutable")) + case "utss.v1.TssKeyProcess.expiry_height": + panic(fmt.Errorf("field expiry_height of message utss.v1.TssKeyProcess is not mutable")) + case "utss.v1.TssKeyProcess.process_type": + panic(fmt.Errorf("field process_type of message utss.v1.TssKeyProcess is not mutable")) + case "utss.v1.TssKeyProcess.id": + panic(fmt.Errorf("field id of message utss.v1.TssKeyProcess is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess 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_TssKeyProcess) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.status": + return protoreflect.ValueOfEnum(0) + case "utss.v1.TssKeyProcess.participants": + list := []string{} + return protoreflect.ValueOfList(&_TssKeyProcess_2_list{list: &list}) + case "utss.v1.TssKeyProcess.block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.TssKeyProcess.expiry_height": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.TssKeyProcess.process_type": + return protoreflect.ValueOfEnum(0) + case "utss.v1.TssKeyProcess.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess 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_TssKeyProcess) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.TssKeyProcess", 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_TssKeyProcess) 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_TssKeyProcess) 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_TssKeyProcess) 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_TssKeyProcess) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TssKeyProcess) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Status != 0 { + n += 1 + runtime.Sov(uint64(x.Status)) + } + if len(x.Participants) > 0 { + for _, s := range x.Participants { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) + } + if x.ExpiryHeight != 0 { + n += 1 + runtime.Sov(uint64(x.ExpiryHeight)) + } + if x.ProcessType != 0 { + n += 1 + runtime.Sov(uint64(x.ProcessType)) + } + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*TssKeyProcess) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x30 + } + if x.ProcessType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessType)) + i-- + dAtA[i] = 0x28 + } + if x.ExpiryHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryHeight)) + i-- + dAtA[i] = 0x20 + } + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) + i-- + dAtA[i] = 0x18 + } + if len(x.Participants) > 0 { + for iNdEx := len(x.Participants) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Participants[iNdEx]) + copy(dAtA[i:], x.Participants[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Participants[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if x.Status != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*TssKeyProcess) + 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: TssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + x.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Status |= TssKeyProcessStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Participants", 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.Participants = append(x.Participants, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + x.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) + } + x.ExpiryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ExpiryHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + } + x.ProcessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ProcessType |= TssProcessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_TssKey_3_list)(nil) + +type _TssKey_3_list struct { + list *[]string +} + +func (x *_TssKey_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_TssKey_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_TssKey_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_TssKey_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_TssKey_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message TssKey at list field Participants as it is not of Message kind")) +} + +func (x *_TssKey_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_TssKey_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_TssKey_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_TssKey protoreflect.MessageDescriptor + fd_TssKey_tss_pubkey protoreflect.FieldDescriptor + fd_TssKey_key_id protoreflect.FieldDescriptor + fd_TssKey_participants protoreflect.FieldDescriptor + fd_TssKey_finalized_block_height protoreflect.FieldDescriptor + fd_TssKey_keygen_block_height protoreflect.FieldDescriptor + fd_TssKey_process_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_types_proto_init() + md_TssKey = File_utss_v1_types_proto.Messages().ByName("TssKey") + fd_TssKey_tss_pubkey = md_TssKey.Fields().ByName("tss_pubkey") + fd_TssKey_key_id = md_TssKey.Fields().ByName("key_id") + fd_TssKey_participants = md_TssKey.Fields().ByName("participants") + fd_TssKey_finalized_block_height = md_TssKey.Fields().ByName("finalized_block_height") + fd_TssKey_keygen_block_height = md_TssKey.Fields().ByName("keygen_block_height") + fd_TssKey_process_id = md_TssKey.Fields().ByName("process_id") +} + +var _ protoreflect.Message = (*fastReflection_TssKey)(nil) + +type fastReflection_TssKey TssKey + +func (x *TssKey) ProtoReflect() protoreflect.Message { + return (*fastReflection_TssKey)(x) +} + +func (x *TssKey) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_TssKey_messageType fastReflection_TssKey_messageType +var _ protoreflect.MessageType = fastReflection_TssKey_messageType{} + +type fastReflection_TssKey_messageType struct{} + +func (x fastReflection_TssKey_messageType) Zero() protoreflect.Message { + return (*fastReflection_TssKey)(nil) +} +func (x fastReflection_TssKey_messageType) New() protoreflect.Message { + return new(fastReflection_TssKey) +} +func (x fastReflection_TssKey_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TssKey +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TssKey) Descriptor() protoreflect.MessageDescriptor { + return md_TssKey +} + +// 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_TssKey) Type() protoreflect.MessageType { + return _fastReflection_TssKey_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TssKey) New() protoreflect.Message { + return new(fastReflection_TssKey) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TssKey) Interface() protoreflect.ProtoMessage { + return (*TssKey)(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_TssKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TssPubkey != "" { + value := protoreflect.ValueOfString(x.TssPubkey) + if !f(fd_TssKey_tss_pubkey, value) { + return + } + } + if x.KeyId != "" { + value := protoreflect.ValueOfString(x.KeyId) + if !f(fd_TssKey_key_id, value) { + return + } + } + if len(x.Participants) != 0 { + value := protoreflect.ValueOfList(&_TssKey_3_list{list: &x.Participants}) + if !f(fd_TssKey_participants, value) { + return + } + } + if x.FinalizedBlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.FinalizedBlockHeight) + if !f(fd_TssKey_finalized_block_height, value) { + return + } + } + if x.KeygenBlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.KeygenBlockHeight) + if !f(fd_TssKey_keygen_block_height, value) { + return + } + } + if x.ProcessId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProcessId) + if !f(fd_TssKey_process_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_TssKey) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.TssKey.tss_pubkey": + return x.TssPubkey != "" + case "utss.v1.TssKey.key_id": + return x.KeyId != "" + case "utss.v1.TssKey.participants": + return len(x.Participants) != 0 + case "utss.v1.TssKey.finalized_block_height": + return x.FinalizedBlockHeight != int64(0) + case "utss.v1.TssKey.keygen_block_height": + return x.KeygenBlockHeight != int64(0) + case "utss.v1.TssKey.process_id": + return x.ProcessId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey 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_TssKey) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.TssKey.tss_pubkey": + x.TssPubkey = "" + case "utss.v1.TssKey.key_id": + x.KeyId = "" + case "utss.v1.TssKey.participants": + x.Participants = nil + case "utss.v1.TssKey.finalized_block_height": + x.FinalizedBlockHeight = int64(0) + case "utss.v1.TssKey.keygen_block_height": + x.KeygenBlockHeight = int64(0) + case "utss.v1.TssKey.process_id": + x.ProcessId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey 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_TssKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.TssKey.tss_pubkey": + value := x.TssPubkey + return protoreflect.ValueOfString(value) + case "utss.v1.TssKey.key_id": + value := x.KeyId + return protoreflect.ValueOfString(value) + case "utss.v1.TssKey.participants": + if len(x.Participants) == 0 { + return protoreflect.ValueOfList(&_TssKey_3_list{}) + } + listValue := &_TssKey_3_list{list: &x.Participants} + return protoreflect.ValueOfList(listValue) + case "utss.v1.TssKey.finalized_block_height": + value := x.FinalizedBlockHeight + return protoreflect.ValueOfInt64(value) + case "utss.v1.TssKey.keygen_block_height": + value := x.KeygenBlockHeight + return protoreflect.ValueOfInt64(value) + case "utss.v1.TssKey.process_id": + value := x.ProcessId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey 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_TssKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.TssKey.tss_pubkey": + x.TssPubkey = value.Interface().(string) + case "utss.v1.TssKey.key_id": + x.KeyId = value.Interface().(string) + case "utss.v1.TssKey.participants": + lv := value.List() + clv := lv.(*_TssKey_3_list) + x.Participants = *clv.list + case "utss.v1.TssKey.finalized_block_height": + x.FinalizedBlockHeight = value.Int() + case "utss.v1.TssKey.keygen_block_height": + x.KeygenBlockHeight = value.Int() + case "utss.v1.TssKey.process_id": + x.ProcessId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey 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_TssKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.TssKey.participants": + if x.Participants == nil { + x.Participants = []string{} + } + value := &_TssKey_3_list{list: &x.Participants} + return protoreflect.ValueOfList(value) + case "utss.v1.TssKey.tss_pubkey": + panic(fmt.Errorf("field tss_pubkey of message utss.v1.TssKey is not mutable")) + case "utss.v1.TssKey.key_id": + panic(fmt.Errorf("field key_id of message utss.v1.TssKey is not mutable")) + case "utss.v1.TssKey.finalized_block_height": + panic(fmt.Errorf("field finalized_block_height of message utss.v1.TssKey is not mutable")) + case "utss.v1.TssKey.keygen_block_height": + panic(fmt.Errorf("field keygen_block_height of message utss.v1.TssKey is not mutable")) + case "utss.v1.TssKey.process_id": + panic(fmt.Errorf("field process_id of message utss.v1.TssKey is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey 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_TssKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.TssKey.tss_pubkey": + return protoreflect.ValueOfString("") + case "utss.v1.TssKey.key_id": + return protoreflect.ValueOfString("") + case "utss.v1.TssKey.participants": + list := []string{} + return protoreflect.ValueOfList(&_TssKey_3_list{list: &list}) + case "utss.v1.TssKey.finalized_block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.TssKey.keygen_block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.TssKey.process_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey 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_TssKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.TssKey", 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_TssKey) 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_TssKey) 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_TssKey) 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_TssKey) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TssKey) + 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.TssPubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.KeyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Participants) > 0 { + for _, s := range x.Participants { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.FinalizedBlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.FinalizedBlockHeight)) + } + if x.KeygenBlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.KeygenBlockHeight)) + } + if x.ProcessId != 0 { + n += 1 + runtime.Sov(uint64(x.ProcessId)) + } + 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().(*TssKey) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ProcessId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessId)) + i-- + dAtA[i] = 0x30 + } + if x.KeygenBlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.KeygenBlockHeight)) + i-- + dAtA[i] = 0x28 + } + if x.FinalizedBlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.FinalizedBlockHeight)) + i-- + dAtA[i] = 0x20 + } + if len(x.Participants) > 0 { + for iNdEx := len(x.Participants) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Participants[iNdEx]) + copy(dAtA[i:], x.Participants[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Participants[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.KeyId) > 0 { + i -= len(x.KeyId) + copy(dAtA[i:], x.KeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyId))) + i-- + dAtA[i] = 0x12 + } + if len(x.TssPubkey) > 0 { + i -= len(x.TssPubkey) + copy(dAtA[i:], x.TssPubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TssPubkey))) + 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().(*TssKey) + 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: TssKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TssKey: 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 TssPubkey", 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.TssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyId", 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.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Participants", 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.Participants = append(x.Participants, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FinalizedBlockHeight", wireType) + } + x.FinalizedBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.FinalizedBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeygenBlockHeight", wireType) + } + x.KeygenBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.KeygenBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + } + x.ProcessId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ProcessId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/v1/types.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TssKeyProcessStatus int32 + +const ( + TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING TssKeyProcessStatus = 0 + TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS TssKeyProcessStatus = 1 + TssKeyProcessStatus_TSS_KEY_PROCESS_FAILED TssKeyProcessStatus = 2 +) + +// Enum value maps for TssKeyProcessStatus. +var ( + TssKeyProcessStatus_name = map[int32]string{ + 0: "TSS_KEY_PROCESS_PENDING", + 1: "TSS_KEY_PROCESS_SUCCESS", + 2: "TSS_KEY_PROCESS_FAILED", + } + TssKeyProcessStatus_value = map[string]int32{ + "TSS_KEY_PROCESS_PENDING": 0, + "TSS_KEY_PROCESS_SUCCESS": 1, + "TSS_KEY_PROCESS_FAILED": 2, + } +) + +func (x TssKeyProcessStatus) Enum() *TssKeyProcessStatus { + p := new(TssKeyProcessStatus) + *p = x + return p +} + +func (x TssKeyProcessStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TssKeyProcessStatus) Descriptor() protoreflect.EnumDescriptor { + return file_utss_v1_types_proto_enumTypes[0].Descriptor() +} + +func (TssKeyProcessStatus) Type() protoreflect.EnumType { + return &file_utss_v1_types_proto_enumTypes[0] +} + +func (x TssKeyProcessStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TssKeyProcessStatus.Descriptor instead. +func (TssKeyProcessStatus) EnumDescriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{0} +} + +type TssProcessType int32 + +const ( + TssProcessType_TSS_PROCESS_KEYGEN TssProcessType = 0 + TssProcessType_TSS_PROCESS_REFRESH TssProcessType = 1 +) + +// Enum value maps for TssProcessType. +var ( + TssProcessType_name = map[int32]string{ + 0: "TSS_PROCESS_KEYGEN", + 1: "TSS_PROCESS_REFRESH", + } + TssProcessType_value = map[string]int32{ + "TSS_PROCESS_KEYGEN": 0, + "TSS_PROCESS_REFRESH": 1, + } +) + +func (x TssProcessType) Enum() *TssProcessType { + p := new(TssProcessType) + *p = x + return p +} + +func (x TssProcessType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TssProcessType) Descriptor() protoreflect.EnumDescriptor { + return file_utss_v1_types_proto_enumTypes[1].Descriptor() +} + +func (TssProcessType) Type() protoreflect.EnumType { + return &file_utss_v1_types_proto_enumTypes[1] +} + +func (x TssProcessType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TssProcessType.Descriptor instead. +func (TssProcessType) EnumDescriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{1} +} + +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The admin account of the utss module. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Params) GetAdmin() string { + if x != nil { + return x.Admin + } + return "" +} + +// TSS key process information +type TssKeyProcess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status TssKeyProcessStatus `protobuf:"varint,1,opt,name=status,proto3,enum=utss.v1.TssKeyProcessStatus" json:"status,omitempty"` + Participants []string `protobuf:"bytes,2,rep,name=participants,proto3" json:"participants,omitempty"` + BlockHeight int64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + ExpiryHeight int64 `protobuf:"varint,4,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` + ProcessType TssProcessType `protobuf:"varint,5,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` + Id uint64 `protobuf:"varint,6,opt,name=id,proto3" json:"id,omitempty"` // process id +} + +func (x *TssKeyProcess) Reset() { + *x = TssKeyProcess{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TssKeyProcess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TssKeyProcess) ProtoMessage() {} + +// Deprecated: Use TssKeyProcess.ProtoReflect.Descriptor instead. +func (*TssKeyProcess) Descriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{1} +} + +func (x *TssKeyProcess) GetStatus() TssKeyProcessStatus { + if x != nil { + return x.Status + } + return TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING +} + +func (x *TssKeyProcess) GetParticipants() []string { + if x != nil { + return x.Participants + } + return nil +} + +func (x *TssKeyProcess) GetBlockHeight() int64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *TssKeyProcess) GetExpiryHeight() int64 { + if x != nil { + return x.ExpiryHeight + } + return 0 +} + +func (x *TssKeyProcess) GetProcessType() TssProcessType { + if x != nil { + return x.ProcessType + } + return TssProcessType_TSS_PROCESS_KEYGEN +} + +func (x *TssKeyProcess) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +// Finalized TSS key details +type TssKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TssPubkey string `protobuf:"bytes,1,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + Participants []string `protobuf:"bytes,3,rep,name=participants,proto3" json:"participants,omitempty"` + FinalizedBlockHeight int64 `protobuf:"varint,4,opt,name=finalized_block_height,json=finalizedBlockHeight,proto3" json:"finalized_block_height,omitempty"` + KeygenBlockHeight int64 `protobuf:"varint,5,opt,name=keygen_block_height,json=keygenBlockHeight,proto3" json:"keygen_block_height,omitempty"` + ProcessId uint64 `protobuf:"varint,6,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` +} + +func (x *TssKey) Reset() { + *x = TssKey{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TssKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TssKey) ProtoMessage() {} + +// Deprecated: Use TssKey.ProtoReflect.Descriptor instead. +func (*TssKey) Descriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{2} +} + +func (x *TssKey) GetTssPubkey() string { + if x != nil { + return x.TssPubkey + } + return "" +} + +func (x *TssKey) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *TssKey) GetParticipants() []string { + if x != nil { + return x.Participants + } + return nil +} + +func (x *TssKey) GetFinalizedBlockHeight() int64 { + if x != nil { + return x.FinalizedBlockHeight + } + return 0 +} + +func (x *TssKey) GetKeygenBlockHeight() int64 { + if x != nil { + return x.KeygenBlockHeight + } + return 0 +} + +func (x *TssKey) GetProcessId() uint64 { + if x != nil { + return x.ProcessId + } + return 0 +} + +var File_utss_v1_types_proto protoreflect.FileDescriptor + +var file_utss_v1_types_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x38, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x3a, 0x18, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0b, 0x75, + 0x74, 0x73, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa0, 0x02, 0x0a, 0x0d, 0x54, + 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, + 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3a, + 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x73, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x21, 0x98, 0xa0, 0x1f, 0x00, + 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x73, + 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x82, 0x02, + 0x0a, 0x06, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, + 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x22, + 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, + 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x6b, 0x65, 0x79, 0x67, + 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x6b, 0x65, 0x79, 0x67, 0x65, 0x6e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x3a, 0x19, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, + 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0c, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x73, 0x73, 0x5f, 0x6b, + 0x65, 0x79, 0x2a, 0x6b, 0x0a, 0x13, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x53, 0x53, + 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x45, 0x4e, + 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, + 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, + 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x2a, + 0x41, 0x0a, 0x0e, 0x54, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x53, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, + 0x5f, 0x4b, 0x45, 0x59, 0x47, 0x45, 0x4e, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x53, 0x53, + 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, + 0x10, 0x01, 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, + 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, + 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, + 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_utss_v1_types_proto_rawDescOnce sync.Once + file_utss_v1_types_proto_rawDescData = file_utss_v1_types_proto_rawDesc +) + +func file_utss_v1_types_proto_rawDescGZIP() []byte { + file_utss_v1_types_proto_rawDescOnce.Do(func() { + file_utss_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_v1_types_proto_rawDescData) + }) + return file_utss_v1_types_proto_rawDescData +} + +var file_utss_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_utss_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_utss_v1_types_proto_goTypes = []interface{}{ + (TssKeyProcessStatus)(0), // 0: utss.v1.TssKeyProcessStatus + (TssProcessType)(0), // 1: utss.v1.TssProcessType + (*Params)(nil), // 2: utss.v1.Params + (*TssKeyProcess)(nil), // 3: utss.v1.TssKeyProcess + (*TssKey)(nil), // 4: utss.v1.TssKey +} +var file_utss_v1_types_proto_depIdxs = []int32{ + 0, // 0: utss.v1.TssKeyProcess.status:type_name -> utss.v1.TssKeyProcessStatus + 1, // 1: utss.v1.TssKeyProcess.process_type:type_name -> utss.v1.TssProcessType + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_utss_v1_types_proto_init() } +func file_utss_v1_types_proto_init() { + if File_utss_v1_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_utss_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TssKeyProcess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TssKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_v1_types_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_utss_v1_types_proto_goTypes, + DependencyIndexes: file_utss_v1_types_proto_depIdxs, + EnumInfos: file_utss_v1_types_proto_enumTypes, + MessageInfos: file_utss_v1_types_proto_msgTypes, + }.Build() + File_utss_v1_types_proto = out.File + file_utss_v1_types_proto_rawDesc = nil + file_utss_v1_types_proto_goTypes = nil + file_utss_v1_types_proto_depIdxs = nil +} diff --git a/api/uvalidator/v1/ballot.pulsar.go b/api/uvalidator/v1/ballot.pulsar.go index e44b59db..e1f3e123 100644 --- a/api/uvalidator/v1/ballot.pulsar.go +++ b/api/uvalidator/v1/ballot.pulsar.go @@ -1052,6 +1052,7 @@ const ( BallotObservationType_BALLOT_OBSERVATION_TYPE_UNSPECIFIED BallotObservationType = 0 BallotObservationType_BALLOT_OBSERVATION_TYPE_INBOUND_TX BallotObservationType = 1 BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX BallotObservationType = 2 + BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY BallotObservationType = 3 ) // Enum value maps for BallotObservationType. @@ -1060,11 +1061,13 @@ var ( 0: "BALLOT_OBSERVATION_TYPE_UNSPECIFIED", 1: "BALLOT_OBSERVATION_TYPE_INBOUND_TX", 2: "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX", + 3: "BALLOT_OBSERVATION_TYPE_TSS_KEY", } BallotObservationType_value = map[string]int32{ "BALLOT_OBSERVATION_TYPE_UNSPECIFIED": 0, "BALLOT_OBSERVATION_TYPE_INBOUND_TX": 1, "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX": 2, + "BALLOT_OBSERVATION_TYPE_TSS_KEY": 3, } ) @@ -1283,7 +1286,7 @@ var file_uvalidator_v1_ballot_proto_rawDesc = []byte{ 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x04, 0x1a, 0x04, - 0xa8, 0xa4, 0x1e, 0x01, 0x2a, 0x97, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x4f, + 0xa8, 0xa4, 0x1e, 0x01, 0x2a, 0xbc, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, @@ -1292,26 +1295,28 @@ var file_uvalidator_v1_ballot_proto_rawDesc = []byte{ 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x55, 0x54, 0x42, 0x4f, - 0x55, 0x4e, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x02, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x2a, 0x63, - 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1d, 0x0a, 0x19, - 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, - 0x59, 0x45, 0x54, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x56, - 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, - 0x53, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, - 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x02, 0x1a, 0x04, 0xa8, - 0xa4, 0x1e, 0x01, 0x42, 0xba, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x42, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, - 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x55, 0x4e, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x41, 0x4c, 0x4c, + 0x4f, 0x54, 0x5f, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x03, 0x1a, 0x04, 0xa8, + 0xa4, 0x1e, 0x01, 0x2a, 0x63, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x59, 0x45, 0x54, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, + 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, + 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x10, 0x02, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xba, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/uvalidator/v1/query.pulsar.go b/api/uvalidator/v1/query.pulsar.go index 01461d82..1fede0aa 100644 --- a/api/uvalidator/v1/query.pulsar.go +++ b/api/uvalidator/v1/query.pulsar.go @@ -805,6 +805,861 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_QueryUniversalValidatorRequest protoreflect.MessageDescriptor + fd_QueryUniversalValidatorRequest_core_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_query_proto_init() + md_QueryUniversalValidatorRequest = File_uvalidator_v1_query_proto.Messages().ByName("QueryUniversalValidatorRequest") + fd_QueryUniversalValidatorRequest_core_validator_address = md_QueryUniversalValidatorRequest.Fields().ByName("core_validator_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryUniversalValidatorRequest)(nil) + +type fastReflection_QueryUniversalValidatorRequest QueryUniversalValidatorRequest + +func (x *QueryUniversalValidatorRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUniversalValidatorRequest)(x) +} + +func (x *QueryUniversalValidatorRequest) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUniversalValidatorRequest_messageType fastReflection_QueryUniversalValidatorRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryUniversalValidatorRequest_messageType{} + +type fastReflection_QueryUniversalValidatorRequest_messageType struct{} + +func (x fastReflection_QueryUniversalValidatorRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUniversalValidatorRequest)(nil) +} +func (x fastReflection_QueryUniversalValidatorRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUniversalValidatorRequest) +} +func (x fastReflection_QueryUniversalValidatorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUniversalValidatorRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUniversalValidatorRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUniversalValidatorRequest +} + +// 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_QueryUniversalValidatorRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryUniversalValidatorRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUniversalValidatorRequest) New() protoreflect.Message { + return new(fastReflection_QueryUniversalValidatorRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUniversalValidatorRequest) Interface() protoreflect.ProtoMessage { + return (*QueryUniversalValidatorRequest)(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_QueryUniversalValidatorRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CoreValidatorAddress != "" { + value := protoreflect.ValueOfString(x.CoreValidatorAddress) + if !f(fd_QueryUniversalValidatorRequest_core_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryUniversalValidatorRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + return x.CoreValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest 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_QueryUniversalValidatorRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + x.CoreValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest 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_QueryUniversalValidatorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + value := x.CoreValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest 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_QueryUniversalValidatorRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + x.CoreValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest 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_QueryUniversalValidatorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.QueryUniversalValidatorRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest 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_QueryUniversalValidatorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest 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_QueryUniversalValidatorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.QueryUniversalValidatorRequest", 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_QueryUniversalValidatorRequest) 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_QueryUniversalValidatorRequest) 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_QueryUniversalValidatorRequest) 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_QueryUniversalValidatorRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUniversalValidatorRequest) + 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.CoreValidatorAddress) + 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().(*QueryUniversalValidatorRequest) + 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.CoreValidatorAddress) > 0 { + i -= len(x.CoreValidatorAddress) + copy(dAtA[i:], x.CoreValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) + 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().(*QueryUniversalValidatorRequest) + 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: QueryUniversalValidatorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUniversalValidatorRequest: 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 CoreValidatorAddress", 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.CoreValidatorAddress = 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_QueryUniversalValidatorResponse protoreflect.MessageDescriptor + fd_QueryUniversalValidatorResponse_universal_validator protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_query_proto_init() + md_QueryUniversalValidatorResponse = File_uvalidator_v1_query_proto.Messages().ByName("QueryUniversalValidatorResponse") + fd_QueryUniversalValidatorResponse_universal_validator = md_QueryUniversalValidatorResponse.Fields().ByName("universal_validator") +} + +var _ protoreflect.Message = (*fastReflection_QueryUniversalValidatorResponse)(nil) + +type fastReflection_QueryUniversalValidatorResponse QueryUniversalValidatorResponse + +func (x *QueryUniversalValidatorResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUniversalValidatorResponse)(x) +} + +func (x *QueryUniversalValidatorResponse) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUniversalValidatorResponse_messageType fastReflection_QueryUniversalValidatorResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryUniversalValidatorResponse_messageType{} + +type fastReflection_QueryUniversalValidatorResponse_messageType struct{} + +func (x fastReflection_QueryUniversalValidatorResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUniversalValidatorResponse)(nil) +} +func (x fastReflection_QueryUniversalValidatorResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUniversalValidatorResponse) +} +func (x fastReflection_QueryUniversalValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUniversalValidatorResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUniversalValidatorResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUniversalValidatorResponse +} + +// 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_QueryUniversalValidatorResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryUniversalValidatorResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUniversalValidatorResponse) New() protoreflect.Message { + return new(fastReflection_QueryUniversalValidatorResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUniversalValidatorResponse) Interface() protoreflect.ProtoMessage { + return (*QueryUniversalValidatorResponse)(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_QueryUniversalValidatorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.UniversalValidator != nil { + value := protoreflect.ValueOfMessage(x.UniversalValidator.ProtoReflect()) + if !f(fd_QueryUniversalValidatorResponse_universal_validator, 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_QueryUniversalValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + return x.UniversalValidator != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse 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_QueryUniversalValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + x.UniversalValidator = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse 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_QueryUniversalValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + value := x.UniversalValidator + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse 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_QueryUniversalValidatorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + x.UniversalValidator = value.Message().Interface().(*UniversalValidator) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse 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_QueryUniversalValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + if x.UniversalValidator == nil { + x.UniversalValidator = new(UniversalValidator) + } + return protoreflect.ValueOfMessage(x.UniversalValidator.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse 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_QueryUniversalValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + m := new(UniversalValidator) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse 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_QueryUniversalValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.QueryUniversalValidatorResponse", 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_QueryUniversalValidatorResponse) 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_QueryUniversalValidatorResponse) 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_QueryUniversalValidatorResponse) 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_QueryUniversalValidatorResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUniversalValidatorResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.UniversalValidator != nil { + l = options.Size(x.UniversalValidator) + 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().(*QueryUniversalValidatorResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.UniversalValidator != nil { + encoded, err := options.Marshal(x.UniversalValidator) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryUniversalValidatorResponse) + 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: QueryUniversalValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUniversalValidatorResponse: 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 UniversalValidator", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.UniversalValidator == nil { + x.UniversalValidator = &UniversalValidator{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UniversalValidator); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_QueryUniversalValidatorsSetRequest protoreflect.MessageDescriptor ) @@ -823,7 +1678,7 @@ func (x *QueryUniversalValidatorsSetRequest) ProtoReflect() protoreflect.Message } func (x *QueryUniversalValidatorsSetRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[2] + mi := &file_uvalidator_v1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1164,7 +2019,7 @@ func (x *fastReflection_QueryUniversalValidatorsSetRequest) ProtoMethods() *prot var _ protoreflect.List = (*_QueryUniversalValidatorsSetResponse_1_list)(nil) type _QueryUniversalValidatorsSetResponse_1_list struct { - list *[]string + list *[]*UniversalValidator } func (x *_QueryUniversalValidatorsSetResponse_1_list) Len() int { @@ -1175,32 +2030,37 @@ func (x *_QueryUniversalValidatorsSetResponse_1_list) Len() int { } func (x *_QueryUniversalValidatorsSetResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryUniversalValidatorsSetResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*UniversalValidator) (*x.list)[i] = concreteValue } func (x *_QueryUniversalValidatorsSetResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*UniversalValidator) *x.list = append(*x.list, concreteValue) } func (x *_QueryUniversalValidatorsSetResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message QueryUniversalValidatorsSetResponse at list field Addresses as it is not of Message kind")) + v := new(UniversalValidator) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryUniversalValidatorsSetResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } *x.list = (*x.list)[:n] } func (x *_QueryUniversalValidatorsSetResponse_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) + v := new(UniversalValidator) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryUniversalValidatorsSetResponse_1_list) IsValid() bool { @@ -1208,14 +2068,14 @@ func (x *_QueryUniversalValidatorsSetResponse_1_list) IsValid() bool { } var ( - md_QueryUniversalValidatorsSetResponse protoreflect.MessageDescriptor - fd_QueryUniversalValidatorsSetResponse_addresses protoreflect.FieldDescriptor + md_QueryUniversalValidatorsSetResponse protoreflect.MessageDescriptor + fd_QueryUniversalValidatorsSetResponse_universal_validator protoreflect.FieldDescriptor ) func init() { file_uvalidator_v1_query_proto_init() md_QueryUniversalValidatorsSetResponse = File_uvalidator_v1_query_proto.Messages().ByName("QueryUniversalValidatorsSetResponse") - fd_QueryUniversalValidatorsSetResponse_addresses = md_QueryUniversalValidatorsSetResponse.Fields().ByName("addresses") + fd_QueryUniversalValidatorsSetResponse_universal_validator = md_QueryUniversalValidatorsSetResponse.Fields().ByName("universal_validator") } var _ protoreflect.Message = (*fastReflection_QueryUniversalValidatorsSetResponse)(nil) @@ -1227,7 +2087,7 @@ func (x *QueryUniversalValidatorsSetResponse) ProtoReflect() protoreflect.Messag } func (x *QueryUniversalValidatorsSetResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[3] + mi := &file_uvalidator_v1_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1283,9 +2143,9 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Interface() protore // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Addresses) != 0 { - value := protoreflect.ValueOfList(&_QueryUniversalValidatorsSetResponse_1_list{list: &x.Addresses}) - if !f(fd_QueryUniversalValidatorsSetResponse_addresses, value) { + if len(x.UniversalValidator) != 0 { + value := protoreflect.ValueOfList(&_QueryUniversalValidatorsSetResponse_1_list{list: &x.UniversalValidator}) + if !f(fd_QueryUniversalValidatorsSetResponse_universal_validator, value) { return } } @@ -1304,8 +2164,8 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Range(f func(protor // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - return len(x.Addresses) != 0 + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + return len(x.UniversalValidator) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorsSetResponse")) @@ -1322,8 +2182,8 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Has(fd protoreflect // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - x.Addresses = nil + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + x.UniversalValidator = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorsSetResponse")) @@ -1340,11 +2200,11 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Clear(fd protorefle // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - if len(x.Addresses) == 0 { + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + if len(x.UniversalValidator) == 0 { return protoreflect.ValueOfList(&_QueryUniversalValidatorsSetResponse_1_list{}) } - listValue := &_QueryUniversalValidatorsSetResponse_1_list{list: &x.Addresses} + listValue := &_QueryUniversalValidatorsSetResponse_1_list{list: &x.UniversalValidator} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { @@ -1366,10 +2226,10 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Get(descriptor prot // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": lv := value.List() clv := lv.(*_QueryUniversalValidatorsSetResponse_1_list) - x.Addresses = *clv.list + x.UniversalValidator = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorsSetResponse")) @@ -1390,11 +2250,11 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Set(fd protoreflect // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - if x.Addresses == nil { - x.Addresses = []string{} + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + if x.UniversalValidator == nil { + x.UniversalValidator = []*UniversalValidator{} } - value := &_QueryUniversalValidatorsSetResponse_1_list{list: &x.Addresses} + value := &_QueryUniversalValidatorsSetResponse_1_list{list: &x.UniversalValidator} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { @@ -1409,8 +2269,8 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Mutable(fd protoref // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryUniversalValidatorsSetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - list := []string{} + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + list := []*UniversalValidator{} return protoreflect.ValueOfList(&_QueryUniversalValidatorsSetResponse_1_list{list: &list}) default: if fd.IsExtension() { @@ -1481,9 +2341,9 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) ProtoMethods() *pro var n int var l int _ = l - if len(x.Addresses) > 0 { - for _, s := range x.Addresses { - l = len(s) + if len(x.UniversalValidator) > 0 { + for _, e := range x.UniversalValidator { + l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } @@ -1516,11 +2376,18 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) ProtoMethods() *pro i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Addresses) > 0 { - for iNdEx := len(x.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Addresses[iNdEx]) - copy(dAtA[i:], x.Addresses[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Addresses[iNdEx]))) + if len(x.UniversalValidator) > 0 { + for iNdEx := len(x.UniversalValidator) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.UniversalValidator[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } @@ -1576,9 +2443,9 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) ProtoMethods() *pro switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UniversalValidator", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1588,23 +2455,25 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) ProtoMethods() *pro } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Addresses = append(x.Addresses, string(dAtA[iNdEx:postIndex])) + x.UniversalValidator = append(x.UniversalValidator, &UniversalValidator{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UniversalValidator[len(x.UniversalValidator)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -1661,7 +2530,7 @@ func (x *QueryBallotRequest) ProtoReflect() protoreflect.Message { } func (x *QueryBallotRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[4] + mi := &file_uvalidator_v1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2081,7 +2950,7 @@ func (x *QueryBallotResponse) ProtoReflect() protoreflect.Message { } func (x *QueryBallotResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[5] + mi := &file_uvalidator_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2516,7 +3385,7 @@ func (x *QueryBallotsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryBallotsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[6] + mi := &file_uvalidator_v1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3004,7 +3873,7 @@ func (x *QueryBallotsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryBallotsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[7] + mi := &file_uvalidator_v1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3524,7 +4393,7 @@ func (x *QueryActiveBallotIDsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryActiveBallotIDsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[8] + mi := &file_uvalidator_v1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4007,7 +4876,7 @@ func (x *QueryActiveBallotIDsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryActiveBallotIDsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[9] + mi := &file_uvalidator_v1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4518,7 +5387,7 @@ func (x *QueryActiveBallotsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryActiveBallotsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[10] + mi := &file_uvalidator_v1_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5006,7 +5875,7 @@ func (x *QueryActiveBallotsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryActiveBallotsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[11] + mi := &file_uvalidator_v1_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5526,7 +6395,7 @@ func (x *QueryExpiredBallotIDsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryExpiredBallotIDsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[12] + mi := &file_uvalidator_v1_query_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6009,7 +6878,7 @@ func (x *QueryExpiredBallotIDsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryExpiredBallotIDsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[13] + mi := &file_uvalidator_v1_query_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6520,7 +7389,7 @@ func (x *QueryExpiredBallotsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryExpiredBallotsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[14] + mi := &file_uvalidator_v1_query_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7008,7 +7877,7 @@ func (x *QueryExpiredBallotsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryExpiredBallotsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[15] + mi := &file_uvalidator_v1_query_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7528,7 +8397,7 @@ func (x *QueryFinalizedBallotIDsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryFinalizedBallotIDsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[16] + mi := &file_uvalidator_v1_query_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8011,7 +8880,7 @@ func (x *QueryFinalizedBallotIDsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryFinalizedBallotIDsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[17] + mi := &file_uvalidator_v1_query_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8522,7 +9391,7 @@ func (x *QueryFinalizedBallotsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryFinalizedBallotsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[18] + mi := &file_uvalidator_v1_query_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9010,7 +9879,7 @@ func (x *QueryFinalizedBallotsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryFinalizedBallotsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[19] + mi := &file_uvalidator_v1_query_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9587,6 +10456,77 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } +// Single Universal Validator +type QueryUniversalValidatorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` +} + +func (x *QueryUniversalValidatorRequest) Reset() { + *x = QueryUniversalValidatorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUniversalValidatorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUniversalValidatorRequest) ProtoMessage() {} + +// Deprecated: Use QueryUniversalValidatorRequest.ProtoReflect.Descriptor instead. +func (*QueryUniversalValidatorRequest) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryUniversalValidatorRequest) GetCoreValidatorAddress() string { + if x != nil { + return x.CoreValidatorAddress + } + return "" +} + +type QueryUniversalValidatorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UniversalValidator *UniversalValidator `protobuf:"bytes,1,opt,name=universal_validator,json=universalValidator,proto3" json:"universal_validator,omitempty"` +} + +func (x *QueryUniversalValidatorResponse) Reset() { + *x = QueryUniversalValidatorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUniversalValidatorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUniversalValidatorResponse) ProtoMessage() {} + +// Deprecated: Use QueryUniversalValidatorResponse.ProtoReflect.Descriptor instead. +func (*QueryUniversalValidatorResponse) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryUniversalValidatorResponse) GetUniversalValidator() *UniversalValidator { + if x != nil { + return x.UniversalValidator + } + return nil +} + // QueryUniversalValidatorsSetRequest is the request type for Query/UniversalValidatorAddresses. type QueryUniversalValidatorsSetRequest struct { state protoimpl.MessageState @@ -9597,7 +10537,7 @@ type QueryUniversalValidatorsSetRequest struct { func (x *QueryUniversalValidatorsSetRequest) Reset() { *x = QueryUniversalValidatorsSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[2] + mi := &file_uvalidator_v1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9611,7 +10551,7 @@ func (*QueryUniversalValidatorsSetRequest) ProtoMessage() {} // Deprecated: Use QueryUniversalValidatorsSetRequest.ProtoReflect.Descriptor instead. func (*QueryUniversalValidatorsSetRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{2} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{4} } // QueryUniversalValidatorsSetResponse is the response type for Query/UniversalValidatorAddresses. @@ -9621,13 +10561,13 @@ type QueryUniversalValidatorsSetResponse struct { unknownFields protoimpl.UnknownFields // addresses is the list of all universal validator addresses registered in the module. - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + UniversalValidator []*UniversalValidator `protobuf:"bytes,1,rep,name=universal_validator,json=universalValidator,proto3" json:"universal_validator,omitempty"` } func (x *QueryUniversalValidatorsSetResponse) Reset() { *x = QueryUniversalValidatorsSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[3] + mi := &file_uvalidator_v1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9641,12 +10581,12 @@ func (*QueryUniversalValidatorsSetResponse) ProtoMessage() {} // Deprecated: Use QueryUniversalValidatorsSetResponse.ProtoReflect.Descriptor instead. func (*QueryUniversalValidatorsSetResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{3} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{5} } -func (x *QueryUniversalValidatorsSetResponse) GetAddresses() []string { +func (x *QueryUniversalValidatorsSetResponse) GetUniversalValidator() []*UniversalValidator { if x != nil { - return x.Addresses + return x.UniversalValidator } return nil } @@ -9663,7 +10603,7 @@ type QueryBallotRequest struct { func (x *QueryBallotRequest) Reset() { *x = QueryBallotRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[4] + mi := &file_uvalidator_v1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9677,7 +10617,7 @@ func (*QueryBallotRequest) ProtoMessage() {} // Deprecated: Use QueryBallotRequest.ProtoReflect.Descriptor instead. func (*QueryBallotRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{4} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{6} } func (x *QueryBallotRequest) GetId() string { @@ -9698,7 +10638,7 @@ type QueryBallotResponse struct { func (x *QueryBallotResponse) Reset() { *x = QueryBallotResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[5] + mi := &file_uvalidator_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9712,7 +10652,7 @@ func (*QueryBallotResponse) ProtoMessage() {} // Deprecated: Use QueryBallotResponse.ProtoReflect.Descriptor instead. func (*QueryBallotResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{5} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{7} } func (x *QueryBallotResponse) GetBallot() *Ballot { @@ -9734,7 +10674,7 @@ type QueryBallotsRequest struct { func (x *QueryBallotsRequest) Reset() { *x = QueryBallotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[6] + mi := &file_uvalidator_v1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9748,7 +10688,7 @@ func (*QueryBallotsRequest) ProtoMessage() {} // Deprecated: Use QueryBallotsRequest.ProtoReflect.Descriptor instead. func (*QueryBallotsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{6} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{8} } func (x *QueryBallotsRequest) GetPagination() *v1beta1.PageRequest { @@ -9770,7 +10710,7 @@ type QueryBallotsResponse struct { func (x *QueryBallotsResponse) Reset() { *x = QueryBallotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[7] + mi := &file_uvalidator_v1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9784,7 +10724,7 @@ func (*QueryBallotsResponse) ProtoMessage() {} // Deprecated: Use QueryBallotsResponse.ProtoReflect.Descriptor instead. func (*QueryBallotsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{7} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{9} } func (x *QueryBallotsResponse) GetBallots() []*Ballot { @@ -9813,7 +10753,7 @@ type QueryActiveBallotIDsRequest struct { func (x *QueryActiveBallotIDsRequest) Reset() { *x = QueryActiveBallotIDsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[8] + mi := &file_uvalidator_v1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9827,7 +10767,7 @@ func (*QueryActiveBallotIDsRequest) ProtoMessage() {} // Deprecated: Use QueryActiveBallotIDsRequest.ProtoReflect.Descriptor instead. func (*QueryActiveBallotIDsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{8} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{10} } func (x *QueryActiveBallotIDsRequest) GetPagination() *v1beta1.PageRequest { @@ -9849,7 +10789,7 @@ type QueryActiveBallotIDsResponse struct { func (x *QueryActiveBallotIDsResponse) Reset() { *x = QueryActiveBallotIDsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[9] + mi := &file_uvalidator_v1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9863,7 +10803,7 @@ func (*QueryActiveBallotIDsResponse) ProtoMessage() {} // Deprecated: Use QueryActiveBallotIDsResponse.ProtoReflect.Descriptor instead. func (*QueryActiveBallotIDsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{9} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{11} } func (x *QueryActiveBallotIDsResponse) GetIds() []string { @@ -9891,7 +10831,7 @@ type QueryActiveBallotsRequest struct { func (x *QueryActiveBallotsRequest) Reset() { *x = QueryActiveBallotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[10] + mi := &file_uvalidator_v1_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9905,7 +10845,7 @@ func (*QueryActiveBallotsRequest) ProtoMessage() {} // Deprecated: Use QueryActiveBallotsRequest.ProtoReflect.Descriptor instead. func (*QueryActiveBallotsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{10} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{12} } func (x *QueryActiveBallotsRequest) GetPagination() *v1beta1.PageRequest { @@ -9927,7 +10867,7 @@ type QueryActiveBallotsResponse struct { func (x *QueryActiveBallotsResponse) Reset() { *x = QueryActiveBallotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[11] + mi := &file_uvalidator_v1_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9941,7 +10881,7 @@ func (*QueryActiveBallotsResponse) ProtoMessage() {} // Deprecated: Use QueryActiveBallotsResponse.ProtoReflect.Descriptor instead. func (*QueryActiveBallotsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{11} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{13} } func (x *QueryActiveBallotsResponse) GetBallots() []*Ballot { @@ -9970,7 +10910,7 @@ type QueryExpiredBallotIDsRequest struct { func (x *QueryExpiredBallotIDsRequest) Reset() { *x = QueryExpiredBallotIDsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[12] + mi := &file_uvalidator_v1_query_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9984,7 +10924,7 @@ func (*QueryExpiredBallotIDsRequest) ProtoMessage() {} // Deprecated: Use QueryExpiredBallotIDsRequest.ProtoReflect.Descriptor instead. func (*QueryExpiredBallotIDsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{12} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{14} } func (x *QueryExpiredBallotIDsRequest) GetPagination() *v1beta1.PageRequest { @@ -10006,7 +10946,7 @@ type QueryExpiredBallotIDsResponse struct { func (x *QueryExpiredBallotIDsResponse) Reset() { *x = QueryExpiredBallotIDsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[13] + mi := &file_uvalidator_v1_query_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10020,7 +10960,7 @@ func (*QueryExpiredBallotIDsResponse) ProtoMessage() {} // Deprecated: Use QueryExpiredBallotIDsResponse.ProtoReflect.Descriptor instead. func (*QueryExpiredBallotIDsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{13} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{15} } func (x *QueryExpiredBallotIDsResponse) GetIds() []string { @@ -10048,7 +10988,7 @@ type QueryExpiredBallotsRequest struct { func (x *QueryExpiredBallotsRequest) Reset() { *x = QueryExpiredBallotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[14] + mi := &file_uvalidator_v1_query_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10062,7 +11002,7 @@ func (*QueryExpiredBallotsRequest) ProtoMessage() {} // Deprecated: Use QueryExpiredBallotsRequest.ProtoReflect.Descriptor instead. func (*QueryExpiredBallotsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{14} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{16} } func (x *QueryExpiredBallotsRequest) GetPagination() *v1beta1.PageRequest { @@ -10084,7 +11024,7 @@ type QueryExpiredBallotsResponse struct { func (x *QueryExpiredBallotsResponse) Reset() { *x = QueryExpiredBallotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[15] + mi := &file_uvalidator_v1_query_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10098,7 +11038,7 @@ func (*QueryExpiredBallotsResponse) ProtoMessage() {} // Deprecated: Use QueryExpiredBallotsResponse.ProtoReflect.Descriptor instead. func (*QueryExpiredBallotsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{15} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{17} } func (x *QueryExpiredBallotsResponse) GetBallots() []*Ballot { @@ -10127,7 +11067,7 @@ type QueryFinalizedBallotIDsRequest struct { func (x *QueryFinalizedBallotIDsRequest) Reset() { *x = QueryFinalizedBallotIDsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[16] + mi := &file_uvalidator_v1_query_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10141,7 +11081,7 @@ func (*QueryFinalizedBallotIDsRequest) ProtoMessage() {} // Deprecated: Use QueryFinalizedBallotIDsRequest.ProtoReflect.Descriptor instead. func (*QueryFinalizedBallotIDsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{16} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{18} } func (x *QueryFinalizedBallotIDsRequest) GetPagination() *v1beta1.PageRequest { @@ -10163,7 +11103,7 @@ type QueryFinalizedBallotIDsResponse struct { func (x *QueryFinalizedBallotIDsResponse) Reset() { *x = QueryFinalizedBallotIDsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[17] + mi := &file_uvalidator_v1_query_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10177,7 +11117,7 @@ func (*QueryFinalizedBallotIDsResponse) ProtoMessage() {} // Deprecated: Use QueryFinalizedBallotIDsResponse.ProtoReflect.Descriptor instead. func (*QueryFinalizedBallotIDsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{17} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{19} } func (x *QueryFinalizedBallotIDsResponse) GetIds() []string { @@ -10205,7 +11145,7 @@ type QueryFinalizedBallotsRequest struct { func (x *QueryFinalizedBallotsRequest) Reset() { *x = QueryFinalizedBallotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[18] + mi := &file_uvalidator_v1_query_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10219,7 +11159,7 @@ func (*QueryFinalizedBallotsRequest) ProtoMessage() {} // Deprecated: Use QueryFinalizedBallotsRequest.ProtoReflect.Descriptor instead. func (*QueryFinalizedBallotsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{18} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{20} } func (x *QueryFinalizedBallotsRequest) GetPagination() *v1beta1.PageRequest { @@ -10241,7 +11181,7 @@ type QueryFinalizedBallotsResponse struct { func (x *QueryFinalizedBallotsResponse) Reset() { *x = QueryFinalizedBallotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[19] + mi := &file_uvalidator_v1_query_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10255,7 +11195,7 @@ func (*QueryFinalizedBallotsResponse) ProtoMessage() {} // Deprecated: Use QueryFinalizedBallotsResponse.ProtoReflect.Descriptor instead. func (*QueryFinalizedBallotsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{19} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{21} } func (x *QueryFinalizedBallotsResponse) GetBallots() []*Ballot { @@ -10284,96 +11224,84 @@ var file_uvalidator_v1_query_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, - 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, - 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x22, 0x24, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x23, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, - 0x24, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x44, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, - 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, - 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x52, 0x06, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x22, 0x5d, 0x0a, 0x13, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x14, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, - 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, + 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, + 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x22, 0x56, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x75, 0x0a, 0x1f, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, + 0x0a, 0x13, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x12, + 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x79, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x52, 0x0a, 0x13, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x12, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x44, 0x0a, 0x13, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x06, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x22, + 0x5d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x63, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, - 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, - 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, - 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x90, + 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, + 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x64, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x6e, 0x22, 0x65, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, @@ -10382,141 +11310,183 @@ var file_uvalidator_v1_query_proto_rawDesc = []byte{ 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x68, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x6e, 0x22, 0x66, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x1d, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, + 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x1f, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, - 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, 0x1c, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x1b, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, + 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, + 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, + 0x6c, 0x6f, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x68, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, + 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x7c, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xb7, 0x0b, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x21, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x12, 0x15, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xac, 0x01, 0x0a, 0x16, 0x41, 0x6c, 0x6c, 0x55, - 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x12, 0x31, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, + 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, + 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, + 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0xf2, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6e, 0x0a, 0x06, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xb8, 0x01, 0x0a, 0x12, + 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x2d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x25, 0x12, 0x23, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, - 0x31, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x06, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, - 0x12, 0x21, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, - 0x1b, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, - 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x75, 0x0a, 0x0a, - 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, - 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x75, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x12, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x75, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x8e, - 0x01, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, - 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x63, + 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xac, 0x01, 0x0a, 0x16, 0x41, 0x6c, 0x6c, 0x55, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x12, 0x31, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, + 0x12, 0x23, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, + 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x06, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x12, + 0x21, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, + 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, + 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x75, 0x0a, 0x0a, 0x41, + 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, + 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, - 0x12, 0x1d, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, - 0x9c, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, - 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, - 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x75, 0x76, 0x61, + 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x92, - 0x01, 0x0a, 0x11, 0x41, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x64, 0x12, 0xa4, 0x01, 0x0a, 0x15, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2d, 0x2e, - 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x75, + 0x74, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x12, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x8e, 0x01, + 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x12, 0x28, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, + 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, + 0x1d, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, + 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x9c, + 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, + 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, + 0x73, 0x2f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x92, 0x01, + 0x0a, 0x11, 0x41, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, + 0x6f, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, + 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x12, 0xa4, 0x01, 0x0a, 0x15, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, + 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x13, 0x41, 0x6c, + 0x6c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, + 0x73, 0x12, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, + 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x13, 0x41, - 0x6c, 0x6c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, - 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x66, 0x69, - 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0xb9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, - 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0xb9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, + 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -10531,79 +11501,86 @@ func file_uvalidator_v1_query_proto_rawDescGZIP() []byte { return file_uvalidator_v1_query_proto_rawDescData } -var file_uvalidator_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_uvalidator_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_uvalidator_v1_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: uvalidator.v1.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: uvalidator.v1.QueryParamsResponse - (*QueryUniversalValidatorsSetRequest)(nil), // 2: uvalidator.v1.QueryUniversalValidatorsSetRequest - (*QueryUniversalValidatorsSetResponse)(nil), // 3: uvalidator.v1.QueryUniversalValidatorsSetResponse - (*QueryBallotRequest)(nil), // 4: uvalidator.v1.QueryBallotRequest - (*QueryBallotResponse)(nil), // 5: uvalidator.v1.QueryBallotResponse - (*QueryBallotsRequest)(nil), // 6: uvalidator.v1.QueryBallotsRequest - (*QueryBallotsResponse)(nil), // 7: uvalidator.v1.QueryBallotsResponse - (*QueryActiveBallotIDsRequest)(nil), // 8: uvalidator.v1.QueryActiveBallotIDsRequest - (*QueryActiveBallotIDsResponse)(nil), // 9: uvalidator.v1.QueryActiveBallotIDsResponse - (*QueryActiveBallotsRequest)(nil), // 10: uvalidator.v1.QueryActiveBallotsRequest - (*QueryActiveBallotsResponse)(nil), // 11: uvalidator.v1.QueryActiveBallotsResponse - (*QueryExpiredBallotIDsRequest)(nil), // 12: uvalidator.v1.QueryExpiredBallotIDsRequest - (*QueryExpiredBallotIDsResponse)(nil), // 13: uvalidator.v1.QueryExpiredBallotIDsResponse - (*QueryExpiredBallotsRequest)(nil), // 14: uvalidator.v1.QueryExpiredBallotsRequest - (*QueryExpiredBallotsResponse)(nil), // 15: uvalidator.v1.QueryExpiredBallotsResponse - (*QueryFinalizedBallotIDsRequest)(nil), // 16: uvalidator.v1.QueryFinalizedBallotIDsRequest - (*QueryFinalizedBallotIDsResponse)(nil), // 17: uvalidator.v1.QueryFinalizedBallotIDsResponse - (*QueryFinalizedBallotsRequest)(nil), // 18: uvalidator.v1.QueryFinalizedBallotsRequest - (*QueryFinalizedBallotsResponse)(nil), // 19: uvalidator.v1.QueryFinalizedBallotsResponse - (*Params)(nil), // 20: uvalidator.v1.Params - (*Ballot)(nil), // 21: uvalidator.v1.Ballot - (*v1beta1.PageRequest)(nil), // 22: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 23: cosmos.base.query.v1beta1.PageResponse + (*QueryUniversalValidatorRequest)(nil), // 2: uvalidator.v1.QueryUniversalValidatorRequest + (*QueryUniversalValidatorResponse)(nil), // 3: uvalidator.v1.QueryUniversalValidatorResponse + (*QueryUniversalValidatorsSetRequest)(nil), // 4: uvalidator.v1.QueryUniversalValidatorsSetRequest + (*QueryUniversalValidatorsSetResponse)(nil), // 5: uvalidator.v1.QueryUniversalValidatorsSetResponse + (*QueryBallotRequest)(nil), // 6: uvalidator.v1.QueryBallotRequest + (*QueryBallotResponse)(nil), // 7: uvalidator.v1.QueryBallotResponse + (*QueryBallotsRequest)(nil), // 8: uvalidator.v1.QueryBallotsRequest + (*QueryBallotsResponse)(nil), // 9: uvalidator.v1.QueryBallotsResponse + (*QueryActiveBallotIDsRequest)(nil), // 10: uvalidator.v1.QueryActiveBallotIDsRequest + (*QueryActiveBallotIDsResponse)(nil), // 11: uvalidator.v1.QueryActiveBallotIDsResponse + (*QueryActiveBallotsRequest)(nil), // 12: uvalidator.v1.QueryActiveBallotsRequest + (*QueryActiveBallotsResponse)(nil), // 13: uvalidator.v1.QueryActiveBallotsResponse + (*QueryExpiredBallotIDsRequest)(nil), // 14: uvalidator.v1.QueryExpiredBallotIDsRequest + (*QueryExpiredBallotIDsResponse)(nil), // 15: uvalidator.v1.QueryExpiredBallotIDsResponse + (*QueryExpiredBallotsRequest)(nil), // 16: uvalidator.v1.QueryExpiredBallotsRequest + (*QueryExpiredBallotsResponse)(nil), // 17: uvalidator.v1.QueryExpiredBallotsResponse + (*QueryFinalizedBallotIDsRequest)(nil), // 18: uvalidator.v1.QueryFinalizedBallotIDsRequest + (*QueryFinalizedBallotIDsResponse)(nil), // 19: uvalidator.v1.QueryFinalizedBallotIDsResponse + (*QueryFinalizedBallotsRequest)(nil), // 20: uvalidator.v1.QueryFinalizedBallotsRequest + (*QueryFinalizedBallotsResponse)(nil), // 21: uvalidator.v1.QueryFinalizedBallotsResponse + (*Params)(nil), // 22: uvalidator.v1.Params + (*UniversalValidator)(nil), // 23: uvalidator.v1.UniversalValidator + (*Ballot)(nil), // 24: uvalidator.v1.Ballot + (*v1beta1.PageRequest)(nil), // 25: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 26: cosmos.base.query.v1beta1.PageResponse } var file_uvalidator_v1_query_proto_depIdxs = []int32{ - 20, // 0: uvalidator.v1.QueryParamsResponse.params:type_name -> uvalidator.v1.Params - 21, // 1: uvalidator.v1.QueryBallotResponse.ballot:type_name -> uvalidator.v1.Ballot - 22, // 2: uvalidator.v1.QueryBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 3: uvalidator.v1.QueryBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot - 23, // 4: uvalidator.v1.QueryBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 5: uvalidator.v1.QueryActiveBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 6: uvalidator.v1.QueryActiveBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 7: uvalidator.v1.QueryActiveBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 8: uvalidator.v1.QueryActiveBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot - 23, // 9: uvalidator.v1.QueryActiveBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 10: uvalidator.v1.QueryExpiredBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 11: uvalidator.v1.QueryExpiredBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 12: uvalidator.v1.QueryExpiredBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 13: uvalidator.v1.QueryExpiredBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot - 23, // 14: uvalidator.v1.QueryExpiredBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 15: uvalidator.v1.QueryFinalizedBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 16: uvalidator.v1.QueryFinalizedBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 17: uvalidator.v1.QueryFinalizedBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 18: uvalidator.v1.QueryFinalizedBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot - 23, // 19: uvalidator.v1.QueryFinalizedBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 20: uvalidator.v1.Query.Params:input_type -> uvalidator.v1.QueryParamsRequest - 2, // 21: uvalidator.v1.Query.AllUniversalValidators:input_type -> uvalidator.v1.QueryUniversalValidatorsSetRequest - 4, // 22: uvalidator.v1.Query.Ballot:input_type -> uvalidator.v1.QueryBallotRequest - 6, // 23: uvalidator.v1.Query.AllBallots:input_type -> uvalidator.v1.QueryBallotsRequest - 8, // 24: uvalidator.v1.Query.AllActiveBallotIDs:input_type -> uvalidator.v1.QueryActiveBallotIDsRequest - 10, // 25: uvalidator.v1.Query.AllActiveBallots:input_type -> uvalidator.v1.QueryActiveBallotsRequest - 12, // 26: uvalidator.v1.Query.AllExpiredBallotIDs:input_type -> uvalidator.v1.QueryExpiredBallotIDsRequest - 14, // 27: uvalidator.v1.Query.AllExpiredBallots:input_type -> uvalidator.v1.QueryExpiredBallotsRequest - 16, // 28: uvalidator.v1.Query.AllFinalizedBallotIDs:input_type -> uvalidator.v1.QueryFinalizedBallotIDsRequest - 18, // 29: uvalidator.v1.Query.AllFinalizedBallots:input_type -> uvalidator.v1.QueryFinalizedBallotsRequest - 1, // 30: uvalidator.v1.Query.Params:output_type -> uvalidator.v1.QueryParamsResponse - 3, // 31: uvalidator.v1.Query.AllUniversalValidators:output_type -> uvalidator.v1.QueryUniversalValidatorsSetResponse - 5, // 32: uvalidator.v1.Query.Ballot:output_type -> uvalidator.v1.QueryBallotResponse - 7, // 33: uvalidator.v1.Query.AllBallots:output_type -> uvalidator.v1.QueryBallotsResponse - 9, // 34: uvalidator.v1.Query.AllActiveBallotIDs:output_type -> uvalidator.v1.QueryActiveBallotIDsResponse - 11, // 35: uvalidator.v1.Query.AllActiveBallots:output_type -> uvalidator.v1.QueryActiveBallotsResponse - 13, // 36: uvalidator.v1.Query.AllExpiredBallotIDs:output_type -> uvalidator.v1.QueryExpiredBallotIDsResponse - 15, // 37: uvalidator.v1.Query.AllExpiredBallots:output_type -> uvalidator.v1.QueryExpiredBallotsResponse - 17, // 38: uvalidator.v1.Query.AllFinalizedBallotIDs:output_type -> uvalidator.v1.QueryFinalizedBallotIDsResponse - 19, // 39: uvalidator.v1.Query.AllFinalizedBallots:output_type -> uvalidator.v1.QueryFinalizedBallotsResponse - 30, // [30:40] is the sub-list for method output_type - 20, // [20:30] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 22, // 0: uvalidator.v1.QueryParamsResponse.params:type_name -> uvalidator.v1.Params + 23, // 1: uvalidator.v1.QueryUniversalValidatorResponse.universal_validator:type_name -> uvalidator.v1.UniversalValidator + 23, // 2: uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator:type_name -> uvalidator.v1.UniversalValidator + 24, // 3: uvalidator.v1.QueryBallotResponse.ballot:type_name -> uvalidator.v1.Ballot + 25, // 4: uvalidator.v1.QueryBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 5: uvalidator.v1.QueryBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot + 26, // 6: uvalidator.v1.QueryBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 7: uvalidator.v1.QueryActiveBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 26, // 8: uvalidator.v1.QueryActiveBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 9: uvalidator.v1.QueryActiveBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 10: uvalidator.v1.QueryActiveBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot + 26, // 11: uvalidator.v1.QueryActiveBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 12: uvalidator.v1.QueryExpiredBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 26, // 13: uvalidator.v1.QueryExpiredBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 14: uvalidator.v1.QueryExpiredBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 15: uvalidator.v1.QueryExpiredBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot + 26, // 16: uvalidator.v1.QueryExpiredBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 17: uvalidator.v1.QueryFinalizedBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 26, // 18: uvalidator.v1.QueryFinalizedBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 19: uvalidator.v1.QueryFinalizedBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 20: uvalidator.v1.QueryFinalizedBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot + 26, // 21: uvalidator.v1.QueryFinalizedBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 22: uvalidator.v1.Query.Params:input_type -> uvalidator.v1.QueryParamsRequest + 2, // 23: uvalidator.v1.Query.UniversalValidator:input_type -> uvalidator.v1.QueryUniversalValidatorRequest + 4, // 24: uvalidator.v1.Query.AllUniversalValidators:input_type -> uvalidator.v1.QueryUniversalValidatorsSetRequest + 6, // 25: uvalidator.v1.Query.Ballot:input_type -> uvalidator.v1.QueryBallotRequest + 8, // 26: uvalidator.v1.Query.AllBallots:input_type -> uvalidator.v1.QueryBallotsRequest + 10, // 27: uvalidator.v1.Query.AllActiveBallotIDs:input_type -> uvalidator.v1.QueryActiveBallotIDsRequest + 12, // 28: uvalidator.v1.Query.AllActiveBallots:input_type -> uvalidator.v1.QueryActiveBallotsRequest + 14, // 29: uvalidator.v1.Query.AllExpiredBallotIDs:input_type -> uvalidator.v1.QueryExpiredBallotIDsRequest + 16, // 30: uvalidator.v1.Query.AllExpiredBallots:input_type -> uvalidator.v1.QueryExpiredBallotsRequest + 18, // 31: uvalidator.v1.Query.AllFinalizedBallotIDs:input_type -> uvalidator.v1.QueryFinalizedBallotIDsRequest + 20, // 32: uvalidator.v1.Query.AllFinalizedBallots:input_type -> uvalidator.v1.QueryFinalizedBallotsRequest + 1, // 33: uvalidator.v1.Query.Params:output_type -> uvalidator.v1.QueryParamsResponse + 3, // 34: uvalidator.v1.Query.UniversalValidator:output_type -> uvalidator.v1.QueryUniversalValidatorResponse + 5, // 35: uvalidator.v1.Query.AllUniversalValidators:output_type -> uvalidator.v1.QueryUniversalValidatorsSetResponse + 7, // 36: uvalidator.v1.Query.Ballot:output_type -> uvalidator.v1.QueryBallotResponse + 9, // 37: uvalidator.v1.Query.AllBallots:output_type -> uvalidator.v1.QueryBallotsResponse + 11, // 38: uvalidator.v1.Query.AllActiveBallotIDs:output_type -> uvalidator.v1.QueryActiveBallotIDsResponse + 13, // 39: uvalidator.v1.Query.AllActiveBallots:output_type -> uvalidator.v1.QueryActiveBallotsResponse + 15, // 40: uvalidator.v1.Query.AllExpiredBallotIDs:output_type -> uvalidator.v1.QueryExpiredBallotIDsResponse + 17, // 41: uvalidator.v1.Query.AllExpiredBallots:output_type -> uvalidator.v1.QueryExpiredBallotsResponse + 19, // 42: uvalidator.v1.Query.AllFinalizedBallotIDs:output_type -> uvalidator.v1.QueryFinalizedBallotIDsResponse + 21, // 43: uvalidator.v1.Query.AllFinalizedBallots:output_type -> uvalidator.v1.QueryFinalizedBallotsResponse + 33, // [33:44] is the sub-list for method output_type + 22, // [22:33] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_uvalidator_v1_query_proto_init() } @@ -10614,6 +11591,7 @@ func file_uvalidator_v1_query_proto_init() { file_uvalidator_v1_genesis_proto_init() file_uvalidator_v1_types_proto_init() file_uvalidator_v1_ballot_proto_init() + file_uvalidator_v1_validator_proto_init() if !protoimpl.UnsafeEnabled { file_uvalidator_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { @@ -10640,7 +11618,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryUniversalValidatorsSetRequest); i { + switch v := v.(*QueryUniversalValidatorRequest); i { case 0: return &v.state case 1: @@ -10652,7 +11630,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryUniversalValidatorsSetResponse); i { + switch v := v.(*QueryUniversalValidatorResponse); i { case 0: return &v.state case 1: @@ -10664,7 +11642,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBallotRequest); i { + switch v := v.(*QueryUniversalValidatorsSetRequest); i { case 0: return &v.state case 1: @@ -10676,7 +11654,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBallotResponse); i { + switch v := v.(*QueryUniversalValidatorsSetResponse); i { case 0: return &v.state case 1: @@ -10688,7 +11666,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBallotsRequest); i { + switch v := v.(*QueryBallotRequest); i { case 0: return &v.state case 1: @@ -10700,7 +11678,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBallotsResponse); i { + switch v := v.(*QueryBallotResponse); i { case 0: return &v.state case 1: @@ -10712,7 +11690,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryActiveBallotIDsRequest); i { + switch v := v.(*QueryBallotsRequest); i { case 0: return &v.state case 1: @@ -10724,7 +11702,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryActiveBallotIDsResponse); i { + switch v := v.(*QueryBallotsResponse); i { case 0: return &v.state case 1: @@ -10736,7 +11714,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryActiveBallotsRequest); i { + switch v := v.(*QueryActiveBallotIDsRequest); i { case 0: return &v.state case 1: @@ -10748,7 +11726,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryActiveBallotsResponse); i { + switch v := v.(*QueryActiveBallotIDsResponse); i { case 0: return &v.state case 1: @@ -10760,7 +11738,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExpiredBallotIDsRequest); i { + switch v := v.(*QueryActiveBallotsRequest); i { case 0: return &v.state case 1: @@ -10772,7 +11750,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExpiredBallotIDsResponse); i { + switch v := v.(*QueryActiveBallotsResponse); i { case 0: return &v.state case 1: @@ -10784,7 +11762,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExpiredBallotsRequest); i { + switch v := v.(*QueryExpiredBallotIDsRequest); i { case 0: return &v.state case 1: @@ -10796,7 +11774,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExpiredBallotsResponse); i { + switch v := v.(*QueryExpiredBallotIDsResponse); i { case 0: return &v.state case 1: @@ -10808,7 +11786,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryFinalizedBallotIDsRequest); i { + switch v := v.(*QueryExpiredBallotsRequest); i { case 0: return &v.state case 1: @@ -10820,7 +11798,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryFinalizedBallotIDsResponse); i { + switch v := v.(*QueryExpiredBallotsResponse); i { case 0: return &v.state case 1: @@ -10832,7 +11810,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryFinalizedBallotsRequest); i { + switch v := v.(*QueryFinalizedBallotIDsRequest); i { case 0: return &v.state case 1: @@ -10844,6 +11822,30 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryFinalizedBallotIDsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryFinalizedBallotsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryFinalizedBallotsResponse); i { case 0: return &v.state @@ -10862,7 +11864,7 @@ func file_uvalidator_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uvalidator_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 22, NumExtensions: 0, NumServices: 1, }, diff --git a/api/uvalidator/v1/query_grpc.pb.go b/api/uvalidator/v1/query_grpc.pb.go index bdaedf81..2df92be1 100644 --- a/api/uvalidator/v1/query_grpc.pb.go +++ b/api/uvalidator/v1/query_grpc.pb.go @@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Query_Params_FullMethodName = "/uvalidator.v1.Query/Params" + Query_UniversalValidator_FullMethodName = "/uvalidator.v1.Query/UniversalValidator" Query_AllUniversalValidators_FullMethodName = "/uvalidator.v1.Query/AllUniversalValidators" Query_Ballot_FullMethodName = "/uvalidator.v1.Query/Ballot" Query_AllBallots_FullMethodName = "/uvalidator.v1.Query/AllBallots" @@ -37,6 +38,8 @@ const ( type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // UniversalValidator queries one universal validator by core validator address. + UniversalValidator(ctx context.Context, in *QueryUniversalValidatorRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorResponse, error) // AllUniversalValidators queries the details of a specific universal validator by its address. AllUniversalValidators(ctx context.Context, in *QueryUniversalValidatorsSetRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorsSetResponse, error) // Ballot queries one ballot by ID. @@ -74,6 +77,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) UniversalValidator(ctx context.Context, in *QueryUniversalValidatorRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorResponse, error) { + out := new(QueryUniversalValidatorResponse) + err := c.cc.Invoke(ctx, Query_UniversalValidator_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) AllUniversalValidators(ctx context.Context, in *QueryUniversalValidatorsSetRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorsSetResponse, error) { out := new(QueryUniversalValidatorsSetResponse) err := c.cc.Invoke(ctx, Query_AllUniversalValidators_FullMethodName, in, out, opts...) @@ -161,6 +173,8 @@ func (c *queryClient) AllFinalizedBallots(ctx context.Context, in *QueryFinalize type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // UniversalValidator queries one universal validator by core validator address. + UniversalValidator(context.Context, *QueryUniversalValidatorRequest) (*QueryUniversalValidatorResponse, error) // AllUniversalValidators queries the details of a specific universal validator by its address. AllUniversalValidators(context.Context, *QueryUniversalValidatorsSetRequest) (*QueryUniversalValidatorsSetResponse, error) // Ballot queries one ballot by ID. @@ -189,6 +203,9 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (UnimplementedQueryServer) UniversalValidator(context.Context, *QueryUniversalValidatorRequest) (*QueryUniversalValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UniversalValidator not implemented") +} func (UnimplementedQueryServer) AllUniversalValidators(context.Context, *QueryUniversalValidatorsSetRequest) (*QueryUniversalValidatorsSetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllUniversalValidators not implemented") } @@ -247,6 +264,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_UniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUniversalValidatorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UniversalValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_UniversalValidator_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UniversalValidator(ctx, req.(*QueryUniversalValidatorRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_AllUniversalValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryUniversalValidatorsSetRequest) if err := dec(in); err != nil { @@ -420,6 +455,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "UniversalValidator", + Handler: _Query_UniversalValidator_Handler, + }, { MethodName: "AllUniversalValidators", Handler: _Query_AllUniversalValidators_Handler, diff --git a/api/uvalidator/v1/tx.pulsar.go b/api/uvalidator/v1/tx.pulsar.go index 2b65ba4a..1280a312 100644 --- a/api/uvalidator/v1/tx.pulsar.go +++ b/api/uvalidator/v1/tx.pulsar.go @@ -875,6 +875,7 @@ var ( md_MsgAddUniversalValidator protoreflect.MessageDescriptor fd_MsgAddUniversalValidator_signer protoreflect.FieldDescriptor fd_MsgAddUniversalValidator_core_validator_address protoreflect.FieldDescriptor + fd_MsgAddUniversalValidator_network protoreflect.FieldDescriptor ) func init() { @@ -882,6 +883,7 @@ func init() { md_MsgAddUniversalValidator = File_uvalidator_v1_tx_proto.Messages().ByName("MsgAddUniversalValidator") fd_MsgAddUniversalValidator_signer = md_MsgAddUniversalValidator.Fields().ByName("signer") fd_MsgAddUniversalValidator_core_validator_address = md_MsgAddUniversalValidator.Fields().ByName("core_validator_address") + fd_MsgAddUniversalValidator_network = md_MsgAddUniversalValidator.Fields().ByName("network") } var _ protoreflect.Message = (*fastReflection_MsgAddUniversalValidator)(nil) @@ -961,6 +963,923 @@ func (x *fastReflection_MsgAddUniversalValidator) Range(f func(protoreflect.Fiel return } } + if x.Network != nil { + value := protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + if !f(fd_MsgAddUniversalValidator_network, 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_MsgAddUniversalValidator) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.MsgAddUniversalValidator.signer": + return x.Signer != "" + case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": + return x.CoreValidatorAddress != "" + case "uvalidator.v1.MsgAddUniversalValidator.network": + return x.Network != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator 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_MsgAddUniversalValidator) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.MsgAddUniversalValidator.signer": + x.Signer = "" + case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": + x.CoreValidatorAddress = "" + case "uvalidator.v1.MsgAddUniversalValidator.network": + x.Network = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator 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_MsgAddUniversalValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.MsgAddUniversalValidator.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": + value := x.CoreValidatorAddress + return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgAddUniversalValidator.network": + value := x.Network + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator 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_MsgAddUniversalValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.MsgAddUniversalValidator.signer": + x.Signer = value.Interface().(string) + case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": + x.CoreValidatorAddress = value.Interface().(string) + case "uvalidator.v1.MsgAddUniversalValidator.network": + x.Network = value.Message().Interface().(*NetworkInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator 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_MsgAddUniversalValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.MsgAddUniversalValidator.network": + if x.Network == nil { + x.Network = new(NetworkInfo) + } + return protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + case "uvalidator.v1.MsgAddUniversalValidator.signer": + panic(fmt.Errorf("field signer of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) + case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": + panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator 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_MsgAddUniversalValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.MsgAddUniversalValidator.signer": + return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": + return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgAddUniversalValidator.network": + m := new(NetworkInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator 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_MsgAddUniversalValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.MsgAddUniversalValidator", 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_MsgAddUniversalValidator) 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_MsgAddUniversalValidator) 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_MsgAddUniversalValidator) 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_MsgAddUniversalValidator) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAddUniversalValidator) + 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.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CoreValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Network != nil { + l = options.Size(x.Network) + 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().(*MsgAddUniversalValidator) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Network != nil { + encoded, err := options.Marshal(x.Network) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.CoreValidatorAddress) > 0 { + i -= len(x.CoreValidatorAddress) + copy(dAtA[i:], x.CoreValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + 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().(*MsgAddUniversalValidator) + 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: MsgAddUniversalValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUniversalValidator: 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 Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", 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.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Network == nil { + x.Network = &NetworkInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Network); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgAddUniversalValidatorResponse protoreflect.MessageDescriptor +) + +func init() { + file_uvalidator_v1_tx_proto_init() + md_MsgAddUniversalValidatorResponse = File_uvalidator_v1_tx_proto.Messages().ByName("MsgAddUniversalValidatorResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgAddUniversalValidatorResponse)(nil) + +type fastReflection_MsgAddUniversalValidatorResponse MsgAddUniversalValidatorResponse + +func (x *MsgAddUniversalValidatorResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAddUniversalValidatorResponse)(x) +} + +func (x *MsgAddUniversalValidatorResponse) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAddUniversalValidatorResponse_messageType fastReflection_MsgAddUniversalValidatorResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAddUniversalValidatorResponse_messageType{} + +type fastReflection_MsgAddUniversalValidatorResponse_messageType struct{} + +func (x fastReflection_MsgAddUniversalValidatorResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAddUniversalValidatorResponse)(nil) +} +func (x fastReflection_MsgAddUniversalValidatorResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAddUniversalValidatorResponse) +} +func (x fastReflection_MsgAddUniversalValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAddUniversalValidatorResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAddUniversalValidatorResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAddUniversalValidatorResponse +} + +// 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_MsgAddUniversalValidatorResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAddUniversalValidatorResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAddUniversalValidatorResponse) New() protoreflect.Message { + return new(fastReflection_MsgAddUniversalValidatorResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAddUniversalValidatorResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAddUniversalValidatorResponse)(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_MsgAddUniversalValidatorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAddUniversalValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse 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_MsgAddUniversalValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse 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_MsgAddUniversalValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse 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_MsgAddUniversalValidatorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse 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_MsgAddUniversalValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse 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_MsgAddUniversalValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse 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_MsgAddUniversalValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.MsgAddUniversalValidatorResponse", 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_MsgAddUniversalValidatorResponse) 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_MsgAddUniversalValidatorResponse) 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_MsgAddUniversalValidatorResponse) 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_MsgAddUniversalValidatorResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAddUniversalValidatorResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAddUniversalValidatorResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAddUniversalValidatorResponse) + 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: MsgAddUniversalValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUniversalValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateUniversalValidator protoreflect.MessageDescriptor + fd_MsgUpdateUniversalValidator_signer protoreflect.FieldDescriptor + fd_MsgUpdateUniversalValidator_network protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_tx_proto_init() + md_MsgUpdateUniversalValidator = File_uvalidator_v1_tx_proto.Messages().ByName("MsgUpdateUniversalValidator") + fd_MsgUpdateUniversalValidator_signer = md_MsgUpdateUniversalValidator.Fields().ByName("signer") + fd_MsgUpdateUniversalValidator_network = md_MsgUpdateUniversalValidator.Fields().ByName("network") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateUniversalValidator)(nil) + +type fastReflection_MsgUpdateUniversalValidator MsgUpdateUniversalValidator + +func (x *MsgUpdateUniversalValidator) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateUniversalValidator)(x) +} + +func (x *MsgUpdateUniversalValidator) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateUniversalValidator_messageType fastReflection_MsgUpdateUniversalValidator_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateUniversalValidator_messageType{} + +type fastReflection_MsgUpdateUniversalValidator_messageType struct{} + +func (x fastReflection_MsgUpdateUniversalValidator_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateUniversalValidator)(nil) +} +func (x fastReflection_MsgUpdateUniversalValidator_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateUniversalValidator) +} +func (x fastReflection_MsgUpdateUniversalValidator_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateUniversalValidator +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateUniversalValidator) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateUniversalValidator +} + +// 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_MsgUpdateUniversalValidator) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateUniversalValidator_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateUniversalValidator) New() protoreflect.Message { + return new(fastReflection_MsgUpdateUniversalValidator) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateUniversalValidator) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateUniversalValidator)(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_MsgUpdateUniversalValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgUpdateUniversalValidator_signer, value) { + return + } + } + if x.Network != nil { + value := protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + if !f(fd_MsgUpdateUniversalValidator_network, value) { + return + } + } } // Has reports whether a field is populated. @@ -974,17 +1893,17 @@ func (x *fastReflection_MsgAddUniversalValidator) Range(f func(protoreflect.Fiel // 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_MsgAddUniversalValidator) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpdateUniversalValidator) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uvalidator.v1.MsgAddUniversalValidator.signer": + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": return x.Signer != "" - case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": - return x.CoreValidatorAddress != "" + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + return x.Network != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", fd.FullName())) } } @@ -994,17 +1913,17 @@ func (x *fastReflection_MsgAddUniversalValidator) Has(fd protoreflect.FieldDescr // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddUniversalValidator) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpdateUniversalValidator) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uvalidator.v1.MsgAddUniversalValidator.signer": + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": x.Signer = "" - case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": - x.CoreValidatorAddress = "" + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + x.Network = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", fd.FullName())) } } @@ -1014,19 +1933,19 @@ func (x *fastReflection_MsgAddUniversalValidator) Clear(fd protoreflect.FieldDes // 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_MsgAddUniversalValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateUniversalValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uvalidator.v1.MsgAddUniversalValidator.signer": + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": value := x.Signer return protoreflect.ValueOfString(value) - case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": - value := x.CoreValidatorAddress - return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + value := x.Network + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", descriptor.FullName())) } } @@ -1040,17 +1959,17 @@ func (x *fastReflection_MsgAddUniversalValidator) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddUniversalValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpdateUniversalValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uvalidator.v1.MsgAddUniversalValidator.signer": + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": x.Signer = value.Interface().(string) - case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": - x.CoreValidatorAddress = value.Interface().(string) + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + x.Network = value.Message().Interface().(*NetworkInfo) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", fd.FullName())) } } @@ -1064,44 +1983,48 @@ func (x *fastReflection_MsgAddUniversalValidator) Set(fd protoreflect.FieldDescr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddUniversalValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateUniversalValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.MsgAddUniversalValidator.signer": - panic(fmt.Errorf("field signer of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) - case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": - panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + if x.Network == nil { + x.Network = new(NetworkInfo) + } + return protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + panic(fmt.Errorf("field signer of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator 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_MsgAddUniversalValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateUniversalValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.MsgAddUniversalValidator.signer": - return protoreflect.ValueOfString("") - case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + m := new(NetworkInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator 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_MsgAddUniversalValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpdateUniversalValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.MsgAddUniversalValidator", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.MsgUpdateUniversalValidator", d.FullName())) } panic("unreachable") } @@ -1109,7 +2032,7 @@ func (x *fastReflection_MsgAddUniversalValidator) WhichOneof(d protoreflect.Oneo // 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_MsgAddUniversalValidator) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpdateUniversalValidator) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1120,7 +2043,7 @@ func (x *fastReflection_MsgAddUniversalValidator) GetUnknown() protoreflect.RawF // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddUniversalValidator) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpdateUniversalValidator) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1132,7 +2055,7 @@ func (x *fastReflection_MsgAddUniversalValidator) SetUnknown(fields protoreflect // 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_MsgAddUniversalValidator) IsValid() bool { +func (x *fastReflection_MsgUpdateUniversalValidator) IsValid() bool { return x != nil } @@ -1142,9 +2065,9 @@ func (x *fastReflection_MsgAddUniversalValidator) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpdateUniversalValidator) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAddUniversalValidator) + x := input.Message.Interface().(*MsgUpdateUniversalValidator) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1160,8 +2083,8 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.CoreValidatorAddress) - if l > 0 { + if x.Network != nil { + l = options.Size(x.Network) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -1174,7 +2097,7 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAddUniversalValidator) + x := input.Message.Interface().(*MsgUpdateUniversalValidator) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1193,10 +2116,17 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.CoreValidatorAddress) > 0 { - i -= len(x.CoreValidatorAddress) - copy(dAtA[i:], x.CoreValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) + if x.Network != nil { + encoded, err := options.Marshal(x.Network) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } @@ -1218,7 +2148,7 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAddUniversalValidator) + x := input.Message.Interface().(*MsgUpdateUniversalValidator) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1250,10 +2180,10 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUniversalValidator: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUniversalValidator: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUniversalValidator: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUniversalValidator: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1290,9 +2220,9 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1302,23 +2232,27 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + if x.Network == nil { + x.Network = &NetworkInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Network); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -1356,24 +2290,24 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met } var ( - md_MsgAddUniversalValidatorResponse protoreflect.MessageDescriptor + md_MsgUpdateUniversalValidatorResponse protoreflect.MessageDescriptor ) func init() { file_uvalidator_v1_tx_proto_init() - md_MsgAddUniversalValidatorResponse = File_uvalidator_v1_tx_proto.Messages().ByName("MsgAddUniversalValidatorResponse") + md_MsgUpdateUniversalValidatorResponse = File_uvalidator_v1_tx_proto.Messages().ByName("MsgUpdateUniversalValidatorResponse") } -var _ protoreflect.Message = (*fastReflection_MsgAddUniversalValidatorResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpdateUniversalValidatorResponse)(nil) -type fastReflection_MsgAddUniversalValidatorResponse MsgAddUniversalValidatorResponse +type fastReflection_MsgUpdateUniversalValidatorResponse MsgUpdateUniversalValidatorResponse -func (x *MsgAddUniversalValidatorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAddUniversalValidatorResponse)(x) +func (x *MsgUpdateUniversalValidatorResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateUniversalValidatorResponse)(x) } -func (x *MsgAddUniversalValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_tx_proto_msgTypes[3] +func (x *MsgUpdateUniversalValidatorResponse) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1384,43 +2318,43 @@ func (x *MsgAddUniversalValidatorResponse) slowProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -var _fastReflection_MsgAddUniversalValidatorResponse_messageType fastReflection_MsgAddUniversalValidatorResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgAddUniversalValidatorResponse_messageType{} +var _fastReflection_MsgUpdateUniversalValidatorResponse_messageType fastReflection_MsgUpdateUniversalValidatorResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateUniversalValidatorResponse_messageType{} -type fastReflection_MsgAddUniversalValidatorResponse_messageType struct{} +type fastReflection_MsgUpdateUniversalValidatorResponse_messageType struct{} -func (x fastReflection_MsgAddUniversalValidatorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAddUniversalValidatorResponse)(nil) +func (x fastReflection_MsgUpdateUniversalValidatorResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateUniversalValidatorResponse)(nil) } -func (x fastReflection_MsgAddUniversalValidatorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAddUniversalValidatorResponse) +func (x fastReflection_MsgUpdateUniversalValidatorResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateUniversalValidatorResponse) } -func (x fastReflection_MsgAddUniversalValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAddUniversalValidatorResponse +func (x fastReflection_MsgUpdateUniversalValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateUniversalValidatorResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgAddUniversalValidatorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAddUniversalValidatorResponse +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateUniversalValidatorResponse } // 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_MsgAddUniversalValidatorResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgAddUniversalValidatorResponse_messageType +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateUniversalValidatorResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAddUniversalValidatorResponse) New() protoreflect.Message { - return new(fastReflection_MsgAddUniversalValidatorResponse) +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateUniversalValidatorResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAddUniversalValidatorResponse) Interface() protoreflect.ProtoMessage { - return (*MsgAddUniversalValidatorResponse)(x) +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateUniversalValidatorResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1428,7 +2362,7 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) Interface() protorefle // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgAddUniversalValidatorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1442,13 +2376,13 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) Range(f func(protorefl // 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_MsgAddUniversalValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", fd.FullName())) } } @@ -1458,13 +2392,13 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) Has(fd protoreflect.Fi // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddUniversalValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", fd.FullName())) } } @@ -1474,13 +2408,13 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) Clear(fd protoreflect. // 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_MsgAddUniversalValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", descriptor.FullName())) } } @@ -1494,13 +2428,13 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) Get(descriptor protore // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddUniversalValidatorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", fd.FullName())) } } @@ -1514,36 +2448,36 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) Set(fd protoreflect.Fi // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddUniversalValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse 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_MsgAddUniversalValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidatorResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) } - panic(fmt.Errorf("message uvalidator.v1.MsgAddUniversalValidatorResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse 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_MsgAddUniversalValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.MsgAddUniversalValidatorResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.MsgUpdateUniversalValidatorResponse", d.FullName())) } panic("unreachable") } @@ -1551,7 +2485,7 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) WhichOneof(d protorefl // 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_MsgAddUniversalValidatorResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1562,7 +2496,7 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) GetUnknown() protorefl // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddUniversalValidatorResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1574,7 +2508,7 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) SetUnknown(fields prot // 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_MsgAddUniversalValidatorResponse) IsValid() bool { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) IsValid() bool { return x != nil } @@ -1584,9 +2518,9 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAddUniversalValidatorResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAddUniversalValidatorResponse) + x := input.Message.Interface().(*MsgUpdateUniversalValidatorResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1608,7 +2542,7 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) ProtoMethods() *protoi } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAddUniversalValidatorResponse) + x := input.Message.Interface().(*MsgUpdateUniversalValidatorResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1638,7 +2572,7 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) ProtoMethods() *protoi }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAddUniversalValidatorResponse) + x := input.Message.Interface().(*MsgUpdateUniversalValidatorResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1670,10 +2604,10 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) ProtoMethods() *protoi fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUniversalValidatorResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUniversalValidatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUniversalValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUniversalValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1733,7 +2667,7 @@ func (x *MsgRemoveUniversalValidator) ProtoReflect() protoreflect.Message { } func (x *MsgRemoveUniversalValidator) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_tx_proto_msgTypes[4] + mi := &file_uvalidator_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2213,7 +3147,7 @@ func (x *MsgRemoveUniversalValidatorResponse) ProtoReflect() protoreflect.Messag } func (x *MsgRemoveUniversalValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_tx_proto_msgTypes[5] + mi := &file_uvalidator_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2653,6 +3587,8 @@ type MsgAddUniversalValidator struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // core_validator_address is the address of the core validator. CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` + // network metadata for validator node (IP, etc.) + Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` } func (x *MsgAddUniversalValidator) Reset() { @@ -2689,6 +3625,13 @@ func (x *MsgAddUniversalValidator) GetCoreValidatorAddress() string { return "" } +func (x *MsgAddUniversalValidator) GetNetwork() *NetworkInfo { + if x != nil { + return x.Network + } + return nil +} + type MsgAddUniversalValidatorResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2715,6 +3658,77 @@ func (*MsgAddUniversalValidatorResponse) Descriptor() ([]byte, []int) { return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{3} } +type MsgUpdateUniversalValidator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signer is the address authorized to execute this message + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // network metadata for validator node + Network *NetworkInfo `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` +} + +func (x *MsgUpdateUniversalValidator) Reset() { + *x = MsgUpdateUniversalValidator{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateUniversalValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateUniversalValidator) ProtoMessage() {} + +// Deprecated: Use MsgUpdateUniversalValidator.ProtoReflect.Descriptor instead. +func (*MsgUpdateUniversalValidator) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgUpdateUniversalValidator) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgUpdateUniversalValidator) GetNetwork() *NetworkInfo { + if x != nil { + return x.Network + } + return nil +} + +type MsgUpdateUniversalValidatorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateUniversalValidatorResponse) Reset() { + *x = MsgUpdateUniversalValidatorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateUniversalValidatorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateUniversalValidatorResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateUniversalValidatorResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateUniversalValidatorResponse) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{5} +} + type MsgRemoveUniversalValidator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2729,7 +3743,7 @@ type MsgRemoveUniversalValidator struct { func (x *MsgRemoveUniversalValidator) Reset() { *x = MsgRemoveUniversalValidator{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_tx_proto_msgTypes[4] + mi := &file_uvalidator_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2743,7 +3757,7 @@ func (*MsgRemoveUniversalValidator) ProtoMessage() {} // Deprecated: Use MsgRemoveUniversalValidator.ProtoReflect.Descriptor instead. func (*MsgRemoveUniversalValidator) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{4} + return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgRemoveUniversalValidator) GetSigner() string { @@ -2769,7 +3783,7 @@ type MsgRemoveUniversalValidatorResponse struct { func (x *MsgRemoveUniversalValidatorResponse) Reset() { *x = MsgRemoveUniversalValidatorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_tx_proto_msgTypes[5] + mi := &file_uvalidator_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2783,7 +3797,7 @@ func (*MsgRemoveUniversalValidatorResponse) ProtoMessage() {} // Deprecated: Use MsgRemoveUniversalValidatorResponse.ProtoReflect.Descriptor instead. func (*MsgRemoveUniversalValidatorResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{5} + return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{7} } var File_uvalidator_v1_tx_proto protoreflect.FileDescriptor @@ -2800,84 +3814,111 @@ var file_uvalidator_v1_tx_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, - 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, - 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, - 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x0f, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, 0x02, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, + 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, + 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, + 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, + 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x25, + 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, - 0x2a, 0x23, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, + 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xcf, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x27, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2f, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1b, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x16, 0x63, - 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x36, 0x82, 0xe7, 0xb0, - 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd3, 0x02, 0x0a, 0x03, 0x4d, - 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x15, 0x41, 0x64, - 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x27, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2f, 0x2e, 0x75, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, - 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x18, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, - 0x42, 0xb6, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, - 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, + 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb6, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2892,29 +3933,36 @@ func file_uvalidator_v1_tx_proto_rawDescGZIP() []byte { return file_uvalidator_v1_tx_proto_rawDescData } -var file_uvalidator_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_uvalidator_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_uvalidator_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: uvalidator.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: uvalidator.v1.MsgUpdateParamsResponse (*MsgAddUniversalValidator)(nil), // 2: uvalidator.v1.MsgAddUniversalValidator (*MsgAddUniversalValidatorResponse)(nil), // 3: uvalidator.v1.MsgAddUniversalValidatorResponse - (*MsgRemoveUniversalValidator)(nil), // 4: uvalidator.v1.MsgRemoveUniversalValidator - (*MsgRemoveUniversalValidatorResponse)(nil), // 5: uvalidator.v1.MsgRemoveUniversalValidatorResponse - (*Params)(nil), // 6: uvalidator.v1.Params + (*MsgUpdateUniversalValidator)(nil), // 4: uvalidator.v1.MsgUpdateUniversalValidator + (*MsgUpdateUniversalValidatorResponse)(nil), // 5: uvalidator.v1.MsgUpdateUniversalValidatorResponse + (*MsgRemoveUniversalValidator)(nil), // 6: uvalidator.v1.MsgRemoveUniversalValidator + (*MsgRemoveUniversalValidatorResponse)(nil), // 7: uvalidator.v1.MsgRemoveUniversalValidatorResponse + (*Params)(nil), // 8: uvalidator.v1.Params + (*NetworkInfo)(nil), // 9: uvalidator.v1.NetworkInfo } var file_uvalidator_v1_tx_proto_depIdxs = []int32{ - 6, // 0: uvalidator.v1.MsgUpdateParams.params:type_name -> uvalidator.v1.Params - 0, // 1: uvalidator.v1.Msg.UpdateParams:input_type -> uvalidator.v1.MsgUpdateParams - 2, // 2: uvalidator.v1.Msg.AddUniversalValidator:input_type -> uvalidator.v1.MsgAddUniversalValidator - 4, // 3: uvalidator.v1.Msg.RemoveUniversalValidator:input_type -> uvalidator.v1.MsgRemoveUniversalValidator - 1, // 4: uvalidator.v1.Msg.UpdateParams:output_type -> uvalidator.v1.MsgUpdateParamsResponse - 3, // 5: uvalidator.v1.Msg.AddUniversalValidator:output_type -> uvalidator.v1.MsgAddUniversalValidatorResponse - 5, // 6: uvalidator.v1.Msg.RemoveUniversalValidator:output_type -> uvalidator.v1.MsgRemoveUniversalValidatorResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 8, // 0: uvalidator.v1.MsgUpdateParams.params:type_name -> uvalidator.v1.Params + 9, // 1: uvalidator.v1.MsgAddUniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo + 9, // 2: uvalidator.v1.MsgUpdateUniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo + 0, // 3: uvalidator.v1.Msg.UpdateParams:input_type -> uvalidator.v1.MsgUpdateParams + 2, // 4: uvalidator.v1.Msg.AddUniversalValidator:input_type -> uvalidator.v1.MsgAddUniversalValidator + 4, // 5: uvalidator.v1.Msg.UpdateUniversalValidator:input_type -> uvalidator.v1.MsgUpdateUniversalValidator + 6, // 6: uvalidator.v1.Msg.RemoveUniversalValidator:input_type -> uvalidator.v1.MsgRemoveUniversalValidator + 1, // 7: uvalidator.v1.Msg.UpdateParams:output_type -> uvalidator.v1.MsgUpdateParamsResponse + 3, // 8: uvalidator.v1.Msg.AddUniversalValidator:output_type -> uvalidator.v1.MsgAddUniversalValidatorResponse + 5, // 9: uvalidator.v1.Msg.UpdateUniversalValidator:output_type -> uvalidator.v1.MsgUpdateUniversalValidatorResponse + 7, // 10: uvalidator.v1.Msg.RemoveUniversalValidator:output_type -> uvalidator.v1.MsgRemoveUniversalValidatorResponse + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_uvalidator_v1_tx_proto_init() } @@ -2924,6 +3972,7 @@ func file_uvalidator_v1_tx_proto_init() { } file_uvalidator_v1_genesis_proto_init() file_uvalidator_v1_types_proto_init() + file_uvalidator_v1_validator_proto_init() if !protoimpl.UnsafeEnabled { file_uvalidator_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { @@ -2974,7 +4023,7 @@ func file_uvalidator_v1_tx_proto_init() { } } file_uvalidator_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRemoveUniversalValidator); i { + switch v := v.(*MsgUpdateUniversalValidator); i { case 0: return &v.state case 1: @@ -2986,6 +4035,30 @@ func file_uvalidator_v1_tx_proto_init() { } } file_uvalidator_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateUniversalValidatorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRemoveUniversalValidator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveUniversalValidatorResponse); i { case 0: return &v.state @@ -3004,7 +4077,7 @@ func file_uvalidator_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uvalidator_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/uvalidator/v1/tx_grpc.pb.go b/api/uvalidator/v1/tx_grpc.pb.go index fa8ebf8d..39739580 100644 --- a/api/uvalidator/v1/tx_grpc.pb.go +++ b/api/uvalidator/v1/tx_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/uvalidator.v1.Msg/UpdateParams" Msg_AddUniversalValidator_FullMethodName = "/uvalidator.v1.Msg/AddUniversalValidator" + Msg_UpdateUniversalValidator_FullMethodName = "/uvalidator.v1.Msg/UpdateUniversalValidator" Msg_RemoveUniversalValidator_FullMethodName = "/uvalidator.v1.Msg/RemoveUniversalValidator" ) @@ -34,6 +35,8 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // AddUniversalValidator defines a message to add a universal validator. AddUniversalValidator(ctx context.Context, in *MsgAddUniversalValidator, opts ...grpc.CallOption) (*MsgAddUniversalValidatorResponse, error) + // UpdateUniversalValidator defines a message to update a universal validator. + UpdateUniversalValidator(ctx context.Context, in *MsgUpdateUniversalValidator, opts ...grpc.CallOption) (*MsgUpdateUniversalValidatorResponse, error) // RemoveUniversalValidator defines a message to remove a universal validator. RemoveUniversalValidator(ctx context.Context, in *MsgRemoveUniversalValidator, opts ...grpc.CallOption) (*MsgRemoveUniversalValidatorResponse, error) } @@ -64,6 +67,15 @@ func (c *msgClient) AddUniversalValidator(ctx context.Context, in *MsgAddUnivers return out, nil } +func (c *msgClient) UpdateUniversalValidator(ctx context.Context, in *MsgUpdateUniversalValidator, opts ...grpc.CallOption) (*MsgUpdateUniversalValidatorResponse, error) { + out := new(MsgUpdateUniversalValidatorResponse) + err := c.cc.Invoke(ctx, Msg_UpdateUniversalValidator_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) RemoveUniversalValidator(ctx context.Context, in *MsgRemoveUniversalValidator, opts ...grpc.CallOption) (*MsgRemoveUniversalValidatorResponse, error) { out := new(MsgRemoveUniversalValidatorResponse) err := c.cc.Invoke(ctx, Msg_RemoveUniversalValidator_FullMethodName, in, out, opts...) @@ -83,6 +95,8 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // AddUniversalValidator defines a message to add a universal validator. AddUniversalValidator(context.Context, *MsgAddUniversalValidator) (*MsgAddUniversalValidatorResponse, error) + // UpdateUniversalValidator defines a message to update a universal validator. + UpdateUniversalValidator(context.Context, *MsgUpdateUniversalValidator) (*MsgUpdateUniversalValidatorResponse, error) // RemoveUniversalValidator defines a message to remove a universal validator. RemoveUniversalValidator(context.Context, *MsgRemoveUniversalValidator) (*MsgRemoveUniversalValidatorResponse, error) mustEmbedUnimplementedMsgServer() @@ -98,6 +112,9 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (* func (UnimplementedMsgServer) AddUniversalValidator(context.Context, *MsgAddUniversalValidator) (*MsgAddUniversalValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddUniversalValidator not implemented") } +func (UnimplementedMsgServer) UpdateUniversalValidator(context.Context, *MsgUpdateUniversalValidator) (*MsgUpdateUniversalValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUniversalValidator not implemented") +} func (UnimplementedMsgServer) RemoveUniversalValidator(context.Context, *MsgRemoveUniversalValidator) (*MsgRemoveUniversalValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveUniversalValidator not implemented") } @@ -150,6 +167,24 @@ func _Msg_AddUniversalValidator_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Msg_UpdateUniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateUniversalValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateUniversalValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateUniversalValidator_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateUniversalValidator(ctx, req.(*MsgUpdateUniversalValidator)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_RemoveUniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveUniversalValidator) if err := dec(in); err != nil { @@ -183,6 +218,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "AddUniversalValidator", Handler: _Msg_AddUniversalValidator_Handler, }, + { + MethodName: "UpdateUniversalValidator", + Handler: _Msg_UpdateUniversalValidator_Handler, + }, { MethodName: "RemoveUniversalValidator", Handler: _Msg_RemoveUniversalValidator_Handler, diff --git a/api/uvalidator/v1/validator.pulsar.go b/api/uvalidator/v1/validator.pulsar.go new file mode 100644 index 00000000..dbe58f07 --- /dev/null +++ b/api/uvalidator/v1/validator.pulsar.go @@ -0,0 +1,3061 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package uvalidatorv1 + +import ( + _ "cosmossdk.io/api/amino" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_IdentityInfo protoreflect.MessageDescriptor + fd_IdentityInfo_core_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_IdentityInfo = File_uvalidator_v1_validator_proto.Messages().ByName("IdentityInfo") + fd_IdentityInfo_core_validator_address = md_IdentityInfo.Fields().ByName("core_validator_address") +} + +var _ protoreflect.Message = (*fastReflection_IdentityInfo)(nil) + +type fastReflection_IdentityInfo IdentityInfo + +func (x *IdentityInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_IdentityInfo)(x) +} + +func (x *IdentityInfo) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_IdentityInfo_messageType fastReflection_IdentityInfo_messageType +var _ protoreflect.MessageType = fastReflection_IdentityInfo_messageType{} + +type fastReflection_IdentityInfo_messageType struct{} + +func (x fastReflection_IdentityInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_IdentityInfo)(nil) +} +func (x fastReflection_IdentityInfo_messageType) New() protoreflect.Message { + return new(fastReflection_IdentityInfo) +} +func (x fastReflection_IdentityInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_IdentityInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_IdentityInfo) Descriptor() protoreflect.MessageDescriptor { + return md_IdentityInfo +} + +// 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_IdentityInfo) Type() protoreflect.MessageType { + return _fastReflection_IdentityInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_IdentityInfo) New() protoreflect.Message { + return new(fastReflection_IdentityInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_IdentityInfo) Interface() protoreflect.ProtoMessage { + return (*IdentityInfo)(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_IdentityInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CoreValidatorAddress != "" { + value := protoreflect.ValueOfString(x.CoreValidatorAddress) + if !f(fd_IdentityInfo_core_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_IdentityInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + return x.CoreValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo 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_IdentityInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + x.CoreValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo 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_IdentityInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + value := x.CoreValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo 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_IdentityInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + x.CoreValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo 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_IdentityInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.IdentityInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo 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_IdentityInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo 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_IdentityInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.IdentityInfo", 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_IdentityInfo) 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_IdentityInfo) 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_IdentityInfo) 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_IdentityInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*IdentityInfo) + 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.CoreValidatorAddress) + 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().(*IdentityInfo) + 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.CoreValidatorAddress) > 0 { + i -= len(x.CoreValidatorAddress) + copy(dAtA[i:], x.CoreValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) + 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().(*IdentityInfo) + 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: IdentityInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IdentityInfo: 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 CoreValidatorAddress", 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.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_NetworkInfo_2_list)(nil) + +type _NetworkInfo_2_list struct { + list *[]string +} + +func (x *_NetworkInfo_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_NetworkInfo_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_NetworkInfo_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_NetworkInfo_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_NetworkInfo_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message NetworkInfo at list field MultiAddrs as it is not of Message kind")) +} + +func (x *_NetworkInfo_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_NetworkInfo_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_NetworkInfo_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_NetworkInfo protoreflect.MessageDescriptor + fd_NetworkInfo_peer_id protoreflect.FieldDescriptor + fd_NetworkInfo_multi_addrs protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_NetworkInfo = File_uvalidator_v1_validator_proto.Messages().ByName("NetworkInfo") + fd_NetworkInfo_peer_id = md_NetworkInfo.Fields().ByName("peer_id") + fd_NetworkInfo_multi_addrs = md_NetworkInfo.Fields().ByName("multi_addrs") +} + +var _ protoreflect.Message = (*fastReflection_NetworkInfo)(nil) + +type fastReflection_NetworkInfo NetworkInfo + +func (x *NetworkInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_NetworkInfo)(x) +} + +func (x *NetworkInfo) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_NetworkInfo_messageType fastReflection_NetworkInfo_messageType +var _ protoreflect.MessageType = fastReflection_NetworkInfo_messageType{} + +type fastReflection_NetworkInfo_messageType struct{} + +func (x fastReflection_NetworkInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_NetworkInfo)(nil) +} +func (x fastReflection_NetworkInfo_messageType) New() protoreflect.Message { + return new(fastReflection_NetworkInfo) +} +func (x fastReflection_NetworkInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_NetworkInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_NetworkInfo) Descriptor() protoreflect.MessageDescriptor { + return md_NetworkInfo +} + +// 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_NetworkInfo) Type() protoreflect.MessageType { + return _fastReflection_NetworkInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_NetworkInfo) New() protoreflect.Message { + return new(fastReflection_NetworkInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_NetworkInfo) Interface() protoreflect.ProtoMessage { + return (*NetworkInfo)(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_NetworkInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.PeerId != "" { + value := protoreflect.ValueOfString(x.PeerId) + if !f(fd_NetworkInfo_peer_id, value) { + return + } + } + if len(x.MultiAddrs) != 0 { + value := protoreflect.ValueOfList(&_NetworkInfo_2_list{list: &x.MultiAddrs}) + if !f(fd_NetworkInfo_multi_addrs, 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_NetworkInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.peer_id": + return x.PeerId != "" + case "uvalidator.v1.NetworkInfo.multi_addrs": + return len(x.MultiAddrs) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo 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_NetworkInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.peer_id": + x.PeerId = "" + case "uvalidator.v1.NetworkInfo.multi_addrs": + x.MultiAddrs = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo 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_NetworkInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.NetworkInfo.peer_id": + value := x.PeerId + return protoreflect.ValueOfString(value) + case "uvalidator.v1.NetworkInfo.multi_addrs": + if len(x.MultiAddrs) == 0 { + return protoreflect.ValueOfList(&_NetworkInfo_2_list{}) + } + listValue := &_NetworkInfo_2_list{list: &x.MultiAddrs} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo 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_NetworkInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.peer_id": + x.PeerId = value.Interface().(string) + case "uvalidator.v1.NetworkInfo.multi_addrs": + lv := value.List() + clv := lv.(*_NetworkInfo_2_list) + x.MultiAddrs = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo 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_NetworkInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.multi_addrs": + if x.MultiAddrs == nil { + x.MultiAddrs = []string{} + } + value := &_NetworkInfo_2_list{list: &x.MultiAddrs} + return protoreflect.ValueOfList(value) + case "uvalidator.v1.NetworkInfo.peer_id": + panic(fmt.Errorf("field peer_id of message uvalidator.v1.NetworkInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo 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_NetworkInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.peer_id": + return protoreflect.ValueOfString("") + case "uvalidator.v1.NetworkInfo.multi_addrs": + list := []string{} + return protoreflect.ValueOfList(&_NetworkInfo_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo 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_NetworkInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.NetworkInfo", 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_NetworkInfo) 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_NetworkInfo) 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_NetworkInfo) 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_NetworkInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*NetworkInfo) + 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.PeerId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.MultiAddrs) > 0 { + for _, s := range x.MultiAddrs { + l = len(s) + 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().(*NetworkInfo) + 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.MultiAddrs) > 0 { + for iNdEx := len(x.MultiAddrs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.MultiAddrs[iNdEx]) + copy(dAtA[i:], x.MultiAddrs[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MultiAddrs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.PeerId) > 0 { + i -= len(x.PeerId) + copy(dAtA[i:], x.PeerId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PeerId))) + 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().(*NetworkInfo) + 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: NetworkInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NetworkInfo: 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 PeerId", 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.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MultiAddrs", 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.MultiAddrs = append(x.MultiAddrs, 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_LifecycleEvent protoreflect.MessageDescriptor + fd_LifecycleEvent_status protoreflect.FieldDescriptor + fd_LifecycleEvent_block_height protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_LifecycleEvent = File_uvalidator_v1_validator_proto.Messages().ByName("LifecycleEvent") + fd_LifecycleEvent_status = md_LifecycleEvent.Fields().ByName("status") + fd_LifecycleEvent_block_height = md_LifecycleEvent.Fields().ByName("block_height") +} + +var _ protoreflect.Message = (*fastReflection_LifecycleEvent)(nil) + +type fastReflection_LifecycleEvent LifecycleEvent + +func (x *LifecycleEvent) ProtoReflect() protoreflect.Message { + return (*fastReflection_LifecycleEvent)(x) +} + +func (x *LifecycleEvent) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_LifecycleEvent_messageType fastReflection_LifecycleEvent_messageType +var _ protoreflect.MessageType = fastReflection_LifecycleEvent_messageType{} + +type fastReflection_LifecycleEvent_messageType struct{} + +func (x fastReflection_LifecycleEvent_messageType) Zero() protoreflect.Message { + return (*fastReflection_LifecycleEvent)(nil) +} +func (x fastReflection_LifecycleEvent_messageType) New() protoreflect.Message { + return new(fastReflection_LifecycleEvent) +} +func (x fastReflection_LifecycleEvent_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_LifecycleEvent +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_LifecycleEvent) Descriptor() protoreflect.MessageDescriptor { + return md_LifecycleEvent +} + +// 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_LifecycleEvent) Type() protoreflect.MessageType { + return _fastReflection_LifecycleEvent_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_LifecycleEvent) New() protoreflect.Message { + return new(fastReflection_LifecycleEvent) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_LifecycleEvent) Interface() protoreflect.ProtoMessage { + return (*LifecycleEvent)(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_LifecycleEvent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Status != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) + if !f(fd_LifecycleEvent_status, value) { + return + } + } + if x.BlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.BlockHeight) + if !f(fd_LifecycleEvent_block_height, 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_LifecycleEvent) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + return x.Status != 0 + case "uvalidator.v1.LifecycleEvent.block_height": + return x.BlockHeight != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent 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_LifecycleEvent) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + x.Status = 0 + case "uvalidator.v1.LifecycleEvent.block_height": + x.BlockHeight = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent 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_LifecycleEvent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + value := x.Status + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uvalidator.v1.LifecycleEvent.block_height": + value := x.BlockHeight + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent 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_LifecycleEvent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + x.Status = (UVStatus)(value.Enum()) + case "uvalidator.v1.LifecycleEvent.block_height": + x.BlockHeight = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent 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_LifecycleEvent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + panic(fmt.Errorf("field status of message uvalidator.v1.LifecycleEvent is not mutable")) + case "uvalidator.v1.LifecycleEvent.block_height": + panic(fmt.Errorf("field block_height of message uvalidator.v1.LifecycleEvent is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent 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_LifecycleEvent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + return protoreflect.ValueOfEnum(0) + case "uvalidator.v1.LifecycleEvent.block_height": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent 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_LifecycleEvent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.LifecycleEvent", 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_LifecycleEvent) 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_LifecycleEvent) 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_LifecycleEvent) 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_LifecycleEvent) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*LifecycleEvent) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Status != 0 { + n += 1 + runtime.Sov(uint64(x.Status)) + } + if x.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) + } + 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().(*LifecycleEvent) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if x.Status != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*LifecycleEvent) + 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: LifecycleEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LifecycleEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + x.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Status |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + x.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_LifecycleInfo_2_list)(nil) + +type _LifecycleInfo_2_list struct { + list *[]*LifecycleEvent +} + +func (x *_LifecycleInfo_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_LifecycleInfo_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_LifecycleInfo_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*LifecycleEvent) + (*x.list)[i] = concreteValue +} + +func (x *_LifecycleInfo_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*LifecycleEvent) + *x.list = append(*x.list, concreteValue) +} + +func (x *_LifecycleInfo_2_list) AppendMutable() protoreflect.Value { + v := new(LifecycleEvent) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_LifecycleInfo_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_LifecycleInfo_2_list) NewElement() protoreflect.Value { + v := new(LifecycleEvent) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_LifecycleInfo_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_LifecycleInfo protoreflect.MessageDescriptor + fd_LifecycleInfo_current_status protoreflect.FieldDescriptor + fd_LifecycleInfo_history protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_LifecycleInfo = File_uvalidator_v1_validator_proto.Messages().ByName("LifecycleInfo") + fd_LifecycleInfo_current_status = md_LifecycleInfo.Fields().ByName("current_status") + fd_LifecycleInfo_history = md_LifecycleInfo.Fields().ByName("history") +} + +var _ protoreflect.Message = (*fastReflection_LifecycleInfo)(nil) + +type fastReflection_LifecycleInfo LifecycleInfo + +func (x *LifecycleInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_LifecycleInfo)(x) +} + +func (x *LifecycleInfo) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_LifecycleInfo_messageType fastReflection_LifecycleInfo_messageType +var _ protoreflect.MessageType = fastReflection_LifecycleInfo_messageType{} + +type fastReflection_LifecycleInfo_messageType struct{} + +func (x fastReflection_LifecycleInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_LifecycleInfo)(nil) +} +func (x fastReflection_LifecycleInfo_messageType) New() protoreflect.Message { + return new(fastReflection_LifecycleInfo) +} +func (x fastReflection_LifecycleInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_LifecycleInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_LifecycleInfo) Descriptor() protoreflect.MessageDescriptor { + return md_LifecycleInfo +} + +// 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_LifecycleInfo) Type() protoreflect.MessageType { + return _fastReflection_LifecycleInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_LifecycleInfo) New() protoreflect.Message { + return new(fastReflection_LifecycleInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_LifecycleInfo) Interface() protoreflect.ProtoMessage { + return (*LifecycleInfo)(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_LifecycleInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CurrentStatus != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.CurrentStatus)) + if !f(fd_LifecycleInfo_current_status, value) { + return + } + } + if len(x.History) != 0 { + value := protoreflect.ValueOfList(&_LifecycleInfo_2_list{list: &x.History}) + if !f(fd_LifecycleInfo_history, 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_LifecycleInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.LifecycleInfo.current_status": + return x.CurrentStatus != 0 + case "uvalidator.v1.LifecycleInfo.history": + return len(x.History) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo 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_LifecycleInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.LifecycleInfo.current_status": + x.CurrentStatus = 0 + case "uvalidator.v1.LifecycleInfo.history": + x.History = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo 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_LifecycleInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.LifecycleInfo.current_status": + value := x.CurrentStatus + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uvalidator.v1.LifecycleInfo.history": + if len(x.History) == 0 { + return protoreflect.ValueOfList(&_LifecycleInfo_2_list{}) + } + listValue := &_LifecycleInfo_2_list{list: &x.History} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo 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_LifecycleInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.LifecycleInfo.current_status": + x.CurrentStatus = (UVStatus)(value.Enum()) + case "uvalidator.v1.LifecycleInfo.history": + lv := value.List() + clv := lv.(*_LifecycleInfo_2_list) + x.History = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo 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_LifecycleInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.LifecycleInfo.history": + if x.History == nil { + x.History = []*LifecycleEvent{} + } + value := &_LifecycleInfo_2_list{list: &x.History} + return protoreflect.ValueOfList(value) + case "uvalidator.v1.LifecycleInfo.current_status": + panic(fmt.Errorf("field current_status of message uvalidator.v1.LifecycleInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo 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_LifecycleInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.LifecycleInfo.current_status": + return protoreflect.ValueOfEnum(0) + case "uvalidator.v1.LifecycleInfo.history": + list := []*LifecycleEvent{} + return protoreflect.ValueOfList(&_LifecycleInfo_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo 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_LifecycleInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.LifecycleInfo", 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_LifecycleInfo) 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_LifecycleInfo) 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_LifecycleInfo) 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_LifecycleInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*LifecycleInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.CurrentStatus != 0 { + n += 1 + runtime.Sov(uint64(x.CurrentStatus)) + } + if len(x.History) > 0 { + for _, e := range x.History { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*LifecycleInfo) + 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.History) > 0 { + for iNdEx := len(x.History) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.History[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.CurrentStatus != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CurrentStatus)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*LifecycleInfo) + 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: LifecycleInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LifecycleInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentStatus", wireType) + } + x.CurrentStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.CurrentStatus |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field History", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.History = append(x.History, &LifecycleEvent{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.History[len(x.History)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_UniversalValidator protoreflect.MessageDescriptor + fd_UniversalValidator_identify_info protoreflect.FieldDescriptor + fd_UniversalValidator_network_info protoreflect.FieldDescriptor + fd_UniversalValidator_lifecycle_info protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_UniversalValidator = File_uvalidator_v1_validator_proto.Messages().ByName("UniversalValidator") + fd_UniversalValidator_identify_info = md_UniversalValidator.Fields().ByName("identify_info") + fd_UniversalValidator_network_info = md_UniversalValidator.Fields().ByName("network_info") + fd_UniversalValidator_lifecycle_info = md_UniversalValidator.Fields().ByName("lifecycle_info") +} + +var _ protoreflect.Message = (*fastReflection_UniversalValidator)(nil) + +type fastReflection_UniversalValidator UniversalValidator + +func (x *UniversalValidator) ProtoReflect() protoreflect.Message { + return (*fastReflection_UniversalValidator)(x) +} + +func (x *UniversalValidator) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_UniversalValidator_messageType fastReflection_UniversalValidator_messageType +var _ protoreflect.MessageType = fastReflection_UniversalValidator_messageType{} + +type fastReflection_UniversalValidator_messageType struct{} + +func (x fastReflection_UniversalValidator_messageType) Zero() protoreflect.Message { + return (*fastReflection_UniversalValidator)(nil) +} +func (x fastReflection_UniversalValidator_messageType) New() protoreflect.Message { + return new(fastReflection_UniversalValidator) +} +func (x fastReflection_UniversalValidator_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_UniversalValidator +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_UniversalValidator) Descriptor() protoreflect.MessageDescriptor { + return md_UniversalValidator +} + +// 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_UniversalValidator) Type() protoreflect.MessageType { + return _fastReflection_UniversalValidator_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_UniversalValidator) New() protoreflect.Message { + return new(fastReflection_UniversalValidator) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_UniversalValidator) Interface() protoreflect.ProtoMessage { + return (*UniversalValidator)(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_UniversalValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.IdentifyInfo != nil { + value := protoreflect.ValueOfMessage(x.IdentifyInfo.ProtoReflect()) + if !f(fd_UniversalValidator_identify_info, value) { + return + } + } + if x.NetworkInfo != nil { + value := protoreflect.ValueOfMessage(x.NetworkInfo.ProtoReflect()) + if !f(fd_UniversalValidator_network_info, value) { + return + } + } + if x.LifecycleInfo != nil { + value := protoreflect.ValueOfMessage(x.LifecycleInfo.ProtoReflect()) + if !f(fd_UniversalValidator_lifecycle_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_UniversalValidator) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.identify_info": + return x.IdentifyInfo != nil + case "uvalidator.v1.UniversalValidator.network_info": + return x.NetworkInfo != nil + case "uvalidator.v1.UniversalValidator.lifecycle_info": + return x.LifecycleInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator 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_UniversalValidator) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.identify_info": + x.IdentifyInfo = nil + case "uvalidator.v1.UniversalValidator.network_info": + x.NetworkInfo = nil + case "uvalidator.v1.UniversalValidator.lifecycle_info": + x.LifecycleInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator 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_UniversalValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.UniversalValidator.identify_info": + value := x.IdentifyInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "uvalidator.v1.UniversalValidator.network_info": + value := x.NetworkInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "uvalidator.v1.UniversalValidator.lifecycle_info": + value := x.LifecycleInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator 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_UniversalValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.identify_info": + x.IdentifyInfo = value.Message().Interface().(*IdentityInfo) + case "uvalidator.v1.UniversalValidator.network_info": + x.NetworkInfo = value.Message().Interface().(*NetworkInfo) + case "uvalidator.v1.UniversalValidator.lifecycle_info": + x.LifecycleInfo = value.Message().Interface().(*LifecycleInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator 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_UniversalValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.identify_info": + if x.IdentifyInfo == nil { + x.IdentifyInfo = new(IdentityInfo) + } + return protoreflect.ValueOfMessage(x.IdentifyInfo.ProtoReflect()) + case "uvalidator.v1.UniversalValidator.network_info": + if x.NetworkInfo == nil { + x.NetworkInfo = new(NetworkInfo) + } + return protoreflect.ValueOfMessage(x.NetworkInfo.ProtoReflect()) + case "uvalidator.v1.UniversalValidator.lifecycle_info": + if x.LifecycleInfo == nil { + x.LifecycleInfo = new(LifecycleInfo) + } + return protoreflect.ValueOfMessage(x.LifecycleInfo.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator 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_UniversalValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.identify_info": + m := new(IdentityInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "uvalidator.v1.UniversalValidator.network_info": + m := new(NetworkInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "uvalidator.v1.UniversalValidator.lifecycle_info": + m := new(LifecycleInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator 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_UniversalValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.UniversalValidator", 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_UniversalValidator) 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_UniversalValidator) 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_UniversalValidator) 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_UniversalValidator) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*UniversalValidator) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.IdentifyInfo != nil { + l = options.Size(x.IdentifyInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.NetworkInfo != nil { + l = options.Size(x.NetworkInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.LifecycleInfo != nil { + l = options.Size(x.LifecycleInfo) + 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().(*UniversalValidator) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.LifecycleInfo != nil { + encoded, err := options.Marshal(x.LifecycleInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.NetworkInfo != nil { + encoded, err := options.Marshal(x.NetworkInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.IdentifyInfo != nil { + encoded, err := options.Marshal(x.IdentifyInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*UniversalValidator) + 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: UniversalValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UniversalValidator: 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 IdentifyInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.IdentifyInfo == nil { + x.IdentifyInfo = &IdentityInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.IdentifyInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NetworkInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.NetworkInfo == nil { + x.NetworkInfo = &NetworkInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NetworkInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LifecycleInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.LifecycleInfo == nil { + x.LifecycleInfo = &LifecycleInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LifecycleInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: uvalidator/v1/validator.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Universal Validator status +type UVStatus int32 + +const ( + UVStatus_UV_STATUS_UNSPECIFIED UVStatus = 0 + UVStatus_UV_STATUS_ACTIVE UVStatus = 1 // Fully active (votes + signs) + UVStatus_UV_STATUS_PENDING_JOIN UVStatus = 2 // Waiting for onboarding keygen / vote + UVStatus_UV_STATUS_PENDING_LEAVE UVStatus = 3 // Marked for removal (still active until TSS reshare) + UVStatus_UV_STATUS_INACTIVE UVStatus = 4 // No longer part of the validator set +) + +// Enum value maps for UVStatus. +var ( + UVStatus_name = map[int32]string{ + 0: "UV_STATUS_UNSPECIFIED", + 1: "UV_STATUS_ACTIVE", + 2: "UV_STATUS_PENDING_JOIN", + 3: "UV_STATUS_PENDING_LEAVE", + 4: "UV_STATUS_INACTIVE", + } + UVStatus_value = map[string]int32{ + "UV_STATUS_UNSPECIFIED": 0, + "UV_STATUS_ACTIVE": 1, + "UV_STATUS_PENDING_JOIN": 2, + "UV_STATUS_PENDING_LEAVE": 3, + "UV_STATUS_INACTIVE": 4, + } +) + +func (x UVStatus) Enum() *UVStatus { + p := new(UVStatus) + *p = x + return p +} + +func (x UVStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UVStatus) Descriptor() protoreflect.EnumDescriptor { + return file_uvalidator_v1_validator_proto_enumTypes[0].Descriptor() +} + +func (UVStatus) Type() protoreflect.EnumType { + return &file_uvalidator_v1_validator_proto_enumTypes[0] +} + +func (x UVStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UVStatus.Descriptor instead. +func (UVStatus) EnumDescriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{0} +} + +// Identity info for validator (chain-level) +type IdentityInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` // Core validator address +} + +func (x *IdentityInfo) Reset() { + *x = IdentityInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdentityInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentityInfo) ProtoMessage() {} + +// Deprecated: Use IdentityInfo.ProtoReflect.Descriptor instead. +func (*IdentityInfo) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{0} +} + +func (x *IdentityInfo) GetCoreValidatorAddress() string { + if x != nil { + return x.CoreValidatorAddress + } + return "" +} + +// Validator network metadata +type NetworkInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + MultiAddrs []string `protobuf:"bytes,2,rep,name=multi_addrs,json=multiAddrs,proto3" json:"multi_addrs,omitempty"` +} + +func (x *NetworkInfo) Reset() { + *x = NetworkInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInfo) ProtoMessage() {} + +// Deprecated: Use NetworkInfo.ProtoReflect.Descriptor instead. +func (*NetworkInfo) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{1} +} + +func (x *NetworkInfo) GetPeerId() string { + if x != nil { + return x.PeerId + } + return "" +} + +func (x *NetworkInfo) GetMultiAddrs() []string { + if x != nil { + return x.MultiAddrs + } + return nil +} + +// Lifecycle event info +type LifecycleEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status UVStatus `protobuf:"varint,1,opt,name=status,proto3,enum=uvalidator.v1.UVStatus" json:"status,omitempty"` // Validator status at this point in time + BlockHeight int64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // Block height when this status transition occurred +} + +func (x *LifecycleEvent) Reset() { + *x = LifecycleEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecycleEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecycleEvent) ProtoMessage() {} + +// Deprecated: Use LifecycleEvent.ProtoReflect.Descriptor instead. +func (*LifecycleEvent) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{2} +} + +func (x *LifecycleEvent) GetStatus() UVStatus { + if x != nil { + return x.Status + } + return UVStatus_UV_STATUS_UNSPECIFIED +} + +func (x *LifecycleEvent) GetBlockHeight() int64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +// Validator lifecycle info +type LifecycleInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CurrentStatus UVStatus `protobuf:"varint,1,opt,name=current_status,json=currentStatus,proto3,enum=uvalidator.v1.UVStatus" json:"current_status,omitempty"` // Current validator state + History []*LifecycleEvent `protobuf:"bytes,2,rep,name=history,proto3" json:"history,omitempty"` // Added to registry +} + +func (x *LifecycleInfo) Reset() { + *x = LifecycleInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecycleInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecycleInfo) ProtoMessage() {} + +// Deprecated: Use LifecycleInfo.ProtoReflect.Descriptor instead. +func (*LifecycleInfo) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{3} +} + +func (x *LifecycleInfo) GetCurrentStatus() UVStatus { + if x != nil { + return x.CurrentStatus + } + return UVStatus_UV_STATUS_UNSPECIFIED +} + +func (x *LifecycleInfo) GetHistory() []*LifecycleEvent { + if x != nil { + return x.History + } + return nil +} + +// Core Universal Validator object +type UniversalValidator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdentifyInfo *IdentityInfo `protobuf:"bytes,1,opt,name=identify_info,json=identifyInfo,proto3" json:"identify_info,omitempty"` // Identity info of the validator + NetworkInfo *NetworkInfo `protobuf:"bytes,2,opt,name=network_info,json=networkInfo,proto3" json:"network_info,omitempty"` // Metadata for networking + LifecycleInfo *LifecycleInfo `protobuf:"bytes,3,opt,name=lifecycle_info,json=lifecycleInfo,proto3" json:"lifecycle_info,omitempty"` // Lifecyle info of the validator +} + +func (x *UniversalValidator) Reset() { + *x = UniversalValidator{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UniversalValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UniversalValidator) ProtoMessage() {} + +// Deprecated: Use UniversalValidator.ProtoReflect.Descriptor instead. +func (*UniversalValidator) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{4} +} + +func (x *UniversalValidator) GetIdentifyInfo() *IdentityInfo { + if x != nil { + return x.IdentifyInfo + } + return nil +} + +func (x *UniversalValidator) GetNetworkInfo() *NetworkInfo { + if x != nil { + return x.NetworkInfo + } + return nil +} + +func (x *UniversalValidator) GetLifecycleInfo() *LifecycleInfo { + if x != nil { + return x.LifecycleInfo + } + return nil +} + +var File_uvalidator_v1_validator_proto protoreflect.FileDescriptor + +var file_uvalidator_v1_validator_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0d, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x14, + 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x0c, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x21, 0xe8, + 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x22, 0x69, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x72, 0x73, 0x3a, 0x20, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, + 0xe7, 0xb0, 0x2a, 0x17, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x0e, + 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x3a, 0x23, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, + 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x66, 0x65, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x0e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x3a, 0x21, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x6c, 0x65, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x12, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x0d, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, + 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x43, 0x0a, + 0x0e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x3a, 0x2b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x1e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, + 0x92, 0x01, 0x0a, 0x08, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, + 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, + 0x16, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, + 0x45, 0x41, 0x56, 0x45, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, + 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xbd, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, + 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_uvalidator_v1_validator_proto_rawDescOnce sync.Once + file_uvalidator_v1_validator_proto_rawDescData = file_uvalidator_v1_validator_proto_rawDesc +) + +func file_uvalidator_v1_validator_proto_rawDescGZIP() []byte { + file_uvalidator_v1_validator_proto_rawDescOnce.Do(func() { + file_uvalidator_v1_validator_proto_rawDescData = protoimpl.X.CompressGZIP(file_uvalidator_v1_validator_proto_rawDescData) + }) + return file_uvalidator_v1_validator_proto_rawDescData +} + +var file_uvalidator_v1_validator_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_uvalidator_v1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_uvalidator_v1_validator_proto_goTypes = []interface{}{ + (UVStatus)(0), // 0: uvalidator.v1.UVStatus + (*IdentityInfo)(nil), // 1: uvalidator.v1.IdentityInfo + (*NetworkInfo)(nil), // 2: uvalidator.v1.NetworkInfo + (*LifecycleEvent)(nil), // 3: uvalidator.v1.LifecycleEvent + (*LifecycleInfo)(nil), // 4: uvalidator.v1.LifecycleInfo + (*UniversalValidator)(nil), // 5: uvalidator.v1.UniversalValidator +} +var file_uvalidator_v1_validator_proto_depIdxs = []int32{ + 0, // 0: uvalidator.v1.LifecycleEvent.status:type_name -> uvalidator.v1.UVStatus + 0, // 1: uvalidator.v1.LifecycleInfo.current_status:type_name -> uvalidator.v1.UVStatus + 3, // 2: uvalidator.v1.LifecycleInfo.history:type_name -> uvalidator.v1.LifecycleEvent + 1, // 3: uvalidator.v1.UniversalValidator.identify_info:type_name -> uvalidator.v1.IdentityInfo + 2, // 4: uvalidator.v1.UniversalValidator.network_info:type_name -> uvalidator.v1.NetworkInfo + 4, // 5: uvalidator.v1.UniversalValidator.lifecycle_info:type_name -> uvalidator.v1.LifecycleInfo + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_uvalidator_v1_validator_proto_init() } +func file_uvalidator_v1_validator_proto_init() { + if File_uvalidator_v1_validator_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_uvalidator_v1_validator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdentityInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_validator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_validator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LifecycleEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_validator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LifecycleInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_validator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UniversalValidator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_uvalidator_v1_validator_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_uvalidator_v1_validator_proto_goTypes, + DependencyIndexes: file_uvalidator_v1_validator_proto_depIdxs, + EnumInfos: file_uvalidator_v1_validator_proto_enumTypes, + MessageInfos: file_uvalidator_v1_validator_proto_msgTypes, + }.Build() + File_uvalidator_v1_validator_proto = out.File + file_uvalidator_v1_validator_proto_rawDesc = nil + file_uvalidator_v1_validator_proto_goTypes = nil + file_uvalidator_v1_validator_proto_depIdxs = nil +} diff --git a/app/app.go b/app/app.go index a5e0160d..be0ce571 100755 --- a/app/app.go +++ b/app/app.go @@ -166,6 +166,9 @@ import ( uregistry "github.com/pushchain/push-chain-node/x/uregistry" uregistrykeeper "github.com/pushchain/push-chain-node/x/uregistry/keeper" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + utss "github.com/pushchain/push-chain-node/x/utss" + utsskeeper "github.com/pushchain/push-chain-node/x/utss/keeper" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" utxverifier "github.com/pushchain/push-chain-node/x/utxverifier" utxverifierkeeper "github.com/pushchain/push-chain-node/x/utxverifier/keeper" utxverifiertypes "github.com/pushchain/push-chain-node/x/utxverifier/types" @@ -318,6 +321,7 @@ type ChainApp struct { UtxverifierKeeper utxverifierkeeper.Keeper UregistryKeeper uregistrykeeper.Keeper UvalidatorKeeper uvalidatorkeeper.Keeper + UtssKeeper utsskeeper.Keeper // the module manager ModuleManager *module.Manager @@ -432,6 +436,7 @@ func NewChainApp( utxverifiertypes.StoreKey, uregistrytypes.StoreKey, uvalidatortypes.StoreKey, + utsstypes.StoreKey, ) tkeys := storetypes.NewTransientStoreKeys( @@ -747,6 +752,22 @@ func NewChainApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.StakingKeeper, app.SlashingKeeper, + &app.UtssKeeper, + ) + + // Create the utss keeper + app.UtssKeeper = utsskeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(keys[utsstypes.StoreKey]), + logger, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.UvalidatorKeeper, + ) + + app.UvalidatorKeeper.SetHooks( + uvalidatorkeeper.NewMultiUValidatorHooks( + app.UtssKeeper.Hooks(), + ), ) // NOTE: we are adding all available EVM extensions. @@ -1017,7 +1038,8 @@ func NewChainApp( uexecutor.NewAppModule(appCodec, app.UexecutorKeeper, app.EVMKeeper, app.FeeMarketKeeper, app.BankKeeper, app.AccountKeeper, app.UregistryKeeper, app.UtxverifierKeeper, app.UvalidatorKeeper), utxverifier.NewAppModule(appCodec, app.UtxverifierKeeper, app.UregistryKeeper), uregistry.NewAppModule(appCodec, app.UregistryKeeper, app.EVMKeeper), - uvalidator.NewAppModule(appCodec, app.UvalidatorKeeper, app.StakingKeeper, app.SlashingKeeper), + uvalidator.NewAppModule(appCodec, app.UvalidatorKeeper, app.StakingKeeper, app.SlashingKeeper, &app.UtssKeeper), + utss.NewAppModule(appCodec, app.UtssKeeper, app.UvalidatorKeeper), ) // BasicModuleManager defines the module BasicManager is in charge of setting up basic, @@ -1067,6 +1089,7 @@ func NewChainApp( utxverifiertypes.ModuleName, uregistrytypes.ModuleName, uvalidatortypes.ModuleName, + utsstypes.ModuleName, ) app.ModuleManager.SetOrderEndBlockers( @@ -1090,6 +1113,7 @@ func NewChainApp( utxverifiertypes.ModuleName, uregistrytypes.ModuleName, uvalidatortypes.ModuleName, + utsstypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -1140,6 +1164,7 @@ func NewChainApp( utxverifiertypes.ModuleName, uregistrytypes.ModuleName, uvalidatortypes.ModuleName, + utsstypes.ModuleName, } app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...) @@ -1580,6 +1605,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(utxverifiertypes.ModuleName) paramsKeeper.Subspace(uregistrytypes.ModuleName) paramsKeeper.Subspace(uvalidatortypes.ModuleName) + paramsKeeper.Subspace(utsstypes.ModuleName) return paramsKeeper } diff --git a/app/upgrades.go b/app/upgrades.go index b996d569..22cdc8bf 100755 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -12,6 +12,7 @@ import ( "github.com/pushchain/push-chain-node/app/upgrades/noop" pcmintcap "github.com/pushchain/push-chain-node/app/upgrades/pc-mint-cap" solanafix "github.com/pushchain/push-chain-node/app/upgrades/solana-fix" + tsscore "github.com/pushchain/push-chain-node/app/upgrades/tss-core" ) // Upgrades list of chain upgrades @@ -21,6 +22,7 @@ var Upgrades = []upgrades.Upgrade{ ethhashfix.NewUpgrade(), gasoracle.NewUpgrade(), pcmintcap.NewUpgrade(), + tsscore.NewUpgrade(), } // RegisterUpgradeHandlers registers the chain upgrade handlers diff --git a/app/upgrades/tss-core/upgrades.go b/app/upgrades/tss-core/upgrades.go new file mode 100644 index 00000000..4eaf8294 --- /dev/null +++ b/app/upgrades/tss-core/upgrades.go @@ -0,0 +1,41 @@ +package inbound + +import ( + "context" + + upgradetypes "cosmossdk.io/x/upgrade/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + + storetypes "cosmossdk.io/store/types" + "github.com/pushchain/push-chain-node/app/upgrades" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" +) + +const UpgradeName = "tss-core" + +// NewUpgrade constructs the upgrade definition +func NewUpgrade() upgrades.Upgrade { + return upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: storetypes.StoreUpgrades{ + Added: []string{utsstypes.StoreKey}, + Deleted: []string{}, + }, + } +} + +func CreateUpgradeHandler( + mm upgrades.ModuleManager, + configurator module.Configurator, + ak *upgrades.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.Logger().Info("🔧 Running upgrade:", "name", UpgradeName) + + // Run module migrations + return mm.RunMigrations(ctx, configurator, fromVM) + } +} diff --git a/proto/utss/module/v1/module.proto b/proto/utss/module/v1/module.proto new file mode 100755 index 00000000..c394c9c8 --- /dev/null +++ b/proto/utss/module/v1/module.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package utss.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the app config object of the module. +// Learn more: https://docs.cosmos.network/main/building-modules/depinject +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import : "github.com/pushchain/push-chain-node" + }; +} \ No newline at end of file diff --git a/proto/utss/v1/genesis.proto b/proto/utss/v1/genesis.proto new file mode 100755 index 00000000..bdbba98a --- /dev/null +++ b/proto/utss/v1/genesis.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package utss.v1; + +import "gogoproto/gogo.proto"; +import "amino/amino.proto"; +import "utss/v1/types.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; + +// GenesisState defines the module genesis state +message GenesisState { + // Params defines all the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/utss/v1/query.proto b/proto/utss/v1/query.proto new file mode 100755 index 00000000..82fb95b8 --- /dev/null +++ b/proto/utss/v1/query.proto @@ -0,0 +1,95 @@ +syntax = "proto3"; + +package utss.v1; + +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +import "utss/v1/genesis.proto"; +import "utss/v1/types.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; + +// Query Service +service Query { + // Params queries module parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/utss/v1/params"; + } + + // Current TSS Process + rpc CurrentProcess(QueryCurrentProcessRequest) returns (QueryCurrentProcessResponse) { + option (google.api.http).get = "/utss/v1/process/current"; + } + + // Process by ID + rpc ProcessById(QueryProcessByIdRequest) returns (QueryProcessByIdResponse) { + option (google.api.http).get = "/utss/v1/process/{id}"; + } + + // List all processes (paginated) + rpc AllProcesses(QueryAllProcessesRequest) returns (QueryAllProcessesResponse) { + option (google.api.http).get = "/utss/v1/process"; + } + + // Current TSS Key + rpc CurrentKey(QueryCurrentKeyRequest) returns (QueryCurrentKeyResponse) { + option (google.api.http).get = "/utss/v1/key/current"; + } + + // Get finalized TSS key by key_id + rpc KeyById(QueryKeyByIdRequest) returns (QueryKeyByIdResponse) { + option (google.api.http).get = "/utss/v1/key/{key_id}"; + } + + // List all finalized keys (paginated) + rpc AllKeys(QueryAllKeysRequest) returns (QueryAllKeysResponse) { + option (google.api.http).get = "/utss/v1/key"; + } +} + +// Messages +message QueryParamsRequest {} +message QueryParamsResponse { + Params params = 1; +} + +message QueryCurrentProcessRequest {} +message QueryCurrentProcessResponse { + TssKeyProcess process = 1; +} + +message QueryProcessByIdRequest { + uint64 id = 1; +} +message QueryProcessByIdResponse { + TssKeyProcess process = 1; +} + +message QueryAllProcessesRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} +message QueryAllProcessesResponse { + repeated TssKeyProcess processes = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryCurrentKeyRequest {} +message QueryCurrentKeyResponse { + TssKey key = 1; +} + +message QueryKeyByIdRequest { + string key_id = 1; +} +message QueryKeyByIdResponse { + TssKey key = 1; +} + +message QueryAllKeysRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} +message QueryAllKeysResponse { + repeated TssKey keys = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/utss/v1/tx.proto b/proto/utss/v1/tx.proto new file mode 100755 index 00000000..4b2ac7cc --- /dev/null +++ b/proto/utss/v1/tx.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; +package utss.v1; + +import "cosmos/msg/v1/msg.proto"; +import "utss/v1/genesis.proto"; +import "utss/v1/types.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + rpc InitiateTssKeyProcess(MsgInitiateTssKeyProcess) returns (MsgInitiateTssKeyProcessResponse); + + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + rpc VoteTssKeyProcess(MsgVoteTssKeyProcess) returns (MsgVoteTssKeyProcessResponse); +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} + + +// Admin initiates new keygen/reshare process +message MsgInitiateTssKeyProcess { + option (amino.name) = "utss/MsgVoteInitiateKeyProcess"; + option (cosmos.msg.v1.signer) = "signer"; + + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + TssProcessType process_type = 2; +} + +message MsgInitiateTssKeyProcessResponse {} + +// Universal validator votes on an ongoing TSS key process +message MsgVoteTssKeyProcess { + option (amino.name) = "utss/MsgVoteTssKeyProcess"; + option (cosmos.msg.v1.signer) = "signer"; + + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; ; // universal validator address + string tss_pubkey = 2; + string key_id = 3; +} + +message MsgVoteTssKeyProcessResponse {} \ No newline at end of file diff --git a/proto/utss/v1/types.proto b/proto/utss/v1/types.proto new file mode 100644 index 00000000..5eb25530 --- /dev/null +++ b/proto/utss/v1/types.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; +package utss.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; + +message Params { + option (amino.name) = "utss/params"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // The admin account of the utss module. + string admin = 1; +} + +enum TssKeyProcessStatus { + TSS_KEY_PROCESS_PENDING = 0; + TSS_KEY_PROCESS_SUCCESS = 1; + TSS_KEY_PROCESS_FAILED = 2; +} + +enum TssProcessType { + TSS_PROCESS_KEYGEN = 0; + TSS_PROCESS_REFRESH = 1; +} + +// TSS key process information +message TssKeyProcess { + option (amino.name) = "utss/tss_key_process"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + TssKeyProcessStatus status = 1; + repeated string participants = 2; + int64 block_height = 3; + int64 expiry_height = 4; + TssProcessType process_type = 5; + uint64 id = 6; // process id +} + +// Finalized TSS key details +message TssKey { + option (amino.name) = "utss/tss_key"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string tss_pubkey = 1; + string key_id = 2; + repeated string participants = 3; + int64 finalized_block_height = 4; + int64 keygen_block_height = 5; + uint64 process_id = 6; +} diff --git a/proto/uvalidator/v1/ballot.proto b/proto/uvalidator/v1/ballot.proto index 8e408a0a..02bcad3a 100644 --- a/proto/uvalidator/v1/ballot.proto +++ b/proto/uvalidator/v1/ballot.proto @@ -28,6 +28,7 @@ enum BallotObservationType { BALLOT_OBSERVATION_TYPE_UNSPECIFIED = 0; BALLOT_OBSERVATION_TYPE_INBOUND_TX = 1; BALLOT_OBSERVATION_TYPE_OUTBOUND_TX = 2; + BALLOT_OBSERVATION_TYPE_TSS_KEY = 3; } // --------------------------- diff --git a/proto/uvalidator/v1/query.proto b/proto/uvalidator/v1/query.proto index 81da4119..929a7766 100755 --- a/proto/uvalidator/v1/query.proto +++ b/proto/uvalidator/v1/query.proto @@ -5,6 +5,7 @@ import "google/api/annotations.proto"; import "uvalidator/v1/genesis.proto"; import "uvalidator/v1/types.proto"; import "uvalidator/v1/ballot.proto"; +import "uvalidator/v1/validator.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; @@ -17,6 +18,11 @@ service Query { option (google.api.http).get = "/uvalidator/v1/params"; } + // UniversalValidator queries one universal validator by core validator address. + rpc UniversalValidator(QueryUniversalValidatorRequest) returns (QueryUniversalValidatorResponse) { + option (google.api.http).get = "/uvalidator/v1/universal_validator/{core_validator_address}"; + } + // AllUniversalValidators queries the details of a specific universal validator by its address. rpc AllUniversalValidators(QueryUniversalValidatorsSetRequest) returns (QueryUniversalValidatorsSetResponse) { option (google.api.http).get = "/uvalidator/v1/universal_validators"; @@ -71,13 +77,22 @@ message QueryParamsResponse { // params defines the parameters of the module. Params params = 1; } + +// Single Universal Validator +message QueryUniversalValidatorRequest { + string core_validator_address = 1; +} +message QueryUniversalValidatorResponse { + UniversalValidator universal_validator = 1; +} + // QueryUniversalValidatorsSetRequest is the request type for Query/UniversalValidatorAddresses. message QueryUniversalValidatorsSetRequest {} // QueryUniversalValidatorsSetResponse is the response type for Query/UniversalValidatorAddresses. message QueryUniversalValidatorsSetResponse { // addresses is the list of all universal validator addresses registered in the module. - repeated string addresses = 1; + repeated UniversalValidator universal_validator = 1; } // Single ballot diff --git a/proto/uvalidator/v1/tx.proto b/proto/uvalidator/v1/tx.proto index bb15ae6a..2156e92a 100755 --- a/proto/uvalidator/v1/tx.proto +++ b/proto/uvalidator/v1/tx.proto @@ -7,6 +7,7 @@ import "uvalidator/v1/genesis.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "uvalidator/v1/types.proto"; +import "uvalidator/v1/validator.proto"; option go_package = "github.com/pushchain/push-chain-node/x/uvalidator/types"; @@ -22,6 +23,9 @@ service Msg { // AddUniversalValidator defines a message to add a universal validator. rpc AddUniversalValidator(MsgAddUniversalValidator) returns (MsgAddUniversalValidatorResponse); + // UpdateUniversalValidator defines a message to update a universal validator. + rpc UpdateUniversalValidator(MsgUpdateUniversalValidator) returns (MsgUpdateUniversalValidatorResponse); + // RemoveUniversalValidator defines a message to remove a universal validator. rpc RemoveUniversalValidator(MsgRemoveUniversalValidator) returns (MsgRemoveUniversalValidatorResponse); } @@ -56,10 +60,26 @@ message MsgAddUniversalValidator { // core_validator_address is the address of the core validator. string core_validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // network metadata for validator node (IP, etc.) + NetworkInfo network = 4; } message MsgAddUniversalValidatorResponse {} +message MsgUpdateUniversalValidator { + option (amino.name) = "uvalidator/MsgUpdateUniversalValidator"; + option (cosmos.msg.v1.signer) = "signer"; + + // signer is the address authorized to execute this message + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // network metadata for validator node + NetworkInfo network = 2; +} + +message MsgUpdateUniversalValidatorResponse {} + message MsgRemoveUniversalValidator { option (amino.name) = "uvalidator/MsgRemoveUniversalValidator"; option (cosmos.msg.v1.signer) = "signer"; diff --git a/proto/uvalidator/v1/validator.proto b/proto/uvalidator/v1/validator.proto new file mode 100644 index 00000000..c7f888e3 --- /dev/null +++ b/proto/uvalidator/v1/validator.proto @@ -0,0 +1,64 @@ +syntax = "proto3"; +package uvalidator.v1; + +import "gogoproto/gogo.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/uvalidator/types"; + +// Universal Validator status +enum UVStatus { + option (gogoproto.goproto_enum_stringer) = true; + + UV_STATUS_UNSPECIFIED = 0; + UV_STATUS_ACTIVE = 1; // Fully active (votes + signs) + UV_STATUS_PENDING_JOIN = 2; // Waiting for onboarding keygen / vote + UV_STATUS_PENDING_LEAVE = 3; // Marked for removal (still active until TSS reshare) + UV_STATUS_INACTIVE = 4; // No longer part of the validator set +} + +// Identity info for validator (chain-level) +message IdentityInfo { + option (amino.name) = "uvalidator/identity_info"; + option (gogoproto.equal) = true; + + string core_validator_address = 1; // Core validator address +} + +// Validator network metadata +message NetworkInfo { + option (amino.name) = "uvalidator/network_info"; + option (gogoproto.equal) = true; + + string peer_id = 1; + repeated string multi_addrs = 2; +} + +// Lifecycle event info +message LifecycleEvent { + option (amino.name) = "uvalidator/lifecycle_event"; + option (gogoproto.equal) = true; + + UVStatus status = 1; // Validator status at this point in time + int64 block_height = 2; // Block height when this status transition occurred +} + +// Validator lifecycle info +message LifecycleInfo { + option (amino.name) = "uvalidator/lifecyle_info"; + option (gogoproto.equal) = true; + + UVStatus current_status = 1; // Current validator state + repeated LifecycleEvent history = 2; // Added to registry +} + +// Core Universal Validator object +message UniversalValidator { + option (amino.name) = "uvalidator/universal_validator"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + IdentityInfo identify_info = 1; // Identity info of the validator + NetworkInfo network_info = 2; // Metadata for networking + LifecycleInfo lifecycle_info = 3; // Lifecyle info of the validator +} \ No newline at end of file diff --git a/x/uexecutor/integration-test/deploy_uea_test.go b/test/integration/uexecutor/deploy_uea_test.go similarity index 98% rename from x/uexecutor/integration-test/deploy_uea_test.go rename to test/integration/uexecutor/deploy_uea_test.go index 3e6b0793..82bf65fa 100644 --- a/x/uexecutor/integration-test/deploy_uea_test.go +++ b/test/integration/uexecutor/deploy_uea_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" diff --git a/x/uexecutor/integration-test/execute_payload_test.go b/test/integration/uexecutor/execute_payload_test.go similarity index 98% rename from x/uexecutor/integration-test/execute_payload_test.go rename to test/integration/uexecutor/execute_payload_test.go index 350ce542..60fb0c18 100644 --- a/x/uexecutor/integration-test/execute_payload_test.go +++ b/test/integration/uexecutor/execute_payload_test.go @@ -4,7 +4,7 @@ import ( "testing" "cosmossdk.io/math" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" diff --git a/x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go similarity index 96% rename from x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go rename to test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go index 583c9348..fbee35a0 100644 --- a/x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go @@ -11,9 +11,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/pushchain/push-chain-node/app" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" "github.com/stretchr/testify/require" ) @@ -70,7 +71,9 @@ func setupInboundBridgePayloadTest(t *testing.T, numVals int) (*app.ChainApp, sd fmt.Sprintf("universal-validator-%d", i), )).String() - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr) + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) require.NoError(t, err) universalVals[i] = universalValAddr @@ -219,7 +222,7 @@ func TestInboundSyntheticBridgePayload(t *testing.T) { require.NoError(t, err) // Now check UniversalTx state - utxKey := uexecutortypes.GetInboundKey(*invalidInbound) + utxKey := uexecutortypes.GetInboundUniversalTxKey(*invalidInbound) utx, found, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxKey) require.NoError(t, err) require.True(t, found, "universal tx should exist after quorum is reached") @@ -297,7 +300,7 @@ func TestInboundSyntheticBridgePayload(t *testing.T) { } // Get the universal tx - utxKey := uexecutortypes.GetInboundKey(*inbound) + utxKey := uexecutortypes.GetInboundUniversalTxKey(*inbound) utx, found, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxKey) require.NoError(t, err) require.True(t, found) diff --git a/x/uexecutor/integration-test/inbound_synthetic_bridge_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_test.go similarity index 97% rename from x/uexecutor/integration-test/inbound_synthetic_bridge_test.go rename to test/integration/uexecutor/inbound_synthetic_bridge_test.go index aa051806..4562f3f0 100644 --- a/x/uexecutor/integration-test/inbound_synthetic_bridge_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_test.go @@ -9,10 +9,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/pushchain/push-chain-node/app" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" "github.com/stretchr/testify/require" "time" @@ -76,7 +77,9 @@ func setupInboundBridgeTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte fmt.Sprintf("universal-validator-%d", i), )).String() - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr) + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) require.NoError(t, err) universalVals[i] = universalValAddr diff --git a/x/uexecutor/integration-test/mint_pc_test.go b/test/integration/uexecutor/mint_pc_test.go similarity index 98% rename from x/uexecutor/integration-test/mint_pc_test.go rename to test/integration/uexecutor/mint_pc_test.go index 41274ea5..52fd5d21 100644 --- a/x/uexecutor/integration-test/mint_pc_test.go +++ b/test/integration/uexecutor/mint_pc_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" diff --git a/x/uexecutor/integration-test/vote_gas_price_test.go b/test/integration/uexecutor/vote_gas_price_test.go similarity index 94% rename from x/uexecutor/integration-test/vote_gas_price_test.go rename to test/integration/uexecutor/vote_gas_price_test.go index 0125a362..75c2327e 100644 --- a/x/uexecutor/integration-test/vote_gas_price_test.go +++ b/test/integration/uexecutor/vote_gas_price_test.go @@ -12,9 +12,10 @@ import ( "github.com/stretchr/testify/require" "github.com/pushchain/push-chain-node/app" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" ) func setupVoteGasPriceTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []string, []stakingtypes.Validator) { @@ -36,7 +37,9 @@ func setupVoteGasPriceTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Contex // --- Register validators as universal validators --- universalVals := make([]string, len(validators)) for i, val := range validators { - require.NoError(t, app.UvalidatorKeeper.AddUniversalValidator(ctx, val.OperatorAddress)) + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} + + require.NoError(t, app.UvalidatorKeeper.AddUniversalValidator(ctx, val.OperatorAddress, network)) universalVals[i] = sdk.AccAddress([]byte(fmt.Sprintf("universal-validator-%d", i))).String() } diff --git a/test/integration/utss/initiate_tss_key_process_test.go b/test/integration/utss/initiate_tss_key_process_test.go new file mode 100644 index 00000000..d547a60f --- /dev/null +++ b/test/integration/utss/initiate_tss_key_process_test.go @@ -0,0 +1,143 @@ +package integrationtest + +import ( + "fmt" + "strconv" + "testing" + + "cosmossdk.io/collections" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// setupTssKeyProcessTest initializes app, context, and validators +func setupTssKeyProcessTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []string) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + + // register them as universal validators (eligible) + universalVals := make([]string, len(validators)) + for i, val := range validators { + coreValAddr := val.OperatorAddress + pubkey := "pubkey-tss-" + coreValAddr + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) + require.NoError(t, err) + + // Finalize the auto-initiated TSS process BEFORE next validator is added + finalizeAutoInitiatedTssProcess(t, app, ctx, pubkey, "Key-id-tss-"+strconv.Itoa(i)) + universalVals[i] = coreValAddr + } + + return app, ctx, universalVals +} + +func finalizeAutoInitiatedTssProcess(t *testing.T, app *app.ChainApp, ctx sdk.Context, pubKey, keyId string) { + // Step 1: check if a process exists + _, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + if err != nil { + return // nothing to finalize + } + + // Step 2: get current eligible voters + voters, err := app.UvalidatorKeeper.GetEligibleVoters(ctx) + require.NoError(t, err) + + // Step 3: cast votes until process finalizes + for _, uv := range voters { + coreVal := uv.IdentifyInfo.CoreValidatorAddress + valAddr, err := sdk.ValAddressFromBech32(coreVal) + require.NoError(t, err) + + // This triggers your normal Vote flow and internally finalizes when quorum reached + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pubKey, keyId) + require.NoError(t, err) + + // Step 4: Check if finalized now + p, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + if err != nil || p.Status == utsstypes.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS { + return + } + } +} + +func TestInitiateTssKeyProcess(t *testing.T) { + t.Run("Successfully initiates new keygen process", func(t *testing.T) { + app, ctx, _ := setupTssKeyProcessTest(t, 4) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + current, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + fmt.Println(current) + require.NoError(t, err) + require.Equal(t, utsstypes.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING, current.Status) + require.Equal(t, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN, current.ProcessType) + require.NotZero(t, current.Id) + require.NotEmpty(t, current.Participants) + }) + + t.Run("Fails when active process already exists", func(t *testing.T) { + app, ctx, _ := setupTssKeyProcessTest(t, 3) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + // simulate that process still active (same block height) + err = app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_REFRESH) + require.ErrorContains(t, err, "active TSS process already exists") + }) + + t.Run("Allows new process after expiry height", func(t *testing.T) { + app, ctx, _ := setupTssKeyProcessTest(t, 2) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + current, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + fmt.Println(current) + + // move block height beyond expiry + ctx = ctx.WithBlockHeight(int64(utsstypes.DefaultTssProcessExpiryAfterBlocks) + 100) + + err = app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_REFRESH) + require.NoError(t, err) + + current, err = app.UtssKeeper.CurrentTssProcess.Get(ctx) + require.NoError(t, err) + require.Equal(t, utsstypes.TssProcessType_TSS_PROCESS_REFRESH, current.ProcessType) + }) + + t.Run("Fails if eligible validators cannot be fetched", func(t *testing.T) { + app, ctx, _ := setupTssKeyProcessTest(t, 1) + + // corrupt the uvalidator keeper mock or clear state + app.UvalidatorKeeper.UniversalValidatorSet.Clear(ctx, collections.Ranger[sdk.ValAddress](nil)) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.ErrorContains(t, err, "invalid tss process: participants list cannot be empty") + }) + + t.Run("Emits correct event on initiation", func(t *testing.T) { + universalValsNum := 3 + app, ctx, _ := setupTssKeyProcessTest(t, universalValsNum) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + events := ctx.EventManager().Events() + require.NotEmpty(t, events) + + last := events[len(events)-1] + require.Equal(t, utsstypes.EventTypeTssProcessInitiated, last.Type) + + pid := last.Attributes[0].Value + require.Equal(t, strconv.Itoa(universalValsNum), pid) + + }) +} diff --git a/test/integration/utss/vote_tss_key_process_test.go b/test/integration/utss/vote_tss_key_process_test.go new file mode 100644 index 00000000..3d06c354 --- /dev/null +++ b/test/integration/utss/vote_tss_key_process_test.go @@ -0,0 +1,180 @@ +package integrationtest + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// Integration tests for VoteTssKeyProcess +func TestVoteTssKeyProcess(t *testing.T) { + + //----------------------------------------------------------- + t.Run("Allows vote but does not finalize with insufficient votes", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + // first vote only (quorum = 2) + v := validators[0] + valAddr, _ := sdk.ValAddressFromBech32(v) + + pub := "pub-k1" + key := "key-k2" + + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + require.NoError(t, err) + + // should not finalize yet + tssKey, err := app.UtssKeeper.CurrentTssKey.Get(ctx) + if err == nil { + require.NotEqual(t, pub, tssKey.TssPubkey) + require.NotEqual(t, key, tssKey.KeyId) + } + }) + + //----------------------------------------------------------- + t.Run("Successfully finalizes after quorum reached", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + pub := "pub-final" + key := "key-final" + + // vote from all 3 → quorum = 2 reached → finalized + for _, v := range validators { + valAddr, _ := sdk.ValAddressFromBech32(v) + err := app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + require.NoError(t, err) + } + + tssKey, err := app.UtssKeeper.CurrentTssKey.Get(ctx) + require.NoError(t, err) + require.Equal(t, key, tssKey.KeyId) + require.Equal(t, pub, tssKey.TssPubkey) + }) + + //----------------------------------------------------------- + t.Run("Fails when no active process exists", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 2) + + // clear active process + app.UtssKeeper.CurrentTssProcess.Remove(ctx) + + valAddr, _ := sdk.ValAddressFromBech32(validators[0]) + + err := app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, "pk", "key") + require.ErrorContains(t, err, "no active TSS process") + }) + + //----------------------------------------------------------- + t.Run("Fails when keyId already exists", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + pub := "dupPub" + key := "dupKey" + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + // finalize once + for _, v := range validators { + valAddr, _ := sdk.ValAddressFromBech32(v) + _ = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + } + + err = app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + // vote again with SAME keyId + valAddr, _ := sdk.ValAddressFromBech32(validators[0]) + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + require.ErrorContains(t, err, "already exists") + }) + + //----------------------------------------------------------- + t.Run("Fails when process expired", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 2) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + process, _ := app.UtssKeeper.CurrentTssProcess.Get(ctx) + + // set block height to AFTER expiry + ctx = ctx.WithBlockHeight(process.ExpiryHeight + 10) + + valAddr, _ := sdk.ValAddressFromBech32(validators[0]) + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, "pub", "key") + require.ErrorContains(t, err, "expired") + }) + + //----------------------------------------------------------- + t.Run("Emits correct TSS_KEY_FINALIZED event", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + pub := "eventPub" + key := "eventKey" + + for _, v := range validators { + valAddr, _ := sdk.ValAddressFromBech32(v) + _ = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + } + + events := ctx.EventManager().Events() + require.NotEmpty(t, events) + + // check LAST event + last := events[len(events)-1] + require.Equal(t, utsstypes.EventTypeTssKeyFinalized, last.Type) + + attrs := last.Attributes + require.Equal(t, key, attrs[1].Value) + require.Equal(t, pub, attrs[2].Value) + }) + + //----------------------------------------------------------- + t.Run("Updates validator lifecycle from pending->active", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + // set validator[0] to pending_join + v1 := validators[0] + valAddr1, _ := sdk.ValAddressFromBech32(v1) + + app.UvalidatorKeeper.UpdateValidatorStatus(ctx, + valAddr1, + uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, + ) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + pubkey := "ls_pub" + keyId := "ls_key" + + // vote from all validators → finalizes + for _, v := range validators { + valAddr, _ := sdk.ValAddressFromBech32(v) + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pubkey, keyId) + require.NoError(t, err) + } + + uv, found, err := app.UvalidatorKeeper.GetUniversalValidator(ctx, valAddr1) + require.NoError(t, err) + require.True(t, found) + require.Equal(t, + uvalidatortypes.UVStatus_UV_STATUS_ACTIVE, + uv.LifecycleInfo.CurrentStatus, + ) + }) +} diff --git a/test/integration/uvalidator/msg_add_universal_validator_test.go b/test/integration/uvalidator/msg_add_universal_validator_test.go new file mode 100644 index 00000000..342bc94d --- /dev/null +++ b/test/integration/uvalidator/msg_add_universal_validator_test.go @@ -0,0 +1,109 @@ +package integrationtest + +import ( + "fmt" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +func setupAddUniversalValidatorTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []stakingtypes.Validator) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + return app, ctx, validators +} + +func TestAddUniversalValidator(t *testing.T) { + t.Run("Successfully adds multiple bonded validators", func(t *testing.T) { + app, ctx, validators := setupAddUniversalValidatorTest(t, 3) + + for i, val := range validators { + coreValAddr := val.OperatorAddress + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) + require.NoError(t, err) + + valAddr, err := sdk.ValAddressFromBech32(coreValAddr) + require.NoError(t, err) + + exists, err := app.UvalidatorKeeper.UniversalValidatorSet.Has(ctx, valAddr) + require.NoError(t, err) + require.True(t, exists, "validator should exist in universal set") + + uv, _ := app.UvalidatorKeeper.UniversalValidatorSet.Get(ctx, valAddr) + require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, uv.LifecycleInfo.CurrentStatus) + require.Equal(t, network, *uv.NetworkInfo) + } + }) + + t.Run("Reactivates an inactive validator", func(t *testing.T) { + app, ctx, validators := setupAddUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + val := validators[0] + valAddr, _ := sdk.ValAddressFromBech32(val.OperatorAddress) + + // pre-store inactive + old := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: val.OperatorAddress}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_INACTIVE, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, old)) + + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp"), MultiAddrs: []string{"temp"}} + err := k.AddUniversalValidator(ctx, val.OperatorAddress, network) + require.NoError(t, err) + + uv, _ := k.UniversalValidatorSet.Get(ctx, valAddr) + require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, uv.LifecycleInfo.CurrentStatus) + require.Equal(t, network, *uv.NetworkInfo) + }) + + t.Run("Adding already active validator fails", func(t *testing.T) { + app, ctx, validators := setupAddUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + val := validators[0] + valAddr, _ := sdk.ValAddressFromBech32(val.OperatorAddress) + + active := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: val.OperatorAddress}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_ACTIVE, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, active)) + + err := k.AddUniversalValidator(ctx, val.OperatorAddress, uvalidatortypes.NetworkInfo{}) + require.ErrorContains(t, err, "already registered") + }) + + t.Run("Unbonded validator cannot join", func(t *testing.T) { + app, ctx, validators := setupAddUniversalValidatorTest(t, 1) + val := validators[0] + valAddr, _ := sdk.ValAddressFromBech32(val.OperatorAddress) + + // make validator unbonded manually + valBonded := val + valBonded.Status = stakingtypes.Unbonded + app.StakingKeeper.SetValidator(ctx, valBonded) + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, valAddr.String(), uvalidatortypes.NetworkInfo{}) + require.ErrorContains(t, err, "not bonded") + }) + + t.Run("Invalid validator address format fails", func(t *testing.T) { + app, ctx, _ := setupAddUniversalValidatorTest(t, 1) + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, "invalid_bech32", uvalidatortypes.NetworkInfo{}) + require.ErrorContains(t, err, "invalid core validator address") + }) +} diff --git a/test/integration/uvalidator/msg_remove_universal_validator_test.go b/test/integration/uvalidator/msg_remove_universal_validator_test.go new file mode 100644 index 00000000..4d962984 --- /dev/null +++ b/test/integration/uvalidator/msg_remove_universal_validator_test.go @@ -0,0 +1,122 @@ +package integrationtest + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// setup function (same as before) +func setupRemoveUniversalValidatorTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []stakingtypes.Validator) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + return app, ctx, validators +} + +func TestRemoveUniversalValidator(t *testing.T) { + t.Run("ACTIVE -> PENDING_LEAVE", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + uv := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: valAddr.String()}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_ACTIVE, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, uv)) + + err := k.RemoveUniversalValidator(ctx, valAddr.String()) + require.NoError(t, err) + + updated, _ := k.UniversalValidatorSet.Get(ctx, valAddr) + require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_PENDING_LEAVE, updated.LifecycleInfo.CurrentStatus) + }) + + t.Run("PENDING_JOIN -> INACTIVE (not in TSS)", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + // ensure utssKeeper has no current TSS process set + err := app.UtssKeeper.CurrentTssProcess.Remove(ctx) + require.NoError(t, err) + + uv := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: valAddr.String()}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, uv)) + + err = k.RemoveUniversalValidator(ctx, valAddr.String()) + require.NoError(t, err) + + updated, _ := k.UniversalValidatorSet.Get(ctx, valAddr) + require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_INACTIVE, updated.LifecycleInfo.CurrentStatus) + }) + + t.Run("PENDING_JOIN -> REVERT if in current TSS process", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + // add fake current TSS process with this validator as participant + process := utsstypes.TssKeyProcess{ + Participants: []string{valAddr.String()}, + } + require.NoError(t, app.UtssKeeper.CurrentTssProcess.Set(ctx, process)) + + uv := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: valAddr.String()}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, uv)) + + err := k.RemoveUniversalValidator(ctx, valAddr.String()) + require.ErrorContains(t, err, "cannot be removed") + }) + + t.Run("Already INACTIVE -> error", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + uv := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: valAddr.String()}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_INACTIVE, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, uv)) + + err := k.RemoveUniversalValidator(ctx, valAddr.String()) + require.ErrorContains(t, err, "already in UV_STATUS_INACTIVE") + }) + + t.Run("Invalid validator address format fails", func(t *testing.T) { + app, ctx, _ := setupRemoveUniversalValidatorTest(t, 1) + err := app.UvalidatorKeeper.RemoveUniversalValidator(ctx, "invalid_bech32") + require.ErrorContains(t, err, "invalid universal validator address") + }) + + t.Run("Non-existent validator fails", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + err := app.UvalidatorKeeper.RemoveUniversalValidator(ctx, valAddr.String()) + require.ErrorContains(t, err, "not found") + }) +} diff --git a/test/integration/uvalidator/msg_update_universal_validator_test.go b/test/integration/uvalidator/msg_update_universal_validator_test.go new file mode 100644 index 00000000..669851ed --- /dev/null +++ b/test/integration/uvalidator/msg_update_universal_validator_test.go @@ -0,0 +1,78 @@ +package integrationtest + +import ( + "fmt" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// setupUpdateUniversalValidatorTest initializes an app with multiple validators +// and registers one universal validator entry. +func setupUpdateUniversalValidatorTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []string) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + + universalVals := make([]string, len(validators)) + + // add one universal validator to update later + for i, val := range validators { + coreValAddr := val.OperatorAddress + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) + require.NoError(t, err) + + universalVals[i] = coreValAddr + } + + return app, ctx, universalVals +} + +func TestUpdateUniversalValidator(t *testing.T) { + t.Run("successfully updates existing universal validator metadata", func(t *testing.T) { + app, ctx, vals := setupUpdateUniversalValidatorTest(t, 1) + coreVal := vals[0] + + // newPubkey := "updated-pubkey" + // newNetwork := uvalidatortypes.NetworkInfo{Ip: "10.0.0.1"} + newNetwork := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("updated-peerId"), MultiAddrs: []string{"updated-multi_addrs"}} + + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, newNetwork) + require.NoError(t, err) + + valAddr, err := sdk.ValAddressFromBech32(coreVal) + require.NoError(t, err) + + updatedVal, err := app.UvalidatorKeeper.UniversalValidatorSet.Get(ctx, valAddr) + require.NoError(t, err) + + require.Equal(t, newNetwork, *updatedVal.NetworkInfo) + }) + + t.Run("fails when validator does not exist", func(t *testing.T) { + app, ctx, _ := setupUpdateUniversalValidatorTest(t, 1) + + coreVal := "pushvaloper1invalidaddress00000000000000000000000" + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp peerId"), MultiAddrs: []string{"temp multi_addrs"}} + + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, network) + require.Error(t, err) + require.Contains(t, err.Error(), "invalid core validator address") + }) + + t.Run("fails when validator not registered as universal", func(t *testing.T) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, 1) + coreVal := validators[0].OperatorAddress + + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp peerId"), MultiAddrs: []string{"temp multi_addrs"}} + + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, network) + require.Error(t, err) + require.Contains(t, err.Error(), "does not exist") + }) +} diff --git a/testutils/account_setup.go b/test/utils/account_setup.go similarity index 99% rename from testutils/account_setup.go rename to test/utils/account_setup.go index 04f0e9c0..e519627d 100644 --- a/testutils/account_setup.go +++ b/test/utils/account_setup.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "testing" diff --git a/testutils/bytecode.go b/test/utils/bytecode.go similarity index 99% rename from testutils/bytecode.go rename to test/utils/bytecode.go index 2acd8244..22df05f2 100644 --- a/testutils/bytecode.go +++ b/test/utils/bytecode.go @@ -1,4 +1,4 @@ -package testutils +package utils const UEA_EVM_BYTECODE = "6080604052348015600e575f80fd5b5060015f55611a2d806100205f395ff3fe6080604052600436106100bb575f3560e01c8063affed0e011610071578063f698da251161004c578063f698da2514610208578063f85135cc1461021c578063ffa1ad741461023d575f80fd5b8063affed0e0146101a5578063ebcd653b146101ba578063f0a136bc146101e9575f80fd5b80633042c33e116100a15780633042c33e1461012b57806338e198011461014c578063872347cf14610186575f80fd5b80631db61b54146100c65780632f546ac91461010c575f80fd5b366100c257005b5f80fd5b3480156100d1575f80fd5b506100f97f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd81565b6040519081526020015b60405180910390f35b348015610117575f80fd5b506100f961012636600461102f565b610292565b348015610136575f80fd5b5061014a61014536600461116e565b610451565b005b348015610157575f80fd5b5061016161090181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610103565b348015610191575f80fd5b5061014a6101a0366004611275565b6104fd565b3480156101b0575f80fd5b506100f960055481565b3480156101c5575f80fd5b506101d96101d43660046112de565b610740565b6040519015158152602001610103565b3480156101f4575f80fd5b506101d9610203366004611322565b610793565b348015610213575f80fd5b506100f96108d3565b348015610227575f80fd5b50610230610a17565b60405161010391906113bc565b348015610248575f80fd5b506102856040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b6040516101039190611457565b5f60e0820135156102db578160e001354211156102db576040517ff87d927100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f1d8b43e5066bd20bfdacf7b8f4790c0309403b18434e3699ce3c5e57502ed8c461030a6020850185611470565b602085013561031c60408701876114a3565b60405161032a929190611504565b6040518091039020866060013587608001358860a001356005548a60e001358b61010001602081019061035d9190611513565b600181111561036e5761036e611531565b60408051602081019b909b5273ffffffffffffffffffffffffffffffffffffffff909916988a01989098526060890196909652608088019490945260a087019290925260c086015260e085015261010084015261012083015260ff16610140820152610160016040516020818303038152906040528051906020012090505f6103f56108d3565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101829052604281018490529091506062016040516020818303038152906040528051906020012092505050919050565b60045460ff161561048e576040517f69783db700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815182919081906104cd90826115f4565b50602082015160018201906104e290826115f4565b50604082015160028201906104f790826115f4565b50505050565b610505610bfc565b5f61050f84610292565b9050600161052561012086016101008701611513565b600181111561053657610536611531565b0361058c57811580610550575061054e818484610793565b155b15610587576040517fce5a759800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610601565b6105cb8184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061074092505050565b610601576040517fc7dbd31d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805460010190555f806106196020870187611470565b73ffffffffffffffffffffffffffffffffffffffff16602087013561064160408901896114a3565b60405161064f929190611504565b5f6040518083038185875af1925050503d805f8114610689576040519150601f19603f3d011682016040523d82523d5f602084013e61068e565b606091505b5091509150816106da578051156106a85780518082602001fd5b6040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fafc6dd5d2ec56ba31e4cd9723889549a104622ecdb580761d055cde575365b7d600361070a6020890189611470565b61071760408a018a6114a3565b60405161072794939291906117ef565b60405180910390a150505061073b60015f55565b505050565b5f8061074c8484610c3d565b9050610758600361183b565b60601c73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150505b92915050565b6040515f9081908190610901906107bb906001906002906003908b908b908b906024016118c0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f45048e03000000000000000000000000000000000000000000000000000000001790525161083c9190611920565b5f60405180830381855afa9150503d805f8114610874576040519150601f19603f3d011682016040523d82523d5f602084013e610879565b606091505b5091509150816108b5576040517ffd23ff6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808060200190518101906108c9919061193b565b9695505050505050565b5f806109686001800180546108e79061155e565b80601f01602080910402602001604051908101604052809291908181526020018280546109139061155e565b801561095e5780601f106109355761010080835404028352916020019161095e565b820191905f5260205f20905b81548152906001019060200180831161094157829003601f168201915b5050505050610c65565b604080518082018252600581527f302e312e3000000000000000000000000000000000000000000000000000000060209182015281517f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd818301527faa7cdbe2cce2ec7b606b0e199ddd9b264a6e645e767fb8479a7917dcd1b8693f818401526060810193909352306080808501919091528251808503909101815260a0909301909152815191012092915050565b610a3b60405180606001604052806060815260200160608152602001606081525090565b60016040518060600160405290815f82018054610a579061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610a839061155e565b8015610ace5780601f10610aa557610100808354040283529160200191610ace565b820191905f5260205f20905b815481529060010190602001808311610ab157829003601f168201915b50505050508152602001600182018054610ae79061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610b139061155e565b8015610b5e5780601f10610b3557610100808354040283529160200191610b5e565b820191905f5260205f20905b815481529060010190602001808311610b4157829003601f168201915b50505050508152602001600282018054610b779061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba39061155e565b8015610bee5780601f10610bc557610100808354040283529160200191610bee565b820191905f5260205f20905b815481529060010190602001808311610bd157829003601f168201915b505050505081525050905090565b60025f5403610c37576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b5f805f80610c4b8686610dd5565b925092509250610c5b8282610e1e565b5090949350505050565b80515f90829080610cfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f456d70747920737472696e672063616e6e6f7420626520636f6e76657274656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5f5b81811015610dcd575f838281518110610d1a57610d1a61195a565b016020015160f81c905060308110801590610d39575060398160ff1611155b610d9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f6e2d64696769742063686172616374657220666f756e642e0000000000006044820152606401610cf4565b610daa6030826119b4565b60ff16610db886600a6119cd565b610dc291906119e4565b945050600101610cff565b505050919050565b5f805f8351604103610e0c576020840151604085015160608601515f1a610dfe88828585610f25565b955095509550505050610e17565b505081515f91506002905b9250925092565b5f826003811115610e3157610e31611531565b03610e3a575050565b6001826003811115610e4e57610e4e611531565b03610e85576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115610e9957610e99611531565b03610ed3576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610cf4565b6003826003811115610ee757610ee7611531565b03610f21576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610cf4565b5050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610f5e57505f9150600390508261100e565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610faf573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661100557505f92506001915082905061100e565b92505f91508190505b9450945094915050565b5f6101208284031215611029575f80fd5b50919050565b5f6020828403121561103f575f80fd5b813567ffffffffffffffff811115611055575f80fd5b61106184828501611018565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156110b9576110b9611069565b60405290565b5f82601f8301126110ce575f80fd5b8135602083015f8067ffffffffffffffff8411156110ee576110ee611069565b506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85018116603f0116810181811067ffffffffffffffff8211171561113b5761113b611069565b604052838152905080828401871015611152575f80fd5b838360208301375f602085830101528094505050505092915050565b5f6020828403121561117e575f80fd5b813567ffffffffffffffff811115611194575f80fd5b8201606081850312156111a5575f80fd5b6111ad611096565b813567ffffffffffffffff8111156111c3575f80fd5b6111cf868285016110bf565b825250602082013567ffffffffffffffff8111156111eb575f80fd5b6111f7868285016110bf565b602083015250604082013567ffffffffffffffff811115611216575f80fd5b611222868285016110bf565b604083015250949350505050565b5f8083601f840112611240575f80fd5b50813567ffffffffffffffff811115611257575f80fd5b60208301915083602082850101111561126e575f80fd5b9250929050565b5f805f60408486031215611287575f80fd5b833567ffffffffffffffff81111561129d575f80fd5b6112a986828701611018565b935050602084013567ffffffffffffffff8111156112c5575f80fd5b6112d186828701611230565b9497909650939450505050565b5f80604083850312156112ef575f80fd5b82359150602083013567ffffffffffffffff81111561130c575f80fd5b611318858286016110bf565b9150509250929050565b5f805f60408486031215611334575f80fd5b83359250602084013567ffffffffffffffff8111156112c5575f80fd5b5f5b8381101561136b578181015183820152602001611353565b50505f910152565b5f815180845261138a816020860160208601611351565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f8251606060208401526113d76080840182611373565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160408501526114128282611373565b91505060408401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301606085015261144e8282611373565b95945050505050565b602081525f6114696020830184611373565b9392505050565b5f60208284031215611480575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114611469575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126114d6575f80fd5b83018035915067ffffffffffffffff8211156114f0575f80fd5b60200191503681900382131561126e575f80fd5b818382375f9101908152919050565b5f60208284031215611523575f80fd5b813560028110611469575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600181811c9082168061157257607f821691505b602082108103611029577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f82111561073b57805f5260205f20601f840160051c810160208510156115ce5750805b601f840160051c820191505b818110156115ed575f81556001016115da565b5050505050565b815167ffffffffffffffff81111561160e5761160e611069565b6116228161161c845461155e565b846115a9565b6020601f821160018114611673575f831561163d5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1784556115ed565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156116c057878501518255602094850194600190920191016116a0565b50848210156116fc57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b5f81546117178161155e565b808552600182168015611731576001811461176b5761179f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020870152602082151560051b870101935061179f565b845f5260205f205f5b838110156117965781546020828a010152600182019150602081019050611774565b87016020019450505b50505092915050565b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081525f611801606083018761170b565b73ffffffffffffffffffffffffffffffffffffffff8616602084015282810360408401526118308185876117a8565b979650505050505050565b5f611846825461155e565b82601f82111561185a57835f5260205f2090505b547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008116925060148210156118b9577fffffffffffffffffffffffffffffffffffffffff000000000000000000000000808360140360031b1b82161692505b5050919050565b60a081525f6118d260a083018961170b565b82810360208401526118e4818961170b565b905082810360408401526118f8818861170b565b905085606084015282810360808401526119138185876117a8565b9998505050505050505050565b5f8251611931818460208701611351565b9190910192915050565b5f6020828403121561194b575f80fd5b81518015158114611469575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60ff828116828216039081111561078d5761078d611987565b808202811582820484141761078d5761078d611987565b8082018082111561078d5761078d61198756fea2646970667358221220cd3107c9a2166b22a9f2db8af03f9834a7f41cdf5fd1af8ad7c1b47e3378c18e64736f6c634300081a0033" diff --git a/testutils/constants.go b/test/utils/constants.go similarity index 98% rename from testutils/constants.go rename to test/utils/constants.go index 4e4e7b38..b93089fe 100644 --- a/testutils/constants.go +++ b/test/utils/constants.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "github.com/ethereum/go-ethereum/common" diff --git a/testutils/contracts_setup.go b/test/utils/contracts_setup.go similarity index 99% rename from testutils/contracts_setup.go rename to test/utils/contracts_setup.go index d54611db..186d5dc8 100644 --- a/testutils/contracts_setup.go +++ b/test/utils/contracts_setup.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "testing" diff --git a/testutils/helpers.go b/test/utils/helpers.go similarity index 98% rename from testutils/helpers.go rename to test/utils/helpers.go index 9a0a0a69..83c45c7a 100644 --- a/testutils/helpers.go +++ b/test/utils/helpers.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "testing" diff --git a/testutils/setup_app.go b/test/utils/setup_app.go similarity index 96% rename from testutils/setup_app.go rename to test/utils/setup_app.go index 1b584369..2c832db5 100644 --- a/testutils/setup_app.go +++ b/test/utils/setup_app.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "fmt" @@ -36,6 +36,10 @@ func SetAppWithValidators(t *testing.T) (*app.ChainApp, sdk.Context, sdk.Account app := SetupApp(t) ctx := app.BaseApp.NewContext(true) + + // start with block height 1 + ctx = ctx.WithBlockHeight(1) + //configure EVM params for PUSH0 opcode configureEVMParams(app, ctx) @@ -60,6 +64,9 @@ func SetAppWithMultipleValidators(t *testing.T, numVals int) (*app.ChainApp, sdk ctx := app.BaseApp.NewContext(true) + // start with block height 1 + ctx = ctx.WithBlockHeight(1) + params, err := app.StakingKeeper.GetParams(ctx) require.NoError(t, err) params.BondDenom = "upc" // must match your token denom diff --git a/x/uexecutor/keeper/execute_inbound_funds.go b/x/uexecutor/keeper/execute_inbound_funds.go index 8f901086..ef828dd7 100644 --- a/x/uexecutor/keeper/execute_inbound_funds.go +++ b/x/uexecutor/keeper/execute_inbound_funds.go @@ -20,7 +20,7 @@ func (k Keeper) ExecuteInboundFunds(ctx context.Context, utx types.UniversalTx) ) _, ueModuleAddressStr := k.GetUeModuleAddress(ctx) - universalTxKey := types.GetInboundKey(*utx.InboundTx) + universalTxKey := types.GetInboundUniversalTxKey(*utx.InboundTx) updateErr := k.UpdateUniversalTx(ctx, universalTxKey, func(utx *types.UniversalTx) error { pcTx := types.PCTx{ TxHash: "", // no hash if depositPRC20 failed diff --git a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go index a64fa751..6b3e6520 100644 --- a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go @@ -14,7 +14,7 @@ import ( func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.UniversalTx) error { sdkCtx := sdk.UnwrapSDKContext(ctx) _, ueModuleAddressStr := k.GetUeModuleAddress(ctx) - universalTxKey := types.GetInboundKey(*utx.InboundTx) + universalTxKey := types.GetInboundUniversalTxKey(*utx.InboundTx) // Build universalAccountId universalAccountId := types.UniversalAccountId{ diff --git a/x/uexecutor/keeper/execute_inbound_gas.go b/x/uexecutor/keeper/execute_inbound_gas.go index 6180f036..a9c28fcc 100644 --- a/x/uexecutor/keeper/execute_inbound_gas.go +++ b/x/uexecutor/keeper/execute_inbound_gas.go @@ -15,7 +15,7 @@ import ( func (k Keeper) ExecuteInboundGas(ctx context.Context, inbound types.Inbound) error { sdkCtx := sdk.UnwrapSDKContext(ctx) ueModuleAccAddress, ueModuleAddressStr := k.GetUeModuleAddress(ctx) - universalTxKey := types.GetInboundKey(inbound) + universalTxKey := types.GetInboundUniversalTxKey(inbound) // Default pcTx, will be filled along the way pcTx := types.PCTx{ diff --git a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go index 9d85e8a1..9290bf24 100644 --- a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go @@ -15,7 +15,7 @@ import ( func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.UniversalTx) error { sdkCtx := sdk.UnwrapSDKContext(ctx) _, ueModuleAddressStr := k.GetUeModuleAddress(ctx) - universalTxKey := types.GetInboundKey(*utx.InboundTx) + universalTxKey := types.GetInboundUniversalTxKey(*utx.InboundTx) universalAccountId := types.UniversalAccountId{ ChainNamespace: strings.Split(utx.InboundTx.SourceChain, ":")[0], diff --git a/x/uexecutor/keeper/inbound.go b/x/uexecutor/keeper/inbound.go index 20e88cc9..16a45949 100644 --- a/x/uexecutor/keeper/inbound.go +++ b/x/uexecutor/keeper/inbound.go @@ -8,7 +8,7 @@ import ( // AddPendingInbound adds an inbound synthetic to the pending set if not already present func (k Keeper) AddPendingInbound(ctx context.Context, inbound types.Inbound) error { - key := types.GetInboundKey(inbound) + key := types.GetInboundUniversalTxKey(inbound) has, err := k.PendingInbounds.Has(ctx, key) if err != nil { return err @@ -22,12 +22,12 @@ func (k Keeper) AddPendingInbound(ctx context.Context, inbound types.Inbound) er // IsPendingInbound checks if an inbound synthetic is pending func (k Keeper) IsPendingInbound(ctx context.Context, inbound types.Inbound) (bool, error) { - key := types.GetInboundKey(inbound) + key := types.GetInboundUniversalTxKey(inbound) return k.PendingInbounds.Has(ctx, key) } // RemovePendingInbound removes an inbound synthetic from the pending set func (k Keeper) RemovePendingInbound(ctx context.Context, inbound types.Inbound) error { - key := types.GetInboundKey(inbound) + key := types.GetInboundUniversalTxKey(inbound) return k.PendingInbounds.Remove(ctx, key) } diff --git a/x/uexecutor/keeper/msg_vote_inbound.go b/x/uexecutor/keeper/msg_vote_inbound.go index ca6aceae..70c6ec2e 100644 --- a/x/uexecutor/keeper/msg_vote_inbound.go +++ b/x/uexecutor/keeper/msg_vote_inbound.go @@ -14,13 +14,13 @@ import ( func (k Keeper) VoteInbound(ctx context.Context, universalValidator sdk.ValAddress, inbound types.Inbound) error { sdkCtx := sdk.UnwrapSDKContext(ctx) // Step 1: Check if inbound synthetic is there in the UTX - key := types.GetInboundKey(inbound) - found, err := k.HasUniversalTx(ctx, key) + universalTxKey := types.GetInboundUniversalTxKey(inbound) + found, err := k.HasUniversalTx(ctx, universalTxKey) if err != nil { return errors.Wrap(err, "failed to check UniversalTx") } if found { - return fmt.Errorf("universal tx with key %s already exists", key) + return fmt.Errorf("universal tx with key %s already exists", universalTxKey) } // use a temporary context to not commit any ballot state change in case of error @@ -52,8 +52,6 @@ func (k Keeper) VoteInbound(ctx context.Context, universalValidator sdk.ValAddre UniversalStatus: types.UniversalTxStatus_PENDING_INBOUND_EXECUTION, } - universalTxKey := types.GetInboundKey(inbound) - // Step 4: If finalized, create the UniversalTx if err := k.CreateUniversalTx(ctx, universalTxKey, utx); err != nil { return err diff --git a/x/uexecutor/keeper/voting.go b/x/uexecutor/keeper/voting.go index ccb62f6a..0fced64d 100644 --- a/x/uexecutor/keeper/voting.go +++ b/x/uexecutor/keeper/voting.go @@ -25,9 +25,12 @@ func (k Keeper) VoteOnInboundBallot( return false, false, fmt.Errorf("inbound tx is not enabled") } - ballotKey := types.GetInboundKey(inbound) + ballotKey, err := types.GetInboundBallotKey(inbound) + if err != nil { + return false, false, err + } - universalValidatorSet, err := k.uvalidatorKeeper.GetUniversalValidatorSet(ctx) + universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) if err != nil { return false, false, err } @@ -37,12 +40,12 @@ func (k Keeper) VoteOnInboundBallot( // votesNeeded = ceil(2/3 * totalValidators) // >2/3 quorum similar to tendermint - votesNeeded := (totalValidators*types.VotesThresholdNumerator + types.VotesThresholdDenominator - 1) / types.VotesThresholdDenominator + votesNeeded := (types.VotesThresholdNumerator*totalValidators)/types.VotesThresholdDenominator + 1 // Convert []sdk.ValAddress → []string universalValidatorSetStrs := make([]string, len(universalValidatorSet)) for i, v := range universalValidatorSet { - universalValidatorSetStrs[i] = v.String() + universalValidatorSetStrs[i] = v.IdentifyInfo.CoreValidatorAddress } // Step 2: Call VoteOnBallot for this inbound synthetic diff --git a/x/uexecutor/types/expected_keepers.go b/x/uexecutor/types/expected_keepers.go index a193889f..1346328f 100644 --- a/x/uexecutor/types/expected_keepers.go +++ b/x/uexecutor/types/expected_keepers.go @@ -112,7 +112,7 @@ type UValidatorKeeper interface { isFinalized bool, isNew bool, err error) - GetUniversalValidatorSet(ctx context.Context) ([]sdk.ValAddress, error) + GetEligibleVoters(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) } // ParamSubspace defines the expected Subspace interface for parameters. diff --git a/x/uexecutor/types/keys.go b/x/uexecutor/types/keys.go index 17ad7d36..7c4ce3e4 100755 --- a/x/uexecutor/types/keys.go +++ b/x/uexecutor/types/keys.go @@ -40,8 +40,16 @@ const ( QuerierRoute = ModuleName ) -func GetInboundKey(inbound Inbound) string { +func GetInboundUniversalTxKey(inbound Inbound) string { data := fmt.Sprintf("%s:%s:%s", inbound.SourceChain, inbound.TxHash, inbound.LogIndex) hash := sha256.Sum256([]byte(data)) return hex.EncodeToString(hash[:]) // hash[:] converts [32]byte → []byte } + +func GetInboundBallotKey(inbound Inbound) (string, error) { + bz, err := inbound.Marshal() + if err != nil { + return "", err + } + return hex.EncodeToString(bz), nil +} diff --git a/x/utss/README.md b/x/utss/README.md new file mode 100755 index 00000000..de166ff6 --- /dev/null +++ b/x/utss/README.md @@ -0,0 +1,13 @@ +# Universal Transaction Verification (utss) Module + +This is utss (Universal Transaction Verification) module. + +## Responsibilities + +- Verifying transaction hashes of funds locked on source chains +- Performing RPC calls to external chains +- Storing verified transaction hashes for reference and validation + +## Overview + +The utss module acts as the verification layer in a universal system, ensuring the authenticity of transactions before execution on the destination chain. \ No newline at end of file diff --git a/x/utss/autocli.go b/x/utss/autocli.go new file mode 100755 index 00000000..1cd9e386 --- /dev/null +++ b/x/utss/autocli.go @@ -0,0 +1,31 @@ +package module + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + modulev1 "github.com/pushchain/push-chain-node/api/utss/v1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: modulev1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current consensus parameters", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: modulev1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateParams", + Skip: false, // set to true if authority gated + }, + }, + }, + } +} diff --git a/x/utss/client/cli/query.go b/x/utss/client/cli/query.go new file mode 100755 index 00000000..4854c9ee --- /dev/null +++ b/x/utss/client/cli/query.go @@ -0,0 +1,49 @@ +package cli + +import ( + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// !NOTE: Must enable in module.go (disabled in favor of autocli.go) + +func GetQueryCmd() *cobra.Command { + queryCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Querying commands for " + types.ModuleName, + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + queryCmd.AddCommand( + // GetCmdParams(), + ) + return queryCmd +} + +// func GetCmdParams() *cobra.Command { +// cmd := &cobra.Command{ +// Use: "params", +// Short: "Show all module params", +// Args: cobra.ExactArgs(0), +// RunE: func(cmd *cobra.Command, args []string) error { +// clientCtx, err := client.GetClientQueryContext(cmd) +// if err != nil { +// return err +// } + +// queryClient := types.NewQueryClient(clientCtx) +// res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) +// if err != nil { +// return err +// } + +// return clientCtx.PrintProto(res) +// }, +// } +// flags.AddQueryFlagsToCmd(cmd) +// return cmd +// } diff --git a/x/utss/client/cli/tx.go b/x/utss/client/cli/tx.go new file mode 100755 index 00000000..959ec045 --- /dev/null +++ b/x/utss/client/cli/tx.go @@ -0,0 +1,67 @@ +package cli + +import ( + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// !NOTE: Must enable in module.go (disabled in favor of autocli.go) + +// NewTxCmd returns a root CLI command handler for certain modules +// transaction commands. +func NewTxCmd() *cobra.Command { + txCmd := &cobra.Command{ + Use: types.ModuleName, + Short: types.ModuleName + " subcommands.", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + txCmd.AddCommand( + // MsgUpdateParams(), + ) + return txCmd +} + +// Returns a CLI command handler for registering a +// contract for the module. +// func MsgUpdateParams() *cobra.Command { +// cmd := &cobra.Command{ +// Use: "update-params [some-value]", +// Short: "Update the params (must be submitted from the authority)", +// Args: cobra.ExactArgs(1), +// RunE: func(cmd *cobra.Command, args []string) error { +// cliCtx, err := client.GetClientTxContext(cmd) +// if err != nil { +// return err +// } + +// senderAddress := cliCtx.GetFromAddress() + +// someValue, err := strconv.ParseBool(args[0]) +// if err != nil { +// return err +// } + +// msg := &types.MsgUpdateParams{ +// Authority: senderAddress.String(), +// Params: types.Params{ +// SomeValue: someValue, +// }, +// } + +// if err := msg.Validate(); err != nil { +// return err +// } + +// return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), msg) +// }, +// } + +// flags.AddTxFlagsToCmd(cmd) +// return cmd +// } diff --git a/x/utss/depinject.go b/x/utss/depinject.go new file mode 100755 index 00000000..542c9db5 --- /dev/null +++ b/x/utss/depinject.go @@ -0,0 +1,65 @@ +package module + +import ( + "os" + + "github.com/cosmos/cosmos-sdk/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" + + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + + "cosmossdk.io/core/address" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + + modulev1 "github.com/pushchain/push-chain-node/api/utss/module/v1" + "github.com/pushchain/push-chain-node/x/utss/keeper" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +var _ appmodule.AppModule = AppModule{} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +func init() { + appmodule.Register( + &modulev1.Module{}, + appmodule.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + Cdc codec.Codec + StoreService store.KVStoreService + AddressCodec address.Codec + + StakingKeeper stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + UValidatorKeeper types.UValidatorKeeper +} + +type ModuleOutputs struct { + depinject.Out + + Module appmodule.AppModule + Keeper keeper.Keeper +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() + + k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.UValidatorKeeper) + m := NewAppModule(in.Cdc, k, in.UValidatorKeeper) + + return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}} +} diff --git a/x/utss/keeper/genesis_test.go b/x/utss/keeper/genesis_test.go new file mode 100755 index 00000000..1158dc6e --- /dev/null +++ b/x/utss/keeper/genesis_test.go @@ -0,0 +1,22 @@ +package keeper_test + +import ( + "testing" + + "github.com/pushchain/push-chain-node/x/utss/types" + "github.com/stretchr/testify/require" +) + +func TestGenesis(t *testing.T) { + f := SetupTest(t) + + genesisState := &types.GenesisState{ + Params: types.DefaultParams(), + } + + f.k.InitGenesis(f.ctx, genesisState) + + got := f.k.ExportGenesis(f.ctx) + require.NotNil(t, got) + +} diff --git a/x/utss/keeper/hooks.go b/x/utss/keeper/hooks.go new file mode 100644 index 00000000..8429f1e9 --- /dev/null +++ b/x/utss/keeper/hooks.go @@ -0,0 +1,49 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +var _ uvalidatortypes.UValidatorHooks = Hooks{} + +type Hooks struct { + k Keeper +} + +func (k Keeper) Hooks() Hooks { return Hooks{k} } + +func (h Hooks) AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) { + h.k.Logger().Info("TSS Hook: Universal validator added", "address", valAddr.String()) + + if err := h.k.InitiateTssKeyProcess(ctx, types.TssProcessType_TSS_PROCESS_REFRESH); err != nil { + h.k.Logger().Error("Failed to initiate TSS key process in hook", "error", err) + ctx.EventManager().EmitEvent( + sdk.NewEvent( + "tss_process_initiation_failed", + sdk.NewAttribute("reason", err.Error()), + sdk.NewAttribute("validator", valAddr.String()), + ), + ) + } +} + +func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) { + h.k.Logger().Info("TSS Hook: Universal validator removed", "address", valAddr.String()) + + if err := h.k.InitiateTssKeyProcess(ctx, types.TssProcessType_TSS_PROCESS_REFRESH); err != nil { + h.k.Logger().Error("Failed to initiate TSS key process in hook", "error", err) + ctx.EventManager().EmitEvent( + sdk.NewEvent( + "tss_process_initiation_failed", + sdk.NewAttribute("reason", err.Error()), + sdk.NewAttribute("validator", valAddr.String()), + ), + ) + } +} + +func (h Hooks) AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus uvalidatortypes.UVStatus) { + h.k.Logger().Info("TSS Hook: Universal validator status changed", "address", oldStatus, newStatus) +} diff --git a/x/utss/keeper/initiate_tss_key_process.go b/x/utss/keeper/initiate_tss_key_process.go new file mode 100644 index 00000000..11f630f9 --- /dev/null +++ b/x/utss/keeper/initiate_tss_key_process.go @@ -0,0 +1,91 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// InitiateTssKeyProcess creates a new keygen or reshare process. +func (k Keeper) InitiateTssKeyProcess( + ctx context.Context, + processType types.TssProcessType, +) error { + + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Check if a current process exists and is still active (not expired and pending) + existing, err := k.CurrentTssProcess.Get(ctx) + if err == nil { + if sdkCtx.BlockHeight() < existing.ExpiryHeight { + return fmt.Errorf("an active TSS process already exists (id: %d)", existing.Id) + } + } + + // Generate new process ID + processID, err := k.NextProcessId.Next(ctx) + if err != nil { + return fmt.Errorf("failed to generate process id: %w", err) + } + + // initiate a tss key process only for those validators which are either pending_join or active + universalValidators, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) + if err != nil { + return fmt.Errorf("failed to fetch eligible validators: %w", err) + } + + // Convert []sdk.ValAddress -> []string + universalValidatorSetStrs := make([]string, len(universalValidators)) + for i, v := range universalValidators { + universalValidatorSetStrs[i] = v.IdentifyInfo.CoreValidatorAddress + } + + // Create a new process + process := types.TssKeyProcess{ + Status: types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING, + Participants: universalValidatorSetStrs, + BlockHeight: sdkCtx.BlockHeight(), + ExpiryHeight: sdkCtx.BlockHeight() + int64(types.DefaultTssProcessExpiryAfterBlocks), + ProcessType: processType, + Id: processID, + } + + if err := process.ValidateBasic(); err != nil { + return fmt.Errorf("invalid tss process: %w", err) + } + + // Store as current + if err := k.CurrentTssProcess.Set(ctx, process); err != nil { + return fmt.Errorf("failed to set current process: %w", err) + } + + // Add to history + if err := k.ProcessHistory.Set(ctx, process.Id, process); err != nil { + return fmt.Errorf("failed to store process history: %w", err) + } + + // Emit TSS Process Initiated Event + event, err := types.NewTssProcessInitiatedEvent(types.TssProcessInitiatedEvent{ + ProcessID: process.Id, + ProcessType: process.ProcessType.String(), + Participants: process.Participants, + ExpiryHeight: process.ExpiryHeight, + }) + if err != nil { + return err + } + + sdkCtx.EventManager().EmitEvent(event) + + k.Logger().Info("New TSS process initiated", + "id", process.Id, + "type", process.ProcessType, + "participants", len(universalValidatorSetStrs), + "expiry_height", process.ExpiryHeight, + ) + + return nil +} diff --git a/x/utss/keeper/keeper.go b/x/utss/keeper/keeper.go new file mode 100755 index 00000000..a47a4deb --- /dev/null +++ b/x/utss/keeper/keeper.go @@ -0,0 +1,108 @@ +package keeper + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/codec" + + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "cosmossdk.io/collections" + storetypes "cosmossdk.io/core/store" + "cosmossdk.io/log" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +type Keeper struct { + cdc codec.BinaryCodec + + logger log.Logger + schemaBuilder *collections.SchemaBuilder + + // Module State + Params collections.Item[types.Params] // module params + NextProcessId collections.Sequence // counter for next process id + CurrentTssProcess collections.Item[types.TssKeyProcess] // current/active process + ProcessHistory collections.Map[uint64, types.TssKeyProcess] // history of past processes + + // TSS Key Storage + CurrentTssKey collections.Item[types.TssKey] // currently active finalized key + TssKeyHistory collections.Map[string, types.TssKey] // map of key_id -> TssKey + + // keepers + uvalidatorKeeper types.UValidatorKeeper + + authority string +} + +// NewKeeper creates a new Keeper instance +func NewKeeper( + cdc codec.BinaryCodec, + storeService storetypes.KVStoreService, + logger log.Logger, + authority string, + uvalidatorKeeper types.UValidatorKeeper, +) Keeper { + logger = logger.With(log.ModuleKey, "x/"+types.ModuleName) + + sb := collections.NewSchemaBuilder(storeService) + + if authority == "" { + authority = authtypes.NewModuleAddress(govtypes.ModuleName).String() + } + + k := Keeper{ + cdc: cdc, + logger: logger, + schemaBuilder: sb, + + Params: collections.NewItem(sb, types.ParamsKey, types.ParamsName, codec.CollValue[types.Params](cdc)), + NextProcessId: collections.NewSequence(sb, types.NextProcessIdKey, "next_process_id"), + CurrentTssProcess: collections.NewItem(sb, types.CurrentTssProcessKey, "current_tss_process", codec.CollValue[types.TssKeyProcess](cdc)), + ProcessHistory: collections.NewMap(sb, types.ProcessHistoryKey, "process_history", collections.Uint64Key, codec.CollValue[types.TssKeyProcess](cdc)), + + // TSS key storage + CurrentTssKey: collections.NewItem(sb, types.CurrentTssKeyKeyPrefix, "current_tss_key", codec.CollValue[types.TssKey](cdc)), + TssKeyHistory: collections.NewMap(sb, types.TssKeyHistoryKey, "tss_key_history", collections.StringKey, codec.CollValue[types.TssKey](cdc)), + + authority: authority, + uvalidatorKeeper: uvalidatorKeeper, + } + + return k +} + +func (k Keeper) Logger() log.Logger { + return k.logger +} + +// InitGenesis initializes the module's state from a genesis state. +func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error { + + if err := data.Params.ValidateBasic(); err != nil { + return err + } + + return k.Params.Set(ctx, data.Params) +} + +// ExportGenesis exports the module's state to a genesis state. +func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { + params, err := k.Params.Get(ctx) + if err != nil { + panic(err) + } + + return &types.GenesisState{ + Params: params, + } +} + +func (k Keeper) SchemaBuilder() *collections.SchemaBuilder { + return k.schemaBuilder +} + +func (k Keeper) GetUValidatorKeeper() types.UValidatorKeeper { + return k.uvalidatorKeeper +} diff --git a/x/utss/keeper/keeper_test.go b/x/utss/keeper/keeper_test.go new file mode 100755 index 00000000..8ab7d736 --- /dev/null +++ b/x/utss/keeper/keeper_test.go @@ -0,0 +1,150 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + "cosmossdk.io/core/address" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + sdkaddress "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil/integration" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/pushchain/push-chain-node/app" + module "github.com/pushchain/push-chain-node/x/utss" + "github.com/pushchain/push-chain-node/x/utss/keeper" + "github.com/pushchain/push-chain-node/x/utss/types" + + uvalidatorKeeper "github.com/pushchain/push-chain-node/x/uvalidator/keeper" +) + +var maccPerms = map[string][]string{ + authtypes.FeeCollectorName: nil, + stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, + stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, + minttypes.ModuleName: {authtypes.Minter}, + govtypes.ModuleName: {authtypes.Burner}, +} + +type testFixture struct { + suite.Suite + + ctx sdk.Context + k keeper.Keeper + msgServer types.MsgServer + queryServer types.QueryServer + appModule *module.AppModule + + accountkeeper authkeeper.AccountKeeper + bankkeeper bankkeeper.BaseKeeper + stakingKeeper *stakingkeeper.Keeper + mintkeeper mintkeeper.Keeper + + addrs []sdk.AccAddress + govModAddr string +} + +func SetupTest(t *testing.T) *testFixture { + t.Helper() + f := new(testFixture) + + cfg := sdk.GetConfig() // do not seal, more set later + cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub) + cfg.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub) + cfg.SetBech32PrefixForConsensusNode(app.Bech32PrefixConsAddr, app.Bech32PrefixConsPub) + cfg.SetCoinType(app.CoinType) + + validatorAddressCodec := sdkaddress.NewBech32Codec(app.Bech32PrefixValAddr) + accountAddressCodec := sdkaddress.NewBech32Codec(app.Bech32PrefixAccAddr) + consensusAddressCodec := sdkaddress.NewBech32Codec(app.Bech32PrefixConsAddr) + + // Base setup + logger := log.NewTestLogger(t) + encCfg := moduletestutil.MakeTestEncodingConfig() + + f.govModAddr = authtypes.NewModuleAddress(govtypes.ModuleName).String() + f.addrs = simtestutil.CreateIncrementalAccounts(3) + + keys := storetypes.NewKVStoreKeys(authtypes.ModuleName, banktypes.ModuleName, stakingtypes.ModuleName, minttypes.ModuleName, types.ModuleName) + f.ctx = sdk.NewContext(integration.CreateMultiStore(keys, logger), cmtproto.Header{}, false, logger) + + // Register SDK modules. + registerBaseSDKModules(logger, f, encCfg, keys, accountAddressCodec, validatorAddressCodec, consensusAddressCodec) + + // Setup Keeper. + f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, &uvalidatorKeeper.Keeper{}) + f.msgServer = keeper.NewMsgServerImpl(f.k) + f.queryServer = keeper.NewQuerier(f.k) + f.appModule = module.NewAppModule(encCfg.Codec, f.k, &uvalidatorKeeper.Keeper{}) + + return f +} + +func registerModuleInterfaces(encCfg moduletestutil.TestEncodingConfig) { + authtypes.RegisterInterfaces(encCfg.InterfaceRegistry) + stakingtypes.RegisterInterfaces(encCfg.InterfaceRegistry) + banktypes.RegisterInterfaces(encCfg.InterfaceRegistry) + minttypes.RegisterInterfaces(encCfg.InterfaceRegistry) + + types.RegisterInterfaces(encCfg.InterfaceRegistry) +} + +func registerBaseSDKModules( + logger log.Logger, + f *testFixture, + encCfg moduletestutil.TestEncodingConfig, + keys map[string]*storetypes.KVStoreKey, + ac address.Codec, + validator address.Codec, + consensus address.Codec, +) { + registerModuleInterfaces(encCfg) + + // Auth Keeper. + f.accountkeeper = authkeeper.NewAccountKeeper( + encCfg.Codec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), + authtypes.ProtoBaseAccount, + maccPerms, + ac, app.Bech32PrefixAccAddr, + f.govModAddr, + ) + + // Bank Keeper. + f.bankkeeper = bankkeeper.NewBaseKeeper( + encCfg.Codec, runtime.NewKVStoreService(keys[banktypes.StoreKey]), + f.accountkeeper, + nil, + f.govModAddr, logger, + ) + + // Staking Keeper. + f.stakingKeeper = stakingkeeper.NewKeeper( + encCfg.Codec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), + f.accountkeeper, f.bankkeeper, f.govModAddr, + validator, + consensus, + ) + + // Mint Keeper. + f.mintkeeper = mintkeeper.NewKeeper( + encCfg.Codec, runtime.NewKVStoreService(keys[minttypes.StoreKey]), + f.stakingKeeper, f.accountkeeper, f.bankkeeper, + authtypes.FeeCollectorName, f.govModAddr, + ) +} diff --git a/x/utss/keeper/msg_server.go b/x/utss/keeper/msg_server.go new file mode 100755 index 00000000..79d82903 --- /dev/null +++ b/x/utss/keeper/msg_server.go @@ -0,0 +1,93 @@ +package keeper + +import ( + "context" + "fmt" + + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkErrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +type msgServer struct { + k Keeper +} + +var _ types.MsgServer = msgServer{} + +// NewMsgServerImpl returns an implementation of the module MsgServer interface. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{k: keeper} +} + +// UpdateParams handles MsgUpdateParams for updating module parameters. +// Only authorized governance account can execute this. +func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if ms.k.authority != msg.Authority { + return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority) + } + + err := ms.k.UpdateParams(ctx, msg.Params) + if err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} + +// InitiateTssKeyProcess implements types.MsgServer. +func (ms msgServer) InitiateTssKeyProcess(ctx context.Context, msg *types.MsgInitiateTssKeyProcess) (*types.MsgInitiateTssKeyProcessResponse, error) { + // Retrieve the current Params + params, err := ms.k.Params.Get(ctx) + if err != nil { + return nil, errors.Wrapf(err, "failed to get params") + } + + if params.Admin != msg.Signer { + return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) + } + + err = ms.k.InitiateTssKeyProcess(ctx, msg.ProcessType) + if err != nil { + return nil, err + } + return &types.MsgInitiateTssKeyProcessResponse{}, nil +} + +// VoteTssKeyProcess implements types.MsgServer. +func (ms msgServer) VoteTssKeyProcess(ctx context.Context, msg *types.MsgVoteTssKeyProcess) (*types.MsgVoteTssKeyProcessResponse, error) { + signerAccAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return nil, fmt.Errorf("invalid signer address: %w", err) + } + + // Convert account to validator operator address + signerValAddr := sdk.ValAddress(signerAccAddr) + + // Lookup the linked universal validator for this signer + isBonded, err := ms.k.uvalidatorKeeper.IsBondedUniversalValidator(ctx, msg.Signer) + if err != nil { + return nil, errors.Wrapf(err, "failed to check bonded status for signer %s", msg.Signer) + } + if !isBonded { + return nil, fmt.Errorf("universal validator for signer %s is not bonded", msg.Signer) + } + + isTombstoned, err := ms.k.uvalidatorKeeper.IsTombstonedUniversalValidator(ctx, msg.Signer) + if err != nil { + return nil, errors.Wrapf(err, "failed to check tombstoned status for signer %s", msg.Signer) + } + if isTombstoned { + return nil, fmt.Errorf("universal validator for signer %s is tombstoned", msg.Signer) + } + + err = ms.k.VoteTssKeyProcess(ctx, signerValAddr, msg.TssPubkey, msg.KeyId) + if err != nil { + return nil, err + } + + return &types.MsgVoteTssKeyProcessResponse{}, nil +} diff --git a/x/utss/keeper/msg_server_test.go b/x/utss/keeper/msg_server_test.go new file mode 100755 index 00000000..48f33fde --- /dev/null +++ b/x/utss/keeper/msg_server_test.go @@ -0,0 +1,56 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +func TestParams(t *testing.T) { + f := SetupTest(t) + require := require.New(t) + + testCases := []struct { + name string + request *types.MsgUpdateParams + err bool + }{ + { + name: "fail; invalid authority", + request: &types.MsgUpdateParams{ + Authority: f.addrs[0].String(), + Params: types.DefaultParams(), + }, + err: true, + }, + { + name: "success", + request: &types.MsgUpdateParams{ + Authority: f.govModAddr, + Params: types.DefaultParams(), + }, + err: false, + }, + } + + for _, tc := range testCases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + _, err := f.msgServer.UpdateParams(f.ctx, tc.request) + + if tc.err { + require.Error(err) + } else { + require.NoError(err) + + r, err := f.queryServer.Params(f.ctx, &types.QueryParamsRequest{}) + require.NoError(err) + + require.EqualValues(&tc.request.Params, r.Params) + } + + }) + } +} diff --git a/x/utss/keeper/msg_update_params.go b/x/utss/keeper/msg_update_params.go new file mode 100644 index 00000000..18182db3 --- /dev/null +++ b/x/utss/keeper/msg_update_params.go @@ -0,0 +1,12 @@ +package keeper + +import ( + "context" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// updateParams is for updating params collections of the module +func (k Keeper) UpdateParams(ctx context.Context, params types.Params) error { + return k.Params.Set(ctx, params) +} diff --git a/x/utss/keeper/msg_vote_tss_key_process.go b/x/utss/keeper/msg_vote_tss_key_process.go new file mode 100644 index 00000000..81077247 --- /dev/null +++ b/x/utss/keeper/msg_vote_tss_key_process.go @@ -0,0 +1,137 @@ +package keeper + +import ( + "context" + "fmt" + + errors "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +func (k Keeper) VoteTssKeyProcess( + ctx context.Context, + universalValidator sdk.ValAddress, + tssPubKey, keyId string, +) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + process, err := k.CurrentTssProcess.Get(ctx) + if err != nil { + return fmt.Errorf("no active TSS process running") + } + + processId := process.Id + + if sdkCtx.BlockHeight() >= process.ExpiryHeight { + return fmt.Errorf("TSS process %d has expired", process.Id) + } + + // Step 1: Ensure the key doesn't already exist + _, found, err := k.GetTssKeyByID(ctx, keyId) + if err != nil { + return errors.Wrap(err, "failed to check existing TSS key") + } + if found { + return fmt.Errorf("tss key with key_id %s already exists", keyId) + } + + // Step 2: Vote on the ballot (using a cache context so we don’t mutate state on failure) + tmpCtx, commit := sdkCtx.CacheContext() + isFinalized, _, err := k.VoteOnTssBallot(tmpCtx, universalValidator, processId, tssPubKey, keyId) + if err != nil { + return errors.Wrap(err, "failed to vote on TSS ballot") + } + + // Commit the vote + commit() + + // Step 3: If not finalized yet, do nothing + if !isFinalized { + return nil + } + + process.Status = types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS + + // Step 5: Ballot finalized — create the TssKey record + tssKey := types.TssKey{ + TssPubkey: tssPubKey, + KeyId: keyId, + Participants: process.Participants, + FinalizedBlockHeight: sdkCtx.BlockHeight(), + KeygenBlockHeight: process.BlockHeight, + ProcessId: processId, + } + + // Step 6: Store updates + if err := k.CurrentTssKey.Set(ctx, tssKey); err != nil { + return errors.Wrap(err, "failed to set current TSS key") + } + if err := k.TssKeyHistory.Set(ctx, keyId, tssKey); err != nil { + return errors.Wrap(err, "failed to store TSS key history") + } + if err := k.FinalizeTssKeyProcess(ctx, processId, types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS); err != nil { + return errors.Wrap(err, "failed to finalise TSS process") + } + + universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) + if err != nil { + return err + } + + for i := range universalValidatorSet { + uv := &universalValidatorSet[i] + coreValidatorAddress := uv.IdentifyInfo.CoreValidatorAddress + + foundInParticipants := false + for _, participant := range tssKey.Participants { + if participant == coreValidatorAddress { + foundInParticipants = true + break + } + } + + valAddr, err := sdk.ValAddressFromBech32(coreValidatorAddress) + if err != nil { + return err + } + + // update pending_join validator to active + switch uv.LifecycleInfo.CurrentStatus { + case uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN: + if foundInParticipants { + uv.LifecycleInfo.CurrentStatus = uvalidatortypes.UVStatus_UV_STATUS_ACTIVE + if err := k.uvalidatorKeeper.UpdateValidatorStatus(ctx, valAddr, uvalidatortypes.UVStatus_UV_STATUS_ACTIVE); err != nil { + k.logger.Error("failed to activate universal validator", "valAddr", coreValidatorAddress, "err", err) + } + } + // update pending_leave validator to inactive + case uvalidatortypes.UVStatus_UV_STATUS_PENDING_LEAVE: + if !foundInParticipants { + uv.LifecycleInfo.CurrentStatus = uvalidatortypes.UVStatus_UV_STATUS_INACTIVE + if err := k.uvalidatorKeeper.UpdateValidatorStatus(ctx, valAddr, uvalidatortypes.UVStatus_UV_STATUS_INACTIVE); err != nil { + k.logger.Error("failed to inactivate universal validator", "valAddr", coreValidatorAddress, "err", err) + } + } + } + } + + // Step 7: Emit finalized event + event, _ := types.NewTssKeyFinalizedEvent(types.TssKeyFinalizedEvent{ + ProcessID: processId, + KeyID: keyId, + TssPubKey: tssPubKey, + }) + sdkCtx.EventManager().EmitEvent(event) + + k.logger.Info( + "TSS key finalized", + "key_id", keyId, + "process_id", processId, + "pubkey", tssPubKey, + ) + + return nil +} diff --git a/x/utss/keeper/query_server.go b/x/utss/keeper/query_server.go new file mode 100755 index 00000000..0ef7d6d2 --- /dev/null +++ b/x/utss/keeper/query_server.go @@ -0,0 +1,134 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +var _ types.QueryServer = Querier{} + +type Querier struct { + Keeper +} + +func NewQuerier(keeper Keeper) Querier { + return Querier{Keeper: keeper} +} + +// ---------------- Params ------------------ +func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + p, err := k.Keeper.Params.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryParamsResponse{Params: &p}, nil +} + +// ---------------- Current TSS Process ------------------ +func (k Querier) CurrentProcess(goCtx context.Context, req *types.QueryCurrentProcessRequest) (*types.QueryCurrentProcessResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + process, err := k.Keeper.CurrentTssProcess.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryCurrentProcessResponse{ + Process: &process, + }, nil +} + +// ---------------- Process By ID ------------------------ +func (k Querier) ProcessById(goCtx context.Context, req *types.QueryProcessByIdRequest) (*types.QueryProcessByIdResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + process, err := k.Keeper.ProcessHistory.Get(ctx, req.Id) + if err != nil { + return nil, err + } + + return &types.QueryProcessByIdResponse{ + Process: &process, + }, nil +} + +// ---------------- All Processes (Paginated) ------------- +func (k Querier) AllProcesses(goCtx context.Context, req *types.QueryAllProcessesRequest) (*types.QueryAllProcessesResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + results, pageRes, err := query.CollectionPaginate( + ctx, + k.Keeper.ProcessHistory, + req.Pagination, + func(id uint64, process types.TssKeyProcess) (*types.TssKeyProcess, error) { + p := process + return &p, nil // return transformed object + }, + ) + if err != nil { + return nil, err + } + + return &types.QueryAllProcessesResponse{ + Processes: results, + Pagination: pageRes, + }, nil +} + +// ---------------- Current TSS Key ----------------------- +func (k Querier) CurrentKey(goCtx context.Context, req *types.QueryCurrentKeyRequest) (*types.QueryCurrentKeyResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + key, err := k.Keeper.CurrentTssKey.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryCurrentKeyResponse{ + Key: &key, + }, nil +} + +// ---------------- Key By ID ----------------------------- +func (k Querier) KeyById(goCtx context.Context, req *types.QueryKeyByIdRequest) (*types.QueryKeyByIdResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + key, err := k.Keeper.TssKeyHistory.Get(ctx, req.KeyId) + if err != nil { + return nil, err + } + + return &types.QueryKeyByIdResponse{ + Key: &key, + }, nil +} + +// ---------------- All Keys (Paginated) ------------------- +func (k Querier) AllKeys(goCtx context.Context, req *types.QueryAllKeysRequest) (*types.QueryAllKeysResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + results, pageRes, err := query.CollectionPaginate( + ctx, + k.Keeper.TssKeyHistory, + req.Pagination, + func(id string, key types.TssKey) (*types.TssKey, error) { + kcopy := key + return &kcopy, nil + }, + ) + if err != nil { + return nil, err + } + + return &types.QueryAllKeysResponse{ + Keys: results, + Pagination: pageRes, + }, nil +} diff --git a/x/utss/keeper/tss_key.go b/x/utss/keeper/tss_key.go new file mode 100644 index 00000000..59e96e8e --- /dev/null +++ b/x/utss/keeper/tss_key.go @@ -0,0 +1,54 @@ +package keeper + +import ( + "context" + "errors" + "fmt" + + "cosmossdk.io/collections" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// SetCurrentTssKey stores the finalized active TSS key. +func (k Keeper) SetCurrentTssKey(ctx context.Context, key types.TssKey) error { + if err := key.ValidateBasic(); err != nil { + return fmt.Errorf("invalid tss key: %w", err) + } + + if err := k.CurrentTssKey.Set(ctx, key); err != nil { + return fmt.Errorf("failed to set current tss key: %w", err) + } + + // Also store in TssKeyHistory for reference + if err := k.TssKeyHistory.Set(ctx, key.KeyId, key); err != nil { + return fmt.Errorf("failed to record tss key history: %w", err) + } + + k.Logger().Info("New TSS key finalized", "key_id", key.KeyId, "pubkey", key.TssPubkey) + return nil +} + +// GetCurrentTssKey fetches the currently active finalized key. +func (k Keeper) GetCurrentTssKey(ctx context.Context) (types.TssKey, bool, error) { + key, err := k.CurrentTssKey.Get(ctx) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.TssKey{}, false, nil + } + return types.TssKey{}, false, err + } + return key, true, nil +} + +// GetTssKeyByID retrieves a specific key from history using key_id. +func (k Keeper) GetTssKeyByID(ctx context.Context, keyID string) (types.TssKey, bool, error) { + key, err := k.TssKeyHistory.Get(ctx, keyID) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.TssKey{}, false, nil + } + return types.TssKey{}, false, err + } + return key, true, nil +} diff --git a/x/utss/keeper/tss_key_process.go b/x/utss/keeper/tss_key_process.go new file mode 100644 index 00000000..328cc496 --- /dev/null +++ b/x/utss/keeper/tss_key_process.go @@ -0,0 +1,61 @@ +package keeper + +import ( + "context" + "errors" + "fmt" + + "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// FinalizeTssKeyProcess updates a process status and removes it from current if completed. +func (k Keeper) FinalizeTssKeyProcess(ctx context.Context, processID uint64, status types.TssKeyProcessStatus) error { + process, err := k.ProcessHistory.Get(ctx, processID) + if err != nil { + return fmt.Errorf("tss process %d not found: %w", processID, err) + } + + process.Status = status + if err := k.ProcessHistory.Set(ctx, processID, process); err != nil { + return fmt.Errorf("failed to update process: %w", err) + } + + if status != types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING { + if err := k.CurrentTssProcess.Remove(ctx); err != nil { + k.Logger().Error("failed to clear current process", "err", err) + } + } + + k.Logger().Info("TSS process finalized", "id", processID, "status", status.String()) + return nil +} + +// GetTssKeyProcessByID retrieves a specific tss key process from history using process_id. +func (k Keeper) GetTssKeyProcessByID(ctx context.Context, processID uint64) (types.TssKeyProcess, bool, error) { + key, err := k.ProcessHistory.Get(ctx, processID) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.TssKeyProcess{}, false, nil + } + return types.TssKeyProcess{}, false, err + } + return key, true, nil +} + +// GetCurrentTssParticipants returns the participants of current tss (ongoing) +func (k Keeper) GetCurrentTssParticipants(ctx context.Context) ([]string, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + currentProcess, err := k.CurrentTssProcess.Get(ctx) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return []string{}, nil + } + return nil, err + } + if sdkCtx.BlockHeight() < currentProcess.ExpiryHeight { + return []string{}, nil + } + return currentProcess.Participants, nil +} diff --git a/x/utss/keeper/tss_key_process_test.go b/x/utss/keeper/tss_key_process_test.go new file mode 100644 index 00000000..300eb8f5 --- /dev/null +++ b/x/utss/keeper/tss_key_process_test.go @@ -0,0 +1,116 @@ +package keeper_test + +import ( + "testing" + + "github.com/pushchain/push-chain-node/x/utss/types" + "github.com/stretchr/testify/require" +) + +func TestFinalizeTssKeyProcess(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + process := types.TssKeyProcess{ + Id: 1, + Status: types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING, + Participants: []string{"val1", "val2"}, + BlockHeight: 100, + ExpiryHeight: 200, + ProcessType: types.TssProcessType_TSS_PROCESS_KEYGEN, + } + + // Store a pending process + err := f.k.ProcessHistory.Set(ctx, process.Id, process) + require.NoError(t, err) + + // Set this as the current process + err = f.k.CurrentTssProcess.Set(ctx, process) + require.NoError(t, err) + + // Finalize with SUCCESS + err = f.k.FinalizeTssKeyProcess(ctx, process.Id, types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS) + require.NoError(t, err) + + // Check ProcessHistory updated + got, found, err := f.k.GetTssKeyProcessByID(ctx, process.Id) + require.NoError(t, err) + require.True(t, found) + require.Equal(t, types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS, got.Status) + + // Ensure current process is removed after finalize + _, err = f.k.CurrentTssProcess.Get(ctx) + require.Error(t, err) +} + +func TestFinalizeTssKeyProcess_NotFound(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + err := f.k.FinalizeTssKeyProcess(ctx, 999, types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS) + require.ErrorContains(t, err, "not found") +} + +func TestGetTssKeyProcessByID(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + proc := types.TssKeyProcess{ + Id: 2, + Status: types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS, + ProcessType: types.TssProcessType_TSS_PROCESS_KEYGEN, + } + err := f.k.ProcessHistory.Set(ctx, proc.Id, proc) + require.NoError(t, err) + + got, found, err := f.k.GetTssKeyProcessByID(ctx, proc.Id) + require.NoError(t, err) + require.True(t, found) + require.Equal(t, proc.Status, got.Status) + require.Equal(t, proc.ProcessType, got.ProcessType) +} + +func TestGetTssKeyProcessByID_NotFound(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + _, found, err := f.k.GetTssKeyProcessByID(ctx, 42) + require.NoError(t, err) + require.False(t, found) +} + +func TestGetCurrentTssParticipants(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + proc := types.TssKeyProcess{ + Id: 10, + Participants: []string{"alice", "bob"}, + ExpiryHeight: 5, + BlockHeight: 1, + ProcessType: types.TssProcessType_TSS_PROCESS_KEYGEN, + } + err := f.k.CurrentTssProcess.Set(ctx, proc) + require.NoError(t, err) + + // Case 1: blockHeight < ExpiryHeight → return empty + f.ctx = f.ctx.WithBlockHeight(3) + participants, err := f.k.GetCurrentTssParticipants(f.ctx) + require.NoError(t, err) + require.Empty(t, participants) + + // Case 2: blockHeight > ExpiryHeight → return participants + f.ctx = f.ctx.WithBlockHeight(10) + participants, err = f.k.GetCurrentTssParticipants(f.ctx) + require.NoError(t, err) + require.Equal(t, []string{"alice", "bob"}, participants) +} + +func TestGetCurrentTssParticipants_NotFound(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + participants, err := f.k.GetCurrentTssParticipants(ctx) + require.NoError(t, err) + require.Empty(t, participants) +} diff --git a/x/utss/keeper/tss_key_test.go b/x/utss/keeper/tss_key_test.go new file mode 100644 index 00000000..6fed5c01 --- /dev/null +++ b/x/utss/keeper/tss_key_test.go @@ -0,0 +1,66 @@ +package keeper_test + +import ( + "testing" + + "github.com/pushchain/push-chain-node/x/utss/types" + "github.com/stretchr/testify/require" +) + +func TestSetAndGetCurrentTssKey(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + key := types.TssKey{ + KeyId: "tss-key-001", + TssPubkey: "pubkey123", + Participants: []string{"validator1", "validator2"}, + KeygenBlockHeight: 1, + FinalizedBlockHeight: 2, + ProcessId: 1, + } + + // Set key + err := f.k.SetCurrentTssKey(ctx, key) + require.NoError(t, err) + + // Get key + got, found, err := f.k.GetCurrentTssKey(ctx) + require.NoError(t, err) + require.True(t, found) + require.Equal(t, key.KeyId, got.KeyId) + require.Equal(t, key.TssPubkey, got.TssPubkey) +} + +func TestGetTssKeyByID(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + key := types.TssKey{ + KeyId: "key-abc", + TssPubkey: "pub123", + Participants: []string{"validator1", "validator2"}, + KeygenBlockHeight: 1, + FinalizedBlockHeight: 2, + ProcessId: 1, + } + + err := f.k.SetCurrentTssKey(ctx, key) + require.NoError(t, err) + + got, found, err := f.k.GetTssKeyByID(ctx, "key-abc") + require.NoError(t, err) + require.True(t, found) + require.Equal(t, key.KeyId, got.KeyId) + require.Equal(t, key.TssPubkey, got.TssPubkey) +} + +func TestGetCurrentTssKey_NotFound(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + got, found, err := f.k.GetCurrentTssKey(ctx) + require.NoError(t, err) + require.False(t, found) + require.Empty(t, got.KeyId) +} diff --git a/x/utss/keeper/voting.go b/x/utss/keeper/voting.go new file mode 100644 index 00000000..5dbdc042 --- /dev/null +++ b/x/utss/keeper/voting.go @@ -0,0 +1,73 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +func (k Keeper) VoteOnTssBallot( + ctx context.Context, + universalValidator sdk.ValAddress, + processId uint64, + tssPubKey, keyId string, +) (isFinalized bool, + isNew bool, + err error) { + + sdkCtx := sdk.UnwrapSDKContext(ctx) + ballotKey := types.GetTssBallotKey(processId, tssPubKey, keyId) + + // Check if a current process exists and is still active (not expired and pending) + existing, err := k.CurrentTssProcess.Get(ctx) + if err != nil { + return false, false, fmt.Errorf("no active TSS process") + } + + if existing.Id != processId { + return false, false, fmt.Errorf( + "invalid vote: active process is %d, got %d", + existing.Id, processId, + ) + } + + currentHeight := sdkCtx.BlockHeight() + + // ensure process hasn't expired + if currentHeight >= existing.ExpiryHeight { + return false, false, fmt.Errorf("process expired at height %d (current %d)", existing.ExpiryHeight, currentHeight) + } + + // compute delta = number of blocks from now until expiry + expiryAfterBlocks := existing.ExpiryHeight - currentHeight + if expiryAfterBlocks <= 0 { + return false, false, fmt.Errorf("invalid expiry delta: %d", expiryAfterBlocks) + } + + // votesNeeded = number of participants in the tss process + // 100% quorum needed + votesNeeded := int64(len(existing.Participants)) + if votesNeeded <= 0 { + return false, false, fmt.Errorf("no participants in process %d", processId) + } + + // Step 2: Call VoteOnBallot for tss + _, isFinalized, isNew, err = k.uvalidatorKeeper.VoteOnBallot( + ctx, + ballotKey, + uvalidatortypes.BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY, + universalValidator.String(), + uvalidatortypes.VoteResult_VOTE_RESULT_SUCCESS, + existing.Participants, + int64(votesNeeded), + expiryAfterBlocks, + ) + if err != nil { + return false, false, err + } + + return isFinalized, isNew, nil +} diff --git a/x/utss/module.go b/x/utss/module.go new file mode 100755 index 00000000..caee793b --- /dev/null +++ b/x/utss/module.go @@ -0,0 +1,153 @@ +package module + +import ( + "context" + "encoding/json" + + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + + abci "github.com/cometbft/cometbft/abci/types" + + "cosmossdk.io/client/v2/autocli" + errorsmod "cosmossdk.io/errors" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/pushchain/push-chain-node/x/utss/keeper" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +const ( + // ConsensusVersion defines the current x/utss module consensus version. + ConsensusVersion = 1 +) + +var ( + _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleGenesis = AppModule{} + _ module.AppModule = AppModule{} + + _ autocli.HasAutoCLIConfig = AppModule{} +) + +// AppModuleBasic defines the basic application module used by the wasm module. +type AppModuleBasic struct { + cdc codec.Codec +} + +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper + uvalidatorKeeper types.UValidatorKeeper +} + +// NewAppModule constructor +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, + uvalidatorKeeper types.UValidatorKeeper, +) *AppModule { + return &AppModule{ + AppModuleBasic: AppModuleBasic{cdc: cdc}, + keeper: keeper, + uvalidatorKeeper: uvalidatorKeeper, + } +} + +func (a AppModuleBasic) Name() string { + return types.ModuleName +} + +func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(&types.GenesisState{ + Params: types.DefaultParams(), + }) +} + +func (a AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, _ client.TxEncodingConfig, message json.RawMessage) error { + var data types.GenesisState + err := marshaler.UnmarshalJSON(message, &data) + if err != nil { + return err + } + if err := data.Params.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "params") + } + return nil +} + +func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) { +} + +func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err != nil { + // same behavior as in cosmos-sdk + panic(err) + } +} + +// Disable in favor of autocli.go. If you wish to use these, it will override AutoCLI methods. +/* +func (a AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.NewTxCmd() +} + +func (a AppModuleBasic) GetQueryCmd() *cobra.Command { + return cli.GetQueryCmd() +} +*/ + +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +func (a AppModuleBasic) RegisterInterfaces(r codectypes.InterfaceRegistry) { + types.RegisterInterfaces(r) +} + +func (a AppModule) InitGenesis(ctx sdk.Context, marshaler codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate { + var genesisState types.GenesisState + marshaler.MustUnmarshalJSON(message, &genesisState) + + if err := a.keeper.Params.Set(ctx, genesisState.Params); err != nil { + panic(err) + } + + if err := a.keeper.InitGenesis(ctx, &genesisState); err != nil { + panic(err) + } + + return nil +} + +func (a AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) json.RawMessage { + genState := a.keeper.ExportGenesis(ctx) + return marshaler.MustMarshalJSON(genState) +} + +func (a AppModule) RegisterInvariants(_ sdk.InvariantRegistry) { +} + +func (a AppModule) QuerierRoute() string { + return types.QuerierRoute +} + +func (a AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(a.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(a.keeper)) +} + +// ConsensusVersion is a sequence number for state-breaking change of the +// module. It should be incremented on each consensus-breaking change +// introduced by the module. To avoid wrong/empty versions, the initial version +// should be set to 1. +func (a AppModule) ConsensusVersion() uint64 { + return ConsensusVersion +} diff --git a/x/utss/types/codec.go b/x/utss/types/codec.go new file mode 100755 index 00000000..6d57a9e3 --- /dev/null +++ b/x/utss/types/codec.go @@ -0,0 +1,35 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + AminoCdc = codec.NewAminoCodec(amino) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + sdk.RegisterLegacyAminoCodec(amino) +} + +// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgUpdateParams{}, ModuleName+"/MsgUpdateParams", nil) +} + +func RegisterInterfaces(registry types.InterfaceRegistry) { + + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgUpdateParams{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/utss/types/constants.go b/x/utss/types/constants.go new file mode 100644 index 00000000..155c5a03 --- /dev/null +++ b/x/utss/types/constants.go @@ -0,0 +1,10 @@ +package types + +// Quorum numerator/denominator for validator votes (>2/3) +const ( + VotesThresholdNumerator = 2 + VotesThresholdDenominator = 3 + + // Default number of blocks after which tss process expires + DefaultTssProcessExpiryAfterBlocks = 500 +) diff --git a/x/utss/types/events.go b/x/utss/types/events.go new file mode 100644 index 00000000..c59b515f --- /dev/null +++ b/x/utss/types/events.go @@ -0,0 +1,90 @@ +package types + +import ( + "encoding/json" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + EventTypeTssProcessInitiated = "tss_process_initiated" + EventTypeTssKeyFinalized = "tss_key_finalized" +) + +// TssProcessInitiatedEvent represents the emitted event when a new TSS key process starts. +type TssProcessInitiatedEvent struct { + ProcessID uint64 `json:"process_id"` + ProcessType string `json:"process_type"` + Participants []string `json:"participants"` + ExpiryHeight int64 `json:"expiry_height"` +} + +// NewTssProcessInitiatedEvent creates and returns a Cosmos SDK event. +func NewTssProcessInitiatedEvent(e TssProcessInitiatedEvent) (sdk.Event, error) { + bz, err := json.Marshal(e) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal event: %w", err) + } + + participantsJSON, err := json.Marshal(e.Participants) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal participants: %w", err) + } + + event := sdk.NewEvent( + EventTypeTssProcessInitiated, + sdk.NewAttribute("process_id", fmt.Sprintf("%d", e.ProcessID)), + sdk.NewAttribute("process_type", e.ProcessType), + sdk.NewAttribute("participants", string(participantsJSON)), + sdk.NewAttribute("expiry_height", fmt.Sprintf("%d", e.ExpiryHeight)), + sdk.NewAttribute("data", string(bz)), // full JSON payload for off-chain consumption + ) + + return event, nil +} + +// String returns a readable log for CLI. +func (e TssProcessInitiatedEvent) String() string { + return fmt.Sprintf( + "TSS process initiated | ID: %d | Type: %s | Participants: %v | ExpiryHeight: %d", + e.ProcessID, e.ProcessType, e.Participants, e.ExpiryHeight, + ) +} + +// ----------------------------------------------------------------------------- +// Finalized Event +// ----------------------------------------------------------------------------- + +// TssKeyFinalizedEvent represents when a TSS keygen or reshare process completes successfully. +type TssKeyFinalizedEvent struct { + ProcessID uint64 `json:"process_id"` + KeyID string `json:"key_id"` + TssPubKey string `json:"tss_pubkey"` +} + +// NewTssKeyFinalizedEvent creates and returns a Cosmos SDK event. +func NewTssKeyFinalizedEvent(e TssKeyFinalizedEvent) (sdk.Event, error) { + bz, err := json.Marshal(e) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal event: %w", err) + } + + event := sdk.NewEvent( + EventTypeTssKeyFinalized, + sdk.NewAttribute("process_id", fmt.Sprintf("%d", e.ProcessID)), + sdk.NewAttribute("key_id", e.KeyID), + sdk.NewAttribute("tss_pubkey", e.TssPubKey), + sdk.NewAttribute("data", string(bz)), + ) + + return event, nil +} + +// String returns a readable log for CLI. +func (e TssKeyFinalizedEvent) String() string { + return fmt.Sprintf( + "TSS key finalized | ProcessID: %d | KeyID: %s | PubKey: %s", + e.ProcessID, e.KeyID, e.TssPubKey, + ) +} diff --git a/x/utss/types/expected_keepers.go b/x/utss/types/expected_keepers.go new file mode 100644 index 00000000..8aa4599b --- /dev/null +++ b/x/utss/types/expected_keepers.go @@ -0,0 +1,31 @@ +package types + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// Uvalidator keeper +type UValidatorKeeper interface { + IsTombstonedUniversalValidator(ctx context.Context, universalValidator string) (bool, error) + IsBondedUniversalValidator(ctx context.Context, universalValidator string) (bool, error) + VoteOnBallot( + ctx context.Context, + id string, + ballotType uvalidatortypes.BallotObservationType, + voter string, + voteResult uvalidatortypes.VoteResult, + voters []string, + votesNeeded int64, + expiryAfterBlocks int64, + ) ( + ballot uvalidatortypes.Ballot, + isFinalized bool, + isNew bool, + err error) + GetEligibleVoters(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) + GetAllUniversalValidators(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) + UpdateValidatorStatus(ctx context.Context, addr sdk.ValAddress, newStatus uvalidatortypes.UVStatus) error +} diff --git a/x/utss/types/genesis.go b/x/utss/types/genesis.go new file mode 100755 index 00000000..ab311ab0 --- /dev/null +++ b/x/utss/types/genesis.go @@ -0,0 +1,19 @@ +package types + +// DefaultIndex is the default global index +const DefaultIndex uint64 = 1 + +// DefaultGenesis returns the default genesis state +func DefaultGenesis() *GenesisState { + return &GenesisState{ + + Params: DefaultParams(), + } +} + +// Validate performs basic genesis state validation returning an error upon any +// failure. +func (gs GenesisState) Validate() error { + + return gs.Params.ValidateBasic() +} diff --git a/x/utss/types/genesis.pb.go b/x/utss/types/genesis.pb.go new file mode 100644 index 00000000..57f56d78 --- /dev/null +++ b/x/utss/types/genesis.pb.go @@ -0,0 +1,323 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: utss/v1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the module genesis state +type GenesisState struct { + // Params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_340c354866cd9772, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "utss.v1.GenesisState") +} + +func init() { proto.RegisterFile("utss/v1/genesis.proto", fileDescriptor_340c354866cd9772) } + +var fileDescriptor_340c354866cd9772 = []byte{ + // 205 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2d, 0x29, 0x2e, + 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x62, 0x07, 0x09, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0xc5, + 0xf4, 0x41, 0x2c, 0x88, 0xb4, 0x94, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0x0a, + 0x09, 0xc3, 0x0c, 0x2a, 0xa9, 0x2c, 0x48, 0x85, 0x1a, 0xa3, 0x64, 0xcb, 0xc5, 0xe3, 0x0e, 0x31, + 0x37, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x48, 0x97, 0x8b, 0xad, 0x20, 0xb1, 0x28, 0x31, 0xb7, 0x58, + 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x88, 0x5f, 0x0f, 0x6a, 0x8f, 0x5e, 0x00, 0x58, 0xd8, 0x89, + 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xa8, 0x22, 0x27, 0xef, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, + 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, + 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, + 0x2f, 0x28, 0x2d, 0xce, 0x48, 0xce, 0x48, 0xcc, 0xcc, 0x03, 0xb3, 0x74, 0xc1, 0x4c, 0xdd, 0xbc, + 0xfc, 0x94, 0x54, 0xfd, 0x0a, 0x7d, 0xb0, 0xa3, 0xc0, 0x2e, 0x4a, 0x62, 0x03, 0x3b, 0xc9, 0x18, + 0x10, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xbf, 0xeb, 0x8f, 0xf2, 0x00, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/utss/types/genesis_test.go b/x/utss/types/genesis_test.go new file mode 100755 index 00000000..11f19ac4 --- /dev/null +++ b/x/utss/types/genesis_test.go @@ -0,0 +1,38 @@ +package types_test + +import ( + "testing" + + "github.com/pushchain/push-chain-node/x/utss/types" + + "github.com/stretchr/testify/require" +) + +func TestGenesisState_Validate(t *testing.T) { + tests := []struct { + desc string + genState *types.GenesisState + valid bool + }{ + { + desc: "default is valid", + genState: types.DefaultGenesis(), + valid: true, + }, + { + desc: "valid genesis state", + genState: &types.GenesisState{}, + valid: true, + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + err := tc.genState.Validate() + if tc.valid { + require.NoError(t, err) + } else { + require.Error(t, err) + } + }) + } +} diff --git a/x/utss/types/keys.go b/x/utss/types/keys.go new file mode 100755 index 00000000..b92d09c7 --- /dev/null +++ b/x/utss/types/keys.go @@ -0,0 +1,61 @@ +package types + +import ( + "crypto/sha256" + "encoding/hex" + "fmt" + + "cosmossdk.io/collections" +) + +var ( + // ParamsKey saves the current module params. + ParamsKey = collections.NewPrefix(0) + + // ParamsName is the name of the params collection. + ParamsName = "params" + + // NextProcessIdKey saves the current module NextProcessId. + NextProcessIdKey = collections.NewPrefix(1) + + // NextProcessIdName is the name of the NextProcessId collection. + NextProcessIdName = "next_process_id" + + // CurrentTssProcessKey saves the current module CurrentTssProcess. + CurrentTssProcessKey = collections.NewPrefix(2) + + // CurrentTssProcessName is the name of the CurrentTssProcess collection. + CurrentTssProcessName = "current_tss_process" + + // ProcessHistoryKey saves the current module ProcessHistory. + ProcessHistoryKey = collections.NewPrefix(3) + + // ProcessHistoryName is the name of the ProcessHistory collection. + ProcessHistoryName = "process_history" + + // CurrentTssKeyPrefix saves the current module CurrentTssKey. + CurrentTssKeyKeyPrefix = collections.NewPrefix(4) + + // CurrentTssKeyName is the name of the CurrentTssKey collection. + CurrentTssKeyName = "current_tss_key" + + // TssKeyHistoryKey saves the current module TssKeyHistory. + TssKeyHistoryKey = collections.NewPrefix(5) + + // TssKeyHistoryName is the name of the TssKeyHistory collection. + TssKeyHistoryName = "tss_key_history" +) + +const ( + ModuleName = "utss" + + StoreKey = ModuleName + + QuerierRoute = ModuleName +) + +func GetTssBallotKey(processId uint64, tssPubKey, keyId string) string { + canonical := fmt.Sprintf("%d:%s:%s", processId, tssPubKey, keyId) + h := sha256.Sum256([]byte(canonical)) + return hex.EncodeToString(h[:]) +} diff --git a/x/utss/types/msg_update_params.go b/x/utss/types/msg_update_params.go new file mode 100755 index 00000000..d250bd28 --- /dev/null +++ b/x/utss/types/msg_update_params.go @@ -0,0 +1,56 @@ +package types + +import ( + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/pushchain/push-chain-node/utils" +) + +var ( + _ sdk.Msg = &MsgUpdateParams{} +) + +// NewMsgUpdateParams creates new instance of MsgUpdateParams +func NewMsgUpdateParams( + sender sdk.Address, + admin sdk.Address, +) *MsgUpdateParams { + return &MsgUpdateParams{ + Authority: sender.String(), + Params: Params{ + Admin: admin.String(), + }, + } +} + +// Route returns the name of the module +func (msg MsgUpdateParams) Route() string { return ModuleName } + +// Type returns the action +func (msg MsgUpdateParams) Type() string { return "update_params" } + +// GetSignBytes implements the LegacyMsg interface. +func (msg MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) +} + +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Authority) + return []sdk.AccAddress{addr} +} + +// ValidateBasic does a sanity check on the provided data. +func (msg *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + return errors.Wrap(err, "invalid authority address") + } + + isValidAdmin := utils.IsValidAddress(msg.Params.Admin, utils.COSMOS) + if !isValidAdmin { + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address: %s", msg.Params.Admin) + } + + return msg.Params.ValidateBasic() +} diff --git a/x/utss/types/msg_update_params_test.go b/x/utss/types/msg_update_params_test.go new file mode 100644 index 00000000..4cd3ee9a --- /dev/null +++ b/x/utss/types/msg_update_params_test.go @@ -0,0 +1,84 @@ +package types_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/app" + "github.com/pushchain/push-chain-node/x/utss/types" + "github.com/stretchr/testify/require" +) + +func TestMsgUpdateParams_ValidateBasic(t *testing.T) { + cfg := sdk.GetConfig() + cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub) + cfg.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub) + + validBech32 := "push1fgaewhyd9fkwtqaj9c233letwcuey6dgly9gv9" + + tests := []struct { + name string + msg types.MsgUpdateParams + wantErr bool + errMsg string + }{ + { + name: "valid message", + msg: types.MsgUpdateParams{ + Authority: validBech32, + Params: types.Params{ + Admin: validBech32, + }, + }, + wantErr: false, + }, + { + name: "invalid authority address", + msg: types.MsgUpdateParams{ + Authority: "invalid_bech32", + Params: types.Params{ + Admin: validBech32, + }, + }, + wantErr: true, + errMsg: "invalid authority address", + }, + { + name: "invalid admin address", + msg: types.MsgUpdateParams{ + Authority: validBech32, + Params: types.Params{ + Admin: "not_cosmos_address", + }, + }, + wantErr: true, + errMsg: "invalid admin address", + }, + { + name: "empty admin address", + msg: types.MsgUpdateParams{ + Authority: validBech32, + Params: types.Params{ + Admin: "", + }, + }, + wantErr: true, + errMsg: "invalid admin address", + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + err := tc.msg.ValidateBasic() + + if tc.wantErr { + require.Error(t, err) + if tc.errMsg != "" { + require.Contains(t, err.Error(), tc.errMsg) + } + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/utss/types/params.go b/x/utss/types/params.go new file mode 100755 index 00000000..b137d735 --- /dev/null +++ b/x/utss/types/params.go @@ -0,0 +1,27 @@ +package types + +import ( + "encoding/json" +) + +// DefaultParams returns default module parameters. +func DefaultParams() Params { + return Params{ + Admin: "push1negskcfqu09j5zvpk7nhvacnwyy2mafffy7r6a", + } +} + +// Stringer method for Params. +func (p Params) String() string { + bz, err := json.Marshal(p) + if err != nil { + panic(err) + } + + return string(bz) +} + +// Validate does the sanity check on the params. +func (p Params) ValidateBasic() error { + return nil +} diff --git a/x/utss/types/query.pb.go b/x/utss/types/query.pb.go new file mode 100644 index 00000000..2707ddac --- /dev/null +++ b/x/utss/types/query.pb.go @@ -0,0 +1,2913 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: utss/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Messages +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +type QueryParamsResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +type QueryCurrentProcessRequest struct { +} + +func (m *QueryCurrentProcessRequest) Reset() { *m = QueryCurrentProcessRequest{} } +func (m *QueryCurrentProcessRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCurrentProcessRequest) ProtoMessage() {} +func (*QueryCurrentProcessRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{2} +} +func (m *QueryCurrentProcessRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCurrentProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCurrentProcessRequest.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 *QueryCurrentProcessRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCurrentProcessRequest.Merge(m, src) +} +func (m *QueryCurrentProcessRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCurrentProcessRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCurrentProcessRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCurrentProcessRequest proto.InternalMessageInfo + +type QueryCurrentProcessResponse struct { + Process *TssKeyProcess `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` +} + +func (m *QueryCurrentProcessResponse) Reset() { *m = QueryCurrentProcessResponse{} } +func (m *QueryCurrentProcessResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCurrentProcessResponse) ProtoMessage() {} +func (*QueryCurrentProcessResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{3} +} +func (m *QueryCurrentProcessResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCurrentProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCurrentProcessResponse.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 *QueryCurrentProcessResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCurrentProcessResponse.Merge(m, src) +} +func (m *QueryCurrentProcessResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCurrentProcessResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCurrentProcessResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCurrentProcessResponse proto.InternalMessageInfo + +func (m *QueryCurrentProcessResponse) GetProcess() *TssKeyProcess { + if m != nil { + return m.Process + } + return nil +} + +type QueryProcessByIdRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryProcessByIdRequest) Reset() { *m = QueryProcessByIdRequest{} } +func (m *QueryProcessByIdRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProcessByIdRequest) ProtoMessage() {} +func (*QueryProcessByIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{4} +} +func (m *QueryProcessByIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProcessByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProcessByIdRequest.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 *QueryProcessByIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProcessByIdRequest.Merge(m, src) +} +func (m *QueryProcessByIdRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProcessByIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProcessByIdRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProcessByIdRequest proto.InternalMessageInfo + +func (m *QueryProcessByIdRequest) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +type QueryProcessByIdResponse struct { + Process *TssKeyProcess `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` +} + +func (m *QueryProcessByIdResponse) Reset() { *m = QueryProcessByIdResponse{} } +func (m *QueryProcessByIdResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProcessByIdResponse) ProtoMessage() {} +func (*QueryProcessByIdResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{5} +} +func (m *QueryProcessByIdResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProcessByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProcessByIdResponse.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 *QueryProcessByIdResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProcessByIdResponse.Merge(m, src) +} +func (m *QueryProcessByIdResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProcessByIdResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProcessByIdResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProcessByIdResponse proto.InternalMessageInfo + +func (m *QueryProcessByIdResponse) GetProcess() *TssKeyProcess { + if m != nil { + return m.Process + } + return nil +} + +type QueryAllProcessesRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllProcessesRequest) Reset() { *m = QueryAllProcessesRequest{} } +func (m *QueryAllProcessesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllProcessesRequest) ProtoMessage() {} +func (*QueryAllProcessesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{6} +} +func (m *QueryAllProcessesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllProcessesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllProcessesRequest.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 *QueryAllProcessesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllProcessesRequest.Merge(m, src) +} +func (m *QueryAllProcessesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllProcessesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllProcessesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllProcessesRequest proto.InternalMessageInfo + +func (m *QueryAllProcessesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllProcessesResponse struct { + Processes []*TssKeyProcess `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllProcessesResponse) Reset() { *m = QueryAllProcessesResponse{} } +func (m *QueryAllProcessesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllProcessesResponse) ProtoMessage() {} +func (*QueryAllProcessesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{7} +} +func (m *QueryAllProcessesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllProcessesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllProcessesResponse.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 *QueryAllProcessesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllProcessesResponse.Merge(m, src) +} +func (m *QueryAllProcessesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllProcessesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllProcessesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllProcessesResponse proto.InternalMessageInfo + +func (m *QueryAllProcessesResponse) GetProcesses() []*TssKeyProcess { + if m != nil { + return m.Processes + } + return nil +} + +func (m *QueryAllProcessesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryCurrentKeyRequest struct { +} + +func (m *QueryCurrentKeyRequest) Reset() { *m = QueryCurrentKeyRequest{} } +func (m *QueryCurrentKeyRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCurrentKeyRequest) ProtoMessage() {} +func (*QueryCurrentKeyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{8} +} +func (m *QueryCurrentKeyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCurrentKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCurrentKeyRequest.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 *QueryCurrentKeyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCurrentKeyRequest.Merge(m, src) +} +func (m *QueryCurrentKeyRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCurrentKeyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCurrentKeyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCurrentKeyRequest proto.InternalMessageInfo + +type QueryCurrentKeyResponse struct { + Key *TssKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *QueryCurrentKeyResponse) Reset() { *m = QueryCurrentKeyResponse{} } +func (m *QueryCurrentKeyResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCurrentKeyResponse) ProtoMessage() {} +func (*QueryCurrentKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{9} +} +func (m *QueryCurrentKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCurrentKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCurrentKeyResponse.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 *QueryCurrentKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCurrentKeyResponse.Merge(m, src) +} +func (m *QueryCurrentKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCurrentKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCurrentKeyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCurrentKeyResponse proto.InternalMessageInfo + +func (m *QueryCurrentKeyResponse) GetKey() *TssKey { + if m != nil { + return m.Key + } + return nil +} + +type QueryKeyByIdRequest struct { + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` +} + +func (m *QueryKeyByIdRequest) Reset() { *m = QueryKeyByIdRequest{} } +func (m *QueryKeyByIdRequest) String() string { return proto.CompactTextString(m) } +func (*QueryKeyByIdRequest) ProtoMessage() {} +func (*QueryKeyByIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{10} +} +func (m *QueryKeyByIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryKeyByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryKeyByIdRequest.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 *QueryKeyByIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryKeyByIdRequest.Merge(m, src) +} +func (m *QueryKeyByIdRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryKeyByIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryKeyByIdRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryKeyByIdRequest proto.InternalMessageInfo + +func (m *QueryKeyByIdRequest) GetKeyId() string { + if m != nil { + return m.KeyId + } + return "" +} + +type QueryKeyByIdResponse struct { + Key *TssKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *QueryKeyByIdResponse) Reset() { *m = QueryKeyByIdResponse{} } +func (m *QueryKeyByIdResponse) String() string { return proto.CompactTextString(m) } +func (*QueryKeyByIdResponse) ProtoMessage() {} +func (*QueryKeyByIdResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{11} +} +func (m *QueryKeyByIdResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryKeyByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryKeyByIdResponse.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 *QueryKeyByIdResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryKeyByIdResponse.Merge(m, src) +} +func (m *QueryKeyByIdResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryKeyByIdResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryKeyByIdResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryKeyByIdResponse proto.InternalMessageInfo + +func (m *QueryKeyByIdResponse) GetKey() *TssKey { + if m != nil { + return m.Key + } + return nil +} + +type QueryAllKeysRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllKeysRequest) Reset() { *m = QueryAllKeysRequest{} } +func (m *QueryAllKeysRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllKeysRequest) ProtoMessage() {} +func (*QueryAllKeysRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{12} +} +func (m *QueryAllKeysRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllKeysRequest.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 *QueryAllKeysRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllKeysRequest.Merge(m, src) +} +func (m *QueryAllKeysRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllKeysRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllKeysRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllKeysRequest proto.InternalMessageInfo + +func (m *QueryAllKeysRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllKeysResponse struct { + Keys []*TssKey `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllKeysResponse) Reset() { *m = QueryAllKeysResponse{} } +func (m *QueryAllKeysResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllKeysResponse) ProtoMessage() {} +func (*QueryAllKeysResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{13} +} +func (m *QueryAllKeysResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllKeysResponse.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 *QueryAllKeysResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllKeysResponse.Merge(m, src) +} +func (m *QueryAllKeysResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllKeysResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllKeysResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllKeysResponse proto.InternalMessageInfo + +func (m *QueryAllKeysResponse) GetKeys() []*TssKey { + if m != nil { + return m.Keys + } + return nil +} + +func (m *QueryAllKeysResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "utss.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "utss.v1.QueryParamsResponse") + proto.RegisterType((*QueryCurrentProcessRequest)(nil), "utss.v1.QueryCurrentProcessRequest") + proto.RegisterType((*QueryCurrentProcessResponse)(nil), "utss.v1.QueryCurrentProcessResponse") + proto.RegisterType((*QueryProcessByIdRequest)(nil), "utss.v1.QueryProcessByIdRequest") + proto.RegisterType((*QueryProcessByIdResponse)(nil), "utss.v1.QueryProcessByIdResponse") + proto.RegisterType((*QueryAllProcessesRequest)(nil), "utss.v1.QueryAllProcessesRequest") + proto.RegisterType((*QueryAllProcessesResponse)(nil), "utss.v1.QueryAllProcessesResponse") + proto.RegisterType((*QueryCurrentKeyRequest)(nil), "utss.v1.QueryCurrentKeyRequest") + proto.RegisterType((*QueryCurrentKeyResponse)(nil), "utss.v1.QueryCurrentKeyResponse") + proto.RegisterType((*QueryKeyByIdRequest)(nil), "utss.v1.QueryKeyByIdRequest") + proto.RegisterType((*QueryKeyByIdResponse)(nil), "utss.v1.QueryKeyByIdResponse") + proto.RegisterType((*QueryAllKeysRequest)(nil), "utss.v1.QueryAllKeysRequest") + proto.RegisterType((*QueryAllKeysResponse)(nil), "utss.v1.QueryAllKeysResponse") +} + +func init() { proto.RegisterFile("utss/v1/query.proto", fileDescriptor_2af2863e9a096df1) } + +var fileDescriptor_2af2863e9a096df1 = []byte{ + // 709 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x51, 0x4f, 0xd3, 0x50, + 0x14, 0xc7, 0xe9, 0x80, 0x2d, 0x1c, 0x08, 0xe8, 0x65, 0xc0, 0x2c, 0x63, 0x8e, 0x62, 0x44, 0x8d, + 0xb4, 0x0e, 0x7d, 0x31, 0x31, 0x26, 0x60, 0xa2, 0x21, 0x33, 0x11, 0x17, 0x9f, 0x0c, 0xc6, 0x74, + 0xdb, 0xc9, 0x68, 0xb6, 0xf5, 0x96, 0xdd, 0x8e, 0xd8, 0x10, 0x5e, 0x8c, 0x1f, 0xc0, 0xc4, 0x37, + 0x3f, 0x91, 0x8f, 0x24, 0xbe, 0xf8, 0x68, 0xc0, 0x8f, 0xe1, 0x83, 0xd9, 0xbd, 0xa7, 0x5b, 0xdb, + 0x8d, 0x69, 0x0c, 0x6f, 0xdb, 0x3d, 0xff, 0x7b, 0x7e, 0xff, 0xf6, 0xdc, 0xff, 0x2d, 0x2c, 0x76, + 0x7d, 0x21, 0xac, 0xe3, 0x92, 0x75, 0xd4, 0xc5, 0x4e, 0x60, 0x7a, 0x1d, 0xee, 0x73, 0x96, 0xe9, + 0x2d, 0x9a, 0xc7, 0x25, 0x3d, 0xdf, 0xe0, 0xbc, 0xd1, 0x42, 0xcb, 0xf6, 0x1c, 0xcb, 0x76, 0x5d, + 0xee, 0xdb, 0xbe, 0xc3, 0x5d, 0xa1, 0x64, 0xfa, 0xbd, 0x1a, 0x17, 0x6d, 0x2e, 0xac, 0xaa, 0x2d, + 0x50, 0xed, 0xb7, 0x8e, 0x4b, 0x55, 0xf4, 0xed, 0x92, 0xe5, 0xd9, 0x0d, 0xc7, 0x95, 0x62, 0xd2, + 0x2e, 0x85, 0x9c, 0x06, 0xba, 0x28, 0x9c, 0xb0, 0x45, 0x1f, 0xef, 0x07, 0x1e, 0xd2, 0xa2, 0x91, + 0x05, 0xf6, 0xba, 0xd7, 0x6d, 0xdf, 0xee, 0xd8, 0x6d, 0x51, 0xc1, 0xa3, 0x2e, 0x0a, 0xdf, 0x78, + 0x0a, 0x8b, 0xb1, 0x55, 0xe1, 0x71, 0x57, 0x20, 0xdb, 0x84, 0xb4, 0x27, 0x57, 0x72, 0x5a, 0x51, + 0xbb, 0x33, 0xbb, 0xbd, 0x60, 0x92, 0x79, 0x93, 0x84, 0x54, 0x36, 0xf2, 0xa0, 0xcb, 0xfd, 0xcf, + 0xba, 0x9d, 0x0e, 0xba, 0xfe, 0x7e, 0x87, 0xd7, 0x50, 0xf4, 0xbb, 0xbf, 0x82, 0xd5, 0x91, 0x55, + 0xa2, 0x3c, 0x80, 0x8c, 0xa7, 0x96, 0x08, 0xb3, 0xdc, 0xc7, 0xbc, 0x11, 0xa2, 0x8c, 0x41, 0xb8, + 0x21, 0x94, 0x19, 0x77, 0x61, 0x45, 0xd9, 0x55, 0xff, 0x77, 0x83, 0xbd, 0x3a, 0xb1, 0xd8, 0x3c, + 0xa4, 0x9c, 0xba, 0xec, 0x33, 0x55, 0x49, 0x39, 0x75, 0xe3, 0x25, 0xe4, 0x86, 0xa5, 0xff, 0x0d, + 0xae, 0x52, 0xb7, 0x9d, 0x56, 0x8b, 0x6a, 0x18, 0x3e, 0x25, 0x7b, 0x0e, 0x30, 0x98, 0x0c, 0x35, + 0xbc, 0x6d, 0xaa, 0x31, 0x9a, 0xbd, 0x31, 0x9a, 0xea, 0x18, 0xd0, 0x18, 0xcd, 0x7d, 0xbb, 0x81, + 0xb4, 0xb7, 0x12, 0xd9, 0x69, 0x7c, 0xd5, 0xe0, 0xc6, 0x08, 0x08, 0x79, 0x7e, 0x04, 0x33, 0x5e, + 0xb8, 0x98, 0xd3, 0x8a, 0x93, 0x63, 0x5c, 0x0f, 0x84, 0xec, 0x45, 0xcc, 0x5b, 0x4a, 0x7a, 0xdb, + 0xfc, 0xab, 0x37, 0x85, 0x8c, 0x99, 0xcb, 0xc1, 0x72, 0x74, 0x94, 0x65, 0x0c, 0xc2, 0x21, 0x3f, + 0xa1, 0x99, 0x44, 0x2b, 0xe4, 0x79, 0x1d, 0x26, 0x9b, 0x18, 0x0c, 0x9d, 0x21, 0xe5, 0xb6, 0xd2, + 0xab, 0x19, 0xf7, 0xe9, 0x00, 0x96, 0x31, 0x88, 0x4e, 0x73, 0x09, 0xd2, 0x4d, 0x0c, 0xde, 0xd3, + 0x44, 0x67, 0x2a, 0xd3, 0x4d, 0x0c, 0xf6, 0xea, 0xc6, 0x63, 0xc8, 0xc6, 0xd5, 0xff, 0x0e, 0x7a, + 0x47, 0xa0, 0x9d, 0x56, 0xab, 0x8c, 0xc1, 0x95, 0x0f, 0xef, 0x93, 0x46, 0xd6, 0xfa, 0xfd, 0xc9, + 0xda, 0x06, 0x4c, 0x35, 0x31, 0x08, 0x47, 0x36, 0xe4, 0x4d, 0x16, 0xaf, 0x6c, 0x4c, 0xdb, 0xbf, + 0xa7, 0x61, 0x5a, 0xda, 0x60, 0x07, 0x90, 0x56, 0x59, 0x65, 0xab, 0x7d, 0xe6, 0xf0, 0x05, 0xa0, + 0xe7, 0x47, 0x17, 0x55, 0x6b, 0x63, 0xe5, 0xe3, 0xf7, 0x5f, 0x5f, 0x52, 0xd7, 0xd9, 0x82, 0x15, + 0x5e, 0x29, 0x2a, 0xf7, 0xec, 0x14, 0xe6, 0xe3, 0xa1, 0x66, 0x1b, 0xf1, 0x46, 0x23, 0x2f, 0x04, + 0xfd, 0xd6, 0x78, 0x11, 0x51, 0x8b, 0x92, 0xaa, 0xb3, 0xdc, 0x80, 0xaa, 0x14, 0x56, 0x4d, 0x6d, + 0x60, 0x47, 0x30, 0x1b, 0xc9, 0x35, 0x2b, 0x26, 0x1e, 0x62, 0xe8, 0x76, 0xd0, 0xd7, 0xc7, 0x28, + 0x88, 0xba, 0x26, 0xa9, 0x2b, 0x6c, 0x69, 0x88, 0x7a, 0xe2, 0xd4, 0x4f, 0x19, 0x87, 0xb9, 0x68, + 0x2e, 0x59, 0xa2, 0xe3, 0x88, 0x8b, 0x41, 0x37, 0xc6, 0x49, 0x88, 0x9a, 0x93, 0x54, 0xc6, 0xae, + 0x25, 0xa9, 0xac, 0x0d, 0x30, 0x88, 0x14, 0xbb, 0x39, 0xf2, 0xcd, 0x0d, 0x62, 0xa8, 0x17, 0x2f, + 0x17, 0x10, 0x2a, 0x2f, 0x51, 0xcb, 0x2c, 0xdb, 0x47, 0x35, 0x31, 0xe8, 0xbf, 0x52, 0x84, 0x0c, + 0xa5, 0x8a, 0x25, 0xce, 0x44, 0x3c, 0x9a, 0xfa, 0xda, 0x25, 0xd5, 0x4b, 0x5f, 0x63, 0x8f, 0x72, + 0xa2, 0xd2, 0x7c, 0xca, 0x0e, 0x20, 0x43, 0x09, 0x49, 0x62, 0xe2, 0xc1, 0x4c, 0x62, 0x12, 0xb1, + 0x32, 0xb2, 0x12, 0x33, 0xcf, 0xe6, 0xa2, 0x98, 0xdd, 0xf2, 0xb7, 0xf3, 0x82, 0x76, 0x76, 0x5e, + 0xd0, 0x7e, 0x9e, 0x17, 0xb4, 0xcf, 0x17, 0x85, 0x89, 0xb3, 0x8b, 0xc2, 0xc4, 0x8f, 0x8b, 0xc2, + 0xc4, 0xdb, 0x52, 0xc3, 0xf1, 0x0f, 0xbb, 0x55, 0xb3, 0xc6, 0xdb, 0x96, 0xd7, 0x15, 0x87, 0xb5, + 0x43, 0xdb, 0x71, 0xe5, 0xaf, 0x2d, 0xf9, 0x73, 0xcb, 0xe5, 0x75, 0xb4, 0x3e, 0xa8, 0x6e, 0xf2, + 0xbb, 0x59, 0x4d, 0xcb, 0x0f, 0xe7, 0xc3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x0e, 0x10, + 0x32, 0xce, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Params queries module parameters. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Current TSS Process + CurrentProcess(ctx context.Context, in *QueryCurrentProcessRequest, opts ...grpc.CallOption) (*QueryCurrentProcessResponse, error) + // Process by ID + ProcessById(ctx context.Context, in *QueryProcessByIdRequest, opts ...grpc.CallOption) (*QueryProcessByIdResponse, error) + // List all processes (paginated) + AllProcesses(ctx context.Context, in *QueryAllProcessesRequest, opts ...grpc.CallOption) (*QueryAllProcessesResponse, error) + // Current TSS Key + CurrentKey(ctx context.Context, in *QueryCurrentKeyRequest, opts ...grpc.CallOption) (*QueryCurrentKeyResponse, error) + // Get finalized TSS key by key_id + KeyById(ctx context.Context, in *QueryKeyByIdRequest, opts ...grpc.CallOption) (*QueryKeyByIdResponse, error) + // List all finalized keys (paginated) + AllKeys(ctx context.Context, in *QueryAllKeysRequest, opts ...grpc.CallOption) (*QueryAllKeysResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CurrentProcess(ctx context.Context, in *QueryCurrentProcessRequest, opts ...grpc.CallOption) (*QueryCurrentProcessResponse, error) { + out := new(QueryCurrentProcessResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/CurrentProcess", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProcessById(ctx context.Context, in *QueryProcessByIdRequest, opts ...grpc.CallOption) (*QueryProcessByIdResponse, error) { + out := new(QueryProcessByIdResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/ProcessById", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllProcesses(ctx context.Context, in *QueryAllProcessesRequest, opts ...grpc.CallOption) (*QueryAllProcessesResponse, error) { + out := new(QueryAllProcessesResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/AllProcesses", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CurrentKey(ctx context.Context, in *QueryCurrentKeyRequest, opts ...grpc.CallOption) (*QueryCurrentKeyResponse, error) { + out := new(QueryCurrentKeyResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/CurrentKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) KeyById(ctx context.Context, in *QueryKeyByIdRequest, opts ...grpc.CallOption) (*QueryKeyByIdResponse, error) { + out := new(QueryKeyByIdResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/KeyById", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllKeys(ctx context.Context, in *QueryAllKeysRequest, opts ...grpc.CallOption) (*QueryAllKeysResponse, error) { + out := new(QueryAllKeysResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/AllKeys", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params queries module parameters. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Current TSS Process + CurrentProcess(context.Context, *QueryCurrentProcessRequest) (*QueryCurrentProcessResponse, error) + // Process by ID + ProcessById(context.Context, *QueryProcessByIdRequest) (*QueryProcessByIdResponse, error) + // List all processes (paginated) + AllProcesses(context.Context, *QueryAllProcessesRequest) (*QueryAllProcessesResponse, error) + // Current TSS Key + CurrentKey(context.Context, *QueryCurrentKeyRequest) (*QueryCurrentKeyResponse, error) + // Get finalized TSS key by key_id + KeyById(context.Context, *QueryKeyByIdRequest) (*QueryKeyByIdResponse, error) + // List all finalized keys (paginated) + AllKeys(context.Context, *QueryAllKeysRequest) (*QueryAllKeysResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) CurrentProcess(ctx context.Context, req *QueryCurrentProcessRequest) (*QueryCurrentProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentProcess not implemented") +} +func (*UnimplementedQueryServer) ProcessById(ctx context.Context, req *QueryProcessByIdRequest) (*QueryProcessByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProcessById not implemented") +} +func (*UnimplementedQueryServer) AllProcesses(ctx context.Context, req *QueryAllProcessesRequest) (*QueryAllProcessesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllProcesses not implemented") +} +func (*UnimplementedQueryServer) CurrentKey(ctx context.Context, req *QueryCurrentKeyRequest) (*QueryCurrentKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentKey not implemented") +} +func (*UnimplementedQueryServer) KeyById(ctx context.Context, req *QueryKeyByIdRequest) (*QueryKeyByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method KeyById not implemented") +} +func (*UnimplementedQueryServer) AllKeys(ctx context.Context, req *QueryAllKeysRequest) (*QueryAllKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllKeys not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CurrentProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentProcessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CurrentProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/CurrentProcess", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentProcess(ctx, req.(*QueryCurrentProcessRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ProcessById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProcessByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProcessById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/ProcessById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProcessById(ctx, req.(*QueryProcessByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllProcesses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllProcessesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllProcesses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/AllProcesses", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllProcesses(ctx, req.(*QueryAllProcessesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CurrentKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CurrentKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/CurrentKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentKey(ctx, req.(*QueryCurrentKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_KeyById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryKeyByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).KeyById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/KeyById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).KeyById(ctx, req.(*QueryKeyByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/AllKeys", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllKeys(ctx, req.(*QueryAllKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "utss.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "CurrentProcess", + Handler: _Query_CurrentProcess_Handler, + }, + { + MethodName: "ProcessById", + Handler: _Query_ProcessById_Handler, + }, + { + MethodName: "AllProcesses", + Handler: _Query_AllProcesses_Handler, + }, + { + MethodName: "CurrentKey", + Handler: _Query_CurrentKey_Handler, + }, + { + MethodName: "KeyById", + Handler: _Query_KeyById_Handler, + }, + { + MethodName: "AllKeys", + Handler: _Query_AllKeys_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utss/v1/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCurrentProcessRequest) 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 *QueryCurrentProcessRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCurrentProcessRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryCurrentProcessResponse) 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 *QueryCurrentProcessResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCurrentProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Process != nil { + { + size, err := m.Process.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProcessByIdRequest) 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 *QueryProcessByIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProcessByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryProcessByIdResponse) 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 *QueryProcessByIdResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProcessByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Process != nil { + { + size, err := m.Process.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllProcessesRequest) 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 *QueryAllProcessesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProcessesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllProcessesResponse) 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 *QueryAllProcessesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProcessesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Processes) > 0 { + for iNdEx := len(m.Processes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Processes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryCurrentKeyRequest) 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 *QueryCurrentKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCurrentKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryCurrentKeyResponse) 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 *QueryCurrentKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCurrentKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Key != nil { + { + size, err := m.Key.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryKeyByIdRequest) 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 *QueryKeyByIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryKeyByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.KeyId) > 0 { + i -= len(m.KeyId) + copy(dAtA[i:], m.KeyId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.KeyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryKeyByIdResponse) 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 *QueryKeyByIdResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryKeyByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Key != nil { + { + size, err := m.Key.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllKeysRequest) 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 *QueryAllKeysRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllKeysResponse) 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 *QueryAllKeysResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Keys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCurrentProcessRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCurrentProcessResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Process != nil { + l = m.Process.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProcessByIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryProcessByIdResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Process != nil { + l = m.Process.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllProcessesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllProcessesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Processes) > 0 { + for _, e := range m.Processes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCurrentKeyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCurrentKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != nil { + l = m.Key.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryKeyByIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.KeyId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryKeyByIdResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != nil { + l = m.Key.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllKeysRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllKeysResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Keys) > 0 { + for _, e := range m.Keys { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentProcessRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentProcessRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentProcessResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Process == nil { + m.Process = &TssKeyProcess{} + } + if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProcessByIdRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProcessByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProcessByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProcessByIdResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProcessByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProcessByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Process == nil { + m.Process = &TssKeyProcess{} + } + if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllProcessesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllProcessesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllProcessesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllProcessesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllProcessesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Processes = append(m.Processes, &TssKeyProcess{}) + if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentKeyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentKeyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentKeyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentKeyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Key == nil { + m.Key = &TssKey{} + } + if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryKeyByIdRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryKeyByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryKeyByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryKeyByIdResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryKeyByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryKeyByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Key == nil { + m.Key = &TssKey{} + } + if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllKeysRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllKeysRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllKeysResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllKeysResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, &TssKey{}) + if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/utss/types/query.pb.gw.go b/x/utss/types/query.pb.gw.go new file mode 100644 index 00000000..bcf795a0 --- /dev/null +++ b/x/utss/types/query.pb.gw.go @@ -0,0 +1,651 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: utss/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_CurrentProcess_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentProcessRequest + var metadata runtime.ServerMetadata + + msg, err := client.CurrentProcess(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CurrentProcess_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentProcessRequest + var metadata runtime.ServerMetadata + + msg, err := server.CurrentProcess(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ProcessById_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProcessByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.ProcessById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ProcessById_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProcessByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.ProcessById(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllProcesses_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllProcesses_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProcessesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllProcesses_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllProcesses(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllProcesses_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProcessesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllProcesses_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllProcesses(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_CurrentKey_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentKeyRequest + var metadata runtime.ServerMetadata + + msg, err := client.CurrentKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CurrentKey_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentKeyRequest + var metadata runtime.ServerMetadata + + msg, err := server.CurrentKey(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_KeyById_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryKeyByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["key_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key_id") + } + + protoReq.KeyId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key_id", err) + } + + msg, err := client.KeyById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_KeyById_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryKeyByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["key_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key_id") + } + + protoReq.KeyId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key_id", err) + } + + msg, err := server.KeyById(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllKeys_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllKeys_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllKeysRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllKeys_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllKeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllKeys_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllKeysRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllKeys_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllKeys(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CurrentProcess_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CurrentProcess_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentProcess_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProcessById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ProcessById_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ProcessById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllProcesses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllProcesses_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllProcesses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CurrentKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CurrentKey_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_KeyById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_KeyById_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_KeyById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllKeys_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CurrentProcess_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CurrentProcess_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentProcess_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProcessById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ProcessById_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ProcessById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllProcesses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllProcesses_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllProcesses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CurrentKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CurrentKey_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_KeyById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_KeyById_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_KeyById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllKeys_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"utss", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CurrentProcess_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"utss", "v1", "process", "current"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ProcessById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"utss", "v1", "process", "id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllProcesses_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"utss", "v1", "process"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CurrentKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"utss", "v1", "key", "current"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_KeyById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"utss", "v1", "key", "key_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllKeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"utss", "v1", "key"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_CurrentProcess_0 = runtime.ForwardResponseMessage + + forward_Query_ProcessById_0 = runtime.ForwardResponseMessage + + forward_Query_AllProcesses_0 = runtime.ForwardResponseMessage + + forward_Query_CurrentKey_0 = runtime.ForwardResponseMessage + + forward_Query_KeyById_0 = runtime.ForwardResponseMessage + + forward_Query_AllKeys_0 = runtime.ForwardResponseMessage +) diff --git a/x/utss/types/tss_key.go b/x/utss/types/tss_key.go new file mode 100644 index 00000000..28f9e6eb --- /dev/null +++ b/x/utss/types/tss_key.go @@ -0,0 +1,60 @@ +package types + +import ( + "encoding/json" + "strings" + + errorsmod "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// String returns a JSON string representation of TssKey +func (p TssKey) String() string { + bz, err := json.Marshal(p) + if err != nil { + panic(err) + } + return string(bz) +} + +// ValidateBasic performs basic validation on TssKey fields +func (p TssKey) ValidateBasic() error { + // Validate TSS public key + if strings.TrimSpace(p.TssPubkey) == "" { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "tss_pubkey cannot be empty") + } + + // Validate Key ID + if strings.TrimSpace(p.KeyId) == "" { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "key_id cannot be empty") + } + + // Validate participants + if len(p.Participants) == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "participants list cannot be empty") + } + for i, participant := range p.Participants { + if strings.TrimSpace(participant) == "" { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "participant at index %d is empty", i) + } + } + + // Validate keygen and finalized block heights + if p.KeygenBlockHeight <= 0 { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid keygen_block_height: %d", p.KeygenBlockHeight) + } + if p.FinalizedBlockHeight < p.KeygenBlockHeight { + return errorsmod.Wrapf( + sdkerrors.ErrInvalidRequest, + "finalized_block_height (%d) cannot be less than keygen_block_height (%d)", + p.FinalizedBlockHeight, p.KeygenBlockHeight, + ) + } + + // Validate process ID + if p.ProcessId == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "process_id cannot be zero") + } + + return nil +} diff --git a/x/utss/types/tss_key_process.go b/x/utss/types/tss_key_process.go new file mode 100644 index 00000000..a03a103a --- /dev/null +++ b/x/utss/types/tss_key_process.go @@ -0,0 +1,55 @@ +package types + +import ( + "encoding/json" + + errorsmod "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Stringer method. +func (p TssKeyProcess) String() string { + bz, err := json.Marshal(p) + if err != nil { + panic(err) + } + + return string(bz) +} + +// ValidateBasic performs basic validation on TssKeyProcess fields +func (p TssKeyProcess) ValidateBasic() error { + // Validate participants list + if len(p.Participants) == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "participants list cannot be empty") + } + for i, participant := range p.Participants { + if participant == "" { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "participant at index %d is empty", i) + } + } + + // Validate block height + if p.BlockHeight < 0 { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid block height: %d", p.BlockHeight) + } + + // Validate expiry height + if p.ExpiryHeight <= p.BlockHeight { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "expiry height (%d) must be greater than block height (%d)", p.ExpiryHeight, p.BlockHeight) + } + + // Validate process type + if p.ProcessType != TssProcessType_TSS_PROCESS_KEYGEN && p.ProcessType != TssProcessType_TSS_PROCESS_REFRESH { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid process type: %v", p.ProcessType) + } + + // Validate status + if p.Status != TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING && + p.Status != TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS && + p.Status != TssKeyProcessStatus_TSS_KEY_PROCESS_FAILED { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid process status: %v", p.Status) + } + + return nil +} diff --git a/x/utss/types/tx.pb.go b/x/utss/types/tx.pb.go new file mode 100644 index 00000000..be964f34 --- /dev/null +++ b/x/utss/types/tx.pb.go @@ -0,0 +1,1409 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: utss/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.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 *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.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 *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// Admin initiates new keygen/reshare process +type MsgInitiateTssKeyProcess struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + ProcessType TssProcessType `protobuf:"varint,2,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` +} + +func (m *MsgInitiateTssKeyProcess) Reset() { *m = MsgInitiateTssKeyProcess{} } +func (m *MsgInitiateTssKeyProcess) String() string { return proto.CompactTextString(m) } +func (*MsgInitiateTssKeyProcess) ProtoMessage() {} +func (*MsgInitiateTssKeyProcess) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{2} +} +func (m *MsgInitiateTssKeyProcess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitiateTssKeyProcess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitiateTssKeyProcess.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 *MsgInitiateTssKeyProcess) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitiateTssKeyProcess.Merge(m, src) +} +func (m *MsgInitiateTssKeyProcess) XXX_Size() int { + return m.Size() +} +func (m *MsgInitiateTssKeyProcess) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitiateTssKeyProcess.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitiateTssKeyProcess proto.InternalMessageInfo + +func (m *MsgInitiateTssKeyProcess) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgInitiateTssKeyProcess) GetProcessType() TssProcessType { + if m != nil { + return m.ProcessType + } + return TssProcessType_TSS_PROCESS_KEYGEN +} + +type MsgInitiateTssKeyProcessResponse struct { +} + +func (m *MsgInitiateTssKeyProcessResponse) Reset() { *m = MsgInitiateTssKeyProcessResponse{} } +func (m *MsgInitiateTssKeyProcessResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInitiateTssKeyProcessResponse) ProtoMessage() {} +func (*MsgInitiateTssKeyProcessResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{3} +} +func (m *MsgInitiateTssKeyProcessResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitiateTssKeyProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitiateTssKeyProcessResponse.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 *MsgInitiateTssKeyProcessResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitiateTssKeyProcessResponse.Merge(m, src) +} +func (m *MsgInitiateTssKeyProcessResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInitiateTssKeyProcessResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitiateTssKeyProcessResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitiateTssKeyProcessResponse proto.InternalMessageInfo + +// Universal validator votes on an ongoing TSS key process +type MsgVoteTssKeyProcess struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + TssPubkey string `protobuf:"bytes,2,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` +} + +func (m *MsgVoteTssKeyProcess) Reset() { *m = MsgVoteTssKeyProcess{} } +func (m *MsgVoteTssKeyProcess) String() string { return proto.CompactTextString(m) } +func (*MsgVoteTssKeyProcess) ProtoMessage() {} +func (*MsgVoteTssKeyProcess) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{4} +} +func (m *MsgVoteTssKeyProcess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteTssKeyProcess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteTssKeyProcess.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 *MsgVoteTssKeyProcess) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteTssKeyProcess.Merge(m, src) +} +func (m *MsgVoteTssKeyProcess) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteTssKeyProcess) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteTssKeyProcess.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteTssKeyProcess proto.InternalMessageInfo + +func (m *MsgVoteTssKeyProcess) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgVoteTssKeyProcess) GetTssPubkey() string { + if m != nil { + return m.TssPubkey + } + return "" +} + +func (m *MsgVoteTssKeyProcess) GetKeyId() string { + if m != nil { + return m.KeyId + } + return "" +} + +type MsgVoteTssKeyProcessResponse struct { +} + +func (m *MsgVoteTssKeyProcessResponse) Reset() { *m = MsgVoteTssKeyProcessResponse{} } +func (m *MsgVoteTssKeyProcessResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteTssKeyProcessResponse) ProtoMessage() {} +func (*MsgVoteTssKeyProcessResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{5} +} +func (m *MsgVoteTssKeyProcessResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteTssKeyProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteTssKeyProcessResponse.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 *MsgVoteTssKeyProcessResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteTssKeyProcessResponse.Merge(m, src) +} +func (m *MsgVoteTssKeyProcessResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteTssKeyProcessResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteTssKeyProcessResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteTssKeyProcessResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "utss.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "utss.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgInitiateTssKeyProcess)(nil), "utss.v1.MsgInitiateTssKeyProcess") + proto.RegisterType((*MsgInitiateTssKeyProcessResponse)(nil), "utss.v1.MsgInitiateTssKeyProcessResponse") + proto.RegisterType((*MsgVoteTssKeyProcess)(nil), "utss.v1.MsgVoteTssKeyProcess") + proto.RegisterType((*MsgVoteTssKeyProcessResponse)(nil), "utss.v1.MsgVoteTssKeyProcessResponse") +} + +func init() { proto.RegisterFile("utss/v1/tx.proto", fileDescriptor_4dcb8cba4d8073e4) } + +var fileDescriptor_4dcb8cba4d8073e4 = []byte{ + // 543 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x31, 0x6f, 0xda, 0x40, + 0x14, 0xc6, 0x49, 0x43, 0xc5, 0x25, 0x4a, 0x1a, 0x17, 0x84, 0xb1, 0x1a, 0x97, 0x5a, 0xaa, 0x94, + 0x20, 0x61, 0x17, 0x2a, 0x75, 0x60, 0x2b, 0x5b, 0x1a, 0x21, 0x21, 0x4a, 0x2b, 0xb5, 0x0b, 0x32, + 0xf8, 0x74, 0x58, 0xc8, 0xbe, 0x93, 0xdf, 0x11, 0xc5, 0x5b, 0xd5, 0xa9, 0xea, 0xd4, 0xb9, 0xff, + 0xa0, 0x1b, 0x43, 0x87, 0xfe, 0x84, 0x8c, 0x51, 0xa7, 0x4e, 0x55, 0x05, 0x03, 0x7f, 0xa3, 0xe2, + 0x7c, 0x36, 0x84, 0x90, 0x66, 0xe8, 0x82, 0xde, 0x7d, 0xef, 0x7b, 0x1f, 0xdf, 0x77, 0xcf, 0x36, + 0x7a, 0x30, 0xe6, 0x00, 0xf6, 0x79, 0xcd, 0xe6, 0x17, 0x16, 0x0b, 0x29, 0xa7, 0xea, 0xfd, 0x05, + 0x62, 0x9d, 0xd7, 0xf4, 0xe2, 0x80, 0x82, 0x4f, 0xc1, 0xf6, 0x81, 0x2c, 0x08, 0x3e, 0x90, 0x98, + 0xa1, 0x17, 0x92, 0x19, 0x82, 0x03, 0x0c, 0x1e, 0x48, 0xf8, 0x61, 0x2a, 0x15, 0x31, 0x9c, 0x80, + 0x79, 0x42, 0x09, 0x15, 0xa5, 0xbd, 0xa8, 0x24, 0x5a, 0x8a, 0xa5, 0x7b, 0x71, 0x23, 0x3e, 0xc8, + 0xd6, 0xa1, 0xe3, 0x7b, 0x01, 0xb5, 0xc5, 0x6f, 0x0c, 0x99, 0x9f, 0x14, 0x74, 0xd0, 0x02, 0xf2, + 0x86, 0xb9, 0x0e, 0xc7, 0x6d, 0x27, 0x74, 0x7c, 0x50, 0x5f, 0xa0, 0x9c, 0x33, 0xe6, 0x43, 0x1a, + 0x7a, 0x3c, 0xd2, 0x94, 0xb2, 0x72, 0x9c, 0x6b, 0x6a, 0x3f, 0xbf, 0x57, 0xf3, 0x52, 0xeb, 0xa5, + 0xeb, 0x86, 0x18, 0xe0, 0x35, 0x0f, 0xbd, 0x80, 0x74, 0x96, 0x54, 0xb5, 0x8a, 0xb2, 0x4c, 0x28, + 0x68, 0x5b, 0x65, 0xe5, 0x78, 0xb7, 0x7e, 0x60, 0xc9, 0xb8, 0x56, 0x2c, 0xdc, 0xbc, 0x77, 0xf9, + 0xfb, 0x71, 0xa6, 0x23, 0x49, 0x8d, 0xfd, 0x8f, 0xf3, 0x49, 0x65, 0x39, 0x6e, 0x96, 0x50, 0x71, + 0xcd, 0x49, 0x07, 0x03, 0xa3, 0x01, 0x60, 0xf3, 0x87, 0x82, 0xb4, 0x16, 0x90, 0xd3, 0xc0, 0xe3, + 0x9e, 0xc3, 0x71, 0x17, 0xe0, 0x0c, 0x47, 0xed, 0x90, 0x0e, 0x30, 0x80, 0xfa, 0x0c, 0x65, 0xc1, + 0x23, 0x01, 0x0e, 0xef, 0xf4, 0x2a, 0x79, 0x6a, 0x03, 0xed, 0xb1, 0x78, 0xb8, 0xb7, 0xb8, 0x4f, + 0x61, 0x77, 0xbf, 0x5e, 0x4c, 0xed, 0x76, 0x01, 0xa4, 0x78, 0x37, 0x62, 0xb8, 0xb3, 0xcb, 0x96, + 0x87, 0x86, 0xb5, 0x70, 0x2d, 0x85, 0x3e, 0xcf, 0x27, 0x15, 0x43, 0x6c, 0xa6, 0x05, 0xe4, 0x2d, + 0xe5, 0x38, 0x31, 0xb8, 0x74, 0x67, 0x9a, 0xa8, 0x7c, 0x9b, 0xf3, 0x34, 0xde, 0x37, 0x05, 0xe5, + 0xa5, 0xc2, 0xff, 0x46, 0x3b, 0x42, 0x88, 0x03, 0xf4, 0xd8, 0xb8, 0x3f, 0xc2, 0x91, 0x08, 0x96, + 0xeb, 0xe4, 0x38, 0x40, 0x5b, 0x00, 0x6a, 0x01, 0x65, 0x47, 0x38, 0xea, 0x79, 0xae, 0xb6, 0x2d, + 0x5a, 0x3b, 0x23, 0x1c, 0x9d, 0xba, 0x8d, 0x93, 0xb5, 0x50, 0xa5, 0xd5, 0x50, 0xd7, 0x2c, 0x99, + 0x06, 0x7a, 0xb4, 0x09, 0x4f, 0xb2, 0xd4, 0xbf, 0x6e, 0xa1, 0xed, 0x16, 0x10, 0xf5, 0x15, 0xda, + 0xbb, 0xf6, 0x50, 0x69, 0xe9, 0xed, 0xae, 0x2d, 0x59, 0x2f, 0xdf, 0xd6, 0x49, 0x34, 0x55, 0x8c, + 0x0a, 0x9b, 0x57, 0xff, 0x64, 0x75, 0x74, 0x23, 0x45, 0x3f, 0xb9, 0x93, 0x92, 0xfe, 0xcd, 0x3b, + 0x74, 0x78, 0x73, 0x05, 0x47, 0xab, 0xf3, 0x37, 0xda, 0xfa, 0xd3, 0x7f, 0xb6, 0x13, 0x69, 0x7d, + 0xe7, 0xc3, 0x7c, 0x52, 0x51, 0x9a, 0x67, 0x97, 0x53, 0x43, 0xb9, 0x9a, 0x1a, 0xca, 0x9f, 0xa9, + 0xa1, 0x7c, 0x99, 0x19, 0x99, 0xab, 0x99, 0x91, 0xf9, 0x35, 0x33, 0x32, 0xef, 0x6b, 0xc4, 0xe3, + 0xc3, 0x71, 0xdf, 0x1a, 0x50, 0xdf, 0x66, 0x63, 0x18, 0x0e, 0x86, 0x8e, 0x17, 0x88, 0xaa, 0x2a, + 0xca, 0x6a, 0x40, 0x5d, 0x6c, 0x5f, 0xd8, 0x62, 0x31, 0xe2, 0x23, 0xd0, 0xcf, 0x8a, 0x37, 0xf8, + 0xf9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x2d, 0x4b, 0x15, 0x67, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) { + out := new(MsgInitiateTssKeyProcessResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Msg/InitiateTssKeyProcess", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) { + out := new(MsgVoteTssKeyProcessResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Msg/VoteTssKeyProcess", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + InitiateTssKeyProcess(context.Context, *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + VoteTssKeyProcess(context.Context, *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) InitiateTssKeyProcess(ctx context.Context, req *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitiateTssKeyProcess not implemented") +} +func (*UnimplementedMsgServer) VoteTssKeyProcess(ctx context.Context, req *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteTssKeyProcess not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_InitiateTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInitiateTssKeyProcess) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InitiateTssKeyProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Msg/InitiateTssKeyProcess", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InitiateTssKeyProcess(ctx, req.(*MsgInitiateTssKeyProcess)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_VoteTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteTssKeyProcess) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteTssKeyProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Msg/VoteTssKeyProcess", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteTssKeyProcess(ctx, req.(*MsgVoteTssKeyProcess)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "utss.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "InitiateTssKeyProcess", + Handler: _Msg_InitiateTssKeyProcess_Handler, + }, + { + MethodName: "VoteTssKeyProcess", + Handler: _Msg_VoteTssKeyProcess_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utss/v1/tx.proto", +} + +func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgInitiateTssKeyProcess) 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 *MsgInitiateTssKeyProcess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitiateTssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProcessType != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProcessType)) + i-- + dAtA[i] = 0x10 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgInitiateTssKeyProcessResponse) 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 *MsgInitiateTssKeyProcessResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitiateTssKeyProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgVoteTssKeyProcess) 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 *MsgVoteTssKeyProcess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteTssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.KeyId) > 0 { + i -= len(m.KeyId) + copy(dAtA[i:], m.KeyId) + i = encodeVarintTx(dAtA, i, uint64(len(m.KeyId))) + i-- + dAtA[i] = 0x1a + } + if len(m.TssPubkey) > 0 { + i -= len(m.TssPubkey) + copy(dAtA[i:], m.TssPubkey) + i = encodeVarintTx(dAtA, i, uint64(len(m.TssPubkey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteTssKeyProcessResponse) 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 *MsgVoteTssKeyProcessResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteTssKeyProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgInitiateTssKeyProcess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ProcessType != 0 { + n += 1 + sovTx(uint64(m.ProcessType)) + } + return n +} + +func (m *MsgInitiateTssKeyProcessResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgVoteTssKeyProcess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.TssPubkey) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.KeyId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgVoteTssKeyProcessResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitiateTssKeyProcess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInitiateTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitiateTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + } + m.ProcessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessType |= TssProcessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitiateTssKeyProcessResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInitiateTssKeyProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitiateTssKeyProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgVoteTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVoteTssKeyProcessResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/utss/types/types.pb.go b/x/utss/types/types.pb.go new file mode 100644 index 00000000..3c9320e6 --- /dev/null +++ b/x/utss/types/types.pb.go @@ -0,0 +1,1243 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: utss/v1/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type TssKeyProcessStatus int32 + +const ( + TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING TssKeyProcessStatus = 0 + TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS TssKeyProcessStatus = 1 + TssKeyProcessStatus_TSS_KEY_PROCESS_FAILED TssKeyProcessStatus = 2 +) + +var TssKeyProcessStatus_name = map[int32]string{ + 0: "TSS_KEY_PROCESS_PENDING", + 1: "TSS_KEY_PROCESS_SUCCESS", + 2: "TSS_KEY_PROCESS_FAILED", +} + +var TssKeyProcessStatus_value = map[string]int32{ + "TSS_KEY_PROCESS_PENDING": 0, + "TSS_KEY_PROCESS_SUCCESS": 1, + "TSS_KEY_PROCESS_FAILED": 2, +} + +func (x TssKeyProcessStatus) String() string { + return proto.EnumName(TssKeyProcessStatus_name, int32(x)) +} + +func (TssKeyProcessStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{0} +} + +type TssProcessType int32 + +const ( + TssProcessType_TSS_PROCESS_KEYGEN TssProcessType = 0 + TssProcessType_TSS_PROCESS_REFRESH TssProcessType = 1 +) + +var TssProcessType_name = map[int32]string{ + 0: "TSS_PROCESS_KEYGEN", + 1: "TSS_PROCESS_REFRESH", +} + +var TssProcessType_value = map[string]int32{ + "TSS_PROCESS_KEYGEN": 0, + "TSS_PROCESS_REFRESH": 1, +} + +func (x TssProcessType) String() string { + return proto.EnumName(TssProcessType_name, int32(x)) +} + +func (TssProcessType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{1} +} + +type Params struct { + // The admin account of the utss module. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +// TSS key process information +type TssKeyProcess struct { + Status TssKeyProcessStatus `protobuf:"varint,1,opt,name=status,proto3,enum=utss.v1.TssKeyProcessStatus" json:"status,omitempty"` + Participants []string `protobuf:"bytes,2,rep,name=participants,proto3" json:"participants,omitempty"` + BlockHeight int64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + ExpiryHeight int64 `protobuf:"varint,4,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` + ProcessType TssProcessType `protobuf:"varint,5,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` + Id uint64 `protobuf:"varint,6,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *TssKeyProcess) Reset() { *m = TssKeyProcess{} } +func (*TssKeyProcess) ProtoMessage() {} +func (*TssKeyProcess) Descriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{1} +} +func (m *TssKeyProcess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TssKeyProcess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TssKeyProcess.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 *TssKeyProcess) XXX_Merge(src proto.Message) { + xxx_messageInfo_TssKeyProcess.Merge(m, src) +} +func (m *TssKeyProcess) XXX_Size() int { + return m.Size() +} +func (m *TssKeyProcess) XXX_DiscardUnknown() { + xxx_messageInfo_TssKeyProcess.DiscardUnknown(m) +} + +var xxx_messageInfo_TssKeyProcess proto.InternalMessageInfo + +func (m *TssKeyProcess) GetStatus() TssKeyProcessStatus { + if m != nil { + return m.Status + } + return TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING +} + +func (m *TssKeyProcess) GetParticipants() []string { + if m != nil { + return m.Participants + } + return nil +} + +func (m *TssKeyProcess) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *TssKeyProcess) GetExpiryHeight() int64 { + if m != nil { + return m.ExpiryHeight + } + return 0 +} + +func (m *TssKeyProcess) GetProcessType() TssProcessType { + if m != nil { + return m.ProcessType + } + return TssProcessType_TSS_PROCESS_KEYGEN +} + +func (m *TssKeyProcess) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +// Finalized TSS key details +type TssKey struct { + TssPubkey string `protobuf:"bytes,1,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + Participants []string `protobuf:"bytes,3,rep,name=participants,proto3" json:"participants,omitempty"` + FinalizedBlockHeight int64 `protobuf:"varint,4,opt,name=finalized_block_height,json=finalizedBlockHeight,proto3" json:"finalized_block_height,omitempty"` + KeygenBlockHeight int64 `protobuf:"varint,5,opt,name=keygen_block_height,json=keygenBlockHeight,proto3" json:"keygen_block_height,omitempty"` + ProcessId uint64 `protobuf:"varint,6,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` +} + +func (m *TssKey) Reset() { *m = TssKey{} } +func (*TssKey) ProtoMessage() {} +func (*TssKey) Descriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{2} +} +func (m *TssKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TssKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TssKey.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 *TssKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_TssKey.Merge(m, src) +} +func (m *TssKey) XXX_Size() int { + return m.Size() +} +func (m *TssKey) XXX_DiscardUnknown() { + xxx_messageInfo_TssKey.DiscardUnknown(m) +} + +var xxx_messageInfo_TssKey proto.InternalMessageInfo + +func (m *TssKey) GetTssPubkey() string { + if m != nil { + return m.TssPubkey + } + return "" +} + +func (m *TssKey) GetKeyId() string { + if m != nil { + return m.KeyId + } + return "" +} + +func (m *TssKey) GetParticipants() []string { + if m != nil { + return m.Participants + } + return nil +} + +func (m *TssKey) GetFinalizedBlockHeight() int64 { + if m != nil { + return m.FinalizedBlockHeight + } + return 0 +} + +func (m *TssKey) GetKeygenBlockHeight() int64 { + if m != nil { + return m.KeygenBlockHeight + } + return 0 +} + +func (m *TssKey) GetProcessId() uint64 { + if m != nil { + return m.ProcessId + } + return 0 +} + +func init() { + proto.RegisterEnum("utss.v1.TssKeyProcessStatus", TssKeyProcessStatus_name, TssKeyProcessStatus_value) + proto.RegisterEnum("utss.v1.TssProcessType", TssProcessType_name, TssProcessType_value) + proto.RegisterType((*Params)(nil), "utss.v1.Params") + proto.RegisterType((*TssKeyProcess)(nil), "utss.v1.TssKeyProcess") + proto.RegisterType((*TssKey)(nil), "utss.v1.TssKey") +} + +func init() { proto.RegisterFile("utss/v1/types.proto", fileDescriptor_6ecfa9650339f6c3) } + +var fileDescriptor_6ecfa9650339f6c3 = []byte{ + // 597 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x3f, 0x4f, 0xdb, 0x4e, + 0x18, 0xc7, 0x63, 0x07, 0xf2, 0x53, 0x1e, 0x02, 0x0a, 0x97, 0xfc, 0x88, 0x4b, 0x8b, 0x09, 0xe9, + 0x12, 0x21, 0x11, 0x2b, 0x2d, 0x43, 0x95, 0x8d, 0x3f, 0x06, 0xa2, 0x54, 0x34, 0xb2, 0xe9, 0x40, + 0x17, 0xcb, 0x7f, 0xae, 0xce, 0xc9, 0xd8, 0x67, 0xe5, 0x2e, 0x08, 0x77, 0xec, 0xd8, 0xa9, 0x63, + 0x47, 0x5e, 0x42, 0x5f, 0x46, 0x47, 0xc6, 0x8e, 0x15, 0x0c, 0xed, 0xcb, 0xa8, 0x7c, 0x36, 0xd4, + 0x69, 0x59, 0xec, 0xe7, 0xbe, 0xdf, 0xef, 0x73, 0x7a, 0xee, 0x73, 0x3a, 0x68, 0xcc, 0x38, 0x63, + 0xda, 0x65, 0x5f, 0xe3, 0x49, 0x8c, 0x59, 0x2f, 0x9e, 0x52, 0x4e, 0xd1, 0x7f, 0xa9, 0xd8, 0xbb, + 0xec, 0xaf, 0xab, 0x2e, 0x65, 0x21, 0x65, 0x9a, 0x63, 0x33, 0xac, 0x5d, 0xf6, 0x1d, 0xcc, 0xed, + 0xbe, 0xe6, 0x52, 0x12, 0x65, 0xc1, 0xf5, 0x56, 0xee, 0x87, 0xcc, 0x4f, 0xf7, 0x08, 0x99, 0x9f, + 0x1b, 0x4d, 0x9f, 0xfa, 0x54, 0x94, 0x5a, 0x5a, 0xe5, 0xea, 0xaa, 0x1d, 0x92, 0x88, 0x6a, 0xe2, + 0x9b, 0x49, 0x9d, 0x57, 0x50, 0x19, 0xdb, 0x53, 0x3b, 0x64, 0xa8, 0x09, 0x8b, 0xb6, 0x17, 0x92, + 0x48, 0x91, 0xda, 0x52, 0xb7, 0x6a, 0x64, 0x8b, 0x81, 0xf2, 0xe5, 0x7a, 0xb3, 0xf4, 0xeb, 0x7a, + 0x53, 0xfa, 0xf4, 0xf3, 0xeb, 0xf6, 0x92, 0x18, 0x36, 0x16, 0xf9, 0xce, 0xb5, 0x0c, 0xcb, 0x67, + 0x8c, 0x8d, 0x70, 0x32, 0x9e, 0x52, 0x17, 0x33, 0x86, 0x76, 0xa1, 0xc2, 0xb8, 0xcd, 0x67, 0x4c, + 0x6c, 0xb1, 0xf2, 0xe2, 0x59, 0x2f, 0x3f, 0x47, 0x6f, 0x2e, 0x67, 0x8a, 0x8c, 0x91, 0x67, 0x51, + 0x07, 0x6a, 0xb1, 0x3d, 0xe5, 0xc4, 0x25, 0xb1, 0x1d, 0x71, 0xa6, 0xc8, 0xed, 0x72, 0xb7, 0x6a, + 0xcc, 0x69, 0x68, 0x0b, 0x6a, 0xce, 0x05, 0x75, 0x03, 0x6b, 0x82, 0x89, 0x3f, 0xe1, 0x4a, 0xb9, + 0x2d, 0x75, 0xcb, 0xc6, 0x92, 0xd0, 0x4e, 0x84, 0x84, 0x9e, 0xc3, 0x32, 0xbe, 0x8a, 0xc9, 0x34, + 0xb9, 0xcf, 0x2c, 0x88, 0x4c, 0x2d, 0x13, 0xf3, 0xd0, 0x00, 0x6a, 0x71, 0x36, 0x84, 0x95, 0xf2, + 0x56, 0x16, 0xc5, 0x9c, 0xad, 0xe2, 0x9c, 0xf9, 0x90, 0x67, 0x49, 0x8c, 0x8d, 0xa5, 0xf8, 0xcf, + 0x02, 0xad, 0x80, 0x4c, 0x3c, 0xa5, 0xd2, 0x96, 0xba, 0x0b, 0x86, 0x4c, 0xbc, 0xc1, 0x56, 0x91, + 0x4c, 0x53, 0x90, 0xe1, 0x8c, 0x59, 0x01, 0x4e, 0xac, 0xbc, 0xad, 0xf3, 0x51, 0x86, 0x4a, 0x76, + 0x74, 0xb4, 0x01, 0x90, 0xba, 0xf1, 0xcc, 0x09, 0x70, 0x92, 0x23, 0xae, 0x72, 0xc6, 0xc6, 0x42, + 0x40, 0xff, 0x43, 0x25, 0x6d, 0x24, 0x9e, 0x22, 0x67, 0xf4, 0x03, 0x9c, 0x0c, 0xbd, 0x7f, 0xd8, + 0x94, 0x1f, 0x61, 0xb3, 0x0b, 0x6b, 0xef, 0x49, 0x64, 0x5f, 0x90, 0x0f, 0xd8, 0xb3, 0xe6, 0x28, + 0x65, 0x04, 0x9a, 0x0f, 0xee, 0x7e, 0x01, 0x57, 0x0f, 0x1a, 0x01, 0x4e, 0x7c, 0x1c, 0xcd, 0xb7, + 0x2c, 0x8a, 0x96, 0xd5, 0xcc, 0x2a, 0xe6, 0x37, 0x00, 0xee, 0xc9, 0x3d, 0x50, 0xa8, 0xe6, 0xca, + 0xd0, 0x1b, 0x3c, 0x29, 0xc2, 0xa8, 0x15, 0x61, 0x6c, 0x07, 0xd0, 0x78, 0xe4, 0xfa, 0xd1, 0x53, + 0x68, 0x9d, 0x99, 0xa6, 0x35, 0xd2, 0xcf, 0xad, 0xb1, 0xf1, 0xe6, 0x40, 0x37, 0x4d, 0x6b, 0xac, + 0x9f, 0x1e, 0x0e, 0x4f, 0x8f, 0xeb, 0xa5, 0xc7, 0x4c, 0xf3, 0xed, 0x41, 0xfa, 0xaf, 0x4b, 0x68, + 0x1d, 0xd6, 0xfe, 0x36, 0x8f, 0xf6, 0x86, 0xaf, 0xf5, 0xc3, 0xba, 0xbc, 0xbd, 0x07, 0x2b, 0xf3, + 0x77, 0x88, 0xd6, 0x00, 0xa5, 0xe9, 0xfb, 0xe4, 0x48, 0x3f, 0x3f, 0xd6, 0x4f, 0xeb, 0x25, 0xd4, + 0x82, 0x46, 0x51, 0x37, 0xf4, 0x23, 0x43, 0x37, 0x4f, 0xea, 0xd2, 0xfe, 0xe8, 0xdb, 0xad, 0x2a, + 0xdd, 0xdc, 0xaa, 0xd2, 0x8f, 0x5b, 0x55, 0xfa, 0x7c, 0xa7, 0x96, 0x6e, 0xee, 0xd4, 0xd2, 0xf7, + 0x3b, 0xb5, 0xf4, 0xae, 0xef, 0x13, 0x3e, 0x99, 0x39, 0x3d, 0x97, 0x86, 0x5a, 0x3c, 0x63, 0x13, + 0x77, 0x62, 0x93, 0x48, 0x54, 0x3b, 0xa2, 0xdc, 0x89, 0xa8, 0x87, 0xb5, 0x2b, 0x2d, 0x3b, 0x7e, + 0xfa, 0x9e, 0x9d, 0x8a, 0x78, 0x65, 0x2f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x82, 0xa9, + 0xa4, 0xe7, 0x03, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Admin != that1.Admin { + return false + } + return true +} +func (this *TssKeyProcess) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TssKeyProcess) + if !ok { + that2, ok := that.(TssKeyProcess) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Status != that1.Status { + return false + } + if len(this.Participants) != len(that1.Participants) { + return false + } + for i := range this.Participants { + if this.Participants[i] != that1.Participants[i] { + return false + } + } + if this.BlockHeight != that1.BlockHeight { + return false + } + if this.ExpiryHeight != that1.ExpiryHeight { + return false + } + if this.ProcessType != that1.ProcessType { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *TssKey) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TssKey) + if !ok { + that2, ok := that.(TssKey) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.TssPubkey != that1.TssPubkey { + return false + } + if this.KeyId != that1.KeyId { + return false + } + if len(this.Participants) != len(that1.Participants) { + return false + } + for i := range this.Participants { + if this.Participants[i] != that1.Participants[i] { + return false + } + } + if this.FinalizedBlockHeight != that1.FinalizedBlockHeight { + return false + } + if this.KeygenBlockHeight != that1.KeygenBlockHeight { + return false + } + if this.ProcessId != that1.ProcessId { + return false + } + return true +} +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TssKeyProcess) 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 *TssKeyProcess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x30 + } + if m.ProcessType != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ProcessType)) + i-- + dAtA[i] = 0x28 + } + if m.ExpiryHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ExpiryHeight)) + i-- + dAtA[i] = 0x20 + } + if m.BlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x18 + } + if len(m.Participants) > 0 { + for iNdEx := len(m.Participants) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Participants[iNdEx]) + copy(dAtA[i:], m.Participants[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Participants[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TssKey) 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 *TssKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TssKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProcessId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ProcessId)) + i-- + dAtA[i] = 0x30 + } + if m.KeygenBlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.KeygenBlockHeight)) + i-- + dAtA[i] = 0x28 + } + if m.FinalizedBlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.FinalizedBlockHeight)) + i-- + dAtA[i] = 0x20 + } + if len(m.Participants) > 0 { + for iNdEx := len(m.Participants) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Participants[iNdEx]) + copy(dAtA[i:], m.Participants[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Participants[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.KeyId) > 0 { + i -= len(m.KeyId) + copy(dAtA[i:], m.KeyId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.KeyId))) + i-- + dAtA[i] = 0x12 + } + if len(m.TssPubkey) > 0 { + i -= len(m.TssPubkey) + copy(dAtA[i:], m.TssPubkey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.TssPubkey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *TssKeyProcess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + if len(m.Participants) > 0 { + for _, s := range m.Participants { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.BlockHeight != 0 { + n += 1 + sovTypes(uint64(m.BlockHeight)) + } + if m.ExpiryHeight != 0 { + n += 1 + sovTypes(uint64(m.ExpiryHeight)) + } + if m.ProcessType != 0 { + n += 1 + sovTypes(uint64(m.ProcessType)) + } + if m.Id != 0 { + n += 1 + sovTypes(uint64(m.Id)) + } + return n +} + +func (m *TssKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TssPubkey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.KeyId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Participants) > 0 { + for _, s := range m.Participants { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.FinalizedBlockHeight != 0 { + n += 1 + sovTypes(uint64(m.FinalizedBlockHeight)) + } + if m.KeygenBlockHeight != 0 { + n += 1 + sovTypes(uint64(m.KeygenBlockHeight)) + } + if m.ProcessId != 0 { + n += 1 + sovTypes(uint64(m.ProcessId)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowTypes + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TssKeyProcess) 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 ErrIntOverflowTypes + } + 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: TssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= TssKeyProcessStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Participants", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Participants = append(m.Participants, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) + } + m.ExpiryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpiryHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + } + m.ProcessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessType |= TssProcessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TssKey) 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 ErrIntOverflowTypes + } + 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: TssKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TssKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Participants", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Participants = append(m.Participants, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FinalizedBlockHeight", wireType) + } + m.FinalizedBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FinalizedBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeygenBlockHeight", wireType) + } + m.KeygenBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeygenBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + } + m.ProcessId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/uvalidator/depinject.go b/x/uvalidator/depinject.go index 6e611426..e4803687 100755 --- a/x/uvalidator/depinject.go +++ b/x/uvalidator/depinject.go @@ -18,6 +18,7 @@ import ( modulev1 "github.com/pushchain/push-chain-node/api/uvalidator/module/v1" "github.com/pushchain/push-chain-node/x/uvalidator/keeper" + "github.com/pushchain/push-chain-node/x/uvalidator/types" ) var _ appmodule.AppModule = AppModule{} @@ -44,6 +45,7 @@ type ModuleInputs struct { StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper + UtssKeeper types.UtssKeeper } type ModuleOutputs struct { @@ -56,8 +58,8 @@ type ModuleOutputs struct { func ProvideModule(in ModuleInputs) ModuleOutputs { govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() - k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.StakingKeeper, in.SlashingKeeper) - m := NewAppModule(in.Cdc, k, in.StakingKeeper, in.SlashingKeeper) + k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.StakingKeeper, in.SlashingKeeper, in.UtssKeeper) + m := NewAppModule(in.Cdc, k, in.StakingKeeper, in.SlashingKeeper, in.UtssKeeper) return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}} } diff --git a/x/uvalidator/keeper/hooks.go b/x/uvalidator/keeper/hooks.go new file mode 100644 index 00000000..173cf730 --- /dev/null +++ b/x/uvalidator/keeper/hooks.go @@ -0,0 +1,35 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// MultiUValidatorHooks allows multiple modules to listen to the same events. +type MultiUValidatorHooks []types.UValidatorHooks + +// NewMultiUValidatorHooks creates a new combined hook instance. +func NewMultiUValidatorHooks(hooks ...types.UValidatorHooks) MultiUValidatorHooks { + return hooks +} + +// AfterValidatorAdded calls every hook in the list. +func (mh MultiUValidatorHooks) AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) { + for _, h := range mh { + h.AfterValidatorAdded(ctx, valAddr) + } +} + +// AfterValidatorRemoved calls every hook in the list. +func (mh MultiUValidatorHooks) AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) { + for _, h := range mh { + h.AfterValidatorRemoved(ctx, valAddr) + } +} + +// AfterValidatorStatusChanged calls every hook in the list. +func (mh MultiUValidatorHooks) AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus types.UVStatus) { + for _, h := range mh { + h.AfterValidatorStatusChanged(ctx, valAddr, oldStatus, newStatus) + } +} diff --git a/x/uvalidator/keeper/keeper.go b/x/uvalidator/keeper/keeper.go index b9ca6d53..65b80430 100755 --- a/x/uvalidator/keeper/keeper.go +++ b/x/uvalidator/keeper/keeper.go @@ -19,11 +19,13 @@ import ( type Keeper struct { cdc codec.BinaryCodec - logger log.Logger + logger log.Logger + schemaBuilder *collections.SchemaBuilder // state management - Params collections.Item[types.Params] - UniversalValidatorSet collections.KeySet[sdk.ValAddress] // Set of all registered Universal Validator addresses + Params collections.Item[types.Params] + // TODO: write the migration from sdk.ValAddress to current structure + UniversalValidatorSet collections.Map[sdk.ValAddress, types.UniversalValidator] // Set of all registered Universal Validator addresses // Ballots management Ballots collections.Map[string, types.Ballot] // stores the actual ballot object, keyed by ballot ID @@ -33,8 +35,10 @@ type Keeper struct { stakingKeeper types.StakingKeeper slashingKeeper types.SlashingKeeper + utssKeeper types.UtssKeeper authority string + hooks types.UValidatorHooks } // NewKeeper creates a new Keeper instance @@ -45,6 +49,7 @@ func NewKeeper( authority string, stakingKeeper types.StakingKeeper, slashingKeeper types.SlashingKeeper, + utssKeeper types.UtssKeeper, ) Keeper { logger = logger.With(log.ModuleKey, "x/"+types.ModuleName) @@ -55,16 +60,18 @@ func NewKeeper( } k := Keeper{ - cdc: cdc, - logger: logger, + cdc: cdc, + logger: logger, + schemaBuilder: sb, Params: collections.NewItem(sb, types.ParamsKey, types.ParamsName, codec.CollValue[types.Params](cdc)), - UniversalValidatorSet: collections.NewKeySet( + UniversalValidatorSet: collections.NewMap( sb, types.CoreValidatorSetKey, types.CoreValidatorSetName, sdk.ValAddressKey, + codec.CollValue[types.UniversalValidator](cdc), ), // Ballot collections @@ -88,6 +95,7 @@ func NewKeeper( authority: authority, stakingKeeper: stakingKeeper, slashingKeeper: slashingKeeper, + utssKeeper: utssKeeper, } return k @@ -119,10 +127,6 @@ func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { } } -func (k Keeper) AddUniversalValidatorToSet(ctx context.Context, uvAddr sdk.ValAddress) error { - return k.UniversalValidatorSet.Set(ctx, uvAddr) -} - func (k Keeper) HasUniversalValidatorInSet(ctx context.Context, uvAddr sdk.ValAddress) (bool, error) { return k.UniversalValidatorSet.Has(ctx, uvAddr) } @@ -136,17 +140,14 @@ func (k Keeper) GetBlockHeight(ctx context.Context) (int64, error) { return sdkCtx.BlockHeight(), nil } -// Returns the universal validator set -func (k Keeper) GetUniversalValidatorSet(ctx context.Context) ([]sdk.ValAddress, error) { - var validators []sdk.ValAddress - - err := k.UniversalValidatorSet.Walk(ctx, nil, func(key sdk.ValAddress) (stop bool, err error) { - validators = append(validators, key) - return false, nil - }) - if err != nil { - return nil, err +func (k *Keeper) SetHooks(h types.UValidatorHooks) *Keeper { + if k.hooks != nil { + panic("cannot set uvalidator hooks twice") } + k.hooks = h + return k +} - return validators, nil +func (k Keeper) SchemaBuilder() *collections.SchemaBuilder { + return k.schemaBuilder } diff --git a/x/uvalidator/keeper/keeper_test.go b/x/uvalidator/keeper/keeper_test.go index d5cd14ff..fd5c3d6b 100755 --- a/x/uvalidator/keeper/keeper_test.go +++ b/x/uvalidator/keeper/keeper_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "context" "testing" "github.com/stretchr/testify/suite" @@ -87,10 +88,10 @@ func SetupTest(t *testing.T) *testFixture { registerBaseSDKModules(logger, f, encCfg, keys, accountAddressCodec, validatorAddressCodec, consensusAddressCodec) // Setup Keeper. - f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, f.stakingKeeper, slashingKeeper.Keeper{}) + f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, f.stakingKeeper, slashingKeeper.Keeper{}, mockUtssKeeper{}) f.msgServer = keeper.NewMsgServerImpl(f.k) f.queryServer = keeper.NewQuerier(f.k) - f.appModule = module.NewAppModule(encCfg.Codec, f.k, f.stakingKeeper, slashingKeeper.Keeper{}) + f.appModule = module.NewAppModule(encCfg.Codec, f.k, f.stakingKeeper, slashingKeeper.Keeper{}, mockUtssKeeper{}) return f } @@ -147,3 +148,9 @@ func registerBaseSDKModules( authtypes.FeeCollectorName, f.govModAddr, ) } + +type mockUtssKeeper struct{} + +func (m mockUtssKeeper) GetCurrentTssParticipants(ctx context.Context) ([]string, error) { + return []string{"val1", "val2"}, nil +} diff --git a/x/uvalidator/keeper/msg_add_universal_validator.go b/x/uvalidator/keeper/msg_add_universal_validator.go index efe507b0..307f3016 100644 --- a/x/uvalidator/keeper/msg_add_universal_validator.go +++ b/x/uvalidator/keeper/msg_add_universal_validator.go @@ -5,13 +5,19 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" ) -// AddUniversalValidator registers a core validator as a universal validator. -// It ensures the core validator exists, is bonded, and not already present. +// new validator -> added as a PENDING_JOIN status +// if existing: +// inactive -> added as a PENDING_JOIN status +// any other status -> revert +// AddUniversalValidator registers or reactivates a core validator as a universal validator. +// It ensures the core validator exists, is bonded, and handles lifecycle reactivation. func (k Keeper) AddUniversalValidator( ctx context.Context, coreValidatorAddr string, + networkInfo types.NetworkInfo, ) error { sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -21,27 +27,89 @@ func (k Keeper) AddUniversalValidator( return fmt.Errorf("invalid core validator address: %w", err) } - // Ensure the core validator exists in the staking module + // Ensure validator exists in staking module validator, err := k.stakingKeeper.GetValidator(sdkCtx, valAddr) if err != nil { return fmt.Errorf("core validator not found: %w", err) } - // Check that the validator is in bonded status + // Must be bonded to join if !validator.IsBonded() { return fmt.Errorf("validator %s is not bonded", coreValidatorAddr) } - // Revert if already present - if exists, err := k.UniversalValidatorSet.Has(ctx, valAddr); err != nil { + // Check if already exists + exists, err := k.UniversalValidatorSet.Has(ctx, valAddr) + if err != nil { return err - } else if exists { - return fmt.Errorf("validator %s already registered", coreValidatorAddr) } - // Add universal validator to the set - if err := k.AddUniversalValidatorToSet(ctx, valAddr); err != nil { - return err + if exists { + // Fetch existing validator entry + existingVal, err := k.UniversalValidatorSet.Get(ctx, valAddr) + if err != nil { + return fmt.Errorf("failed to fetch existing validator: %w", err) + } + + switch existingVal.LifecycleInfo.CurrentStatus { + case types.UVStatus_UV_STATUS_INACTIVE: + oldStatus := existingVal.LifecycleInfo.CurrentStatus + newStatus := types.UVStatus_UV_STATUS_PENDING_JOIN + + // Reactivate: INACTIVE → PENDING_JOIN + existingVal.LifecycleInfo.CurrentStatus = types.UVStatus_UV_STATUS_PENDING_JOIN + existingVal.LifecycleInfo.History = append(existingVal.LifecycleInfo.History, &types.LifecycleEvent{ + Status: types.UVStatus_UV_STATUS_PENDING_JOIN, + BlockHeight: sdkCtx.BlockHeight(), + }) + existingVal.NetworkInfo = &networkInfo + + if err := k.UniversalValidatorSet.Set(ctx, valAddr, existingVal); err != nil { + return fmt.Errorf("failed to reactivate validator: %w", err) + } + + // ---- Trigger hooks ---- + if k.hooks != nil { + k.hooks.AfterValidatorStatusChanged(sdkCtx, valAddr, oldStatus, newStatus) + k.hooks.AfterValidatorAdded(sdkCtx, valAddr) + } + return nil + + default: + // Already active or pending — reject + return fmt.Errorf("validator %s already registered with status %s", + coreValidatorAddr, existingVal.LifecycleInfo.CurrentStatus) + } + } + + // New registration: start as PENDING_JOIN + initialStatus := types.UVStatus_UV_STATUS_PENDING_JOIN + + uv := types.UniversalValidator{ + IdentifyInfo: &types.IdentityInfo{ + CoreValidatorAddress: coreValidatorAddr, + }, + LifecycleInfo: &types.LifecycleInfo{ + CurrentStatus: initialStatus, + History: []*types.LifecycleEvent{ + { + Status: initialStatus, + BlockHeight: sdkCtx.BlockHeight(), + }, + }, + }, + NetworkInfo: &networkInfo, + } + + // Store new universal validator + if err := k.UniversalValidatorSet.Set(ctx, valAddr, uv); err != nil { + return fmt.Errorf("failed to store universal validator: %w", err) + } + + // ---- Trigger hooks ---- + if k.hooks != nil { + k.hooks.AfterValidatorStatusChanged(sdkCtx, valAddr, types.UVStatus_UV_STATUS_UNSPECIFIED, types.UVStatus_UV_STATUS_PENDING_JOIN) + k.hooks.AfterValidatorAdded(sdkCtx, valAddr) } return nil diff --git a/x/uvalidator/keeper/msg_remove_universal_validator.go b/x/uvalidator/keeper/msg_remove_universal_validator.go index 3bb25c8a..84aecf93 100644 --- a/x/uvalidator/keeper/msg_remove_universal_validator.go +++ b/x/uvalidator/keeper/msg_remove_universal_validator.go @@ -5,32 +5,83 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" ) -// RemoveUniversalValidator removes a universal validator from the set and its associated mapping. -// It ensures the validator exists before removal. +// RemoveUniversalValidator handles universal validator removal lifecycle: +// - ACTIVE -> PENDING_LEAVE +// - PENDING_JOIN -> +// - if in current TSS process (ongoing) → revert (keygen ongoing) +// - if not in current TSS process (ongoing) → INACTIVE +// +// It ensures the validator exists before removal and triggers hooks on status change. func (k Keeper) RemoveUniversalValidator( ctx context.Context, universalValidatorAddr string, ) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + // Parse core validator address and validate format valAddr, err := sdk.ValAddressFromBech32(universalValidatorAddr) if err != nil { return fmt.Errorf("invalid universal validator address: %w", err) } - // Check if the universal validator is in the set - exists, err := k.UniversalValidatorSet.Has(ctx, valAddr) + // Fetch validator entry + val, err := k.UniversalValidatorSet.Get(ctx, valAddr) if err != nil { - return fmt.Errorf("failed to check universal validator existence: %w", err) + return fmt.Errorf("universal validator %s not found: %w", universalValidatorAddr, err) } - if !exists { - return fmt.Errorf("universal validator %s is not registered", universalValidatorAddr) + + oldStatus := val.LifecycleInfo.CurrentStatus + var newStatus types.UVStatus + + switch val.LifecycleInfo.CurrentStatus { + case types.UVStatus_UV_STATUS_ACTIVE: + // Active -> Pending Leave + if err := k.UpdateValidatorStatus(ctx, valAddr, types.UVStatus_UV_STATUS_PENDING_LEAVE); err != nil { + return fmt.Errorf("failed to mark validator %s as pending leave: %w", universalValidatorAddr, err) + } + + newStatus = types.UVStatus_UV_STATUS_PENDING_LEAVE + + case types.UVStatus_UV_STATUS_PENDING_JOIN: + // Check if validator is part of the current TSS process + currentParticipants, err := k.utssKeeper.GetCurrentTssParticipants(ctx) + if err != nil { + return fmt.Errorf("failed to fetch current TSS participants: %w", err) + } + + isParticipant := false + for _, p := range currentParticipants { + if p == universalValidatorAddr { + isParticipant = true + break + } + } + + // If part of current keygen, reject removal + if isParticipant { + return fmt.Errorf("validator %s is part of the current TSS process and cannot be removed", universalValidatorAddr) + } + + // Otherwise, mark as inactive + if err := k.UpdateValidatorStatus(ctx, valAddr, types.UVStatus_UV_STATUS_INACTIVE); err != nil { + return fmt.Errorf("failed to inactivate validator %s: %w", universalValidatorAddr, err) + } + newStatus = types.UVStatus_UV_STATUS_INACTIVE + + case types.UVStatus_UV_STATUS_PENDING_LEAVE, types.UVStatus_UV_STATUS_INACTIVE: + return fmt.Errorf("validator %s is already in %s state", universalValidatorAddr, val.LifecycleInfo.CurrentStatus) + + default: + return fmt.Errorf("invalid lifecycle state for removal: %s", val.LifecycleInfo.CurrentStatus) } - // Remove from the set - if err := k.UniversalValidatorSet.Remove(ctx, valAddr); err != nil { - return fmt.Errorf("failed to remove universal validator from set: %w", err) + // ---- Trigger hooks ---- + if k.hooks != nil { + k.hooks.AfterValidatorStatusChanged(sdkCtx, valAddr, oldStatus, newStatus) + k.hooks.AfterValidatorRemoved(sdkCtx, valAddr) } return nil diff --git a/x/uvalidator/keeper/msg_server.go b/x/uvalidator/keeper/msg_server.go index 947d8b45..02271cbc 100755 --- a/x/uvalidator/keeper/msg_server.go +++ b/x/uvalidator/keeper/msg_server.go @@ -3,6 +3,7 @@ package keeper import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "cosmossdk.io/errors" @@ -48,7 +49,7 @@ func (ms msgServer) AddUniversalValidator(ctx context.Context, msg *types.MsgAdd return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) } - err = ms.k.AddUniversalValidator(ctx, msg.CoreValidatorAddress) + err = ms.k.AddUniversalValidator(ctx, msg.CoreValidatorAddress, *msg.Network) if err != nil { return nil, err } @@ -75,3 +76,27 @@ func (ms msgServer) RemoveUniversalValidator(ctx context.Context, msg *types.Msg return &types.MsgRemoveUniversalValidatorResponse{}, nil } + +// UpdateUniversalValidator implements types.MsgServer. +func (ms msgServer) UpdateUniversalValidator(ctx context.Context, msg *types.MsgUpdateUniversalValidator) (*types.MsgUpdateUniversalValidatorResponse, error) { + // Parse signer account + signerAcc, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return nil, errors.Wrapf(sdkErrors.ErrInvalidAddress, "invalid signer address: %s", msg.Signer) + } + + // Find validator controlled by this account + valAddr := sdk.ValAddress(signerAcc) + + validator, err := ms.k.stakingKeeper.GetValidator(ctx, valAddr) + if err != nil { + return nil, errors.Wrap(err, "signer is not a validator operator") + } + + err = ms.k.UpdateUniversalValidator(ctx, validator.OperatorAddress, *msg.Network) + if err != nil { + return nil, err + } + + return &types.MsgUpdateUniversalValidatorResponse{}, nil +} diff --git a/x/uvalidator/keeper/msg_update_universal_validator.go b/x/uvalidator/keeper/msg_update_universal_validator.go new file mode 100644 index 00000000..7806df21 --- /dev/null +++ b/x/uvalidator/keeper/msg_update_universal_validator.go @@ -0,0 +1,55 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// UpdateUniversalValidator updates the metadata of the registered universal validator +func (k Keeper) UpdateUniversalValidator( + ctx context.Context, + coreValidatorAddr string, + networkInfo types.NetworkInfo, +) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Parse core validator address and validate format + valAddr, err := sdk.ValAddressFromBech32(coreValidatorAddr) + if err != nil { + return fmt.Errorf("invalid core validator address: %w", err) + } + + // Ensure validator exists in staking module + _, err = k.stakingKeeper.GetValidator(sdkCtx, valAddr) + if err != nil { + return fmt.Errorf("core validator not found: %w", err) + } + + // Check if already exists + exists, err := k.UniversalValidatorSet.Has(ctx, valAddr) + if err != nil { + return err + } + if !exists { + return fmt.Errorf("validator %s does not exist", coreValidatorAddr) + } + + // Fetch existing universal validator + existingVal, err := k.UniversalValidatorSet.Get(ctx, valAddr) + if err != nil { + return fmt.Errorf("failed to fetch existing universal validator: %w", err) + } + + // Update only metadata + existingVal.NetworkInfo = &networkInfo + + // Save updated entry + if err := k.UniversalValidatorSet.Set(ctx, valAddr, existingVal); err != nil { + return fmt.Errorf("failed to update universal validator: %w", err) + } + + return nil +} diff --git a/x/uvalidator/keeper/query_server.go b/x/uvalidator/keeper/query_server.go index a68ffde7..3dca7a5d 100755 --- a/x/uvalidator/keeper/query_server.go +++ b/x/uvalidator/keeper/query_server.go @@ -38,9 +38,9 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type func (k Querier) AllUniversalValidators(goCtx context.Context, req *types.QueryUniversalValidatorsSetRequest) (*types.QueryUniversalValidatorsSetResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - var validators []string - err := k.Keeper.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress) (stop bool, err error) { - validators = append(validators, addr.String()) + var validators []*types.UniversalValidator + err := k.Keeper.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress, val types.UniversalValidator) (stop bool, err error) { + validators = append(validators, &val) return false, nil }) if err != nil { @@ -48,7 +48,32 @@ func (k Querier) AllUniversalValidators(goCtx context.Context, req *types.QueryU } return &types.QueryUniversalValidatorsSetResponse{ - Addresses: validators, + UniversalValidator: validators, + }, nil +} + +func (k Querier) UniversalValidator(goCtx context.Context, req *types.QueryUniversalValidatorRequest) (*types.QueryUniversalValidatorResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if req == nil || req.CoreValidatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "core validator address is required") + } + + valAddr, err := sdk.ValAddressFromBech32(req.CoreValidatorAddress) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid validator address: %v", err) + } + + val, err := k.Keeper.UniversalValidatorSet.Get(ctx, valAddr) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return nil, status.Errorf(codes.NotFound, "universal validator %s not found", req.CoreValidatorAddress) + } + return nil, status.Errorf(codes.Internal, "failed to fetch validator: %v", err) + } + + return &types.QueryUniversalValidatorResponse{ + UniversalValidator: &val, }, nil } diff --git a/x/uvalidator/keeper/validator.go b/x/uvalidator/keeper/validator.go new file mode 100644 index 00000000..3218c762 --- /dev/null +++ b/x/uvalidator/keeper/validator.go @@ -0,0 +1,126 @@ +package keeper + +import ( + "context" + "errors" + "fmt" + + "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// GetAllUniversalValidators returns all validators in the UniversalValidatorSet. +func (k Keeper) GetAllUniversalValidators(ctx context.Context) ([]types.UniversalValidator, error) { + var vals []types.UniversalValidator + + err := k.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress, val types.UniversalValidator) (stop bool, err error) { + vals = append(vals, val) + return false, nil + }) + + if err != nil { + return nil, err + } + return vals, nil +} + +// GetValidatorsByStatus returns a list of validators filtered by status (ACTIVE, PENDING_JOIN, etc.). +func (k Keeper) GetValidatorsByStatus(ctx context.Context, status types.UVStatus) ([]types.UniversalValidator, error) { + var vals []types.UniversalValidator + + err := k.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress, val types.UniversalValidator) (stop bool, err error) { + if val.LifecycleInfo.CurrentStatus == status { + vals = append(vals, val) + } + return false, nil + }) + + if err != nil { + return nil, err + } + return vals, nil +} + +// GetEligibleVoters returns all validators that are eligible to vote on external transactions. +// Eligibility: validators with status ACTIVE or PENDING_JOIN. +func (k Keeper) GetEligibleVoters(ctx context.Context) ([]types.UniversalValidator, error) { + var voters []types.UniversalValidator + + err := k.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress, val types.UniversalValidator) (stop bool, err error) { + switch val.LifecycleInfo.CurrentStatus { + case types.UVStatus_UV_STATUS_ACTIVE, types.UVStatus_UV_STATUS_PENDING_JOIN: + voters = append(voters, val) + } + return false, nil + }) + + if err != nil { + return nil, err + } + return voters, nil +} + +// UpdateValidatorStatus updates the validator’s lifecycle status. +// It appends a LifecycleEvent, validates legal transitions, and saves the updated record. +func (k Keeper) UpdateValidatorStatus(ctx context.Context, addr sdk.ValAddress, newStatus types.UVStatus) error { + val, err := k.UniversalValidatorSet.Get(ctx, addr) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return fmt.Errorf("validator %s not found", addr) + } + return err + } + + // Validate status transition + if err := validateStatusTransition(val.LifecycleInfo.CurrentStatus, newStatus); err != nil { + return err + } + + blockHeight := sdk.UnwrapSDKContext(ctx).BlockHeight() + + // Update lifecycle info + event := types.LifecycleEvent{ + Status: newStatus, + BlockHeight: blockHeight, + } + val.LifecycleInfo.History = append(val.LifecycleInfo.History, &event) + val.LifecycleInfo.CurrentStatus = newStatus + + // Save back to state + return k.UniversalValidatorSet.Set(ctx, addr, val) +} + +// validateStatusTransition ensures a validator can only move in a legal state order. +// only strict rule for two cases, pending join -> active & active -> pending_leave +// can see in future if a pending leave could be transitioned to pending_join +func validateStatusTransition(from, to types.UVStatus) error { + switch to { + case types.UVStatus_UV_STATUS_ACTIVE: + if from != types.UVStatus_UV_STATUS_PENDING_JOIN { + return fmt.Errorf("invalid transition: can only become ACTIVE from PENDING_JOIN, got %s → %s", from, to) + } + case types.UVStatus_UV_STATUS_PENDING_LEAVE: + if from != types.UVStatus_UV_STATUS_ACTIVE { + return fmt.Errorf("invalid transition: can only become PENDING_LEAVE from ACTIVE, got %s → %s", from, to) + } + } + return nil +} + +// GetUniversalValidator returns a single UniversalValidator by address. +func (k Keeper) GetUniversalValidator( + ctx context.Context, + addr sdk.ValAddress, +) (types.UniversalValidator, bool, error) { + + val, err := k.UniversalValidatorSet.Get(ctx, addr) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.UniversalValidator{}, false, nil + } + return types.UniversalValidator{}, false, err + } + + return val, true, nil +} diff --git a/x/uvalidator/migrations/v2/migrate.go b/x/uvalidator/migrations/v2/migrate.go new file mode 100644 index 00000000..af13b621 --- /dev/null +++ b/x/uvalidator/migrations/v2/migrate.go @@ -0,0 +1,62 @@ +package v2 + +import ( + "cosmossdk.io/collections" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/pushchain/push-chain-node/x/uvalidator/keeper" + "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +func MigrateUniversalValidatorSet(ctx sdk.Context, k *keeper.Keeper, cdc codec.BinaryCodec) error { + sb := k.SchemaBuilder() + + // Old KeySet -> only stored validator addresses + oldKeySet := collections.NewKeySet( + sb, + types.CoreValidatorSetKey, + types.CoreValidatorSetName, + sdk.ValAddressKey, // ValAddressKey + ) + + iter, err := oldKeySet.Iterate(ctx, nil) + if err != nil { + return err + } + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + valAddr, err := iter.Key() + if err != nil { + return err + } + + // Build new UniversalValidator struct here with temporary params + newVal := types.UniversalValidator{ + IdentifyInfo: &types.IdentityInfo{ + CoreValidatorAddress: valAddr.String(), + }, + NetworkInfo: &types.NetworkInfo{ + PeerId: "12D3KooWFNC8BxiPoHyTJtiN1u1ctw3nSexuJHUBv4mMMmqEtQgg", + MultiAddrs: []string{"/ip4/127.0.0.1/tcp/39001/p2p/12D3KooWFNC8BxiPoHyTJtiN1u1ctw3nSexuJHUBv4mMMmqEtQgg"}, + }, + LifecycleInfo: &types.LifecycleInfo{ + CurrentStatus: types.UVStatus_UV_STATUS_PENDING_JOIN, + History: []*types.LifecycleEvent{ + { + Status: types.UVStatus_UV_STATUS_PENDING_JOIN, + BlockHeight: ctx.BlockHeight(), + }, + }, + }, + } + + // Write into new Map + if err := k.UniversalValidatorSet.Set(ctx, valAddr, newVal); err != nil { + return err + } + } + + return nil +} diff --git a/x/uvalidator/module.go b/x/uvalidator/module.go index 99caecef..6baaba9f 100755 --- a/x/uvalidator/module.go +++ b/x/uvalidator/module.go @@ -3,6 +3,7 @@ package module import ( "context" "encoding/json" + "fmt" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" @@ -19,12 +20,13 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/pushchain/push-chain-node/x/uvalidator/keeper" + v2 "github.com/pushchain/push-chain-node/x/uvalidator/migrations/v2" "github.com/pushchain/push-chain-node/x/uvalidator/types" ) const ( // ConsensusVersion defines the current x/uvalidator module consensus version. - ConsensusVersion = 1 + ConsensusVersion = 2 ) var ( @@ -46,6 +48,7 @@ type AppModule struct { keeper keeper.Keeper stakingKeeper types.StakingKeeper slashingKeeper types.SlashingKeeper + utssKeeper types.UtssKeeper } // NewAppModule constructor @@ -54,12 +57,14 @@ func NewAppModule( keeper keeper.Keeper, stakingKeeper types.StakingKeeper, slashingKeeper types.SlashingKeeper, + utssKeeper types.UtssKeeper, ) *AppModule { return &AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc}, keeper: keeper, stakingKeeper: stakingKeeper, slashingKeeper: slashingKeeper, + utssKeeper: utssKeeper, } } @@ -145,6 +150,19 @@ func (a AppModule) QuerierRoute() string { func (a AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(a.keeper)) types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(a.keeper)) + + // Register UValidator custom migration for v2 (from version 1 → 2) + if err := cfg.RegisterMigration(types.ModuleName, 1, a.migrateToV2()); err != nil { + panic(fmt.Sprintf("failed to migrate %s from version 1 to 2: %v", types.ModuleName, err)) + } +} + +func (a AppModule) migrateToV2() module.MigrationHandler { + return func(ctx sdk.Context) error { + ctx.Logger().Info("🔧 Running uvalidator module migration: v1 → v2") + + return v2.MigrateUniversalValidatorSet(ctx, &a.keeper, a.AppModuleBasic.cdc) + } } // ConsensusVersion is a sequence number for state-breaking change of the diff --git a/x/uvalidator/types/ballot.pb.go b/x/uvalidator/types/ballot.pb.go index 1324e538..68d10d68 100644 --- a/x/uvalidator/types/ballot.pb.go +++ b/x/uvalidator/types/ballot.pb.go @@ -70,18 +70,21 @@ const ( BallotObservationType_BALLOT_OBSERVATION_TYPE_UNSPECIFIED BallotObservationType = 0 BallotObservationType_BALLOT_OBSERVATION_TYPE_INBOUND_TX BallotObservationType = 1 BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX BallotObservationType = 2 + BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY BallotObservationType = 3 ) var BallotObservationType_name = map[int32]string{ 0: "BALLOT_OBSERVATION_TYPE_UNSPECIFIED", 1: "BALLOT_OBSERVATION_TYPE_INBOUND_TX", 2: "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX", + 3: "BALLOT_OBSERVATION_TYPE_TSS_KEY", } var BallotObservationType_value = map[string]int32{ "BALLOT_OBSERVATION_TYPE_UNSPECIFIED": 0, "BALLOT_OBSERVATION_TYPE_INBOUND_TX": 1, "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX": 2, + "BALLOT_OBSERVATION_TYPE_TSS_KEY": 3, } func (x BallotObservationType) String() string { @@ -236,44 +239,45 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/ballot.proto", fileDescriptor_b9f9c8e0d3c818f3) } var fileDescriptor_b9f9c8e0d3c818f3 = []byte{ - // 585 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x4f, 0x6f, 0xd3, 0x3e, - 0x1c, 0xc6, 0xeb, 0x76, 0xeb, 0xef, 0x37, 0x03, 0x5d, 0xe6, 0x6d, 0x90, 0x15, 0x11, 0x55, 0x03, - 0xb1, 0x32, 0x69, 0x0d, 0xdb, 0x0e, 0x9c, 0xfb, 0xc7, 0x83, 0xa0, 0x2a, 0x29, 0x89, 0x33, 0x6d, - 0x5c, 0xac, 0xb4, 0xb5, 0x1a, 0x8b, 0xac, 0xae, 0x12, 0xb7, 0xda, 0xde, 0x05, 0x37, 0x8e, 0x5c, - 0x38, 0xf0, 0x52, 0x38, 0xee, 0xc8, 0x11, 0x6d, 0x2f, 0x83, 0x0b, 0x8a, 0xb3, 0xb2, 0xb6, 0x0c, - 0x2e, 0xd1, 0x57, 0xcf, 0xe7, 0x79, 0xfc, 0xd8, 0x49, 0x0c, 0xcb, 0xe3, 0x49, 0x10, 0xf1, 0x7e, - 0x20, 0x45, 0x6c, 0x4e, 0xf6, 0xcd, 0x6e, 0x10, 0x45, 0x42, 0xd6, 0x46, 0xb1, 0x90, 0x02, 0x3d, - 0xb8, 0x65, 0xb5, 0xc9, 0x7e, 0x79, 0x63, 0x20, 0x06, 0x42, 0x11, 0x33, 0x9d, 0x32, 0x53, 0x79, - 0x2d, 0x38, 0xe3, 0x43, 0x61, 0xaa, 0x67, 0x26, 0x6d, 0xff, 0xcc, 0xc3, 0x62, 0x43, 0x2d, 0x84, - 0x4a, 0x30, 0xcf, 0xfb, 0x3a, 0xa8, 0x80, 0xea, 0x8a, 0x9b, 0xe7, 0x7d, 0x84, 0xe1, 0xbd, 0xac, - 0x82, 0xca, 0x8b, 0x11, 0xd3, 0xf3, 0x15, 0x50, 0x2d, 0x1d, 0x3c, 0xab, 0xcd, 0x15, 0xd5, 0xb2, - 0xac, 0xd3, 0x4d, 0x58, 0x3c, 0x09, 0x24, 0x17, 0x43, 0x72, 0x31, 0x62, 0x2e, 0xcc, 0x82, 0xe9, - 0x8c, 0x76, 0xe0, 0x2a, 0x8b, 0xf8, 0x80, 0x77, 0x23, 0x46, 0x27, 0x42, 0xb2, 0x38, 0xd1, 0x0b, - 0x95, 0x42, 0x75, 0xc5, 0x2d, 0x4d, 0xe5, 0x63, 0xa5, 0x22, 0x13, 0x2e, 0xa7, 0x3c, 0xd1, 0x97, - 0x2a, 0x85, 0x6a, 0xe9, 0x60, 0x6b, 0xa1, 0x29, 0x75, 0xb9, 0x2c, 0x19, 0x47, 0xd2, 0xcd, 0x7c, - 0xe8, 0x05, 0xd4, 0x26, 0x42, 0xf2, 0xe1, 0x80, 0xca, 0x30, 0x66, 0x49, 0x28, 0xa2, 0xbe, 0xbe, - 0x5c, 0x01, 0xd5, 0x82, 0xbb, 0x9a, 0xe9, 0x64, 0x2a, 0xa3, 0x43, 0x58, 0x4c, 0x64, 0x20, 0xc7, - 0x89, 0x5e, 0x54, 0xc7, 0x78, 0x7c, 0xe7, 0x31, 0x3c, 0x65, 0x71, 0x6f, 0xac, 0xe8, 0x25, 0xdc, - 0xe8, 0x46, 0xa2, 0xf7, 0x81, 0x86, 0x8c, 0x0f, 0x42, 0x49, 0x7b, 0x31, 0x0b, 0x24, 0xeb, 0xeb, - 0xff, 0xa9, 0x0e, 0xa4, 0xd8, 0x1b, 0x85, 0x9a, 0x19, 0x41, 0x35, 0xb8, 0x3e, 0x97, 0x60, 0xe7, - 0x23, 0x1e, 0x5f, 0xe8, 0xff, 0xab, 0xc0, 0xda, 0x4c, 0x00, 0x2b, 0xb0, 0xfb, 0x19, 0xc0, 0xfb, - 0xb3, 0xd5, 0xe8, 0x09, 0xdc, 0x6a, 0xd4, 0xdb, 0x6d, 0x87, 0x50, 0x8f, 0xd4, 0x89, 0xef, 0x51, - 0xdf, 0xf6, 0x3a, 0xb8, 0x69, 0x1d, 0x59, 0xb8, 0xa5, 0xe5, 0xd0, 0x16, 0xdc, 0x9c, 0xc7, 0x1d, - 0x6c, 0xb7, 0x2c, 0xfb, 0xb5, 0x06, 0x90, 0x0e, 0x37, 0x16, 0x50, 0xdd, 0xf3, 0x70, 0x4b, 0xcb, - 0xa3, 0x32, 0x7c, 0x38, 0x4f, 0x5c, 0xfc, 0x16, 0x37, 0x09, 0x6e, 0x69, 0x85, 0x3f, 0x17, 0xc4, - 0x27, 0x1d, 0xcb, 0xc5, 0x2d, 0x6d, 0xa9, 0xbc, 0xf4, 0xf5, 0x8b, 0x01, 0x76, 0x3f, 0x01, 0xb8, - 0x79, 0xe7, 0x37, 0x46, 0x3b, 0xf0, 0xe9, 0x4d, 0xd4, 0x69, 0x78, 0xd8, 0x3d, 0xae, 0x13, 0xcb, - 0xb1, 0x29, 0x39, 0xed, 0xe0, 0x85, 0x4d, 0x3f, 0x87, 0xdb, 0x7f, 0x33, 0x5a, 0x76, 0xc3, 0xf1, - 0xed, 0x16, 0x25, 0x27, 0x1a, 0xf8, 0xd7, 0x82, 0x8e, 0x4f, 0x7e, 0x1b, 0xf3, 0x37, 0x3b, 0xeb, - 0x41, 0x78, 0xfb, 0x4b, 0xa4, 0x2f, 0xee, 0xd8, 0x21, 0x98, 0xba, 0xd8, 0xf3, 0xdb, 0x84, 0xda, - 0x0e, 0xa1, 0xa7, 0x98, 0xd0, 0x54, 0x4b, 0xf7, 0xf0, 0x08, 0xae, 0xcf, 0x62, 0xcf, 0x6f, 0x36, - 0xb1, 0xe7, 0x69, 0x60, 0x11, 0x1c, 0xd5, 0xad, 0xb6, 0xef, 0xe2, 0x69, 0x49, 0xe3, 0xdd, 0xb7, - 0x2b, 0x03, 0x5c, 0x5e, 0x19, 0xe0, 0xc7, 0x95, 0x01, 0x3e, 0x5e, 0x1b, 0xb9, 0xcb, 0x6b, 0x23, - 0xf7, 0xfd, 0xda, 0xc8, 0xbd, 0x7f, 0x35, 0xe0, 0x32, 0x1c, 0x77, 0x6b, 0x3d, 0x71, 0x66, 0x8e, - 0xc6, 0x49, 0xd8, 0x0b, 0x03, 0x3e, 0x54, 0xd3, 0x9e, 0x1a, 0xf7, 0x86, 0xa2, 0xcf, 0xcc, 0x73, - 0x73, 0xe6, 0xce, 0xa6, 0xd7, 0x28, 0xe9, 0x16, 0xd5, 0xc5, 0x3b, 0xfc, 0x15, 0x00, 0x00, 0xff, - 0xff, 0xaf, 0xa0, 0x83, 0xb4, 0xce, 0x03, 0x00, 0x00, + // 601 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x4f, 0x53, 0xd3, 0x4e, + 0x1c, 0xc6, 0x9b, 0x14, 0xfa, 0xfb, 0xb1, 0x6a, 0x09, 0x0b, 0x68, 0xa8, 0x63, 0xec, 0x80, 0x23, + 0x95, 0x19, 0x1a, 0x81, 0x83, 0xe7, 0xfe, 0x59, 0x34, 0xda, 0x49, 0x6a, 0x76, 0xc3, 0x80, 0x97, + 0x9d, 0xb4, 0xdd, 0x69, 0x32, 0x86, 0x6e, 0x27, 0xd9, 0x76, 0xe0, 0x5d, 0xf8, 0x0e, 0xbc, 0x78, + 0xf0, 0x45, 0xf8, 0x02, 0x3c, 0x72, 0xf4, 0xe8, 0xc0, 0xcb, 0xf0, 0xe2, 0x64, 0x53, 0xa4, 0xad, + 0xe0, 0x25, 0xf3, 0x9d, 0xe7, 0xf3, 0x3c, 0xfb, 0xec, 0x26, 0x59, 0x50, 0x1a, 0x8d, 0xfd, 0x28, + 0xec, 0xf9, 0x82, 0xc7, 0xe6, 0x78, 0xcf, 0xec, 0xf8, 0x51, 0xc4, 0x45, 0x75, 0x18, 0x73, 0xc1, + 0xe1, 0x83, 0x1b, 0x56, 0x1d, 0xef, 0x95, 0xd6, 0xfa, 0xbc, 0xcf, 0x25, 0x31, 0xd3, 0x29, 0x33, + 0x95, 0x56, 0xfc, 0xd3, 0x70, 0xc0, 0x4d, 0xf9, 0xcc, 0xa4, 0xcd, 0x5f, 0x2a, 0x28, 0xd4, 0xe5, + 0x42, 0xb0, 0x08, 0xd4, 0xb0, 0xa7, 0x2b, 0x65, 0xa5, 0xb2, 0xe4, 0xaa, 0x61, 0x0f, 0x22, 0x70, + 0x2f, 0xab, 0xa0, 0xe2, 0x7c, 0xc8, 0x74, 0xb5, 0xac, 0x54, 0x8a, 0xfb, 0xcf, 0xaa, 0x33, 0x45, + 0xd5, 0x2c, 0xeb, 0x74, 0x12, 0x16, 0x8f, 0x7d, 0x11, 0xf2, 0x01, 0x39, 0x1f, 0x32, 0x17, 0x64, + 0xc1, 0x74, 0x86, 0xdb, 0x60, 0x99, 0x45, 0x61, 0x3f, 0xec, 0x44, 0x8c, 0x8e, 0xb9, 0x60, 0x71, + 0xa2, 0xe7, 0xcb, 0xf9, 0xca, 0x92, 0x5b, 0xbc, 0x96, 0x8f, 0xa4, 0x0a, 0x4d, 0xb0, 0x98, 0xf2, + 0x44, 0x5f, 0x28, 0xe7, 0x2b, 0xc5, 0xfd, 0x8d, 0xb9, 0xa6, 0xd4, 0xe5, 0xb2, 0x64, 0x14, 0x09, + 0x37, 0xf3, 0xc1, 0x17, 0x40, 0x1b, 0x73, 0x11, 0x0e, 0xfa, 0x54, 0x04, 0x31, 0x4b, 0x02, 0x1e, + 0xf5, 0xf4, 0xc5, 0xb2, 0x52, 0xc9, 0xbb, 0xcb, 0x99, 0x4e, 0xae, 0x65, 0x78, 0x00, 0x0a, 0x89, + 0xf0, 0xc5, 0x28, 0xd1, 0x0b, 0xf2, 0x18, 0x8f, 0x6f, 0x3d, 0x06, 0x96, 0x16, 0x77, 0x62, 0x85, + 0x2f, 0xc1, 0x5a, 0x27, 0xe2, 0xdd, 0x8f, 0x34, 0x60, 0x61, 0x3f, 0x10, 0xb4, 0x1b, 0x33, 0x5f, + 0xb0, 0x9e, 0xfe, 0x9f, 0xec, 0x80, 0x92, 0xbd, 0x91, 0xa8, 0x91, 0x11, 0x58, 0x05, 0xab, 0x33, + 0x09, 0x76, 0x36, 0x0c, 0xe3, 0x73, 0xfd, 0x7f, 0x19, 0x58, 0x99, 0x0a, 0x20, 0x09, 0x76, 0x3e, + 0x2b, 0xe0, 0xfe, 0x74, 0x35, 0x7c, 0x02, 0x36, 0xea, 0xb5, 0x56, 0xcb, 0x21, 0x14, 0x93, 0x1a, + 0xf1, 0x30, 0xf5, 0x6c, 0xdc, 0x46, 0x0d, 0xeb, 0xd0, 0x42, 0x4d, 0x2d, 0x07, 0x37, 0xc0, 0xfa, + 0x2c, 0x6e, 0x23, 0xbb, 0x69, 0xd9, 0xaf, 0x35, 0x05, 0xea, 0x60, 0x6d, 0x0e, 0xd5, 0x30, 0x46, + 0x4d, 0x4d, 0x85, 0x25, 0xf0, 0x70, 0x96, 0xb8, 0xe8, 0x2d, 0x6a, 0x10, 0xd4, 0xd4, 0xf2, 0x7f, + 0x2f, 0x88, 0x8e, 0xdb, 0x96, 0x8b, 0x9a, 0xda, 0x42, 0x69, 0xe1, 0xeb, 0x17, 0x43, 0xd9, 0xf9, + 0xa6, 0x80, 0xf5, 0x5b, 0xbf, 0x31, 0xdc, 0x06, 0x5b, 0x93, 0xa8, 0x53, 0xc7, 0xc8, 0x3d, 0xaa, + 0x11, 0xcb, 0xb1, 0x29, 0x39, 0x69, 0xa3, 0xb9, 0x4d, 0x3f, 0x07, 0x9b, 0x77, 0x19, 0x2d, 0xbb, + 0xee, 0x78, 0x76, 0x93, 0x92, 0x63, 0x4d, 0xf9, 0xd7, 0x82, 0x8e, 0x47, 0xfe, 0x18, 0x55, 0xb8, + 0x05, 0x9e, 0xde, 0x65, 0x24, 0x18, 0xd3, 0x77, 0xe8, 0x44, 0xcb, 0x4f, 0xb6, 0xdf, 0x05, 0xe0, + 0xe6, 0xbf, 0x49, 0xdf, 0xee, 0x91, 0x43, 0x10, 0x75, 0x11, 0xf6, 0x5a, 0x84, 0xda, 0x0e, 0xa1, + 0x27, 0x88, 0xd0, 0x54, 0x4b, 0x37, 0xfa, 0x08, 0xac, 0x4e, 0x63, 0xec, 0x35, 0x1a, 0x08, 0x63, + 0x4d, 0x99, 0x07, 0x87, 0x35, 0xab, 0xe5, 0xb9, 0x48, 0x53, 0xb3, 0x92, 0xfa, 0xfb, 0xef, 0x97, + 0x86, 0x72, 0x71, 0x69, 0x28, 0x3f, 0x2f, 0x0d, 0xe5, 0xd3, 0x95, 0x91, 0xbb, 0xb8, 0x32, 0x72, + 0x3f, 0xae, 0x8c, 0xdc, 0x87, 0x57, 0xfd, 0x50, 0x04, 0xa3, 0x4e, 0xb5, 0xcb, 0x4f, 0xcd, 0xe1, + 0x28, 0x09, 0xba, 0x81, 0x1f, 0x0e, 0xe4, 0xb4, 0x2b, 0xc7, 0xdd, 0x01, 0xef, 0x31, 0xf3, 0xcc, + 0x9c, 0xba, 0xd8, 0xe9, 0x5d, 0x4b, 0x3a, 0x05, 0x79, 0x3b, 0x0f, 0x7e, 0x07, 0x00, 0x00, 0xff, + 0xff, 0xa1, 0xfd, 0xe6, 0x6e, 0xf3, 0x03, 0x00, 0x00, } func (m *Ballot) Marshal() (dAtA []byte, err error) { diff --git a/x/uvalidator/types/expected_keepers.go b/x/uvalidator/types/expected_keepers.go index b2f2d183..c30061d7 100644 --- a/x/uvalidator/types/expected_keepers.go +++ b/x/uvalidator/types/expected_keepers.go @@ -17,3 +17,8 @@ type StakingKeeper interface { type SlashingKeeper interface { IsTombstoned(ctx context.Context, addr sdk.ConsAddress) bool } + +// UtssKeeper defines the expected interface for the utss module. +type UtssKeeper interface { + GetCurrentTssParticipants(ctx context.Context) ([]string, error) +} diff --git a/x/uvalidator/types/hooks.go b/x/uvalidator/types/hooks.go new file mode 100644 index 00000000..041a9f3a --- /dev/null +++ b/x/uvalidator/types/hooks.go @@ -0,0 +1,16 @@ +package types + +import sdk "github.com/cosmos/cosmos-sdk/types" + +// UValidatorHooks defines the interface that external modules can implement +// to react to uvalidator lifecycle events. +type UValidatorHooks interface { + // Triggered when a validator enters PENDING_JOIN (newly added or rejoining) + AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) + + // Triggered when a validator enters PENDING_LEAVE status (starting removal) + AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) + + // Triggered whenever a validator's status changes between any two valid states + AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus UVStatus) +} diff --git a/x/uvalidator/types/identity_info.go b/x/uvalidator/types/identity_info.go new file mode 100644 index 00000000..99197f57 --- /dev/null +++ b/x/uvalidator/types/identity_info.go @@ -0,0 +1,17 @@ +package types + +import ( + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// Validate does the sanity check on the IdentityInfo message type. +func (p IdentityInfo) ValidateBasic() error { + // Validate core validator address (must be a valid valoper address) + _, err := sdk.ValAddressFromBech32(p.CoreValidatorAddress) + if err != nil { + return errors.Wrap(err, "invalid core validator address") + } + + return nil +} diff --git a/x/uvalidator/types/lifecyle_event.go b/x/uvalidator/types/lifecyle_event.go new file mode 100644 index 00000000..1c954270 --- /dev/null +++ b/x/uvalidator/types/lifecyle_event.go @@ -0,0 +1,16 @@ +package types + +import ( + "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Validate does the sanity check on the LifecycleEvent message type. +func (p LifecycleEvent) ValidateBasic() error { + // Validate uv_status is within known enum range + if _, ok := UVStatus_name[int32(p.Status)]; !ok { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid uv_status: %v", p.Status) + } + + return nil +} diff --git a/x/uvalidator/types/lifecyle_info.go b/x/uvalidator/types/lifecyle_info.go new file mode 100644 index 00000000..31b48e40 --- /dev/null +++ b/x/uvalidator/types/lifecyle_info.go @@ -0,0 +1,35 @@ +package types + +import ( + "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// ValidateBasic performs stateless validation on the LifecycleInfo struct. +// Ensures that current status is valid and lifecycle history entries are consistent. +func (p LifecycleInfo) ValidateBasic() error { + // Validate that the current_status is within known enum range + if _, ok := UVStatus_name[int32(p.CurrentStatus)]; !ok { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid current_status: %v", p.CurrentStatus) + } + + // Validate each lifecycle event in history + for i, event := range p.History { + if err := event.ValidateBasic(); err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid history[%d]: %v", i, err) + } + } + + // Ensure the lifecycle history is ordered by block height + for i := 1; i < len(p.History); i++ { + if p.History[i].BlockHeight < p.History[i-1].BlockHeight { + return errors.Wrapf( + sdkerrors.ErrInvalidRequest, + "history not ordered: event[%d] (height %d) < event[%d] (height %d)", + i, p.History[i].BlockHeight, i-1, p.History[i-1].BlockHeight, + ) + } + } + + return nil +} diff --git a/x/uvalidator/types/msg_add_universal_validator.go b/x/uvalidator/types/msg_add_universal_validator.go index dda71748..db388637 100644 --- a/x/uvalidator/types/msg_add_universal_validator.go +++ b/x/uvalidator/types/msg_add_universal_validator.go @@ -13,11 +13,13 @@ var ( func NewMsgAddUniversalValidator( sender sdk.Address, coreValidatorAddress sdk.Address, - universalValidatorAddress sdk.Address, + pubKey string, + network NetworkInfo, ) *MsgAddUniversalValidator { return &MsgAddUniversalValidator{ Signer: sender.String(), CoreValidatorAddress: coreValidatorAddress.String(), + Network: &network, } } @@ -50,5 +52,5 @@ func (msg *MsgAddUniversalValidator) ValidateBasic() error { return errors.Wrap(err, "invalid core validator address") } - return nil + return msg.Network.ValidateBasic() } diff --git a/x/uvalidator/types/msg_add_universal_validator_test.go b/x/uvalidator/types/msg_add_universal_validator_test.go index 3fa49f1d..701d1374 100644 --- a/x/uvalidator/types/msg_add_universal_validator_test.go +++ b/x/uvalidator/types/msg_add_universal_validator_test.go @@ -29,6 +29,10 @@ func TestMsgAddUniversalValidator_ValidateBasic(t *testing.T) { msg: types.MsgAddUniversalValidator{ Signer: validAdmin, CoreValidatorAddress: validCoreVal, + Network: &types.NetworkInfo{ + PeerId: "temp peerId", + MultiAddrs: []string{"temp multi_addrs"}, + }, }, wantErr: false, }, diff --git a/x/uvalidator/types/msg_update_universal_validator.go b/x/uvalidator/types/msg_update_universal_validator.go new file mode 100644 index 00000000..0973668e --- /dev/null +++ b/x/uvalidator/types/msg_update_universal_validator.go @@ -0,0 +1,48 @@ +package types + +import ( + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + _ sdk.Msg = &MsgUpdateUniversalValidator{} +) + +// NewMsgUpdateUniversalValidator creates new instance of MsgUpdateUniversalValidator +func NewMsgUpdateUniversalValidator( + sender sdk.Address, + coreValidatorAddress sdk.Address, + network NetworkInfo, +) *MsgUpdateUniversalValidator { + return &MsgUpdateUniversalValidator{ + Signer: sender.String(), + Network: &network, + } +} + +// Route returns the name of the module +func (msg MsgUpdateUniversalValidator) Route() string { return ModuleName } + +// Type returns the action +func (msg MsgUpdateUniversalValidator) Type() string { return "update_universal_validator" } + +// GetSignBytes implements the LegacyMsg interface. +func (msg MsgUpdateUniversalValidator) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) +} + +// GetSigners returns the expected signers for a MsgUpdateUniversalValidator message. +func (msg *MsgUpdateUniversalValidator) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Signer) + return []sdk.AccAddress{addr} +} + +func (msg *MsgUpdateUniversalValidator) ValidateBasic() error { + // Validate signer + if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { + return errors.Wrap(err, "invalid signer address") + } + + return msg.Network.ValidateBasic() +} diff --git a/x/uvalidator/types/msg_update_universal_validator_test.go b/x/uvalidator/types/msg_update_universal_validator_test.go new file mode 100644 index 00000000..089feb13 --- /dev/null +++ b/x/uvalidator/types/msg_update_universal_validator_test.go @@ -0,0 +1,91 @@ +package types_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/app" + "github.com/pushchain/push-chain-node/x/uvalidator/types" + "github.com/stretchr/testify/require" +) + +func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { + cfg := sdk.GetConfig() + cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub) + cfg.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub) + + validSigner := "push1gjaw568e35hjc8udhat0xnsxxmkm2snrexxz20" + + tests := []struct { + name string + msg types.MsgUpdateUniversalValidator + wantErr bool + errMsg string + }{ + { + name: "valid message", + msg: types.MsgUpdateUniversalValidator{ + Signer: validSigner, + Network: &types.NetworkInfo{ + PeerId: "temp peerId", + MultiAddrs: []string{"temp multi_addrs"}, + }, + }, + wantErr: false, + }, + { + name: "invalid signer address", + msg: types.MsgUpdateUniversalValidator{ + Signer: "invalid_signer", + Network: &types.NetworkInfo{ + PeerId: "temp peerId", + MultiAddrs: []string{"temp multi_addrs"}, + }, + }, + wantErr: true, + errMsg: "invalid signer address", + }, + { + name: "empty peerId should fail", + msg: types.MsgUpdateUniversalValidator{ + Signer: validSigner, + Network: &types.NetworkInfo{PeerId: "", MultiAddrs: []string{"temp multi_addrs"}}, + }, + wantErr: true, + errMsg: "peerId cannot be empty", + }, + { + name: "nil multi_addrs in networkInfo should fail", + msg: types.MsgUpdateUniversalValidator{ + Signer: validSigner, + Network: &types.NetworkInfo{PeerId: "temp peerId", MultiAddrs: nil}, + }, + wantErr: true, + errMsg: "multi_addrs cannot be nil", + }, + { + name: "empty multi_addrs in networkInfo should fail", + msg: types.MsgUpdateUniversalValidator{ + Signer: validSigner, + Network: &types.NetworkInfo{PeerId: "temp peerId", MultiAddrs: []string{}}, + }, + wantErr: true, + errMsg: "multi_addrs must contain at least one value", + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + err := tc.msg.ValidateBasic() + + if tc.wantErr { + require.Error(t, err) + if tc.errMsg != "" { + require.Contains(t, err.Error(), tc.errMsg) + } + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/uvalidator/types/network_info.go b/x/uvalidator/types/network_info.go new file mode 100644 index 00000000..f58d4204 --- /dev/null +++ b/x/uvalidator/types/network_info.go @@ -0,0 +1,26 @@ +package types + +import ( + "strings" + + "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Validate does the sanity check on the network_info params. +func (p NetworkInfo) ValidateBasic() error { + peerId := strings.TrimSpace(p.PeerId) + if peerId == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "peerId cannot be empty") + } + + if p.MultiAddrs == nil { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "multi_addrs cannot be nil") + } + + if len(p.MultiAddrs) == 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "multi_addrs must contain at least one value") + } + + return nil +} diff --git a/x/uvalidator/types/query.pb.go b/x/uvalidator/types/query.pb.go index f868e36b..97f7653f 100644 --- a/x/uvalidator/types/query.pb.go +++ b/x/uvalidator/types/query.pb.go @@ -112,6 +112,95 @@ func (m *QueryParamsResponse) GetParams() *Params { return nil } +// Single Universal Validator +type QueryUniversalValidatorRequest struct { + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` +} + +func (m *QueryUniversalValidatorRequest) Reset() { *m = QueryUniversalValidatorRequest{} } +func (m *QueryUniversalValidatorRequest) String() string { return proto.CompactTextString(m) } +func (*QueryUniversalValidatorRequest) ProtoMessage() {} +func (*QueryUniversalValidatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f4cd4c651106fbb0, []int{2} +} +func (m *QueryUniversalValidatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUniversalValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUniversalValidatorRequest.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 *QueryUniversalValidatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUniversalValidatorRequest.Merge(m, src) +} +func (m *QueryUniversalValidatorRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryUniversalValidatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUniversalValidatorRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUniversalValidatorRequest proto.InternalMessageInfo + +func (m *QueryUniversalValidatorRequest) GetCoreValidatorAddress() string { + if m != nil { + return m.CoreValidatorAddress + } + return "" +} + +type QueryUniversalValidatorResponse struct { + UniversalValidator *UniversalValidator `protobuf:"bytes,1,opt,name=universal_validator,json=universalValidator,proto3" json:"universal_validator,omitempty"` +} + +func (m *QueryUniversalValidatorResponse) Reset() { *m = QueryUniversalValidatorResponse{} } +func (m *QueryUniversalValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*QueryUniversalValidatorResponse) ProtoMessage() {} +func (*QueryUniversalValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f4cd4c651106fbb0, []int{3} +} +func (m *QueryUniversalValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUniversalValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUniversalValidatorResponse.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 *QueryUniversalValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUniversalValidatorResponse.Merge(m, src) +} +func (m *QueryUniversalValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryUniversalValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUniversalValidatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUniversalValidatorResponse proto.InternalMessageInfo + +func (m *QueryUniversalValidatorResponse) GetUniversalValidator() *UniversalValidator { + if m != nil { + return m.UniversalValidator + } + return nil +} + // QueryUniversalValidatorsSetRequest is the request type for Query/UniversalValidatorAddresses. type QueryUniversalValidatorsSetRequest struct { } @@ -120,7 +209,7 @@ func (m *QueryUniversalValidatorsSetRequest) Reset() { *m = QueryUnivers func (m *QueryUniversalValidatorsSetRequest) String() string { return proto.CompactTextString(m) } func (*QueryUniversalValidatorsSetRequest) ProtoMessage() {} func (*QueryUniversalValidatorsSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{2} + return fileDescriptor_f4cd4c651106fbb0, []int{4} } func (m *QueryUniversalValidatorsSetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -152,14 +241,14 @@ var xxx_messageInfo_QueryUniversalValidatorsSetRequest proto.InternalMessageInfo // QueryUniversalValidatorsSetResponse is the response type for Query/UniversalValidatorAddresses. type QueryUniversalValidatorsSetResponse struct { // addresses is the list of all universal validator addresses registered in the module. - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + UniversalValidator []*UniversalValidator `protobuf:"bytes,1,rep,name=universal_validator,json=universalValidator,proto3" json:"universal_validator,omitempty"` } func (m *QueryUniversalValidatorsSetResponse) Reset() { *m = QueryUniversalValidatorsSetResponse{} } func (m *QueryUniversalValidatorsSetResponse) String() string { return proto.CompactTextString(m) } func (*QueryUniversalValidatorsSetResponse) ProtoMessage() {} func (*QueryUniversalValidatorsSetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{3} + return fileDescriptor_f4cd4c651106fbb0, []int{5} } func (m *QueryUniversalValidatorsSetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -188,9 +277,9 @@ func (m *QueryUniversalValidatorsSetResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUniversalValidatorsSetResponse proto.InternalMessageInfo -func (m *QueryUniversalValidatorsSetResponse) GetAddresses() []string { +func (m *QueryUniversalValidatorsSetResponse) GetUniversalValidator() []*UniversalValidator { if m != nil { - return m.Addresses + return m.UniversalValidator } return nil } @@ -204,7 +293,7 @@ func (m *QueryBallotRequest) Reset() { *m = QueryBallotRequest{} } func (m *QueryBallotRequest) String() string { return proto.CompactTextString(m) } func (*QueryBallotRequest) ProtoMessage() {} func (*QueryBallotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{4} + return fileDescriptor_f4cd4c651106fbb0, []int{6} } func (m *QueryBallotRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +337,7 @@ func (m *QueryBallotResponse) Reset() { *m = QueryBallotResponse{} } func (m *QueryBallotResponse) String() string { return proto.CompactTextString(m) } func (*QueryBallotResponse) ProtoMessage() {} func (*QueryBallotResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{5} + return fileDescriptor_f4cd4c651106fbb0, []int{7} } func (m *QueryBallotResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -293,7 +382,7 @@ func (m *QueryBallotsRequest) Reset() { *m = QueryBallotsRequest{} } func (m *QueryBallotsRequest) String() string { return proto.CompactTextString(m) } func (*QueryBallotsRequest) ProtoMessage() {} func (*QueryBallotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{6} + return fileDescriptor_f4cd4c651106fbb0, []int{8} } func (m *QueryBallotsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -338,7 +427,7 @@ func (m *QueryBallotsResponse) Reset() { *m = QueryBallotsResponse{} } func (m *QueryBallotsResponse) String() string { return proto.CompactTextString(m) } func (*QueryBallotsResponse) ProtoMessage() {} func (*QueryBallotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{7} + return fileDescriptor_f4cd4c651106fbb0, []int{9} } func (m *QueryBallotsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -390,7 +479,7 @@ func (m *QueryActiveBallotIDsRequest) Reset() { *m = QueryActiveBallotID func (m *QueryActiveBallotIDsRequest) String() string { return proto.CompactTextString(m) } func (*QueryActiveBallotIDsRequest) ProtoMessage() {} func (*QueryActiveBallotIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{8} + return fileDescriptor_f4cd4c651106fbb0, []int{10} } func (m *QueryActiveBallotIDsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -435,7 +524,7 @@ func (m *QueryActiveBallotIDsResponse) Reset() { *m = QueryActiveBallotI func (m *QueryActiveBallotIDsResponse) String() string { return proto.CompactTextString(m) } func (*QueryActiveBallotIDsResponse) ProtoMessage() {} func (*QueryActiveBallotIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{9} + return fileDescriptor_f4cd4c651106fbb0, []int{11} } func (m *QueryActiveBallotIDsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -486,7 +575,7 @@ func (m *QueryActiveBallotsRequest) Reset() { *m = QueryActiveBallotsReq func (m *QueryActiveBallotsRequest) String() string { return proto.CompactTextString(m) } func (*QueryActiveBallotsRequest) ProtoMessage() {} func (*QueryActiveBallotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{10} + return fileDescriptor_f4cd4c651106fbb0, []int{12} } func (m *QueryActiveBallotsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -531,7 +620,7 @@ func (m *QueryActiveBallotsResponse) Reset() { *m = QueryActiveBallotsRe func (m *QueryActiveBallotsResponse) String() string { return proto.CompactTextString(m) } func (*QueryActiveBallotsResponse) ProtoMessage() {} func (*QueryActiveBallotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{11} + return fileDescriptor_f4cd4c651106fbb0, []int{13} } func (m *QueryActiveBallotsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +672,7 @@ func (m *QueryExpiredBallotIDsRequest) Reset() { *m = QueryExpiredBallot func (m *QueryExpiredBallotIDsRequest) String() string { return proto.CompactTextString(m) } func (*QueryExpiredBallotIDsRequest) ProtoMessage() {} func (*QueryExpiredBallotIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{12} + return fileDescriptor_f4cd4c651106fbb0, []int{14} } func (m *QueryExpiredBallotIDsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -628,7 +717,7 @@ func (m *QueryExpiredBallotIDsResponse) Reset() { *m = QueryExpiredBallo func (m *QueryExpiredBallotIDsResponse) String() string { return proto.CompactTextString(m) } func (*QueryExpiredBallotIDsResponse) ProtoMessage() {} func (*QueryExpiredBallotIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{13} + return fileDescriptor_f4cd4c651106fbb0, []int{15} } func (m *QueryExpiredBallotIDsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -679,7 +768,7 @@ func (m *QueryExpiredBallotsRequest) Reset() { *m = QueryExpiredBallotsR func (m *QueryExpiredBallotsRequest) String() string { return proto.CompactTextString(m) } func (*QueryExpiredBallotsRequest) ProtoMessage() {} func (*QueryExpiredBallotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{14} + return fileDescriptor_f4cd4c651106fbb0, []int{16} } func (m *QueryExpiredBallotsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +813,7 @@ func (m *QueryExpiredBallotsResponse) Reset() { *m = QueryExpiredBallots func (m *QueryExpiredBallotsResponse) String() string { return proto.CompactTextString(m) } func (*QueryExpiredBallotsResponse) ProtoMessage() {} func (*QueryExpiredBallotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{15} + return fileDescriptor_f4cd4c651106fbb0, []int{17} } func (m *QueryExpiredBallotsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -776,7 +865,7 @@ func (m *QueryFinalizedBallotIDsRequest) Reset() { *m = QueryFinalizedBa func (m *QueryFinalizedBallotIDsRequest) String() string { return proto.CompactTextString(m) } func (*QueryFinalizedBallotIDsRequest) ProtoMessage() {} func (*QueryFinalizedBallotIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{16} + return fileDescriptor_f4cd4c651106fbb0, []int{18} } func (m *QueryFinalizedBallotIDsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -821,7 +910,7 @@ func (m *QueryFinalizedBallotIDsResponse) Reset() { *m = QueryFinalizedB func (m *QueryFinalizedBallotIDsResponse) String() string { return proto.CompactTextString(m) } func (*QueryFinalizedBallotIDsResponse) ProtoMessage() {} func (*QueryFinalizedBallotIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{17} + return fileDescriptor_f4cd4c651106fbb0, []int{19} } func (m *QueryFinalizedBallotIDsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -872,7 +961,7 @@ func (m *QueryFinalizedBallotsRequest) Reset() { *m = QueryFinalizedBall func (m *QueryFinalizedBallotsRequest) String() string { return proto.CompactTextString(m) } func (*QueryFinalizedBallotsRequest) ProtoMessage() {} func (*QueryFinalizedBallotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{18} + return fileDescriptor_f4cd4c651106fbb0, []int{20} } func (m *QueryFinalizedBallotsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -917,7 +1006,7 @@ func (m *QueryFinalizedBallotsResponse) Reset() { *m = QueryFinalizedBal func (m *QueryFinalizedBallotsResponse) String() string { return proto.CompactTextString(m) } func (*QueryFinalizedBallotsResponse) ProtoMessage() {} func (*QueryFinalizedBallotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{19} + return fileDescriptor_f4cd4c651106fbb0, []int{21} } func (m *QueryFinalizedBallotsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -963,6 +1052,8 @@ func (m *QueryFinalizedBallotsResponse) GetPagination() *query.PageResponse { func init() { proto.RegisterType((*QueryParamsRequest)(nil), "uvalidator.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "uvalidator.v1.QueryParamsResponse") + proto.RegisterType((*QueryUniversalValidatorRequest)(nil), "uvalidator.v1.QueryUniversalValidatorRequest") + proto.RegisterType((*QueryUniversalValidatorResponse)(nil), "uvalidator.v1.QueryUniversalValidatorResponse") proto.RegisterType((*QueryUniversalValidatorsSetRequest)(nil), "uvalidator.v1.QueryUniversalValidatorsSetRequest") proto.RegisterType((*QueryUniversalValidatorsSetResponse)(nil), "uvalidator.v1.QueryUniversalValidatorsSetResponse") proto.RegisterType((*QueryBallotRequest)(nil), "uvalidator.v1.QueryBallotRequest") @@ -986,62 +1077,67 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/query.proto", fileDescriptor_f4cd4c651106fbb0) } var fileDescriptor_f4cd4c651106fbb0 = []byte{ - // 867 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x97, 0xcf, 0x4f, 0xdb, 0x48, - 0x14, 0xc7, 0x71, 0xd0, 0x66, 0xc5, 0xa0, 0x5d, 0xb1, 0xc3, 0x8f, 0x05, 0x43, 0x0c, 0x38, 0x81, - 0x0d, 0x81, 0xd8, 0x0a, 0x7b, 0xe8, 0x39, 0x94, 0x52, 0xf5, 0x06, 0xa9, 0xda, 0x43, 0xa5, 0xaa, - 0x9a, 0xc4, 0x43, 0x32, 0xd2, 0x60, 0x9b, 0x8c, 0x13, 0x01, 0x6d, 0x2f, 0xfd, 0x03, 0x2a, 0xd4, - 0x4a, 0xfd, 0xa5, 0x1e, 0x7b, 0xec, 0xbd, 0xff, 0x42, 0x8f, 0x48, 0xbd, 0xf4, 0x58, 0x41, 0xff, - 0x90, 0x2a, 0x33, 0xe3, 0x04, 0x3b, 0x76, 0x92, 0x4a, 0x89, 0xb8, 0x59, 0x9e, 0xef, 0xbc, 0xef, - 0xe7, 0xbd, 0x37, 0xc9, 0x1b, 0x83, 0x85, 0x46, 0x13, 0x51, 0x62, 0x21, 0xcf, 0xa9, 0x9b, 0xcd, - 0x82, 0x79, 0xdc, 0xc0, 0xf5, 0x53, 0xc3, 0xad, 0x3b, 0x9e, 0x03, 0xff, 0xea, 0x2c, 0x19, 0xcd, - 0x82, 0xba, 0x54, 0x75, 0x9c, 0x2a, 0xc5, 0x26, 0x72, 0x89, 0x89, 0x6c, 0xdb, 0xf1, 0x90, 0x47, - 0x1c, 0x9b, 0x09, 0xb1, 0xba, 0x18, 0x8c, 0x53, 0xc5, 0x36, 0x66, 0xc4, 0x5f, 0x0c, 0x99, 0x78, - 0xa7, 0x2e, 0xf6, 0x97, 0xd4, 0xe0, 0x52, 0x19, 0x51, 0xea, 0x78, 0x72, 0x2d, 0x57, 0x71, 0xd8, - 0x91, 0xc3, 0xcc, 0x32, 0x62, 0x58, 0x90, 0x99, 0xcd, 0x42, 0x19, 0x7b, 0xa8, 0x60, 0xba, 0xa8, - 0x4a, 0x6c, 0x0e, 0x20, 0xb4, 0xfa, 0x0c, 0x80, 0x07, 0x2d, 0xc5, 0x3e, 0xaa, 0xa3, 0x23, 0x56, - 0xc2, 0xc7, 0x0d, 0xcc, 0x3c, 0x7d, 0x17, 0x4c, 0x07, 0xde, 0x32, 0xd7, 0xb1, 0x19, 0x86, 0x79, - 0x90, 0x74, 0xf9, 0x9b, 0x79, 0x65, 0x45, 0xc9, 0x4e, 0x6e, 0xcf, 0x1a, 0x81, 0x54, 0x0d, 0x29, - 0x97, 0x22, 0x3d, 0x03, 0x74, 0x1e, 0xe5, 0x81, 0x4d, 0x9a, 0xb8, 0xce, 0x10, 0x7d, 0xe8, 0x8b, - 0xd9, 0x7d, 0xec, 0xf9, 0x5e, 0xb7, 0x41, 0xba, 0xa7, 0x4a, 0x7a, 0x2f, 0x81, 0x09, 0x64, 0x59, - 0x75, 0xcc, 0x18, 0x6e, 0xd9, 0x8f, 0x67, 0x27, 0x4a, 0x9d, 0x17, 0x7a, 0x46, 0xa6, 0xb1, 0xc3, - 0xeb, 0x20, 0x43, 0xc3, 0xbf, 0x41, 0x82, 0x58, 0x9c, 0x75, 0xa2, 0x94, 0x20, 0x56, 0x3b, 0x2d, - 0x5f, 0xd5, 0x49, 0x4b, 0xd4, 0x2f, 0x26, 0x2d, 0x29, 0x97, 0x22, 0xfd, 0x71, 0x20, 0x8a, 0x5f, - 0x33, 0xb8, 0x07, 0x40, 0xa7, 0xba, 0x32, 0xd2, 0xba, 0x21, 0x5a, 0x61, 0xb4, 0x5a, 0x61, 0x88, - 0x43, 0x22, 0x5b, 0x61, 0xec, 0xa3, 0x2a, 0x96, 0x7b, 0x4b, 0xd7, 0x76, 0xea, 0xe7, 0x0a, 0x98, - 0x09, 0xc6, 0x97, 0x98, 0x26, 0xf8, 0x53, 0x10, 0x88, 0xfc, 0x63, 0x39, 0x7d, 0x15, 0xbc, 0x1b, - 0x20, 0x4a, 0x70, 0xa2, 0xff, 0xfa, 0x12, 0x09, 0xb7, 0x00, 0x12, 0x06, 0x8b, 0x9c, 0xa8, 0x58, - 0xf1, 0x48, 0x13, 0x0b, 0x9b, 0x7b, 0xbb, 0x43, 0xcf, 0xfc, 0x14, 0x2c, 0x45, 0xdb, 0xc8, 0x02, - 0x4c, 0x81, 0x71, 0x62, 0xf9, 0xcd, 0x6f, 0x3d, 0x0e, 0x2f, 0xc3, 0x0a, 0x58, 0xe8, 0xb2, 0x1e, - 0x7a, 0x7e, 0x6f, 0x14, 0xa0, 0x46, 0xb9, 0xdc, 0x78, 0x7f, 0x0f, 0x65, 0xe1, 0xef, 0x9c, 0xb8, - 0xa4, 0x8e, 0xad, 0x91, 0x35, 0xf8, 0x0c, 0xa4, 0x62, 0x7c, 0x46, 0xdf, 0x61, 0x4b, 0xd6, 0x3e, - 0xe0, 0x3d, 0xf4, 0x0c, 0xdf, 0x2a, 0xf2, 0xa7, 0x12, 0xb6, 0xb9, 0xf1, 0x1e, 0xd7, 0x80, 0xc6, - 0xc1, 0xf6, 0x88, 0x8d, 0x28, 0x39, 0x1b, 0x61, 0x97, 0x9f, 0x81, 0xe5, 0x58, 0xa7, 0xd1, 0xf7, - 0xd9, 0x3f, 0xcb, 0x21, 0xf7, 0xa1, 0x67, 0xf9, 0x5e, 0x91, 0x87, 0xb9, 0xdb, 0xe8, 0xa6, 0x7b, - 0xbd, 0xfd, 0x65, 0x12, 0xfc, 0xc1, 0xd9, 0xa0, 0x0d, 0x92, 0x62, 0x28, 0xc3, 0xd5, 0x90, 0x79, - 0xf7, 0xd4, 0x57, 0xf5, 0x5e, 0x12, 0x61, 0xa3, 0xa7, 0x5e, 0x7c, 0xfb, 0xf9, 0x3a, 0xf1, 0x2f, - 0x9c, 0x35, 0x83, 0x17, 0x10, 0x31, 0xf2, 0xe1, 0x67, 0x05, 0xcc, 0x15, 0x29, 0x8d, 0x98, 0xe5, - 0xb0, 0x10, 0x15, 0xbd, 0xe7, 0xd5, 0x40, 0xdd, 0xfe, 0x9d, 0x2d, 0x12, 0x70, 0x93, 0x03, 0xae, - 0xc1, 0x74, 0x08, 0xb0, 0xe1, 0x6f, 0x7b, 0xd2, 0xec, 0x30, 0x79, 0x20, 0x29, 0x9a, 0x10, 0x5d, - 0x9e, 0xc0, 0x6d, 0x22, 0xba, 0x3c, 0xc1, 0xab, 0x84, 0x9e, 0xe6, 0xee, 0x29, 0xb8, 0x68, 0x46, - 0xdd, 0xcf, 0x98, 0xf9, 0x94, 0x58, 0xcf, 0x61, 0x03, 0x80, 0x22, 0xa5, 0xf2, 0xb8, 0xc0, 0x1e, - 0x61, 0xdb, 0x9d, 0x49, 0xf7, 0xd4, 0x48, 0x6f, 0x8d, 0x7b, 0xcf, 0xc3, 0xb9, 0x68, 0x6f, 0xf8, - 0x4e, 0x01, 0xb0, 0x48, 0x69, 0x68, 0xba, 0xc2, 0x5c, 0x54, 0xec, 0xe8, 0x49, 0xaf, 0x6e, 0x0e, - 0xa4, 0x95, 0x3c, 0x1b, 0x9c, 0x27, 0x0d, 0x57, 0x63, 0x6a, 0x81, 0xf8, 0x3e, 0xb3, 0xf5, 0xeb, - 0x7f, 0xa9, 0x80, 0xa9, 0x10, 0x1a, 0x83, 0xd9, 0x7e, 0x66, 0x6d, 0xac, 0x8d, 0x01, 0x94, 0x12, - 0x6a, 0x8d, 0x43, 0x2d, 0xc3, 0x54, 0x4f, 0x28, 0xf8, 0x51, 0x01, 0xd3, 0x45, 0x4a, 0xc3, 0x83, - 0x0a, 0x46, 0x16, 0x20, 0x66, 0x6c, 0xaa, 0x5b, 0x83, 0x89, 0x25, 0x59, 0x8e, 0x93, 0x65, 0xa0, - 0x1e, 0x43, 0x86, 0xc5, 0x46, 0x5e, 0xaf, 0x57, 0x0a, 0xf8, 0x27, 0x8c, 0xc7, 0xe0, 0x46, 0x5f, - 0xbf, 0x36, 0x5a, 0x6e, 0x10, 0xa9, 0x04, 0x5b, 0xe7, 0x60, 0x2b, 0x50, 0xeb, 0x0d, 0x06, 0x3f, - 0x29, 0x60, 0xb6, 0x48, 0x69, 0xf7, 0xdf, 0x3e, 0xcc, 0x47, 0xb9, 0xc5, 0x0e, 0x22, 0xd5, 0x18, - 0x54, 0x2e, 0x01, 0xb7, 0x38, 0xe0, 0x3a, 0xcc, 0xc4, 0x00, 0x1e, 0xfa, 0x5b, 0x79, 0xed, 0x3e, - 0x88, 0xd6, 0x86, 0xff, 0xb6, 0xa3, 0x5b, 0x1b, 0x33, 0x45, 0xa2, 0x5b, 0x1b, 0x37, 0x09, 0xf4, - 0x2c, 0x07, 0xd4, 0xe1, 0x4a, 0x3f, 0xc0, 0x9d, 0x83, 0xaf, 0x97, 0x9a, 0x72, 0x71, 0xa9, 0x29, - 0x3f, 0x2e, 0x35, 0xe5, 0xfc, 0x4a, 0x1b, 0xbb, 0xb8, 0xd2, 0xc6, 0xbe, 0x5f, 0x69, 0x63, 0x8f, - 0x6e, 0x55, 0x89, 0x57, 0x6b, 0x94, 0x8d, 0x8a, 0x73, 0x64, 0xba, 0x0d, 0x56, 0xab, 0xd4, 0x10, - 0xb1, 0xf9, 0x53, 0x9e, 0x3f, 0xe6, 0x6d, 0xc7, 0xc2, 0xe6, 0xc9, 0x75, 0x07, 0xfe, 0xbd, 0x58, - 0x4e, 0xf2, 0x0f, 0xbd, 0xff, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x10, 0xb0, 0xfb, 0x4d, 0xb2, - 0x0e, 0x00, 0x00, + // 958 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x98, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0xc7, 0xbd, 0x0e, 0xea, 0x22, 0xd3, 0x0f, 0xa4, 0xe3, 0x8f, 0x26, 0x74, 0xc4, 0x38, 0x94, + 0xe3, 0xda, 0x4e, 0x4c, 0x42, 0x6e, 0x81, 0x1e, 0x8a, 0x1e, 0x94, 0xa6, 0x29, 0x7a, 0x4b, 0x54, + 0x34, 0x87, 0x02, 0x45, 0xb0, 0x12, 0x37, 0xf2, 0x02, 0x6b, 0x52, 0xd1, 0x92, 0x42, 0x9c, 0x34, + 0x97, 0x3e, 0x40, 0x11, 0xb4, 0x40, 0xbf, 0xd0, 0x63, 0x8f, 0x7d, 0x80, 0x3e, 0x42, 0x8f, 0x06, + 0x7a, 0xe9, 0xb1, 0xb0, 0xfb, 0x04, 0x7d, 0x82, 0x42, 0xbb, 0x4b, 0xc9, 0xa4, 0x96, 0x92, 0x8a, + 0x48, 0xf0, 0x8d, 0xe0, 0xcc, 0xce, 0xff, 0xb7, 0x33, 0x23, 0xce, 0xd8, 0x70, 0x25, 0xed, 0x51, + 0xc1, 0x43, 0x9a, 0xc4, 0xdd, 0xa0, 0x57, 0x0b, 0x1e, 0xa7, 0xac, 0x7b, 0xe4, 0x77, 0xba, 0x71, + 0x12, 0xe3, 0x1b, 0x43, 0x93, 0xdf, 0xab, 0x39, 0x57, 0xdb, 0x71, 0xdc, 0x16, 0x2c, 0xa0, 0x1d, + 0x1e, 0xd0, 0x28, 0x8a, 0x13, 0x9a, 0xf0, 0x38, 0x92, 0xda, 0xd9, 0x59, 0xcf, 0xc7, 0x69, 0xb3, + 0x88, 0x49, 0x9e, 0x19, 0x0b, 0x22, 0xc9, 0x51, 0x87, 0x65, 0x26, 0x27, 0x6f, 0x6a, 0x52, 0x21, + 0xe2, 0xc4, 0xd8, 0x2a, 0x79, 0xdb, 0x90, 0x46, 0x9b, 0x77, 0x5b, 0xb1, 0x3c, 0x8c, 0x65, 0xd0, + 0xa4, 0x92, 0x69, 0xf0, 0xa0, 0x57, 0x6b, 0xb2, 0x84, 0xd6, 0x82, 0x0e, 0x6d, 0xf3, 0x48, 0xf1, + 0x69, 0x5f, 0x6f, 0x05, 0xf0, 0x7e, 0xdf, 0xe3, 0x1e, 0xed, 0xd2, 0x43, 0xd9, 0x60, 0x8f, 0x53, + 0x26, 0x13, 0xef, 0x0e, 0x2c, 0xe7, 0xde, 0xca, 0x4e, 0x1c, 0x49, 0x86, 0x7b, 0xb0, 0xd4, 0x51, + 0x6f, 0x2e, 0x93, 0x0d, 0xb2, 0xfd, 0xda, 0xfe, 0xaa, 0x9f, 0xcb, 0x84, 0x6f, 0xdc, 0x8d, 0x93, + 0xf7, 0x00, 0x5c, 0x15, 0xe5, 0xf3, 0x88, 0xf7, 0x58, 0x57, 0x52, 0xf1, 0x20, 0x73, 0x36, 0x3a, + 0xf8, 0x1e, 0xac, 0xb5, 0xe2, 0x2e, 0x7b, 0x38, 0x88, 0xf2, 0x90, 0x86, 0x61, 0x97, 0x49, 0x2d, + 0x70, 0xb1, 0xb1, 0xd2, 0xb7, 0x0e, 0x4e, 0xd5, 0xb5, 0xcd, 0x4b, 0xe1, 0x5a, 0x69, 0x5c, 0x43, + 0xda, 0x80, 0xe5, 0x34, 0xb3, 0x0e, 0xa3, 0x1b, 0xec, 0xeb, 0x05, 0x6c, 0x4b, 0x1c, 0x4c, 0x47, + 0xde, 0x79, 0x9b, 0xe0, 0x95, 0xc8, 0xca, 0xcf, 0x58, 0x92, 0xa5, 0xee, 0x08, 0xaa, 0x63, 0xbd, + 0x26, 0x01, 0x5e, 0x78, 0x19, 0x40, 0x5d, 0xcb, 0xdb, 0xaa, 0x57, 0xb2, 0x1c, 0xbf, 0x09, 0x8b, + 0x3c, 0x34, 0xf9, 0x5c, 0xe4, 0xe1, 0xa0, 0xb6, 0x99, 0xd7, 0xb0, 0xb6, 0xba, 0xc7, 0x4a, 0x6a, + 0x6b, 0xdc, 0x8d, 0x93, 0xf7, 0x65, 0x2e, 0x4a, 0xd6, 0x38, 0x78, 0x17, 0x60, 0xd8, 0x62, 0x26, + 0xd2, 0x96, 0xaf, 0xfb, 0xd1, 0xef, 0xf7, 0xa3, 0xaf, 0x7f, 0x48, 0xa6, 0x1f, 0xfd, 0x7b, 0xb4, + 0xcd, 0xcc, 0xd9, 0xc6, 0x99, 0x93, 0xde, 0x0b, 0x02, 0x2b, 0xf9, 0xf8, 0x06, 0x33, 0x80, 0x57, + 0x35, 0x81, 0x34, 0xb9, 0x2a, 0xe1, 0xcc, 0xbc, 0xf0, 0x93, 0x1c, 0xd1, 0xa2, 0x22, 0x7a, 0x67, + 0x22, 0x91, 0x56, 0xcb, 0x21, 0x31, 0x58, 0x57, 0x44, 0xf5, 0x56, 0xc2, 0x7b, 0x4c, 0xcb, 0x7c, + 0x7a, 0x67, 0xe6, 0x37, 0x3f, 0x82, 0xab, 0x76, 0x19, 0x93, 0x80, 0x4b, 0x70, 0x81, 0x87, 0xfa, + 0xf2, 0x17, 0x1b, 0xfd, 0xc7, 0xd9, 0xdd, 0xb0, 0x05, 0x57, 0x46, 0xa4, 0x67, 0x7e, 0xbf, 0xef, + 0x09, 0x38, 0x36, 0x95, 0x73, 0xaf, 0xef, 0x23, 0x93, 0xf8, 0x8f, 0x9f, 0x74, 0x78, 0x97, 0x85, + 0x73, 0x2b, 0xf0, 0x53, 0xa8, 0x94, 0xe8, 0xcc, 0xbf, 0xc2, 0xa1, 0xc9, 0x7d, 0x4e, 0x7b, 0xe6, + 0x37, 0xfc, 0x81, 0x98, 0x9f, 0x4a, 0x51, 0xe6, 0xdc, 0x6b, 0x7c, 0x60, 0x26, 0xd2, 0x5d, 0x1e, + 0x51, 0xc1, 0x9f, 0xce, 0xb1, 0xca, 0x5f, 0x99, 0x19, 0x65, 0x53, 0x9a, 0x7f, 0x9d, 0xb3, 0x5e, + 0x2e, 0xa8, 0xcf, 0xfc, 0x96, 0x3f, 0x11, 0xd3, 0xcc, 0xa3, 0x42, 0xe7, 0x5d, 0xeb, 0xfd, 0x7f, + 0x5f, 0x87, 0x57, 0x14, 0x1b, 0x46, 0xb0, 0xa4, 0x37, 0x13, 0x2c, 0x0e, 0xd6, 0xd1, 0xd5, 0xc7, + 0xf1, 0xc6, 0xb9, 0x68, 0x19, 0xaf, 0xf2, 0xf5, 0x9f, 0xff, 0x7c, 0xb7, 0xf8, 0x36, 0xae, 0x06, + 0xf9, 0x45, 0x4c, 0xef, 0x3d, 0xf8, 0x3b, 0x01, 0x1c, 0x1d, 0xd9, 0xb8, 0x67, 0x8b, 0x5c, 0xba, + 0x1b, 0x39, 0xfe, 0xb4, 0xee, 0x06, 0xea, 0x23, 0x05, 0xf5, 0x21, 0x7e, 0x50, 0x80, 0xb2, 0xac, + 0x19, 0xc1, 0x33, 0xfb, 0xd6, 0xf5, 0x1c, 0x7f, 0x23, 0xb0, 0x56, 0x17, 0xc2, 0xb2, 0xbc, 0x60, + 0x6d, 0x3a, 0x9e, 0x33, 0xbb, 0x90, 0xb3, 0xff, 0x7f, 0x8e, 0x98, 0x6b, 0xdc, 0x54, 0xd7, 0xb8, + 0x81, 0xd5, 0xc9, 0xd7, 0x90, 0x98, 0xc0, 0x92, 0xee, 0x1f, 0x7b, 0x65, 0x73, 0x8b, 0x90, 0xbd, + 0xb2, 0xf9, 0x2d, 0xc8, 0xab, 0x2a, 0xf5, 0x0a, 0xae, 0x07, 0xb6, 0xf5, 0x5b, 0x06, 0xcf, 0x78, + 0xf8, 0x1c, 0x53, 0x80, 0xba, 0x10, 0xa6, 0xd3, 0x71, 0x4c, 0xd8, 0x41, 0x53, 0x55, 0xc7, 0xfa, + 0x18, 0x6d, 0x57, 0x69, 0x5f, 0xc6, 0x35, 0xbb, 0x36, 0xfe, 0x48, 0x00, 0xeb, 0x42, 0x14, 0x16, + 0x03, 0xdc, 0xb5, 0xc5, 0xb6, 0x2f, 0x29, 0xce, 0xcd, 0xa9, 0x7c, 0x0d, 0xcf, 0x8e, 0xe2, 0xa9, + 0xe2, 0xf5, 0x92, 0x5c, 0x50, 0x75, 0x2e, 0xe8, 0x7f, 0xb8, 0xbe, 0x21, 0x70, 0xa9, 0x80, 0x26, + 0x71, 0x7b, 0x92, 0xd8, 0x00, 0x6b, 0x67, 0x0a, 0x4f, 0x03, 0x75, 0x43, 0x41, 0x5d, 0xc3, 0xca, + 0x58, 0x28, 0xfc, 0x85, 0xc0, 0x72, 0x5d, 0x88, 0xe2, 0x8c, 0x45, 0x6b, 0x02, 0x4a, 0x26, 0xbe, + 0x73, 0x6b, 0x3a, 0x67, 0x43, 0xb6, 0xab, 0xc8, 0x36, 0xd1, 0x2b, 0x21, 0x63, 0xfa, 0xa0, 0xca, + 0xd7, 0xb7, 0x04, 0xde, 0x2a, 0xe2, 0x49, 0xdc, 0x99, 0xa8, 0x37, 0x40, 0xdb, 0x9d, 0xc6, 0xd5, + 0x80, 0x6d, 0x29, 0xb0, 0x0d, 0x74, 0xc7, 0x83, 0xe1, 0xaf, 0x04, 0x56, 0xeb, 0x42, 0x8c, 0x4e, + 0x2c, 0xfb, 0x97, 0xab, 0x74, 0x86, 0xda, 0xbf, 0x5c, 0xe5, 0x83, 0xd0, 0xbb, 0xa5, 0x00, 0xb7, + 0x70, 0xb3, 0x04, 0xf0, 0x51, 0x76, 0x54, 0xe5, 0xee, 0x67, 0x5d, 0xda, 0xe2, 0xc4, 0xb1, 0x97, + 0xb6, 0x64, 0x00, 0xda, 0x4b, 0x5b, 0x36, 0xc4, 0xbc, 0x6d, 0x05, 0xe8, 0xe1, 0xc6, 0x24, 0xc0, + 0xdb, 0xf7, 0xff, 0x38, 0x71, 0xc9, 0xf1, 0x89, 0x4b, 0xfe, 0x3e, 0x71, 0xc9, 0x8b, 0x53, 0x77, + 0xe1, 0xf8, 0xd4, 0x5d, 0xf8, 0xeb, 0xd4, 0x5d, 0xf8, 0xe2, 0xfd, 0x36, 0x4f, 0x0e, 0xd2, 0xa6, + 0xdf, 0x8a, 0x0f, 0x83, 0x4e, 0x2a, 0x0f, 0x5a, 0x07, 0x94, 0x47, 0xea, 0x69, 0x4f, 0x3d, 0xee, + 0x45, 0x71, 0xc8, 0x82, 0x27, 0x67, 0x15, 0xd4, 0xbf, 0x03, 0x9a, 0x4b, 0xea, 0x0f, 0xf5, 0x77, + 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x38, 0x07, 0xb0, 0xe3, 0x91, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1058,6 +1154,8 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // UniversalValidator queries one universal validator by core validator address. + UniversalValidator(ctx context.Context, in *QueryUniversalValidatorRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorResponse, error) // AllUniversalValidators queries the details of a specific universal validator by its address. AllUniversalValidators(ctx context.Context, in *QueryUniversalValidatorsSetRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorsSetResponse, error) // Ballot queries one ballot by ID. @@ -1095,6 +1193,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) UniversalValidator(ctx context.Context, in *QueryUniversalValidatorRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorResponse, error) { + out := new(QueryUniversalValidatorResponse) + err := c.cc.Invoke(ctx, "/uvalidator.v1.Query/UniversalValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) AllUniversalValidators(ctx context.Context, in *QueryUniversalValidatorsSetRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorsSetResponse, error) { out := new(QueryUniversalValidatorsSetResponse) err := c.cc.Invoke(ctx, "/uvalidator.v1.Query/AllUniversalValidators", in, out, opts...) @@ -1180,6 +1287,8 @@ func (c *queryClient) AllFinalizedBallots(ctx context.Context, in *QueryFinalize type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // UniversalValidator queries one universal validator by core validator address. + UniversalValidator(context.Context, *QueryUniversalValidatorRequest) (*QueryUniversalValidatorResponse, error) // AllUniversalValidators queries the details of a specific universal validator by its address. AllUniversalValidators(context.Context, *QueryUniversalValidatorsSetRequest) (*QueryUniversalValidatorsSetResponse, error) // Ballot queries one ballot by ID. @@ -1207,6 +1316,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) UniversalValidator(ctx context.Context, req *QueryUniversalValidatorRequest) (*QueryUniversalValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UniversalValidator not implemented") +} func (*UnimplementedQueryServer) AllUniversalValidators(ctx context.Context, req *QueryUniversalValidatorsSetRequest) (*QueryUniversalValidatorsSetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllUniversalValidators not implemented") } @@ -1257,6 +1369,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_UniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUniversalValidatorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UniversalValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/uvalidator.v1.Query/UniversalValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UniversalValidator(ctx, req.(*QueryUniversalValidatorRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_AllUniversalValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryUniversalValidatorsSetRequest) if err := dec(in); err != nil { @@ -1427,6 +1557,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "UniversalValidator", + Handler: _Query_UniversalValidator_Handler, + }, { MethodName: "AllUniversalValidators", Handler: _Query_AllUniversalValidators_Handler, @@ -1526,6 +1660,71 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryUniversalValidatorRequest) 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 *QueryUniversalValidatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUniversalValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CoreValidatorAddress) > 0 { + i -= len(m.CoreValidatorAddress) + copy(dAtA[i:], m.CoreValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.CoreValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryUniversalValidatorResponse) 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 *QueryUniversalValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUniversalValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UniversalValidator != nil { + { + size, err := m.UniversalValidator.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryUniversalValidatorsSetRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1569,11 +1768,16 @@ func (m *QueryUniversalValidatorsSetResponse) MarshalToSizedBuffer(dAtA []byte) _ = i var l int _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + if len(m.UniversalValidator) > 0 { + for iNdEx := len(m.UniversalValidator) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UniversalValidator[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } @@ -2252,6 +2456,32 @@ func (m *QueryParamsResponse) Size() (n int) { return n } +func (m *QueryUniversalValidatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CoreValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryUniversalValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UniversalValidator != nil { + l = m.UniversalValidator.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryUniversalValidatorsSetRequest) Size() (n int) { if m == nil { return 0 @@ -2267,9 +2497,9 @@ func (m *QueryUniversalValidatorsSetResponse) Size() (n int) { } var l int _ = l - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) + if len(m.UniversalValidator) > 0 { + for _, e := range m.UniversalValidator { + l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } @@ -2668,6 +2898,174 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryUniversalValidatorRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryUniversalValidatorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUniversalValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryUniversalValidatorResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryUniversalValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUniversalValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UniversalValidator", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UniversalValidator == nil { + m.UniversalValidator = &UniversalValidator{} + } + if err := m.UniversalValidator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryUniversalValidatorsSetRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2749,9 +3147,9 @@ func (m *QueryUniversalValidatorsSetResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UniversalValidator", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2761,23 +3159,25 @@ func (m *QueryUniversalValidatorsSetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + m.UniversalValidator = append(m.UniversalValidator, &UniversalValidator{}) + if err := m.UniversalValidator[len(m.UniversalValidator)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/uvalidator/types/query.pb.gw.go b/x/uvalidator/types/query.pb.gw.go index ec38fee4..f36f6d81 100644 --- a/x/uvalidator/types/query.pb.gw.go +++ b/x/uvalidator/types/query.pb.gw.go @@ -51,6 +51,60 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_UniversalValidator_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUniversalValidatorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["core_validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "core_validator_address") + } + + protoReq.CoreValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "core_validator_address", err) + } + + msg, err := client.UniversalValidator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_UniversalValidator_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUniversalValidatorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["core_validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "core_validator_address") + } + + protoReq.CoreValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "core_validator_address", err) + } + + msg, err := server.UniversalValidator(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_AllUniversalValidators_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryUniversalValidatorsSetRequest var metadata runtime.ServerMetadata @@ -404,6 +458,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_UniversalValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_UniversalValidator_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UniversalValidator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_AllUniversalValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -672,6 +749,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_UniversalValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_UniversalValidator_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UniversalValidator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_AllUniversalValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -858,6 +955,8 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"uvalidator", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_UniversalValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"uvalidator", "v1", "universal_validator", "core_validator_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AllUniversalValidators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"uvalidator", "v1", "universal_validators"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Ballot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"uvalidator", "v1", "ballots", "id"}, "", runtime.AssumeColonVerbOpt(false))) @@ -880,6 +979,8 @@ var ( var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + forward_Query_UniversalValidator_0 = runtime.ForwardResponseMessage + forward_Query_AllUniversalValidators_0 = runtime.ForwardResponseMessage forward_Query_Ballot_0 = runtime.ForwardResponseMessage diff --git a/x/uvalidator/types/tx.pb.go b/x/uvalidator/types/tx.pb.go index 431474c7..dcfa6e9c 100644 --- a/x/uvalidator/types/tx.pb.go +++ b/x/uvalidator/types/tx.pb.go @@ -135,6 +135,8 @@ type MsgAddUniversalValidator struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // core_validator_address is the address of the core validator. CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` + // network metadata for validator node (IP, etc.) + Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` } func (m *MsgAddUniversalValidator) Reset() { *m = MsgAddUniversalValidator{} } @@ -184,6 +186,13 @@ func (m *MsgAddUniversalValidator) GetCoreValidatorAddress() string { return "" } +func (m *MsgAddUniversalValidator) GetNetwork() *NetworkInfo { + if m != nil { + return m.Network + } + return nil +} + type MsgAddUniversalValidatorResponse struct { } @@ -220,6 +229,96 @@ func (m *MsgAddUniversalValidatorResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAddUniversalValidatorResponse proto.InternalMessageInfo +type MsgUpdateUniversalValidator struct { + // signer is the address authorized to execute this message + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // network metadata for validator node + Network *NetworkInfo `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` +} + +func (m *MsgUpdateUniversalValidator) Reset() { *m = MsgUpdateUniversalValidator{} } +func (m *MsgUpdateUniversalValidator) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateUniversalValidator) ProtoMessage() {} +func (*MsgUpdateUniversalValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_bea4c2a0c904c8a7, []int{4} +} +func (m *MsgUpdateUniversalValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateUniversalValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateUniversalValidator.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 *MsgUpdateUniversalValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateUniversalValidator.Merge(m, src) +} +func (m *MsgUpdateUniversalValidator) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateUniversalValidator) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateUniversalValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateUniversalValidator proto.InternalMessageInfo + +func (m *MsgUpdateUniversalValidator) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgUpdateUniversalValidator) GetNetwork() *NetworkInfo { + if m != nil { + return m.Network + } + return nil +} + +type MsgUpdateUniversalValidatorResponse struct { +} + +func (m *MsgUpdateUniversalValidatorResponse) Reset() { *m = MsgUpdateUniversalValidatorResponse{} } +func (m *MsgUpdateUniversalValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateUniversalValidatorResponse) ProtoMessage() {} +func (*MsgUpdateUniversalValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bea4c2a0c904c8a7, []int{5} +} +func (m *MsgUpdateUniversalValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateUniversalValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateUniversalValidatorResponse.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 *MsgUpdateUniversalValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateUniversalValidatorResponse.Merge(m, src) +} +func (m *MsgUpdateUniversalValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateUniversalValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateUniversalValidatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateUniversalValidatorResponse proto.InternalMessageInfo + type MsgRemoveUniversalValidator struct { // signer is the address authorized to execute this message Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` @@ -231,7 +330,7 @@ func (m *MsgRemoveUniversalValidator) Reset() { *m = MsgRemoveUniversalV func (m *MsgRemoveUniversalValidator) String() string { return proto.CompactTextString(m) } func (*MsgRemoveUniversalValidator) ProtoMessage() {} func (*MsgRemoveUniversalValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_bea4c2a0c904c8a7, []int{4} + return fileDescriptor_bea4c2a0c904c8a7, []int{6} } func (m *MsgRemoveUniversalValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -281,7 +380,7 @@ func (m *MsgRemoveUniversalValidatorResponse) Reset() { *m = MsgRemoveUn func (m *MsgRemoveUniversalValidatorResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveUniversalValidatorResponse) ProtoMessage() {} func (*MsgRemoveUniversalValidatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bea4c2a0c904c8a7, []int{5} + return fileDescriptor_bea4c2a0c904c8a7, []int{7} } func (m *MsgRemoveUniversalValidatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -315,6 +414,8 @@ func init() { proto.RegisterType((*MsgUpdateParamsResponse)(nil), "uvalidator.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgAddUniversalValidator)(nil), "uvalidator.v1.MsgAddUniversalValidator") proto.RegisterType((*MsgAddUniversalValidatorResponse)(nil), "uvalidator.v1.MsgAddUniversalValidatorResponse") + proto.RegisterType((*MsgUpdateUniversalValidator)(nil), "uvalidator.v1.MsgUpdateUniversalValidator") + proto.RegisterType((*MsgUpdateUniversalValidatorResponse)(nil), "uvalidator.v1.MsgUpdateUniversalValidatorResponse") proto.RegisterType((*MsgRemoveUniversalValidator)(nil), "uvalidator.v1.MsgRemoveUniversalValidator") proto.RegisterType((*MsgRemoveUniversalValidatorResponse)(nil), "uvalidator.v1.MsgRemoveUniversalValidatorResponse") } @@ -322,40 +423,44 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/tx.proto", fileDescriptor_bea4c2a0c904c8a7) } var fileDescriptor_bea4c2a0c904c8a7 = []byte{ - // 522 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xc7, 0x73, 0x05, 0x22, 0xe5, 0x78, 0x13, 0x56, 0xda, 0xba, 0xae, 0x30, 0xc1, 0x15, 0xa5, - 0x8a, 0x14, 0x9b, 0x26, 0x52, 0x91, 0xba, 0x35, 0x7b, 0x10, 0x04, 0xb5, 0x48, 0x2c, 0xd1, 0x35, - 0x3e, 0x5d, 0x2c, 0xd5, 0x3e, 0x73, 0x8f, 0x63, 0xb5, 0x4c, 0x88, 0x91, 0x01, 0xf1, 0x51, 0x32, - 0xf4, 0x43, 0x74, 0xac, 0xca, 0x00, 0x62, 0x40, 0x28, 0x19, 0xf2, 0x35, 0x50, 0xec, 0x73, 0x52, - 0xbb, 0x71, 0x9b, 0xa1, 0x4b, 0xf4, 0xe4, 0xfe, 0x7f, 0xff, 0x9e, 0x97, 0x7b, 0x74, 0x78, 0xa5, - 0x1f, 0x92, 0x23, 0xc7, 0x26, 0x01, 0x17, 0x56, 0xb8, 0x6d, 0x05, 0xc7, 0xa6, 0x2f, 0x78, 0xc0, - 0x95, 0x87, 0xb3, 0x73, 0x33, 0xdc, 0xd6, 0x9e, 0x10, 0xd7, 0xf1, 0xb8, 0x15, 0xfd, 0xc6, 0x0e, - 0x6d, 0xb5, 0xcb, 0xc1, 0xe5, 0x60, 0xb9, 0xc0, 0x26, 0x5f, 0xba, 0xc0, 0xa4, 0xb0, 0x9e, 0x46, - 0x32, 0xea, 0x51, 0x70, 0x40, 0x8a, 0x65, 0xc6, 0x19, 0x8f, 0x42, 0x6b, 0x12, 0xc9, 0xd3, 0xb5, - 0x98, 0xd5, 0x89, 0x85, 0xf8, 0x4f, 0x22, 0x65, 0x0a, 0x3c, 0xf1, 0xa9, 0x94, 0x8c, 0xef, 0x08, - 0x3f, 0x6e, 0x01, 0xdb, 0xf7, 0x6d, 0x12, 0xd0, 0xb7, 0x44, 0x10, 0x17, 0x94, 0x1d, 0x5c, 0x22, - 0xfd, 0xa0, 0xc7, 0x85, 0x13, 0x9c, 0xa8, 0xa8, 0x82, 0xb6, 0x4a, 0x4d, 0xf5, 0xe2, 0xb4, 0x56, - 0x96, 0xcc, 0x3d, 0xdb, 0x16, 0x14, 0xe0, 0x7d, 0x20, 0x1c, 0x8f, 0xb5, 0x67, 0x56, 0xa5, 0x81, - 0x8b, 0x7e, 0x44, 0x50, 0x97, 0x2a, 0x68, 0xeb, 0x7e, 0x7d, 0xd9, 0x4c, 0x0d, 0xc0, 0x8c, 0xf1, - 0xcd, 0xbb, 0x67, 0x7f, 0x9f, 0x15, 0xda, 0xd2, 0xba, 0xfb, 0xe8, 0xeb, 0x78, 0x50, 0x9d, 0x41, - 0x8c, 0x35, 0xbc, 0x9a, 0xa9, 0xa7, 0x4d, 0xc1, 0xe7, 0x1e, 0x50, 0xe3, 0x0f, 0xc2, 0x6a, 0x0b, - 0xd8, 0x9e, 0x6d, 0xef, 0x7b, 0x4e, 0x48, 0x05, 0x90, 0xa3, 0x83, 0x84, 0xaf, 0xbc, 0xc2, 0x45, - 0x70, 0x98, 0x47, 0xc5, 0x8d, 0x15, 0x4b, 0x9f, 0xf2, 0x01, 0xaf, 0x74, 0xb9, 0xa0, 0x9d, 0x69, - 0x8d, 0x1d, 0x12, 0xfb, 0xa2, 0xf2, 0x4b, 0xcd, 0xe7, 0x17, 0xa7, 0xb5, 0xa7, 0x92, 0x30, 0xcd, - 0x93, 0x46, 0x95, 0x27, 0x80, 0xac, 0xb6, 0xdb, 0x98, 0xb4, 0x24, 0xb3, 0x7c, 0x1b, 0x0f, 0xaa, - 0x1b, 0x97, 0xc6, 0x9f, 0x57, 0xbf, 0x61, 0xe0, 0x4a, 0x9e, 0x36, 0x1d, 0xc0, 0x2f, 0x84, 0xd7, - 0x5b, 0xc0, 0xda, 0xd4, 0xe5, 0x21, 0xbd, 0x95, 0x19, 0xbc, 0xb9, 0x61, 0x06, 0xf9, 0x84, 0xf9, - 0xad, 0xef, 0x64, 0x5a, 0xdf, 0x4c, 0xb7, 0x9e, 0x57, 0xb9, 0xf1, 0x02, 0x6f, 0x5c, 0x23, 0x27, - 0x03, 0xa8, 0xff, 0x5c, 0xc2, 0x77, 0x5a, 0xc0, 0x94, 0x03, 0xfc, 0x20, 0xb5, 0xb1, 0x7a, 0x66, - 0xd3, 0x32, 0x1b, 0xa4, 0x6d, 0x5e, 0xaf, 0x27, 0x7c, 0xe5, 0x13, 0x5e, 0x9e, 0xbf, 0x5d, 0x2f, - 0xaf, 0x02, 0xe6, 0x1a, 0x35, 0x6b, 0x41, 0xe3, 0x34, 0xe5, 0x67, 0xac, 0xe6, 0xde, 0x67, 0xf5, - 0x2a, 0x2c, 0xcf, 0xab, 0xd5, 0x17, 0xf7, 0x26, 0xb9, 0xb5, 0x7b, 0x5f, 0xc6, 0x83, 0x2a, 0x6a, - 0xbe, 0x3b, 0x1b, 0xea, 0xe8, 0x7c, 0xa8, 0xa3, 0x7f, 0x43, 0x1d, 0xfd, 0x18, 0xe9, 0x85, 0xf3, - 0x91, 0x5e, 0xf8, 0x3d, 0xd2, 0x0b, 0x1f, 0x5f, 0x33, 0x27, 0xe8, 0xf5, 0x0f, 0xcd, 0x2e, 0x77, - 0x2d, 0xbf, 0x0f, 0xbd, 0x6e, 0x8f, 0x38, 0x5e, 0x14, 0xd5, 0xa2, 0xb0, 0xe6, 0x71, 0x9b, 0x5a, - 0xc7, 0xd6, 0xa5, 0x5b, 0x8e, 0x1e, 0x97, 0xc3, 0x62, 0xf4, 0xba, 0x34, 0xfe, 0x07, 0x00, 0x00, - 0xff, 0xff, 0x06, 0xae, 0x7f, 0x17, 0x1b, 0x05, 0x00, 0x00, + // 589 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xbf, 0x6f, 0xd3, 0x40, + 0x18, 0x8d, 0xd3, 0x12, 0x94, 0xe3, 0x97, 0xb0, 0xd2, 0xd6, 0x75, 0x55, 0x13, 0x5c, 0x51, 0xaa, + 0x48, 0x89, 0x69, 0x82, 0x8a, 0xd4, 0xad, 0xd9, 0x18, 0x52, 0x41, 0x50, 0x8b, 0xc4, 0x12, 0xb9, + 0xf1, 0x71, 0xb1, 0xa8, 0xef, 0xcc, 0x9d, 0x13, 0x5a, 0x26, 0xc4, 0xc8, 0x80, 0xfa, 0xa7, 0x64, + 0xe8, 0xca, 0xde, 0x8d, 0xaa, 0x0b, 0x4c, 0x08, 0x25, 0x43, 0xfe, 0x0d, 0x94, 0xf3, 0x8f, 0xc4, + 0xc6, 0xd7, 0x64, 0xe8, 0x12, 0x7d, 0xf1, 0x7b, 0x79, 0xdf, 0xfb, 0xde, 0x7d, 0x17, 0x83, 0xe5, + 0x6e, 0xcf, 0x3c, 0xb6, 0x2d, 0xd3, 0x23, 0xd4, 0xe8, 0x6d, 0x1b, 0xde, 0x49, 0xc5, 0xa5, 0xc4, + 0x23, 0xf2, 0xbd, 0xc9, 0xf3, 0x4a, 0x6f, 0x5b, 0x7d, 0x68, 0x3a, 0x36, 0x26, 0x06, 0xff, 0xf4, + 0x19, 0xea, 0x4a, 0x9b, 0x30, 0x87, 0x30, 0xc3, 0x61, 0x68, 0xfc, 0x4b, 0x87, 0xa1, 0x00, 0x58, + 0x8b, 0x4b, 0x22, 0x88, 0x21, 0xb3, 0x59, 0x00, 0x16, 0x10, 0x41, 0x84, 0x97, 0xc6, 0xb8, 0x0a, + 0x9e, 0xae, 0xfa, 0x5a, 0x2d, 0x1f, 0xf0, 0xbf, 0x84, 0x50, 0xc2, 0xe0, 0xa9, 0x0b, 0x43, 0x68, + 0x3d, 0x0e, 0x4d, 0x0c, 0x73, 0x58, 0xff, 0x2e, 0x81, 0x07, 0x0d, 0x86, 0x0e, 0x5c, 0xcb, 0xf4, + 0xe0, 0x2b, 0x93, 0x9a, 0x0e, 0x93, 0x77, 0x40, 0xde, 0xec, 0x7a, 0x1d, 0x42, 0x6d, 0xef, 0x54, + 0x91, 0x8a, 0xd2, 0x56, 0xbe, 0xae, 0x5c, 0x9d, 0x97, 0x0b, 0x41, 0xcb, 0x3d, 0xcb, 0xa2, 0x90, + 0xb1, 0x37, 0x1e, 0xb5, 0x31, 0x6a, 0x4e, 0xa8, 0x72, 0x0d, 0xe4, 0x5c, 0xae, 0xa0, 0x64, 0x8b, + 0xd2, 0xd6, 0x9d, 0xea, 0x52, 0x25, 0x96, 0x4f, 0xc5, 0x97, 0xaf, 0x2f, 0x5e, 0xfc, 0x79, 0x94, + 0x69, 0x06, 0xd4, 0xdd, 0xfb, 0x5f, 0x47, 0xfd, 0xd2, 0x44, 0x44, 0x5f, 0x05, 0x2b, 0x09, 0x3f, + 0x4d, 0xc8, 0x5c, 0x82, 0x19, 0xd4, 0xcf, 0xb2, 0x40, 0x69, 0x30, 0xb4, 0x67, 0x59, 0x07, 0xd8, + 0xee, 0x41, 0xca, 0xcc, 0xe3, 0xc3, 0x50, 0x5f, 0x7e, 0x06, 0x72, 0xcc, 0x46, 0x18, 0xd2, 0x99, + 0x8e, 0x03, 0x9e, 0xfc, 0x16, 0x2c, 0xb7, 0x09, 0x85, 0xad, 0xc8, 0x63, 0xcb, 0xf4, 0x79, 0xdc, + 0x7e, 0xbe, 0xfe, 0xf8, 0xea, 0xbc, 0xbc, 0x1e, 0x28, 0x44, 0x7d, 0xe2, 0x52, 0x85, 0xb1, 0x40, + 0x12, 0x93, 0x9f, 0x83, 0xdb, 0x18, 0x7a, 0x9f, 0x08, 0xfd, 0xa0, 0x2c, 0xf2, 0x20, 0xd4, 0x44, + 0x10, 0xfb, 0x3e, 0xfa, 0x12, 0xbf, 0x27, 0xcd, 0x90, 0xba, 0x5b, 0x1b, 0x07, 0x11, 0x78, 0xfb, + 0x36, 0xea, 0x97, 0x36, 0xa6, 0x0e, 0x4e, 0x34, 0xb5, 0xae, 0x83, 0xa2, 0x08, 0x8b, 0x62, 0xfb, + 0x21, 0x81, 0xb5, 0x28, 0xd2, 0x1b, 0x49, 0x6e, 0x6a, 0xc0, 0xec, 0xfc, 0x03, 0xee, 0x24, 0x06, + 0xdc, 0x8c, 0x0f, 0x28, 0xf2, 0xa7, 0x3f, 0x01, 0x1b, 0xd7, 0xc0, 0xd1, 0x98, 0xbf, 0xfc, 0x31, + 0x9b, 0xd0, 0x21, 0xbd, 0x9b, 0x19, 0x73, 0x7f, 0xc6, 0x82, 0x88, 0x15, 0x52, 0xf7, 0x62, 0x56, + 0x00, 0x22, 0xe7, 0x41, 0x00, 0x22, 0x38, 0x0c, 0xa0, 0xfa, 0x73, 0x01, 0x2c, 0x34, 0x18, 0x92, + 0x0f, 0xc1, 0xdd, 0xd8, 0x75, 0xd6, 0x12, 0x87, 0x93, 0xb8, 0x5e, 0xea, 0xe6, 0xf5, 0x78, 0xa8, + 0x2f, 0x7f, 0x04, 0x4b, 0xe9, 0x57, 0xef, 0xe9, 0xff, 0x02, 0xa9, 0x44, 0xd5, 0x98, 0x93, 0x18, + 0xb5, 0xfc, 0x0c, 0x14, 0xe1, 0xda, 0x96, 0x44, 0xb6, 0x53, 0x1a, 0x57, 0xe7, 0xe7, 0x4e, 0xf7, + 0x16, 0xee, 0x52, 0x4a, 0x6f, 0x11, 0x37, 0xad, 0xf7, 0xac, 0xa3, 0x54, 0x6f, 0x7d, 0x19, 0xf5, + 0x4b, 0x52, 0xfd, 0xf5, 0xc5, 0x40, 0x93, 0x2e, 0x07, 0x9a, 0xf4, 0x77, 0xa0, 0x49, 0x67, 0x43, + 0x2d, 0x73, 0x39, 0xd4, 0x32, 0xbf, 0x87, 0x5a, 0xe6, 0xdd, 0x0b, 0x64, 0x7b, 0x9d, 0xee, 0x51, + 0xa5, 0x4d, 0x1c, 0xc3, 0xed, 0xb2, 0x4e, 0xbb, 0x63, 0xda, 0x98, 0x57, 0x65, 0x5e, 0x96, 0x31, + 0xb1, 0xa0, 0x71, 0x62, 0x4c, 0x6d, 0x18, 0x7f, 0x29, 0x1c, 0xe5, 0xf8, 0xdf, 0x7e, 0xed, 0x5f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x5f, 0x0e, 0xc7, 0xd3, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -376,6 +481,8 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // AddUniversalValidator defines a message to add a universal validator. AddUniversalValidator(ctx context.Context, in *MsgAddUniversalValidator, opts ...grpc.CallOption) (*MsgAddUniversalValidatorResponse, error) + // UpdateUniversalValidator defines a message to update a universal validator. + UpdateUniversalValidator(ctx context.Context, in *MsgUpdateUniversalValidator, opts ...grpc.CallOption) (*MsgUpdateUniversalValidatorResponse, error) // RemoveUniversalValidator defines a message to remove a universal validator. RemoveUniversalValidator(ctx context.Context, in *MsgRemoveUniversalValidator, opts ...grpc.CallOption) (*MsgRemoveUniversalValidatorResponse, error) } @@ -406,6 +513,15 @@ func (c *msgClient) AddUniversalValidator(ctx context.Context, in *MsgAddUnivers return out, nil } +func (c *msgClient) UpdateUniversalValidator(ctx context.Context, in *MsgUpdateUniversalValidator, opts ...grpc.CallOption) (*MsgUpdateUniversalValidatorResponse, error) { + out := new(MsgUpdateUniversalValidatorResponse) + err := c.cc.Invoke(ctx, "/uvalidator.v1.Msg/UpdateUniversalValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) RemoveUniversalValidator(ctx context.Context, in *MsgRemoveUniversalValidator, opts ...grpc.CallOption) (*MsgRemoveUniversalValidatorResponse, error) { out := new(MsgRemoveUniversalValidatorResponse) err := c.cc.Invoke(ctx, "/uvalidator.v1.Msg/RemoveUniversalValidator", in, out, opts...) @@ -423,6 +539,8 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // AddUniversalValidator defines a message to add a universal validator. AddUniversalValidator(context.Context, *MsgAddUniversalValidator) (*MsgAddUniversalValidatorResponse, error) + // UpdateUniversalValidator defines a message to update a universal validator. + UpdateUniversalValidator(context.Context, *MsgUpdateUniversalValidator) (*MsgUpdateUniversalValidatorResponse, error) // RemoveUniversalValidator defines a message to remove a universal validator. RemoveUniversalValidator(context.Context, *MsgRemoveUniversalValidator) (*MsgRemoveUniversalValidatorResponse, error) } @@ -437,6 +555,9 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) AddUniversalValidator(ctx context.Context, req *MsgAddUniversalValidator) (*MsgAddUniversalValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddUniversalValidator not implemented") } +func (*UnimplementedMsgServer) UpdateUniversalValidator(ctx context.Context, req *MsgUpdateUniversalValidator) (*MsgUpdateUniversalValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUniversalValidator not implemented") +} func (*UnimplementedMsgServer) RemoveUniversalValidator(ctx context.Context, req *MsgRemoveUniversalValidator) (*MsgRemoveUniversalValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveUniversalValidator not implemented") } @@ -481,6 +602,24 @@ func _Msg_AddUniversalValidator_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Msg_UpdateUniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateUniversalValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateUniversalValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/uvalidator.v1.Msg/UpdateUniversalValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateUniversalValidator(ctx, req.(*MsgUpdateUniversalValidator)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_RemoveUniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveUniversalValidator) if err := dec(in); err != nil { @@ -511,6 +650,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "AddUniversalValidator", Handler: _Msg_AddUniversalValidator_Handler, }, + { + MethodName: "UpdateUniversalValidator", + Handler: _Msg_UpdateUniversalValidator_Handler, + }, { MethodName: "RemoveUniversalValidator", Handler: _Msg_RemoveUniversalValidator_Handler, @@ -603,6 +746,18 @@ func (m *MsgAddUniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.Network != nil { + { + size, err := m.Network.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } if len(m.CoreValidatorAddress) > 0 { i -= len(m.CoreValidatorAddress) copy(dAtA[i:], m.CoreValidatorAddress) @@ -643,6 +798,71 @@ func (m *MsgAddUniversalValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *MsgUpdateUniversalValidator) 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 *MsgUpdateUniversalValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateUniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Network != nil { + { + size, err := m.Network.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateUniversalValidatorResponse) 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 *MsgUpdateUniversalValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateUniversalValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgRemoveUniversalValidator) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -752,6 +972,10 @@ func (m *MsgAddUniversalValidator) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if m.Network != nil { + l = m.Network.Size() + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -764,6 +988,32 @@ func (m *MsgAddUniversalValidatorResponse) Size() (n int) { return n } +func (m *MsgUpdateUniversalValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Network != nil { + l = m.Network.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateUniversalValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgRemoveUniversalValidator) Size() (n int) { if m == nil { return 0 @@ -1054,6 +1304,42 @@ func (m *MsgAddUniversalValidator) Unmarshal(dAtA []byte) error { } m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Network == nil { + m.Network = &NetworkInfo{} + } + if err := m.Network.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1125,6 +1411,174 @@ func (m *MsgAddUniversalValidatorResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateUniversalValidator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateUniversalValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateUniversalValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Network == nil { + m.Network = &NetworkInfo{} + } + if err := m.Network.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateUniversalValidatorResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateUniversalValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateUniversalValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgRemoveUniversalValidator) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/uvalidator/types/universal_validator.go b/x/uvalidator/types/universal_validator.go new file mode 100644 index 00000000..154fecc6 --- /dev/null +++ b/x/uvalidator/types/universal_validator.go @@ -0,0 +1,39 @@ +package types + +import ( + "encoding/json" + + "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Stringer method for Params. +func (p UniversalValidator) String() string { + bz, err := json.Marshal(p) + if err != nil { + panic(err) + } + + return string(bz) +} + +// Validate does the sanity check on the params. +func (p UniversalValidator) ValidateBasic() error { + + // Validate identity info + if err := p.IdentifyInfo.ValidateBasic(); err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid identify info: %v", err) + } + + // Validate lifecycle info + if err := p.LifecycleInfo.ValidateBasic(); err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid lifecycle info: %v", err) + } + + // Validate network info + if err := p.NetworkInfo.ValidateBasic(); err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid network info: %v", err) + } + + return nil +} diff --git a/x/uvalidator/types/validator.pb.go b/x/uvalidator/types/validator.pb.go new file mode 100644 index 00000000..2bea904a --- /dev/null +++ b/x/uvalidator/types/validator.pb.go @@ -0,0 +1,1459 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: uvalidator/v1/validator.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Universal Validator status +type UVStatus int32 + +const ( + UVStatus_UV_STATUS_UNSPECIFIED UVStatus = 0 + UVStatus_UV_STATUS_ACTIVE UVStatus = 1 + UVStatus_UV_STATUS_PENDING_JOIN UVStatus = 2 + UVStatus_UV_STATUS_PENDING_LEAVE UVStatus = 3 + UVStatus_UV_STATUS_INACTIVE UVStatus = 4 +) + +var UVStatus_name = map[int32]string{ + 0: "UV_STATUS_UNSPECIFIED", + 1: "UV_STATUS_ACTIVE", + 2: "UV_STATUS_PENDING_JOIN", + 3: "UV_STATUS_PENDING_LEAVE", + 4: "UV_STATUS_INACTIVE", +} + +var UVStatus_value = map[string]int32{ + "UV_STATUS_UNSPECIFIED": 0, + "UV_STATUS_ACTIVE": 1, + "UV_STATUS_PENDING_JOIN": 2, + "UV_STATUS_PENDING_LEAVE": 3, + "UV_STATUS_INACTIVE": 4, +} + +func (x UVStatus) String() string { + return proto.EnumName(UVStatus_name, int32(x)) +} + +func (UVStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{0} +} + +// Identity info for validator (chain-level) +type IdentityInfo struct { + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` +} + +func (m *IdentityInfo) Reset() { *m = IdentityInfo{} } +func (m *IdentityInfo) String() string { return proto.CompactTextString(m) } +func (*IdentityInfo) ProtoMessage() {} +func (*IdentityInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{0} +} +func (m *IdentityInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IdentityInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IdentityInfo.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 *IdentityInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_IdentityInfo.Merge(m, src) +} +func (m *IdentityInfo) XXX_Size() int { + return m.Size() +} +func (m *IdentityInfo) XXX_DiscardUnknown() { + xxx_messageInfo_IdentityInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_IdentityInfo proto.InternalMessageInfo + +func (m *IdentityInfo) GetCoreValidatorAddress() string { + if m != nil { + return m.CoreValidatorAddress + } + return "" +} + +// Validator network metadata +type NetworkInfo struct { + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + MultiAddrs []string `protobuf:"bytes,2,rep,name=multi_addrs,json=multiAddrs,proto3" json:"multi_addrs,omitempty"` +} + +func (m *NetworkInfo) Reset() { *m = NetworkInfo{} } +func (m *NetworkInfo) String() string { return proto.CompactTextString(m) } +func (*NetworkInfo) ProtoMessage() {} +func (*NetworkInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{1} +} +func (m *NetworkInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NetworkInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NetworkInfo.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 *NetworkInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkInfo.Merge(m, src) +} +func (m *NetworkInfo) XXX_Size() int { + return m.Size() +} +func (m *NetworkInfo) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkInfo proto.InternalMessageInfo + +func (m *NetworkInfo) GetPeerId() string { + if m != nil { + return m.PeerId + } + return "" +} + +func (m *NetworkInfo) GetMultiAddrs() []string { + if m != nil { + return m.MultiAddrs + } + return nil +} + +// Lifecycle event info +type LifecycleEvent struct { + Status UVStatus `protobuf:"varint,1,opt,name=status,proto3,enum=uvalidator.v1.UVStatus" json:"status,omitempty"` + BlockHeight int64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` +} + +func (m *LifecycleEvent) Reset() { *m = LifecycleEvent{} } +func (m *LifecycleEvent) String() string { return proto.CompactTextString(m) } +func (*LifecycleEvent) ProtoMessage() {} +func (*LifecycleEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{2} +} +func (m *LifecycleEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LifecycleEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LifecycleEvent.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 *LifecycleEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_LifecycleEvent.Merge(m, src) +} +func (m *LifecycleEvent) XXX_Size() int { + return m.Size() +} +func (m *LifecycleEvent) XXX_DiscardUnknown() { + xxx_messageInfo_LifecycleEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_LifecycleEvent proto.InternalMessageInfo + +func (m *LifecycleEvent) GetStatus() UVStatus { + if m != nil { + return m.Status + } + return UVStatus_UV_STATUS_UNSPECIFIED +} + +func (m *LifecycleEvent) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +// Validator lifecycle info +type LifecycleInfo struct { + CurrentStatus UVStatus `protobuf:"varint,1,opt,name=current_status,json=currentStatus,proto3,enum=uvalidator.v1.UVStatus" json:"current_status,omitempty"` + History []*LifecycleEvent `protobuf:"bytes,2,rep,name=history,proto3" json:"history,omitempty"` +} + +func (m *LifecycleInfo) Reset() { *m = LifecycleInfo{} } +func (m *LifecycleInfo) String() string { return proto.CompactTextString(m) } +func (*LifecycleInfo) ProtoMessage() {} +func (*LifecycleInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{3} +} +func (m *LifecycleInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LifecycleInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LifecycleInfo.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 *LifecycleInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_LifecycleInfo.Merge(m, src) +} +func (m *LifecycleInfo) XXX_Size() int { + return m.Size() +} +func (m *LifecycleInfo) XXX_DiscardUnknown() { + xxx_messageInfo_LifecycleInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_LifecycleInfo proto.InternalMessageInfo + +func (m *LifecycleInfo) GetCurrentStatus() UVStatus { + if m != nil { + return m.CurrentStatus + } + return UVStatus_UV_STATUS_UNSPECIFIED +} + +func (m *LifecycleInfo) GetHistory() []*LifecycleEvent { + if m != nil { + return m.History + } + return nil +} + +// Core Universal Validator object +type UniversalValidator struct { + IdentifyInfo *IdentityInfo `protobuf:"bytes,1,opt,name=identify_info,json=identifyInfo,proto3" json:"identify_info,omitempty"` + NetworkInfo *NetworkInfo `protobuf:"bytes,2,opt,name=network_info,json=networkInfo,proto3" json:"network_info,omitempty"` + LifecycleInfo *LifecycleInfo `protobuf:"bytes,3,opt,name=lifecycle_info,json=lifecycleInfo,proto3" json:"lifecycle_info,omitempty"` +} + +func (m *UniversalValidator) Reset() { *m = UniversalValidator{} } +func (*UniversalValidator) ProtoMessage() {} +func (*UniversalValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{4} +} +func (m *UniversalValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UniversalValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UniversalValidator.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 *UniversalValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_UniversalValidator.Merge(m, src) +} +func (m *UniversalValidator) XXX_Size() int { + return m.Size() +} +func (m *UniversalValidator) XXX_DiscardUnknown() { + xxx_messageInfo_UniversalValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_UniversalValidator proto.InternalMessageInfo + +func (m *UniversalValidator) GetIdentifyInfo() *IdentityInfo { + if m != nil { + return m.IdentifyInfo + } + return nil +} + +func (m *UniversalValidator) GetNetworkInfo() *NetworkInfo { + if m != nil { + return m.NetworkInfo + } + return nil +} + +func (m *UniversalValidator) GetLifecycleInfo() *LifecycleInfo { + if m != nil { + return m.LifecycleInfo + } + return nil +} + +func init() { + proto.RegisterEnum("uvalidator.v1.UVStatus", UVStatus_name, UVStatus_value) + proto.RegisterType((*IdentityInfo)(nil), "uvalidator.v1.IdentityInfo") + proto.RegisterType((*NetworkInfo)(nil), "uvalidator.v1.NetworkInfo") + proto.RegisterType((*LifecycleEvent)(nil), "uvalidator.v1.LifecycleEvent") + proto.RegisterType((*LifecycleInfo)(nil), "uvalidator.v1.LifecycleInfo") + proto.RegisterType((*UniversalValidator)(nil), "uvalidator.v1.UniversalValidator") +} + +func init() { proto.RegisterFile("uvalidator/v1/validator.proto", fileDescriptor_317d9e276ec46d00) } + +var fileDescriptor_317d9e276ec46d00 = []byte{ + // 622 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0x25, 0x55, 0x4b, 0xcf, 0x49, 0x14, 0x4e, 0xa5, 0x09, 0x2e, 0x75, 0xd3, 0xb2, 0x54, + 0x45, 0x8d, 0xd5, 0x80, 0x54, 0x29, 0x12, 0x88, 0xd0, 0x1a, 0x30, 0xaa, 0x4c, 0x71, 0x9a, 0x0c, + 0x2c, 0x96, 0x6b, 0x5f, 0xe2, 0x53, 0x5d, 0x5f, 0x64, 0x9f, 0x03, 0xf9, 0x05, 0x08, 0x26, 0xc4, + 0xc4, 0xd8, 0x81, 0x01, 0x89, 0x85, 0x9f, 0xc1, 0xd8, 0x91, 0x11, 0x25, 0x03, 0xfc, 0x0c, 0x94, + 0x73, 0x1c, 0xbb, 0x01, 0x24, 0x96, 0xe8, 0xde, 0xfb, 0x9e, 0xbf, 0xef, 0xbd, 0xef, 0x3d, 0x05, + 0xae, 0x87, 0x03, 0xd3, 0x25, 0xb6, 0xc9, 0xa8, 0x2f, 0x0f, 0xf6, 0xe4, 0x59, 0x50, 0xeb, 0xfb, + 0x94, 0x51, 0x54, 0x48, 0xe0, 0xda, 0x60, 0x4f, 0x5c, 0xe9, 0xd1, 0x1e, 0xe5, 0x88, 0x3c, 0x79, + 0x45, 0x45, 0xe2, 0x75, 0xf3, 0x9c, 0x78, 0x54, 0xe6, 0xbf, 0x51, 0x6a, 0xab, 0x07, 0xf3, 0xaa, + 0x8d, 0x3d, 0x46, 0xd8, 0x50, 0xf5, 0xba, 0x14, 0xdd, 0x83, 0xab, 0x16, 0xf5, 0xb1, 0x31, 0x63, + 0x33, 0x4c, 0xdb, 0xf6, 0x71, 0x10, 0x54, 0x40, 0x15, 0x6c, 0x2f, 0xeb, 0x2b, 0x13, 0xb4, 0x13, + 0x83, 0xcd, 0x08, 0x6b, 0x6c, 0xfe, 0xba, 0xd8, 0x00, 0xef, 0x7e, 0x7e, 0xdd, 0xa9, 0xa4, 0xba, + 0x24, 0x53, 0x5e, 0x83, 0x78, 0x5d, 0xba, 0x45, 0xa0, 0xa0, 0x61, 0xf6, 0x8a, 0xfa, 0x67, 0x5c, + 0xa7, 0x0c, 0x97, 0xfa, 0x18, 0xfb, 0x06, 0xb1, 0xa7, 0xc4, 0x8b, 0x93, 0x50, 0xb5, 0xd1, 0x06, + 0x14, 0xce, 0x43, 0x97, 0x11, 0xae, 0x1b, 0x54, 0xb2, 0xd5, 0xdc, 0xf6, 0xb2, 0x0e, 0x79, 0x6a, + 0xa2, 0x16, 0x34, 0xaa, 0xb1, 0x56, 0x39, 0xa5, 0xe5, 0x45, 0xd4, 0x91, 0xd4, 0x5b, 0x00, 0x8b, + 0x47, 0xa4, 0x8b, 0xad, 0xa1, 0xe5, 0x62, 0x65, 0x80, 0x3d, 0x86, 0x64, 0xb8, 0x18, 0x30, 0x93, + 0x85, 0xd1, 0x18, 0xc5, 0x7a, 0xb9, 0x76, 0xc5, 0xaf, 0x5a, 0xbb, 0xd3, 0xe2, 0xb0, 0x3e, 0x2d, + 0x43, 0x9b, 0x30, 0x7f, 0xea, 0x52, 0xeb, 0xcc, 0x70, 0x30, 0xe9, 0x39, 0xac, 0x92, 0xad, 0x82, + 0xed, 0x9c, 0x2e, 0xf0, 0xdc, 0x53, 0x9e, 0x6a, 0xdc, 0x8e, 0x1b, 0x11, 0x53, 0x8d, 0xb8, 0xb1, + 0xae, 0x81, 0x27, 0xc2, 0x5b, 0x5f, 0x00, 0x2c, 0xcc, 0x7a, 0xe1, 0x93, 0x3f, 0x80, 0x45, 0x2b, + 0xf4, 0x7d, 0xec, 0x31, 0xe3, 0xff, 0x5a, 0x2a, 0x4c, 0xcb, 0xa3, 0x10, 0xed, 0xc3, 0x25, 0x87, + 0x04, 0x8c, 0xfa, 0x43, 0x6e, 0x8e, 0x50, 0x5f, 0x9f, 0xfb, 0xf0, 0xea, 0xe8, 0x7a, 0x5c, 0xfd, + 0xf7, 0x25, 0x45, 0xfd, 0xba, 0x38, 0x72, 0xee, 0x4d, 0x16, 0xa2, 0xb6, 0x47, 0x06, 0xd8, 0x0f, + 0x4c, 0x77, 0xb6, 0x65, 0xf4, 0x10, 0x16, 0xa2, 0x65, 0x76, 0xa3, 0x65, 0xf2, 0x8e, 0x85, 0xfa, + 0xda, 0x9c, 0x70, 0xfa, 0x90, 0xf4, 0x7c, 0xfc, 0x05, 0x1f, 0xfa, 0x3e, 0xcc, 0xa7, 0x57, 0xc4, + 0xed, 0x14, 0xea, 0xe2, 0x1c, 0x41, 0xea, 0x40, 0x74, 0xc1, 0x4b, 0x5d, 0xcb, 0x01, 0x2c, 0x26, + 0xc6, 0x72, 0x82, 0x1c, 0x27, 0xb8, 0xf5, 0xaf, 0xd1, 0x39, 0x45, 0xc1, 0x4d, 0x87, 0x8d, 0x3b, + 0x1f, 0x2f, 0x36, 0x32, 0xb1, 0x07, 0x52, 0xca, 0x83, 0x30, 0x9e, 0x38, 0xb9, 0xfa, 0x9d, 0x0f, + 0x00, 0x5e, 0x8b, 0x37, 0x80, 0x6e, 0xc2, 0x1b, 0xed, 0x8e, 0xd1, 0x3a, 0x69, 0x9e, 0xb4, 0x5b, + 0x46, 0x5b, 0x6b, 0x1d, 0x2b, 0x07, 0xea, 0x63, 0x55, 0x39, 0x2c, 0x65, 0xd0, 0x0a, 0x2c, 0x25, + 0x50, 0xf3, 0xe0, 0x44, 0xed, 0x28, 0x25, 0x80, 0x44, 0xb8, 0x9a, 0x64, 0x8f, 0x15, 0xed, 0x50, + 0xd5, 0x9e, 0x18, 0xcf, 0x9e, 0xab, 0x5a, 0x29, 0x8b, 0xd6, 0x60, 0xf9, 0x4f, 0xec, 0x48, 0x69, + 0x76, 0x94, 0x52, 0x0e, 0xad, 0x42, 0x94, 0x80, 0xaa, 0x36, 0x25, 0x5c, 0x10, 0x17, 0x3e, 0x7f, + 0x92, 0xc0, 0xa3, 0x17, 0xdf, 0x46, 0x12, 0xb8, 0x1c, 0x49, 0xe0, 0xc7, 0x48, 0x02, 0xef, 0xc7, + 0x52, 0xe6, 0x72, 0x2c, 0x65, 0xbe, 0x8f, 0xa5, 0xcc, 0xcb, 0xfd, 0x1e, 0x61, 0x4e, 0x78, 0x5a, + 0xb3, 0xe8, 0xb9, 0xdc, 0x0f, 0x03, 0xc7, 0x72, 0x4c, 0xe2, 0xf1, 0xd7, 0x2e, 0x7f, 0xee, 0x7a, + 0xd4, 0xc6, 0xf2, 0x6b, 0x39, 0x35, 0x35, 0x1b, 0xf6, 0x71, 0x70, 0xba, 0xc8, 0xff, 0x06, 0xee, + 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xb2, 0x20, 0x70, 0x5f, 0x04, 0x00, 0x00, +} + +func (this *IdentityInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IdentityInfo) + if !ok { + that2, ok := that.(IdentityInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CoreValidatorAddress != that1.CoreValidatorAddress { + return false + } + return true +} +func (this *NetworkInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NetworkInfo) + if !ok { + that2, ok := that.(NetworkInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.PeerId != that1.PeerId { + return false + } + if len(this.MultiAddrs) != len(that1.MultiAddrs) { + return false + } + for i := range this.MultiAddrs { + if this.MultiAddrs[i] != that1.MultiAddrs[i] { + return false + } + } + return true +} +func (this *LifecycleEvent) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LifecycleEvent) + if !ok { + that2, ok := that.(LifecycleEvent) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Status != that1.Status { + return false + } + if this.BlockHeight != that1.BlockHeight { + return false + } + return true +} +func (this *LifecycleInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LifecycleInfo) + if !ok { + that2, ok := that.(LifecycleInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CurrentStatus != that1.CurrentStatus { + return false + } + if len(this.History) != len(that1.History) { + return false + } + for i := range this.History { + if !this.History[i].Equal(that1.History[i]) { + return false + } + } + return true +} +func (this *UniversalValidator) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UniversalValidator) + if !ok { + that2, ok := that.(UniversalValidator) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.IdentifyInfo.Equal(that1.IdentifyInfo) { + return false + } + if !this.NetworkInfo.Equal(that1.NetworkInfo) { + return false + } + if !this.LifecycleInfo.Equal(that1.LifecycleInfo) { + return false + } + return true +} +func (m *IdentityInfo) 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 *IdentityInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IdentityInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CoreValidatorAddress) > 0 { + i -= len(m.CoreValidatorAddress) + copy(dAtA[i:], m.CoreValidatorAddress) + i = encodeVarintValidator(dAtA, i, uint64(len(m.CoreValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NetworkInfo) 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 *NetworkInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NetworkInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MultiAddrs) > 0 { + for iNdEx := len(m.MultiAddrs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MultiAddrs[iNdEx]) + copy(dAtA[i:], m.MultiAddrs[iNdEx]) + i = encodeVarintValidator(dAtA, i, uint64(len(m.MultiAddrs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = encodeVarintValidator(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LifecycleEvent) 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 *LifecycleEvent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LifecycleEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockHeight != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Status != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *LifecycleInfo) 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 *LifecycleInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LifecycleInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.History) > 0 { + for iNdEx := len(m.History) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.History[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.CurrentStatus != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.CurrentStatus)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *UniversalValidator) 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 *UniversalValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LifecycleInfo != nil { + { + size, err := m.LifecycleInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.NetworkInfo != nil { + { + size, err := m.NetworkInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.IdentifyInfo != nil { + { + size, err := m.IdentifyInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintValidator(dAtA []byte, offset int, v uint64) int { + offset -= sovValidator(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *IdentityInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CoreValidatorAddress) + if l > 0 { + n += 1 + l + sovValidator(uint64(l)) + } + return n +} + +func (m *NetworkInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PeerId) + if l > 0 { + n += 1 + l + sovValidator(uint64(l)) + } + if len(m.MultiAddrs) > 0 { + for _, s := range m.MultiAddrs { + l = len(s) + n += 1 + l + sovValidator(uint64(l)) + } + } + return n +} + +func (m *LifecycleEvent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovValidator(uint64(m.Status)) + } + if m.BlockHeight != 0 { + n += 1 + sovValidator(uint64(m.BlockHeight)) + } + return n +} + +func (m *LifecycleInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CurrentStatus != 0 { + n += 1 + sovValidator(uint64(m.CurrentStatus)) + } + if len(m.History) > 0 { + for _, e := range m.History { + l = e.Size() + n += 1 + l + sovValidator(uint64(l)) + } + } + return n +} + +func (m *UniversalValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IdentifyInfo != nil { + l = m.IdentifyInfo.Size() + n += 1 + l + sovValidator(uint64(l)) + } + if m.NetworkInfo != nil { + l = m.NetworkInfo.Size() + n += 1 + l + sovValidator(uint64(l)) + } + if m.LifecycleInfo != nil { + l = m.LifecycleInfo.Size() + n += 1 + l + sovValidator(uint64(l)) + } + return n +} + +func sovValidator(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozValidator(x uint64) (n int) { + return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IdentityInfo) 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 ErrIntOverflowValidator + } + 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: IdentityInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IdentityInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + 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 ErrInvalidLengthValidator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkInfo) 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 ErrIntOverflowValidator + } + 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: NetworkInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + 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 ErrInvalidLengthValidator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MultiAddrs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + 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 ErrInvalidLengthValidator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MultiAddrs = append(m.MultiAddrs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LifecycleEvent) 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 ErrIntOverflowValidator + } + 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: LifecycleEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LifecycleEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LifecycleInfo) 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 ErrIntOverflowValidator + } + 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: LifecycleInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LifecycleInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentStatus", wireType) + } + m.CurrentStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CurrentStatus |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field History", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthValidator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.History = append(m.History, &LifecycleEvent{}) + if err := m.History[len(m.History)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UniversalValidator) 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 ErrIntOverflowValidator + } + 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: UniversalValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UniversalValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdentifyInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthValidator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IdentifyInfo == nil { + m.IdentifyInfo = &IdentityInfo{} + } + if err := m.IdentifyInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthValidator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NetworkInfo == nil { + m.NetworkInfo = &NetworkInfo{} + } + if err := m.NetworkInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LifecycleInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthValidator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LifecycleInfo == nil { + m.LifecycleInfo = &LifecycleInfo{} + } + if err := m.LifecycleInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipValidator(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowValidator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowValidator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowValidator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthValidator + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupValidator + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthValidator + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthValidator = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowValidator = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupValidator = fmt.Errorf("proto: unexpected end of group") +)