diff --git a/api/uexecutor/v1/tx.pulsar.go b/api/uexecutor/v1/tx.pulsar.go index 7f88ade5..fdcda3d6 100644 --- a/api/uexecutor/v1/tx.pulsar.go +++ b/api/uexecutor/v1/tx.pulsar.go @@ -4628,6 +4628,989 @@ func (x *fastReflection_MsgVoteInboundResponse) ProtoMethods() *protoiface.Metho } } +var ( + md_MsgVoteOutbound protoreflect.MessageDescriptor + fd_MsgVoteOutbound_signer protoreflect.FieldDescriptor + fd_MsgVoteOutbound_utx_id protoreflect.FieldDescriptor + fd_MsgVoteOutbound_outbound_id protoreflect.FieldDescriptor + fd_MsgVoteOutbound_observed_tx protoreflect.FieldDescriptor +) + +func init() { + file_uexecutor_v1_tx_proto_init() + md_MsgVoteOutbound = File_uexecutor_v1_tx_proto.Messages().ByName("MsgVoteOutbound") + fd_MsgVoteOutbound_signer = md_MsgVoteOutbound.Fields().ByName("signer") + fd_MsgVoteOutbound_utx_id = md_MsgVoteOutbound.Fields().ByName("utx_id") + fd_MsgVoteOutbound_outbound_id = md_MsgVoteOutbound.Fields().ByName("outbound_id") + fd_MsgVoteOutbound_observed_tx = md_MsgVoteOutbound.Fields().ByName("observed_tx") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteOutbound)(nil) + +type fastReflection_MsgVoteOutbound MsgVoteOutbound + +func (x *MsgVoteOutbound) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteOutbound)(x) +} + +func (x *MsgVoteOutbound) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_tx_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_MsgVoteOutbound_messageType fastReflection_MsgVoteOutbound_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteOutbound_messageType{} + +type fastReflection_MsgVoteOutbound_messageType struct{} + +func (x fastReflection_MsgVoteOutbound_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteOutbound)(nil) +} +func (x fastReflection_MsgVoteOutbound_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteOutbound) +} +func (x fastReflection_MsgVoteOutbound_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteOutbound +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteOutbound) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteOutbound +} + +// 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_MsgVoteOutbound) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteOutbound_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteOutbound) New() protoreflect.Message { + return new(fastReflection_MsgVoteOutbound) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteOutbound) Interface() protoreflect.ProtoMessage { + return (*MsgVoteOutbound)(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_MsgVoteOutbound) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgVoteOutbound_signer, value) { + return + } + } + if x.UtxId != "" { + value := protoreflect.ValueOfString(x.UtxId) + if !f(fd_MsgVoteOutbound_utx_id, value) { + return + } + } + if x.OutboundId != "" { + value := protoreflect.ValueOfString(x.OutboundId) + if !f(fd_MsgVoteOutbound_outbound_id, value) { + return + } + } + if x.ObservedTx != nil { + value := protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) + if !f(fd_MsgVoteOutbound_observed_tx, 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_MsgVoteOutbound) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + return x.Signer != "" + case "uexecutor.v1.MsgVoteOutbound.utx_id": + return x.UtxId != "" + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + return x.OutboundId != "" + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + return x.ObservedTx != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound 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_MsgVoteOutbound) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + x.Signer = "" + case "uexecutor.v1.MsgVoteOutbound.utx_id": + x.UtxId = "" + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + x.OutboundId = "" + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + x.ObservedTx = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound 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_MsgVoteOutbound) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "uexecutor.v1.MsgVoteOutbound.utx_id": + value := x.UtxId + return protoreflect.ValueOfString(value) + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + value := x.OutboundId + return protoreflect.ValueOfString(value) + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + value := x.ObservedTx + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound 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_MsgVoteOutbound) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + x.Signer = value.Interface().(string) + case "uexecutor.v1.MsgVoteOutbound.utx_id": + x.UtxId = value.Interface().(string) + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + x.OutboundId = value.Interface().(string) + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + x.ObservedTx = value.Message().Interface().(*OutboundObservation) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound 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_MsgVoteOutbound) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + if x.ObservedTx == nil { + x.ObservedTx = new(OutboundObservation) + } + return protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) + case "uexecutor.v1.MsgVoteOutbound.signer": + panic(fmt.Errorf("field signer of message uexecutor.v1.MsgVoteOutbound is not mutable")) + case "uexecutor.v1.MsgVoteOutbound.utx_id": + panic(fmt.Errorf("field utx_id of message uexecutor.v1.MsgVoteOutbound is not mutable")) + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + panic(fmt.Errorf("field outbound_id of message uexecutor.v1.MsgVoteOutbound is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound 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_MsgVoteOutbound) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + return protoreflect.ValueOfString("") + case "uexecutor.v1.MsgVoteOutbound.utx_id": + return protoreflect.ValueOfString("") + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + return protoreflect.ValueOfString("") + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + m := new(OutboundObservation) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound 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_MsgVoteOutbound) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.MsgVoteOutbound", 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_MsgVoteOutbound) 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_MsgVoteOutbound) 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_MsgVoteOutbound) 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_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteOutbound) + 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.UtxId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OutboundId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ObservedTx != nil { + l = options.Size(x.ObservedTx) + 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().(*MsgVoteOutbound) + 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.ObservedTx != nil { + encoded, err := options.Marshal(x.ObservedTx) + 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.OutboundId) > 0 { + i -= len(x.OutboundId) + copy(dAtA[i:], x.OutboundId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OutboundId))) + i-- + dAtA[i] = 0x1a + } + if len(x.UtxId) > 0 { + i -= len(x.UtxId) + copy(dAtA[i:], x.UtxId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UtxId))) + 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().(*MsgVoteOutbound) + 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: MsgVoteOutbound: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteOutbound: 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 UtxId", 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.UtxId = 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 OutboundId", 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.OutboundId = 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 ObservedTx", 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.ObservedTx == nil { + x.ObservedTx = &OutboundObservation{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ObservedTx); 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_MsgVoteOutboundResponse protoreflect.MessageDescriptor +) + +func init() { + file_uexecutor_v1_tx_proto_init() + md_MsgVoteOutboundResponse = File_uexecutor_v1_tx_proto.Messages().ByName("MsgVoteOutboundResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteOutboundResponse)(nil) + +type fastReflection_MsgVoteOutboundResponse MsgVoteOutboundResponse + +func (x *MsgVoteOutboundResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteOutboundResponse)(x) +} + +func (x *MsgVoteOutboundResponse) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_tx_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_MsgVoteOutboundResponse_messageType fastReflection_MsgVoteOutboundResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteOutboundResponse_messageType{} + +type fastReflection_MsgVoteOutboundResponse_messageType struct{} + +func (x fastReflection_MsgVoteOutboundResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteOutboundResponse)(nil) +} +func (x fastReflection_MsgVoteOutboundResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteOutboundResponse) +} +func (x fastReflection_MsgVoteOutboundResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteOutboundResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteOutboundResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteOutboundResponse +} + +// 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_MsgVoteOutboundResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteOutboundResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteOutboundResponse) New() protoreflect.Message { + return new(fastReflection_MsgVoteOutboundResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteOutboundResponse) Interface() protoreflect.ProtoMessage { + return (*MsgVoteOutboundResponse)(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_MsgVoteOutboundResponse) 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_MsgVoteOutboundResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse 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_MsgVoteOutboundResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse 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_MsgVoteOutboundResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse 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_MsgVoteOutboundResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse 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_MsgVoteOutboundResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse 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_MsgVoteOutboundResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse 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_MsgVoteOutboundResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.MsgVoteOutboundResponse", 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_MsgVoteOutboundResponse) 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_MsgVoteOutboundResponse) 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_MsgVoteOutboundResponse) 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_MsgVoteOutboundResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteOutboundResponse) + 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().(*MsgVoteOutboundResponse) + 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().(*MsgVoteOutboundResponse) + 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: MsgVoteOutboundResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteOutboundResponse: 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_MsgVoteGasPrice protoreflect.MessageDescriptor fd_MsgVoteGasPrice_signer protoreflect.FieldDescriptor @@ -4654,7 +5637,7 @@ func (x *MsgVoteGasPrice) ProtoReflect() protoreflect.Message { } func (x *MsgVoteGasPrice) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[10] + mi := &file_uexecutor_v1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5226,7 +6209,7 @@ func (x *MsgVoteGasPriceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgVoteGasPriceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[11] + mi := &file_uexecutor_v1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5995,6 +6978,94 @@ func (*MsgVoteInboundResponse) Descriptor() ([]byte, []int) { return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{9} } +// MsgVoteOutbound allows a universal validator to vote on an outbound tx observation. +type MsgVoteOutbound struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signer is the Cosmos address initiating the tx (used for tx signing) + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + UtxId string `protobuf:"bytes,2,opt,name=utx_id,json=utxId,proto3" json:"utx_id,omitempty"` // UniversalTx Id + OutboundId string `protobuf:"bytes,3,opt,name=outbound_id,json=outboundId,proto3" json:"outbound_id,omitempty"` // index of outbound tx + ObservedTx *OutboundObservation `protobuf:"bytes,4,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain +} + +func (x *MsgVoteOutbound) Reset() { + *x = MsgVoteOutbound{} + if protoimpl.UnsafeEnabled { + mi := &file_uexecutor_v1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteOutbound) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteOutbound) ProtoMessage() {} + +// Deprecated: Use MsgVoteOutbound.ProtoReflect.Descriptor instead. +func (*MsgVoteOutbound) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgVoteOutbound) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgVoteOutbound) GetUtxId() string { + if x != nil { + return x.UtxId + } + return "" +} + +func (x *MsgVoteOutbound) GetOutboundId() string { + if x != nil { + return x.OutboundId + } + return "" +} + +func (x *MsgVoteOutbound) GetObservedTx() *OutboundObservation { + if x != nil { + return x.ObservedTx + } + return nil +} + +// MsgVoteInboundResponse defines the response for MsgExecutePayload. +type MsgVoteOutboundResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgVoteOutboundResponse) Reset() { + *x = MsgVoteOutboundResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_uexecutor_v1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteOutboundResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteOutboundResponse) ProtoMessage() {} + +// Deprecated: Use MsgVoteOutboundResponse.ProtoReflect.Descriptor instead. +func (*MsgVoteOutboundResponse) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{11} +} + // MsgVoteGasPrice is broadcasted by Universal Validators to submit their observed gas prices type MsgVoteGasPrice struct { state protoimpl.MessageState @@ -6010,7 +7081,7 @@ type MsgVoteGasPrice struct { func (x *MsgVoteGasPrice) Reset() { *x = MsgVoteGasPrice{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[10] + mi := &file_uexecutor_v1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6024,7 +7095,7 @@ func (*MsgVoteGasPrice) ProtoMessage() {} // Deprecated: Use MsgVoteGasPrice.ProtoReflect.Descriptor instead. func (*MsgVoteGasPrice) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{10} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{12} } func (x *MsgVoteGasPrice) GetSigner() string { @@ -6065,7 +7136,7 @@ type MsgVoteGasPriceResponse struct { func (x *MsgVoteGasPriceResponse) Reset() { *x = MsgVoteGasPriceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[11] + mi := &file_uexecutor_v1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6079,7 +7150,7 @@ func (*MsgVoteGasPriceResponse) ProtoMessage() {} // Deprecated: Use MsgVoteGasPriceResponse.ProtoReflect.Descriptor instead. func (*MsgVoteGasPriceResponse) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{11} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{13} } var File_uexecutor_v1_tx_proto protoreflect.FileDescriptor @@ -6171,65 +7242,86 @@ var file_uexecutor_v1_tx_proto_rawDesc = []byte{ 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, + 0x65, 0x22, 0xe3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 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, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, 0xe7, - 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, - 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, - 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xf8, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x75, 0x74, 0x78, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x74, 0x78, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, + 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x54, 0x78, 0x3a, 0x22, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, + 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 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, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, + 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, + 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xce, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 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, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x12, 0x1a, 0x2e, - 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x1a, 0x22, 0x2e, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, - 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, - 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x12, 0x1a, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x1a, 0x22, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, + 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, + 0x43, 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, - 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, - 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, - 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, - 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, + 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, + 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, + 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, + 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, + 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 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, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, + 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6244,7 +7336,7 @@ func file_uexecutor_v1_tx_proto_rawDescGZIP() []byte { return file_uexecutor_v1_tx_proto_rawDescData } -var file_uexecutor_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_uexecutor_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_uexecutor_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: uexecutor.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: uexecutor.v1.MsgUpdateParamsResponse @@ -6256,37 +7348,43 @@ var file_uexecutor_v1_tx_proto_goTypes = []interface{}{ (*MsgExecutePayloadResponse)(nil), // 7: uexecutor.v1.MsgExecutePayloadResponse (*MsgVoteInbound)(nil), // 8: uexecutor.v1.MsgVoteInbound (*MsgVoteInboundResponse)(nil), // 9: uexecutor.v1.MsgVoteInboundResponse - (*MsgVoteGasPrice)(nil), // 10: uexecutor.v1.MsgVoteGasPrice - (*MsgVoteGasPriceResponse)(nil), // 11: uexecutor.v1.MsgVoteGasPriceResponse - (*Params)(nil), // 12: uexecutor.v1.Params - (*UniversalAccountId)(nil), // 13: uexecutor.v1.UniversalAccountId - (*UniversalPayload)(nil), // 14: uexecutor.v1.UniversalPayload - (*Inbound)(nil), // 15: uexecutor.v1.Inbound + (*MsgVoteOutbound)(nil), // 10: uexecutor.v1.MsgVoteOutbound + (*MsgVoteOutboundResponse)(nil), // 11: uexecutor.v1.MsgVoteOutboundResponse + (*MsgVoteGasPrice)(nil), // 12: uexecutor.v1.MsgVoteGasPrice + (*MsgVoteGasPriceResponse)(nil), // 13: uexecutor.v1.MsgVoteGasPriceResponse + (*Params)(nil), // 14: uexecutor.v1.Params + (*UniversalAccountId)(nil), // 15: uexecutor.v1.UniversalAccountId + (*UniversalPayload)(nil), // 16: uexecutor.v1.UniversalPayload + (*Inbound)(nil), // 17: uexecutor.v1.Inbound + (*OutboundObservation)(nil), // 18: uexecutor.v1.OutboundObservation } var file_uexecutor_v1_tx_proto_depIdxs = []int32{ - 12, // 0: uexecutor.v1.MsgUpdateParams.params:type_name -> uexecutor.v1.Params - 13, // 1: uexecutor.v1.MsgDeployUEA.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 13, // 2: uexecutor.v1.MsgMintPC.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 13, // 3: uexecutor.v1.MsgExecutePayload.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 14, // 4: uexecutor.v1.MsgExecutePayload.universal_payload:type_name -> uexecutor.v1.UniversalPayload - 15, // 5: uexecutor.v1.MsgVoteInbound.inbound:type_name -> uexecutor.v1.Inbound - 0, // 6: uexecutor.v1.Msg.UpdateParams:input_type -> uexecutor.v1.MsgUpdateParams - 2, // 7: uexecutor.v1.Msg.DeployUEA:input_type -> uexecutor.v1.MsgDeployUEA - 4, // 8: uexecutor.v1.Msg.MintPC:input_type -> uexecutor.v1.MsgMintPC - 6, // 9: uexecutor.v1.Msg.ExecutePayload:input_type -> uexecutor.v1.MsgExecutePayload - 8, // 10: uexecutor.v1.Msg.VoteInbound:input_type -> uexecutor.v1.MsgVoteInbound - 10, // 11: uexecutor.v1.Msg.VoteGasPrice:input_type -> uexecutor.v1.MsgVoteGasPrice - 1, // 12: uexecutor.v1.Msg.UpdateParams:output_type -> uexecutor.v1.MsgUpdateParamsResponse - 3, // 13: uexecutor.v1.Msg.DeployUEA:output_type -> uexecutor.v1.MsgDeployUEAResponse - 5, // 14: uexecutor.v1.Msg.MintPC:output_type -> uexecutor.v1.MsgMintPCResponse - 7, // 15: uexecutor.v1.Msg.ExecutePayload:output_type -> uexecutor.v1.MsgExecutePayloadResponse - 9, // 16: uexecutor.v1.Msg.VoteInbound:output_type -> uexecutor.v1.MsgVoteInboundResponse - 11, // 17: uexecutor.v1.Msg.VoteGasPrice:output_type -> uexecutor.v1.MsgVoteGasPriceResponse - 12, // [12:18] is the sub-list for method output_type - 6, // [6:12] 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 + 14, // 0: uexecutor.v1.MsgUpdateParams.params:type_name -> uexecutor.v1.Params + 15, // 1: uexecutor.v1.MsgDeployUEA.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId + 15, // 2: uexecutor.v1.MsgMintPC.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId + 15, // 3: uexecutor.v1.MsgExecutePayload.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId + 16, // 4: uexecutor.v1.MsgExecutePayload.universal_payload:type_name -> uexecutor.v1.UniversalPayload + 17, // 5: uexecutor.v1.MsgVoteInbound.inbound:type_name -> uexecutor.v1.Inbound + 18, // 6: uexecutor.v1.MsgVoteOutbound.observed_tx:type_name -> uexecutor.v1.OutboundObservation + 0, // 7: uexecutor.v1.Msg.UpdateParams:input_type -> uexecutor.v1.MsgUpdateParams + 2, // 8: uexecutor.v1.Msg.DeployUEA:input_type -> uexecutor.v1.MsgDeployUEA + 4, // 9: uexecutor.v1.Msg.MintPC:input_type -> uexecutor.v1.MsgMintPC + 6, // 10: uexecutor.v1.Msg.ExecutePayload:input_type -> uexecutor.v1.MsgExecutePayload + 8, // 11: uexecutor.v1.Msg.VoteInbound:input_type -> uexecutor.v1.MsgVoteInbound + 10, // 12: uexecutor.v1.Msg.VoteOutbound:input_type -> uexecutor.v1.MsgVoteOutbound + 12, // 13: uexecutor.v1.Msg.VoteGasPrice:input_type -> uexecutor.v1.MsgVoteGasPrice + 1, // 14: uexecutor.v1.Msg.UpdateParams:output_type -> uexecutor.v1.MsgUpdateParamsResponse + 3, // 15: uexecutor.v1.Msg.DeployUEA:output_type -> uexecutor.v1.MsgDeployUEAResponse + 5, // 16: uexecutor.v1.Msg.MintPC:output_type -> uexecutor.v1.MsgMintPCResponse + 7, // 17: uexecutor.v1.Msg.ExecutePayload:output_type -> uexecutor.v1.MsgExecutePayloadResponse + 9, // 18: uexecutor.v1.Msg.VoteInbound:output_type -> uexecutor.v1.MsgVoteInboundResponse + 11, // 19: uexecutor.v1.Msg.VoteOutbound:output_type -> uexecutor.v1.MsgVoteOutboundResponse + 13, // 20: uexecutor.v1.Msg.VoteGasPrice:output_type -> uexecutor.v1.MsgVoteGasPriceResponse + 14, // [14:21] is the sub-list for method output_type + 7, // [7:14] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_uexecutor_v1_tx_proto_init() } @@ -6417,7 +7515,7 @@ func file_uexecutor_v1_tx_proto_init() { } } file_uexecutor_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteGasPrice); i { + switch v := v.(*MsgVoteOutbound); i { case 0: return &v.state case 1: @@ -6429,6 +7527,30 @@ func file_uexecutor_v1_tx_proto_init() { } } file_uexecutor_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteOutboundResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uexecutor_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteGasPrice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uexecutor_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgVoteGasPriceResponse); i { case 0: return &v.state @@ -6447,7 +7569,7 @@ func file_uexecutor_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uexecutor_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/api/uexecutor/v1/tx_grpc.pb.go b/api/uexecutor/v1/tx_grpc.pb.go index f5c3f94c..d5f4108d 100644 --- a/api/uexecutor/v1/tx_grpc.pb.go +++ b/api/uexecutor/v1/tx_grpc.pb.go @@ -24,6 +24,7 @@ const ( Msg_MintPC_FullMethodName = "/uexecutor.v1.Msg/MintPC" Msg_ExecutePayload_FullMethodName = "/uexecutor.v1.Msg/ExecutePayload" Msg_VoteInbound_FullMethodName = "/uexecutor.v1.Msg/VoteInbound" + Msg_VoteOutbound_FullMethodName = "/uexecutor.v1.Msg/VoteOutbound" Msg_VoteGasPrice_FullMethodName = "/uexecutor.v1.Msg/VoteGasPrice" ) @@ -43,6 +44,8 @@ type MsgClient interface { ExecutePayload(ctx context.Context, in *MsgExecutePayload, opts ...grpc.CallOption) (*MsgExecutePayloadResponse, error) // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC VoteInbound(ctx context.Context, in *MsgVoteInbound, opts ...grpc.CallOption) (*MsgVoteInboundResponse, error) + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + VoteOutbound(ctx context.Context, in *MsgVoteOutbound, opts ...grpc.CallOption) (*MsgVoteOutboundResponse, error) // VoteGasPrice defines a message for universal validators to vote on the gas price VoteGasPrice(ctx context.Context, in *MsgVoteGasPrice, opts ...grpc.CallOption) (*MsgVoteGasPriceResponse, error) } @@ -100,6 +103,15 @@ func (c *msgClient) VoteInbound(ctx context.Context, in *MsgVoteInbound, opts .. return out, nil } +func (c *msgClient) VoteOutbound(ctx context.Context, in *MsgVoteOutbound, opts ...grpc.CallOption) (*MsgVoteOutboundResponse, error) { + out := new(MsgVoteOutboundResponse) + err := c.cc.Invoke(ctx, Msg_VoteOutbound_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) VoteGasPrice(ctx context.Context, in *MsgVoteGasPrice, opts ...grpc.CallOption) (*MsgVoteGasPriceResponse, error) { out := new(MsgVoteGasPriceResponse) err := c.cc.Invoke(ctx, Msg_VoteGasPrice_FullMethodName, in, out, opts...) @@ -125,6 +137,8 @@ type MsgServer interface { ExecutePayload(context.Context, *MsgExecutePayload) (*MsgExecutePayloadResponse, error) // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC VoteInbound(context.Context, *MsgVoteInbound) (*MsgVoteInboundResponse, error) + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + VoteOutbound(context.Context, *MsgVoteOutbound) (*MsgVoteOutboundResponse, error) // VoteGasPrice defines a message for universal validators to vote on the gas price VoteGasPrice(context.Context, *MsgVoteGasPrice) (*MsgVoteGasPriceResponse, error) mustEmbedUnimplementedMsgServer() @@ -149,6 +163,9 @@ func (UnimplementedMsgServer) ExecutePayload(context.Context, *MsgExecutePayload func (UnimplementedMsgServer) VoteInbound(context.Context, *MsgVoteInbound) (*MsgVoteInboundResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteInbound not implemented") } +func (UnimplementedMsgServer) VoteOutbound(context.Context, *MsgVoteOutbound) (*MsgVoteOutboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteOutbound not implemented") +} func (UnimplementedMsgServer) VoteGasPrice(context.Context, *MsgVoteGasPrice) (*MsgVoteGasPriceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteGasPrice not implemented") } @@ -255,6 +272,24 @@ func _Msg_VoteInbound_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Msg_VoteOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteOutbound) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteOutbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_VoteOutbound_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteOutbound(ctx, req.(*MsgVoteOutbound)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_VoteGasPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgVoteGasPrice) if err := dec(in); err != nil { @@ -300,6 +335,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "VoteInbound", Handler: _Msg_VoteInbound_Handler, }, + { + MethodName: "VoteOutbound", + Handler: _Msg_VoteOutbound_Handler, + }, { MethodName: "VoteGasPrice", Handler: _Msg_VoteGasPrice_Handler, diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index 7e4b9fef..ad12299d 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -1889,25 +1889,43 @@ func (x *fastReflection_UniversalAccountId) ProtoMethods() *protoiface.Methods { } var ( - md_InboundStatus protoreflect.MessageDescriptor - fd_InboundStatus_status protoreflect.FieldDescriptor + md_Inbound protoreflect.MessageDescriptor + fd_Inbound_source_chain protoreflect.FieldDescriptor + fd_Inbound_tx_hash protoreflect.FieldDescriptor + fd_Inbound_sender protoreflect.FieldDescriptor + fd_Inbound_recipient protoreflect.FieldDescriptor + fd_Inbound_amount protoreflect.FieldDescriptor + fd_Inbound_asset_addr protoreflect.FieldDescriptor + fd_Inbound_log_index protoreflect.FieldDescriptor + fd_Inbound_tx_type protoreflect.FieldDescriptor + fd_Inbound_universal_payload protoreflect.FieldDescriptor + fd_Inbound_verification_data protoreflect.FieldDescriptor ) func init() { file_uexecutor_v1_types_proto_init() - md_InboundStatus = File_uexecutor_v1_types_proto.Messages().ByName("InboundStatus") - fd_InboundStatus_status = md_InboundStatus.Fields().ByName("status") + md_Inbound = File_uexecutor_v1_types_proto.Messages().ByName("Inbound") + fd_Inbound_source_chain = md_Inbound.Fields().ByName("source_chain") + fd_Inbound_tx_hash = md_Inbound.Fields().ByName("tx_hash") + fd_Inbound_sender = md_Inbound.Fields().ByName("sender") + fd_Inbound_recipient = md_Inbound.Fields().ByName("recipient") + fd_Inbound_amount = md_Inbound.Fields().ByName("amount") + fd_Inbound_asset_addr = md_Inbound.Fields().ByName("asset_addr") + fd_Inbound_log_index = md_Inbound.Fields().ByName("log_index") + fd_Inbound_tx_type = md_Inbound.Fields().ByName("tx_type") + fd_Inbound_universal_payload = md_Inbound.Fields().ByName("universal_payload") + fd_Inbound_verification_data = md_Inbound.Fields().ByName("verification_data") } -var _ protoreflect.Message = (*fastReflection_InboundStatus)(nil) +var _ protoreflect.Message = (*fastReflection_Inbound)(nil) -type fastReflection_InboundStatus InboundStatus +type fastReflection_Inbound Inbound -func (x *InboundStatus) ProtoReflect() protoreflect.Message { - return (*fastReflection_InboundStatus)(x) +func (x *Inbound) ProtoReflect() protoreflect.Message { + return (*fastReflection_Inbound)(x) } -func (x *InboundStatus) slowProtoReflect() protoreflect.Message { +func (x *Inbound) slowProtoReflect() protoreflect.Message { mi := &file_uexecutor_v1_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1919,43 +1937,43 @@ func (x *InboundStatus) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_InboundStatus_messageType fastReflection_InboundStatus_messageType -var _ protoreflect.MessageType = fastReflection_InboundStatus_messageType{} +var _fastReflection_Inbound_messageType fastReflection_Inbound_messageType +var _ protoreflect.MessageType = fastReflection_Inbound_messageType{} -type fastReflection_InboundStatus_messageType struct{} +type fastReflection_Inbound_messageType struct{} -func (x fastReflection_InboundStatus_messageType) Zero() protoreflect.Message { - return (*fastReflection_InboundStatus)(nil) +func (x fastReflection_Inbound_messageType) Zero() protoreflect.Message { + return (*fastReflection_Inbound)(nil) } -func (x fastReflection_InboundStatus_messageType) New() protoreflect.Message { - return new(fastReflection_InboundStatus) +func (x fastReflection_Inbound_messageType) New() protoreflect.Message { + return new(fastReflection_Inbound) } -func (x fastReflection_InboundStatus_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_InboundStatus +func (x fastReflection_Inbound_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Inbound } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_InboundStatus) Descriptor() protoreflect.MessageDescriptor { - return md_InboundStatus +func (x *fastReflection_Inbound) Descriptor() protoreflect.MessageDescriptor { + return md_Inbound } // 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_InboundStatus) Type() protoreflect.MessageType { - return _fastReflection_InboundStatus_messageType +func (x *fastReflection_Inbound) Type() protoreflect.MessageType { + return _fastReflection_Inbound_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_InboundStatus) New() protoreflect.Message { - return new(fastReflection_InboundStatus) +func (x *fastReflection_Inbound) New() protoreflect.Message { + return new(fastReflection_Inbound) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_InboundStatus) Interface() protoreflect.ProtoMessage { - return (*InboundStatus)(x) +func (x *fastReflection_Inbound) Interface() protoreflect.ProtoMessage { + return (*Inbound)(x) } // Range iterates over every populated field in an undefined order, @@ -1963,10 +1981,64 @@ func (x *fastReflection_InboundStatus) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_InboundStatus) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_InboundStatus_status, value) { +func (x *fastReflection_Inbound) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_Inbound_source_chain, value) { + return + } + } + if x.TxHash != "" { + value := protoreflect.ValueOfString(x.TxHash) + if !f(fd_Inbound_tx_hash, value) { + return + } + } + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_Inbound_sender, value) { + return + } + } + if x.Recipient != "" { + value := protoreflect.ValueOfString(x.Recipient) + if !f(fd_Inbound_recipient, value) { + return + } + } + if x.Amount != "" { + value := protoreflect.ValueOfString(x.Amount) + if !f(fd_Inbound_amount, value) { + return + } + } + if x.AssetAddr != "" { + value := protoreflect.ValueOfString(x.AssetAddr) + if !f(fd_Inbound_asset_addr, value) { + return + } + } + if x.LogIndex != "" { + value := protoreflect.ValueOfString(x.LogIndex) + if !f(fd_Inbound_log_index, value) { + return + } + } + if x.TxType != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.TxType)) + if !f(fd_Inbound_tx_type, value) { + return + } + } + if x.UniversalPayload != nil { + value := protoreflect.ValueOfMessage(x.UniversalPayload.ProtoReflect()) + if !f(fd_Inbound_universal_payload, value) { + return + } + } + if x.VerificationData != "" { + value := protoreflect.ValueOfString(x.VerificationData) + if !f(fd_Inbound_verification_data, value) { return } } @@ -1983,15 +2055,33 @@ func (x *fastReflection_InboundStatus) Range(f func(protoreflect.FieldDescriptor // 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_InboundStatus) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Inbound) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": - return x.Status != 0 + case "uexecutor.v1.Inbound.source_chain": + return x.SourceChain != "" + case "uexecutor.v1.Inbound.tx_hash": + return x.TxHash != "" + case "uexecutor.v1.Inbound.sender": + return x.Sender != "" + case "uexecutor.v1.Inbound.recipient": + return x.Recipient != "" + case "uexecutor.v1.Inbound.amount": + return x.Amount != "" + case "uexecutor.v1.Inbound.asset_addr": + return x.AssetAddr != "" + case "uexecutor.v1.Inbound.log_index": + return x.LogIndex != "" + case "uexecutor.v1.Inbound.tx_type": + return x.TxType != 0 + case "uexecutor.v1.Inbound.universal_payload": + return x.UniversalPayload != nil + case "uexecutor.v1.Inbound.verification_data": + return x.VerificationData != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", fd.FullName())) } } @@ -2001,15 +2091,33 @@ func (x *fastReflection_InboundStatus) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_InboundStatus) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Inbound) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": - x.Status = 0 + case "uexecutor.v1.Inbound.source_chain": + x.SourceChain = "" + case "uexecutor.v1.Inbound.tx_hash": + x.TxHash = "" + case "uexecutor.v1.Inbound.sender": + x.Sender = "" + case "uexecutor.v1.Inbound.recipient": + x.Recipient = "" + case "uexecutor.v1.Inbound.amount": + x.Amount = "" + case "uexecutor.v1.Inbound.asset_addr": + x.AssetAddr = "" + case "uexecutor.v1.Inbound.log_index": + x.LogIndex = "" + case "uexecutor.v1.Inbound.tx_type": + x.TxType = 0 + case "uexecutor.v1.Inbound.universal_payload": + x.UniversalPayload = nil + case "uexecutor.v1.Inbound.verification_data": + x.VerificationData = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", fd.FullName())) } } @@ -2019,16 +2127,43 @@ func (x *fastReflection_InboundStatus) Clear(fd protoreflect.FieldDescriptor) { // 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_InboundStatus) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Inbound) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uexecutor.v1.InboundStatus.status": - value := x.Status + case "uexecutor.v1.Inbound.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "uexecutor.v1.Inbound.tx_hash": + value := x.TxHash + return protoreflect.ValueOfString(value) + case "uexecutor.v1.Inbound.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "uexecutor.v1.Inbound.recipient": + value := x.Recipient + return protoreflect.ValueOfString(value) + case "uexecutor.v1.Inbound.amount": + value := x.Amount + return protoreflect.ValueOfString(value) + case "uexecutor.v1.Inbound.asset_addr": + value := x.AssetAddr + return protoreflect.ValueOfString(value) + case "uexecutor.v1.Inbound.log_index": + value := x.LogIndex + return protoreflect.ValueOfString(value) + case "uexecutor.v1.Inbound.tx_type": + value := x.TxType return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uexecutor.v1.Inbound.universal_payload": + value := x.UniversalPayload + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "uexecutor.v1.Inbound.verification_data": + value := x.VerificationData + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", descriptor.FullName())) } } @@ -2042,15 +2177,33 @@ func (x *fastReflection_InboundStatus) Get(descriptor protoreflect.FieldDescript // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_InboundStatus) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Inbound) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": - x.Status = (Status)(value.Enum()) + case "uexecutor.v1.Inbound.source_chain": + x.SourceChain = value.Interface().(string) + case "uexecutor.v1.Inbound.tx_hash": + x.TxHash = value.Interface().(string) + case "uexecutor.v1.Inbound.sender": + x.Sender = value.Interface().(string) + case "uexecutor.v1.Inbound.recipient": + x.Recipient = value.Interface().(string) + case "uexecutor.v1.Inbound.amount": + x.Amount = value.Interface().(string) + case "uexecutor.v1.Inbound.asset_addr": + x.AssetAddr = value.Interface().(string) + case "uexecutor.v1.Inbound.log_index": + x.LogIndex = value.Interface().(string) + case "uexecutor.v1.Inbound.tx_type": + x.TxType = (TxType)(value.Enum()) + case "uexecutor.v1.Inbound.universal_payload": + x.UniversalPayload = value.Message().Interface().(*UniversalPayload) + case "uexecutor.v1.Inbound.verification_data": + x.VerificationData = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", fd.FullName())) } } @@ -2064,40 +2217,80 @@ func (x *fastReflection_InboundStatus) Set(fd protoreflect.FieldDescriptor, valu // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_InboundStatus) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Inbound) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": - panic(fmt.Errorf("field status of message uexecutor.v1.InboundStatus is not mutable")) + case "uexecutor.v1.Inbound.universal_payload": + if x.UniversalPayload == nil { + x.UniversalPayload = new(UniversalPayload) + } + return protoreflect.ValueOfMessage(x.UniversalPayload.ProtoReflect()) + case "uexecutor.v1.Inbound.source_chain": + panic(fmt.Errorf("field source_chain of message uexecutor.v1.Inbound is not mutable")) + case "uexecutor.v1.Inbound.tx_hash": + panic(fmt.Errorf("field tx_hash of message uexecutor.v1.Inbound is not mutable")) + case "uexecutor.v1.Inbound.sender": + panic(fmt.Errorf("field sender of message uexecutor.v1.Inbound is not mutable")) + case "uexecutor.v1.Inbound.recipient": + panic(fmt.Errorf("field recipient of message uexecutor.v1.Inbound is not mutable")) + case "uexecutor.v1.Inbound.amount": + panic(fmt.Errorf("field amount of message uexecutor.v1.Inbound is not mutable")) + case "uexecutor.v1.Inbound.asset_addr": + panic(fmt.Errorf("field asset_addr of message uexecutor.v1.Inbound is not mutable")) + case "uexecutor.v1.Inbound.log_index": + panic(fmt.Errorf("field log_index of message uexecutor.v1.Inbound is not mutable")) + case "uexecutor.v1.Inbound.tx_type": + panic(fmt.Errorf("field tx_type of message uexecutor.v1.Inbound is not mutable")) + case "uexecutor.v1.Inbound.verification_data": + panic(fmt.Errorf("field verification_data of message uexecutor.v1.Inbound is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Inbound 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_InboundStatus) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Inbound) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": + case "uexecutor.v1.Inbound.source_chain": + return protoreflect.ValueOfString("") + case "uexecutor.v1.Inbound.tx_hash": + return protoreflect.ValueOfString("") + case "uexecutor.v1.Inbound.sender": + return protoreflect.ValueOfString("") + case "uexecutor.v1.Inbound.recipient": + return protoreflect.ValueOfString("") + case "uexecutor.v1.Inbound.amount": + return protoreflect.ValueOfString("") + case "uexecutor.v1.Inbound.asset_addr": + return protoreflect.ValueOfString("") + case "uexecutor.v1.Inbound.log_index": + return protoreflect.ValueOfString("") + case "uexecutor.v1.Inbound.tx_type": return protoreflect.ValueOfEnum(0) + case "uexecutor.v1.Inbound.universal_payload": + m := new(UniversalPayload) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "uexecutor.v1.Inbound.verification_data": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Inbound 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_InboundStatus) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Inbound) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.InboundStatus", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.Inbound", d.FullName())) } panic("unreachable") } @@ -2105,7 +2298,7 @@ func (x *fastReflection_InboundStatus) WhichOneof(d protoreflect.OneofDescriptor // 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_InboundStatus) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Inbound) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2116,7 +2309,7 @@ func (x *fastReflection_InboundStatus) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_InboundStatus) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Inbound) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2128,7 +2321,7 @@ func (x *fastReflection_InboundStatus) SetUnknown(fields protoreflect.RawFields) // 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_InboundStatus) IsValid() bool { +func (x *fastReflection_Inbound) IsValid() bool { return x != nil } @@ -2138,9 +2331,9 @@ func (x *fastReflection_InboundStatus) 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_InboundStatus) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*InboundStatus) + x := input.Message.Interface().(*Inbound) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2152,8 +2345,44 @@ func (x *fastReflection_InboundStatus) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.TxHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Recipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Amount) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AssetAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.LogIndex) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TxType != 0 { + n += 1 + runtime.Sov(uint64(x.TxType)) + } + if x.UniversalPayload != nil { + l = options.Size(x.UniversalPayload) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.VerificationData) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -2165,7 +2394,7 @@ func (x *fastReflection_InboundStatus) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*InboundStatus) + x := input.Message.Interface().(*Inbound) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2184,10 +2413,80 @@ func (x *fastReflection_InboundStatus) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) + if len(x.VerificationData) > 0 { + i -= len(x.VerificationData) + copy(dAtA[i:], x.VerificationData) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VerificationData))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x52 + } + if x.UniversalPayload != nil { + encoded, err := options.Marshal(x.UniversalPayload) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + if x.TxType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TxType)) + i-- + dAtA[i] = 0x40 + } + if len(x.LogIndex) > 0 { + i -= len(x.LogIndex) + copy(dAtA[i:], x.LogIndex) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LogIndex))) + i-- + dAtA[i] = 0x3a + } + if len(x.AssetAddr) > 0 { + i -= len(x.AssetAddr) + copy(dAtA[i:], x.AssetAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetAddr))) + i-- + dAtA[i] = 0x32 + } + if len(x.Amount) > 0 { + i -= len(x.Amount) + copy(dAtA[i:], x.Amount) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) + i-- + dAtA[i] = 0x2a + } + if len(x.Recipient) > 0 { + i -= len(x.Recipient) + copy(dAtA[i:], x.Recipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) + i-- + dAtA[i] = 0x22 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0x1a + } + if len(x.TxHash) > 0 { + i -= len(x.TxHash) + copy(dAtA[i:], x.TxHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) + i-- + dAtA[i] = 0x12 + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -2200,7 +2499,7 @@ func (x *fastReflection_InboundStatus) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*InboundStatus) + x := input.Message.Interface().(*Inbound) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2232,17 +2531,17 @@ func (x *fastReflection_InboundStatus) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InboundStatus: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Inbound: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InboundStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Inbound: 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) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) } - x.Status = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2252,197 +2551,1141 @@ func (x *fastReflection_InboundStatus) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Status |= Status(b&0x7F) << shift + stringLen |= 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 + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - if (iNdEx + skippy) > l { + if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + x.SourceChain = 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 TxHash", wireType) } - 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_Inbound protoreflect.MessageDescriptor - fd_Inbound_source_chain protoreflect.FieldDescriptor - fd_Inbound_tx_hash protoreflect.FieldDescriptor - fd_Inbound_sender protoreflect.FieldDescriptor - fd_Inbound_recipient protoreflect.FieldDescriptor - fd_Inbound_amount protoreflect.FieldDescriptor - fd_Inbound_asset_addr protoreflect.FieldDescriptor - fd_Inbound_log_index protoreflect.FieldDescriptor - fd_Inbound_tx_type protoreflect.FieldDescriptor - fd_Inbound_universal_payload protoreflect.FieldDescriptor - fd_Inbound_verification_data protoreflect.FieldDescriptor -) - -func init() { - file_uexecutor_v1_types_proto_init() - md_Inbound = File_uexecutor_v1_types_proto.Messages().ByName("Inbound") - fd_Inbound_source_chain = md_Inbound.Fields().ByName("source_chain") - fd_Inbound_tx_hash = md_Inbound.Fields().ByName("tx_hash") - fd_Inbound_sender = md_Inbound.Fields().ByName("sender") - fd_Inbound_recipient = md_Inbound.Fields().ByName("recipient") - fd_Inbound_amount = md_Inbound.Fields().ByName("amount") - fd_Inbound_asset_addr = md_Inbound.Fields().ByName("asset_addr") - fd_Inbound_log_index = md_Inbound.Fields().ByName("log_index") - fd_Inbound_tx_type = md_Inbound.Fields().ByName("tx_type") - fd_Inbound_universal_payload = md_Inbound.Fields().ByName("universal_payload") - fd_Inbound_verification_data = md_Inbound.Fields().ByName("verification_data") -} - -var _ protoreflect.Message = (*fastReflection_Inbound)(nil) - -type fastReflection_Inbound Inbound - -func (x *Inbound) ProtoReflect() protoreflect.Message { - return (*fastReflection_Inbound)(x) -} - -func (x *Inbound) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_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_Inbound_messageType fastReflection_Inbound_messageType -var _ protoreflect.MessageType = fastReflection_Inbound_messageType{} - -type fastReflection_Inbound_messageType struct{} - -func (x fastReflection_Inbound_messageType) Zero() protoreflect.Message { - return (*fastReflection_Inbound)(nil) -} -func (x fastReflection_Inbound_messageType) New() protoreflect.Message { - return new(fastReflection_Inbound) -} -func (x fastReflection_Inbound_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Inbound -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Inbound) Descriptor() protoreflect.MessageDescriptor { - return md_Inbound -} - -// 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_Inbound) Type() protoreflect.MessageType { - return _fastReflection_Inbound_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Inbound) New() protoreflect.Message { - return new(fastReflection_Inbound) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Inbound) Interface() protoreflect.ProtoMessage { - return (*Inbound)(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. + 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.TxHash = 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 Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", 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.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", 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.AssetAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LogIndex", 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.LogIndex = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) + } + x.TxType = 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.TxType |= TxType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UniversalPayload", 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.UniversalPayload == nil { + x.UniversalPayload = &UniversalPayload{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UniversalPayload); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationData", 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.VerificationData = 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_PCTx protoreflect.MessageDescriptor + fd_PCTx_tx_hash protoreflect.FieldDescriptor + fd_PCTx_sender protoreflect.FieldDescriptor + fd_PCTx_gas_used protoreflect.FieldDescriptor + fd_PCTx_block_height protoreflect.FieldDescriptor + fd_PCTx_status protoreflect.FieldDescriptor + fd_PCTx_error_msg protoreflect.FieldDescriptor +) + +func init() { + file_uexecutor_v1_types_proto_init() + md_PCTx = File_uexecutor_v1_types_proto.Messages().ByName("PCTx") + fd_PCTx_tx_hash = md_PCTx.Fields().ByName("tx_hash") + fd_PCTx_sender = md_PCTx.Fields().ByName("sender") + fd_PCTx_gas_used = md_PCTx.Fields().ByName("gas_used") + fd_PCTx_block_height = md_PCTx.Fields().ByName("block_height") + fd_PCTx_status = md_PCTx.Fields().ByName("status") + fd_PCTx_error_msg = md_PCTx.Fields().ByName("error_msg") +} + +var _ protoreflect.Message = (*fastReflection_PCTx)(nil) + +type fastReflection_PCTx PCTx + +func (x *PCTx) ProtoReflect() protoreflect.Message { + return (*fastReflection_PCTx)(x) +} + +func (x *PCTx) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_types_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_PCTx_messageType fastReflection_PCTx_messageType +var _ protoreflect.MessageType = fastReflection_PCTx_messageType{} + +type fastReflection_PCTx_messageType struct{} + +func (x fastReflection_PCTx_messageType) Zero() protoreflect.Message { + return (*fastReflection_PCTx)(nil) +} +func (x fastReflection_PCTx_messageType) New() protoreflect.Message { + return new(fastReflection_PCTx) +} +func (x fastReflection_PCTx_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PCTx +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_PCTx) Descriptor() protoreflect.MessageDescriptor { + return md_PCTx +} + +// 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_PCTx) Type() protoreflect.MessageType { + return _fastReflection_PCTx_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_PCTx) New() protoreflect.Message { + return new(fastReflection_PCTx) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_PCTx) Interface() protoreflect.ProtoMessage { + return (*PCTx)(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_Inbound) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SourceChain != "" { - value := protoreflect.ValueOfString(x.SourceChain) - if !f(fd_Inbound_source_chain, value) { +func (x *fastReflection_PCTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TxHash != "" { + value := protoreflect.ValueOfString(x.TxHash) + if !f(fd_PCTx_tx_hash, value) { + return + } + } + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_PCTx_sender, value) { + return + } + } + if x.GasUsed != uint64(0) { + value := protoreflect.ValueOfUint64(x.GasUsed) + if !f(fd_PCTx_gas_used, value) { + return + } + } + if x.BlockHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.BlockHeight) + if !f(fd_PCTx_block_height, value) { + return + } + } + if x.Status != "" { + value := protoreflect.ValueOfString(x.Status) + if !f(fd_PCTx_status, value) { + return + } + } + if x.ErrorMsg != "" { + value := protoreflect.ValueOfString(x.ErrorMsg) + if !f(fd_PCTx_error_msg, value) { return } } - if x.TxHash != "" { - value := protoreflect.ValueOfString(x.TxHash) - if !f(fd_Inbound_tx_hash, 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_PCTx) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uexecutor.v1.PCTx.tx_hash": + return x.TxHash != "" + case "uexecutor.v1.PCTx.sender": + return x.Sender != "" + case "uexecutor.v1.PCTx.gas_used": + return x.GasUsed != uint64(0) + case "uexecutor.v1.PCTx.block_height": + return x.BlockHeight != uint64(0) + case "uexecutor.v1.PCTx.status": + return x.Status != "" + case "uexecutor.v1.PCTx.error_msg": + return x.ErrorMsg != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + } + panic(fmt.Errorf("message uexecutor.v1.PCTx 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_PCTx) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uexecutor.v1.PCTx.tx_hash": + x.TxHash = "" + case "uexecutor.v1.PCTx.sender": + x.Sender = "" + case "uexecutor.v1.PCTx.gas_used": + x.GasUsed = uint64(0) + case "uexecutor.v1.PCTx.block_height": + x.BlockHeight = uint64(0) + case "uexecutor.v1.PCTx.status": + x.Status = "" + case "uexecutor.v1.PCTx.error_msg": + x.ErrorMsg = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + } + panic(fmt.Errorf("message uexecutor.v1.PCTx 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_PCTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uexecutor.v1.PCTx.tx_hash": + value := x.TxHash + return protoreflect.ValueOfString(value) + case "uexecutor.v1.PCTx.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "uexecutor.v1.PCTx.gas_used": + value := x.GasUsed + return protoreflect.ValueOfUint64(value) + case "uexecutor.v1.PCTx.block_height": + value := x.BlockHeight + return protoreflect.ValueOfUint64(value) + case "uexecutor.v1.PCTx.status": + value := x.Status + return protoreflect.ValueOfString(value) + case "uexecutor.v1.PCTx.error_msg": + value := x.ErrorMsg + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + } + panic(fmt.Errorf("message uexecutor.v1.PCTx 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_PCTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uexecutor.v1.PCTx.tx_hash": + x.TxHash = value.Interface().(string) + case "uexecutor.v1.PCTx.sender": + x.Sender = value.Interface().(string) + case "uexecutor.v1.PCTx.gas_used": + x.GasUsed = value.Uint() + case "uexecutor.v1.PCTx.block_height": + x.BlockHeight = value.Uint() + case "uexecutor.v1.PCTx.status": + x.Status = value.Interface().(string) + case "uexecutor.v1.PCTx.error_msg": + x.ErrorMsg = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + } + panic(fmt.Errorf("message uexecutor.v1.PCTx 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_PCTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.PCTx.tx_hash": + panic(fmt.Errorf("field tx_hash of message uexecutor.v1.PCTx is not mutable")) + case "uexecutor.v1.PCTx.sender": + panic(fmt.Errorf("field sender of message uexecutor.v1.PCTx is not mutable")) + case "uexecutor.v1.PCTx.gas_used": + panic(fmt.Errorf("field gas_used of message uexecutor.v1.PCTx is not mutable")) + case "uexecutor.v1.PCTx.block_height": + panic(fmt.Errorf("field block_height of message uexecutor.v1.PCTx is not mutable")) + case "uexecutor.v1.PCTx.status": + panic(fmt.Errorf("field status of message uexecutor.v1.PCTx is not mutable")) + case "uexecutor.v1.PCTx.error_msg": + panic(fmt.Errorf("field error_msg of message uexecutor.v1.PCTx is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + } + panic(fmt.Errorf("message uexecutor.v1.PCTx 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_PCTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.PCTx.tx_hash": + return protoreflect.ValueOfString("") + case "uexecutor.v1.PCTx.sender": + return protoreflect.ValueOfString("") + case "uexecutor.v1.PCTx.gas_used": + return protoreflect.ValueOfUint64(uint64(0)) + case "uexecutor.v1.PCTx.block_height": + return protoreflect.ValueOfUint64(uint64(0)) + case "uexecutor.v1.PCTx.status": + return protoreflect.ValueOfString("") + case "uexecutor.v1.PCTx.error_msg": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + } + panic(fmt.Errorf("message uexecutor.v1.PCTx 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_PCTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.PCTx", 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_PCTx) 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_PCTx) 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_PCTx) 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_PCTx) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*PCTx) + 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.TxHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.GasUsed != 0 { + n += 1 + runtime.Sov(uint64(x.GasUsed)) + } + if x.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) + } + l = len(x.Status) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ErrorMsg) + 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, } } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_Inbound_sender, value) { - return + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*PCTx) + 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.ErrorMsg) > 0 { + i -= len(x.ErrorMsg) + copy(dAtA[i:], x.ErrorMsg) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ErrorMsg))) + i-- + dAtA[i] = 0x3a + } + if len(x.Status) > 0 { + i -= len(x.Status) + copy(dAtA[i:], x.Status) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Status))) + i-- + dAtA[i] = 0x32 + } + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) + i-- + dAtA[i] = 0x20 + } + if x.GasUsed != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GasUsed)) + i-- + dAtA[i] = 0x18 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0x12 + } + if len(x.TxHash) > 0 { + i -= len(x.TxHash) + copy(dAtA[i:], x.TxHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) + 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 } - if x.Recipient != "" { - value := protoreflect.ValueOfString(x.Recipient) - if !f(fd_Inbound_recipient, value) { - return + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*PCTx) + 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: PCTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PCTx: 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 TxHash", 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.TxHash = 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 Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + x.GasUsed = 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.GasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ErrorMsg", 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.ErrorMsg = 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 x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_Inbound_amount, value) { - return + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } - if x.AssetAddr != "" { - value := protoreflect.ValueOfString(x.AssetAddr) - if !f(fd_Inbound_asset_addr, value) { - return - } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, } - if x.LogIndex != "" { - value := protoreflect.ValueOfString(x.LogIndex) - if !f(fd_Inbound_log_index, value) { - return +} + +var ( + md_OutboundObservation protoreflect.MessageDescriptor + fd_OutboundObservation_success protoreflect.FieldDescriptor + fd_OutboundObservation_block_height protoreflect.FieldDescriptor + fd_OutboundObservation_tx_hash protoreflect.FieldDescriptor +) + +func init() { + file_uexecutor_v1_types_proto_init() + md_OutboundObservation = File_uexecutor_v1_types_proto.Messages().ByName("OutboundObservation") + fd_OutboundObservation_success = md_OutboundObservation.Fields().ByName("success") + fd_OutboundObservation_block_height = md_OutboundObservation.Fields().ByName("block_height") + fd_OutboundObservation_tx_hash = md_OutboundObservation.Fields().ByName("tx_hash") +} + +var _ protoreflect.Message = (*fastReflection_OutboundObservation)(nil) + +type fastReflection_OutboundObservation OutboundObservation + +func (x *OutboundObservation) ProtoReflect() protoreflect.Message { + return (*fastReflection_OutboundObservation)(x) +} + +func (x *OutboundObservation) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_types_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - if x.TxType != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.TxType)) - if !f(fd_Inbound_tx_type, value) { + return mi.MessageOf(x) +} + +var _fastReflection_OutboundObservation_messageType fastReflection_OutboundObservation_messageType +var _ protoreflect.MessageType = fastReflection_OutboundObservation_messageType{} + +type fastReflection_OutboundObservation_messageType struct{} + +func (x fastReflection_OutboundObservation_messageType) Zero() protoreflect.Message { + return (*fastReflection_OutboundObservation)(nil) +} +func (x fastReflection_OutboundObservation_messageType) New() protoreflect.Message { + return new(fastReflection_OutboundObservation) +} +func (x fastReflection_OutboundObservation_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_OutboundObservation +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_OutboundObservation) Descriptor() protoreflect.MessageDescriptor { + return md_OutboundObservation +} + +// 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_OutboundObservation) Type() protoreflect.MessageType { + return _fastReflection_OutboundObservation_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_OutboundObservation) New() protoreflect.Message { + return new(fastReflection_OutboundObservation) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_OutboundObservation) Interface() protoreflect.ProtoMessage { + return (*OutboundObservation)(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_OutboundObservation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_OutboundObservation_success, value) { return } } - if x.UniversalPayload != nil { - value := protoreflect.ValueOfMessage(x.UniversalPayload.ProtoReflect()) - if !f(fd_Inbound_universal_payload, value) { + if x.BlockHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.BlockHeight) + if !f(fd_OutboundObservation_block_height, value) { return } } - if x.VerificationData != "" { - value := protoreflect.ValueOfString(x.VerificationData) - if !f(fd_Inbound_verification_data, value) { + if x.TxHash != "" { + value := protoreflect.ValueOfString(x.TxHash) + if !f(fd_OutboundObservation_tx_hash, value) { return } } @@ -2456,36 +3699,22 @@ func (x *fastReflection_Inbound) Range(f func(protoreflect.FieldDescriptor, prot // 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_Inbound) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "uexecutor.v1.Inbound.source_chain": - return x.SourceChain != "" - case "uexecutor.v1.Inbound.tx_hash": - return x.TxHash != "" - case "uexecutor.v1.Inbound.sender": - return x.Sender != "" - case "uexecutor.v1.Inbound.recipient": - return x.Recipient != "" - case "uexecutor.v1.Inbound.amount": - return x.Amount != "" - case "uexecutor.v1.Inbound.asset_addr": - return x.AssetAddr != "" - case "uexecutor.v1.Inbound.log_index": - return x.LogIndex != "" - case "uexecutor.v1.Inbound.tx_type": - return x.TxType != 0 - case "uexecutor.v1.Inbound.universal_payload": - return x.UniversalPayload != nil - case "uexecutor.v1.Inbound.verification_data": - return x.VerificationData != "" +// 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_OutboundObservation) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uexecutor.v1.OutboundObservation.success": + return x.Success != false + case "uexecutor.v1.OutboundObservation.block_height": + return x.BlockHeight != uint64(0) + case "uexecutor.v1.OutboundObservation.tx_hash": + return x.TxHash != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", fd.FullName())) } } @@ -2495,33 +3724,19 @@ func (x *fastReflection_Inbound) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Inbound) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_OutboundObservation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uexecutor.v1.Inbound.source_chain": - x.SourceChain = "" - case "uexecutor.v1.Inbound.tx_hash": + case "uexecutor.v1.OutboundObservation.success": + x.Success = false + case "uexecutor.v1.OutboundObservation.block_height": + x.BlockHeight = uint64(0) + case "uexecutor.v1.OutboundObservation.tx_hash": x.TxHash = "" - case "uexecutor.v1.Inbound.sender": - x.Sender = "" - case "uexecutor.v1.Inbound.recipient": - x.Recipient = "" - case "uexecutor.v1.Inbound.amount": - x.Amount = "" - case "uexecutor.v1.Inbound.asset_addr": - x.AssetAddr = "" - case "uexecutor.v1.Inbound.log_index": - x.LogIndex = "" - case "uexecutor.v1.Inbound.tx_type": - x.TxType = 0 - case "uexecutor.v1.Inbound.universal_payload": - x.UniversalPayload = nil - case "uexecutor.v1.Inbound.verification_data": - x.VerificationData = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", fd.FullName())) } } @@ -2531,43 +3746,22 @@ func (x *fastReflection_Inbound) Clear(fd protoreflect.FieldDescriptor) { // 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_Inbound) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OutboundObservation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uexecutor.v1.Inbound.source_chain": - value := x.SourceChain - return protoreflect.ValueOfString(value) - case "uexecutor.v1.Inbound.tx_hash": + case "uexecutor.v1.OutboundObservation.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "uexecutor.v1.OutboundObservation.block_height": + value := x.BlockHeight + return protoreflect.ValueOfUint64(value) + case "uexecutor.v1.OutboundObservation.tx_hash": value := x.TxHash return protoreflect.ValueOfString(value) - case "uexecutor.v1.Inbound.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "uexecutor.v1.Inbound.recipient": - value := x.Recipient - return protoreflect.ValueOfString(value) - case "uexecutor.v1.Inbound.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "uexecutor.v1.Inbound.asset_addr": - value := x.AssetAddr - return protoreflect.ValueOfString(value) - case "uexecutor.v1.Inbound.log_index": - value := x.LogIndex - return protoreflect.ValueOfString(value) - case "uexecutor.v1.Inbound.tx_type": - value := x.TxType - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "uexecutor.v1.Inbound.universal_payload": - value := x.UniversalPayload - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "uexecutor.v1.Inbound.verification_data": - value := x.VerificationData - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", descriptor.FullName())) } } @@ -2581,33 +3775,19 @@ func (x *fastReflection_Inbound) Get(descriptor protoreflect.FieldDescriptor) pr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Inbound) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_OutboundObservation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uexecutor.v1.Inbound.source_chain": - x.SourceChain = value.Interface().(string) - case "uexecutor.v1.Inbound.tx_hash": + case "uexecutor.v1.OutboundObservation.success": + x.Success = value.Bool() + case "uexecutor.v1.OutboundObservation.block_height": + x.BlockHeight = value.Uint() + case "uexecutor.v1.OutboundObservation.tx_hash": x.TxHash = value.Interface().(string) - case "uexecutor.v1.Inbound.sender": - x.Sender = value.Interface().(string) - case "uexecutor.v1.Inbound.recipient": - x.Recipient = value.Interface().(string) - case "uexecutor.v1.Inbound.amount": - x.Amount = value.Interface().(string) - case "uexecutor.v1.Inbound.asset_addr": - x.AssetAddr = value.Interface().(string) - case "uexecutor.v1.Inbound.log_index": - x.LogIndex = value.Interface().(string) - case "uexecutor.v1.Inbound.tx_type": - x.TxType = (InboundTxType)(value.Enum()) - case "uexecutor.v1.Inbound.universal_payload": - x.UniversalPayload = value.Message().Interface().(*UniversalPayload) - case "uexecutor.v1.Inbound.verification_data": - x.VerificationData = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", fd.FullName())) } } @@ -2621,80 +3801,48 @@ func (x *fastReflection_Inbound) Set(fd protoreflect.FieldDescriptor, value prot // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Inbound) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OutboundObservation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.Inbound.universal_payload": - if x.UniversalPayload == nil { - x.UniversalPayload = new(UniversalPayload) - } - return protoreflect.ValueOfMessage(x.UniversalPayload.ProtoReflect()) - case "uexecutor.v1.Inbound.source_chain": - panic(fmt.Errorf("field source_chain of message uexecutor.v1.Inbound is not mutable")) - case "uexecutor.v1.Inbound.tx_hash": - panic(fmt.Errorf("field tx_hash of message uexecutor.v1.Inbound is not mutable")) - case "uexecutor.v1.Inbound.sender": - panic(fmt.Errorf("field sender of message uexecutor.v1.Inbound is not mutable")) - case "uexecutor.v1.Inbound.recipient": - panic(fmt.Errorf("field recipient of message uexecutor.v1.Inbound is not mutable")) - case "uexecutor.v1.Inbound.amount": - panic(fmt.Errorf("field amount of message uexecutor.v1.Inbound is not mutable")) - case "uexecutor.v1.Inbound.asset_addr": - panic(fmt.Errorf("field asset_addr of message uexecutor.v1.Inbound is not mutable")) - case "uexecutor.v1.Inbound.log_index": - panic(fmt.Errorf("field log_index of message uexecutor.v1.Inbound is not mutable")) - case "uexecutor.v1.Inbound.tx_type": - panic(fmt.Errorf("field tx_type of message uexecutor.v1.Inbound is not mutable")) - case "uexecutor.v1.Inbound.verification_data": - panic(fmt.Errorf("field verification_data of message uexecutor.v1.Inbound is not mutable")) + case "uexecutor.v1.OutboundObservation.success": + panic(fmt.Errorf("field success of message uexecutor.v1.OutboundObservation is not mutable")) + case "uexecutor.v1.OutboundObservation.block_height": + panic(fmt.Errorf("field block_height of message uexecutor.v1.OutboundObservation is not mutable")) + case "uexecutor.v1.OutboundObservation.tx_hash": + panic(fmt.Errorf("field tx_hash of message uexecutor.v1.OutboundObservation is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation 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_Inbound) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OutboundObservation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.Inbound.source_chain": - return protoreflect.ValueOfString("") - case "uexecutor.v1.Inbound.tx_hash": - return protoreflect.ValueOfString("") - case "uexecutor.v1.Inbound.sender": - return protoreflect.ValueOfString("") - case "uexecutor.v1.Inbound.recipient": - return protoreflect.ValueOfString("") - case "uexecutor.v1.Inbound.amount": - return protoreflect.ValueOfString("") - case "uexecutor.v1.Inbound.asset_addr": - return protoreflect.ValueOfString("") - case "uexecutor.v1.Inbound.log_index": - return protoreflect.ValueOfString("") - case "uexecutor.v1.Inbound.tx_type": - return protoreflect.ValueOfEnum(0) - case "uexecutor.v1.Inbound.universal_payload": - m := new(UniversalPayload) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "uexecutor.v1.Inbound.verification_data": + case "uexecutor.v1.OutboundObservation.success": + return protoreflect.ValueOfBool(false) + case "uexecutor.v1.OutboundObservation.block_height": + return protoreflect.ValueOfUint64(uint64(0)) + case "uexecutor.v1.OutboundObservation.tx_hash": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.Inbound does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation 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_Inbound) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_OutboundObservation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.Inbound", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.OutboundObservation", d.FullName())) } panic("unreachable") } @@ -2702,7 +3850,7 @@ func (x *fastReflection_Inbound) WhichOneof(d protoreflect.OneofDescriptor) prot // 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_Inbound) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_OutboundObservation) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2713,7 +3861,7 @@ func (x *fastReflection_Inbound) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Inbound) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_OutboundObservation) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2725,7 +3873,7 @@ func (x *fastReflection_Inbound) SetUnknown(fields protoreflect.RawFields) { // 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_Inbound) IsValid() bool { +func (x *fastReflection_OutboundObservation) IsValid() bool { return x != nil } @@ -2735,9 +3883,9 @@ func (x *fastReflection_Inbound) 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_Inbound) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Inbound) + x := input.Message.Interface().(*OutboundObservation) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2749,42 +3897,13 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.SourceChain) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TxHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Recipient) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AssetAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LogIndex) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TxType != 0 { - n += 1 + runtime.Sov(uint64(x.TxType)) + if x.Success { + n += 2 } - if x.UniversalPayload != nil { - l = options.Size(x.UniversalPayload) - n += 1 + l + runtime.Sov(uint64(l)) + if x.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) } - l = len(x.VerificationData) + l = len(x.TxHash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -2798,99 +3917,46 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Inbound) + x := input.Message.Interface().(*OutboundObservation) 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.VerificationData) > 0 { - i -= len(x.VerificationData) - copy(dAtA[i:], x.VerificationData) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VerificationData))) - i-- - dAtA[i] = 0x52 - } - if x.UniversalPayload != nil { - encoded, err := options.Marshal(x.UniversalPayload) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if x.TxType != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TxType)) - i-- - dAtA[i] = 0x40 - } - if len(x.LogIndex) > 0 { - i -= len(x.LogIndex) - copy(dAtA[i:], x.LogIndex) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LogIndex))) - i-- - dAtA[i] = 0x3a - } - if len(x.AssetAddr) > 0 { - i -= len(x.AssetAddr) - copy(dAtA[i:], x.AssetAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetAddr))) - i-- - dAtA[i] = 0x32 - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x2a - } - if len(x.Recipient) > 0 { - i -= len(x.Recipient) - copy(dAtA[i:], x.Recipient) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) - i-- - dAtA[i] = 0x22 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x1a + 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.TxHash) > 0 { i -= len(x.TxHash) copy(dAtA[i:], x.TxHash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } - if len(x.SourceChain) > 0 { - i -= len(x.SourceChain) - copy(dAtA[i:], x.SourceChain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x10 + } + if x.Success { + i-- + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -2903,7 +3969,7 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Inbound) + x := input.Message.Interface().(*OutboundObservation) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2935,241 +4001,17 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Inbound: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OutboundObservation: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Inbound: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OutboundObservation: 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 SourceChain", 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.SourceChain = 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 TxHash", 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.TxHash = 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 Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", 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.Recipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", 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.AssetAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LogIndex", 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.LogIndex = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) } - x.TxType = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3179,16 +4021,17 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.TxType |= InboundTxType(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UniversalPayload", wireType) + x.Success = bool(v != 0) + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } - var msglen int + x.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3198,31 +4041,14 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + x.BlockHeight |= uint64(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.UniversalPayload == nil { - x.UniversalPayload = &UniversalPayload{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UniversalPayload); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: + case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationData", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3250,7 +4076,7 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.VerificationData = string(dAtA[iNdEx:postIndex]) + x.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3288,36 +4114,28 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { } var ( - md_PCTx protoreflect.MessageDescriptor - fd_PCTx_tx_hash protoreflect.FieldDescriptor - fd_PCTx_sender protoreflect.FieldDescriptor - fd_PCTx_gas_used protoreflect.FieldDescriptor - fd_PCTx_block_height protoreflect.FieldDescriptor - fd_PCTx_status protoreflect.FieldDescriptor - fd_PCTx_error_msg protoreflect.FieldDescriptor + md_Originating_Pc_TX protoreflect.MessageDescriptor + fd_Originating_Pc_TX_tx_hash protoreflect.FieldDescriptor + fd_Originating_Pc_TX_log_index protoreflect.FieldDescriptor ) func init() { file_uexecutor_v1_types_proto_init() - md_PCTx = File_uexecutor_v1_types_proto.Messages().ByName("PCTx") - fd_PCTx_tx_hash = md_PCTx.Fields().ByName("tx_hash") - fd_PCTx_sender = md_PCTx.Fields().ByName("sender") - fd_PCTx_gas_used = md_PCTx.Fields().ByName("gas_used") - fd_PCTx_block_height = md_PCTx.Fields().ByName("block_height") - fd_PCTx_status = md_PCTx.Fields().ByName("status") - fd_PCTx_error_msg = md_PCTx.Fields().ByName("error_msg") + md_Originating_Pc_TX = File_uexecutor_v1_types_proto.Messages().ByName("Originating_Pc_TX") + fd_Originating_Pc_TX_tx_hash = md_Originating_Pc_TX.Fields().ByName("tx_hash") + fd_Originating_Pc_TX_log_index = md_Originating_Pc_TX.Fields().ByName("log_index") } -var _ protoreflect.Message = (*fastReflection_PCTx)(nil) +var _ protoreflect.Message = (*fastReflection_Originating_Pc_TX)(nil) -type fastReflection_PCTx PCTx +type fastReflection_Originating_Pc_TX Originating_Pc_TX -func (x *PCTx) ProtoReflect() protoreflect.Message { - return (*fastReflection_PCTx)(x) +func (x *Originating_Pc_TX) ProtoReflect() protoreflect.Message { + return (*fastReflection_Originating_Pc_TX)(x) } -func (x *PCTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[5] +func (x *Originating_Pc_TX) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_types_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3328,43 +4146,43 @@ func (x *PCTx) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_PCTx_messageType fastReflection_PCTx_messageType -var _ protoreflect.MessageType = fastReflection_PCTx_messageType{} +var _fastReflection_Originating_Pc_TX_messageType fastReflection_Originating_Pc_TX_messageType +var _ protoreflect.MessageType = fastReflection_Originating_Pc_TX_messageType{} -type fastReflection_PCTx_messageType struct{} +type fastReflection_Originating_Pc_TX_messageType struct{} -func (x fastReflection_PCTx_messageType) Zero() protoreflect.Message { - return (*fastReflection_PCTx)(nil) +func (x fastReflection_Originating_Pc_TX_messageType) Zero() protoreflect.Message { + return (*fastReflection_Originating_Pc_TX)(nil) } -func (x fastReflection_PCTx_messageType) New() protoreflect.Message { - return new(fastReflection_PCTx) +func (x fastReflection_Originating_Pc_TX_messageType) New() protoreflect.Message { + return new(fastReflection_Originating_Pc_TX) } -func (x fastReflection_PCTx_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PCTx +func (x fastReflection_Originating_Pc_TX_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Originating_Pc_TX } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_PCTx) Descriptor() protoreflect.MessageDescriptor { - return md_PCTx +func (x *fastReflection_Originating_Pc_TX) Descriptor() protoreflect.MessageDescriptor { + return md_Originating_Pc_TX } // 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_PCTx) Type() protoreflect.MessageType { - return _fastReflection_PCTx_messageType +func (x *fastReflection_Originating_Pc_TX) Type() protoreflect.MessageType { + return _fastReflection_Originating_Pc_TX_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_PCTx) New() protoreflect.Message { - return new(fastReflection_PCTx) +func (x *fastReflection_Originating_Pc_TX) New() protoreflect.Message { + return new(fastReflection_Originating_Pc_TX) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_PCTx) Interface() protoreflect.ProtoMessage { - return (*PCTx)(x) +func (x *fastReflection_Originating_Pc_TX) Interface() protoreflect.ProtoMessage { + return (*Originating_Pc_TX)(x) } // Range iterates over every populated field in an undefined order, @@ -3372,40 +4190,16 @@ func (x *fastReflection_PCTx) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_PCTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Originating_Pc_TX) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.TxHash != "" { value := protoreflect.ValueOfString(x.TxHash) - if !f(fd_PCTx_tx_hash, value) { - return - } - } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_PCTx_sender, value) { - return - } - } - if x.GasUsed != uint64(0) { - value := protoreflect.ValueOfUint64(x.GasUsed) - if !f(fd_PCTx_gas_used, value) { - return - } - } - if x.BlockHeight != uint64(0) { - value := protoreflect.ValueOfUint64(x.BlockHeight) - if !f(fd_PCTx_block_height, value) { - return - } - } - if x.Status != "" { - value := protoreflect.ValueOfString(x.Status) - if !f(fd_PCTx_status, value) { + if !f(fd_Originating_Pc_TX_tx_hash, value) { return } } - if x.ErrorMsg != "" { - value := protoreflect.ValueOfString(x.ErrorMsg) - if !f(fd_PCTx_error_msg, value) { + if x.LogIndex != "" { + value := protoreflect.ValueOfString(x.LogIndex) + if !f(fd_Originating_Pc_TX_log_index, value) { return } } @@ -3422,25 +4216,17 @@ func (x *fastReflection_PCTx) Range(f func(protoreflect.FieldDescriptor, protore // 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_PCTx) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Originating_Pc_TX) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uexecutor.v1.PCTx.tx_hash": + case "uexecutor.v1.Originating_Pc_TX.tx_hash": return x.TxHash != "" - case "uexecutor.v1.PCTx.sender": - return x.Sender != "" - case "uexecutor.v1.PCTx.gas_used": - return x.GasUsed != uint64(0) - case "uexecutor.v1.PCTx.block_height": - return x.BlockHeight != uint64(0) - case "uexecutor.v1.PCTx.status": - return x.Status != "" - case "uexecutor.v1.PCTx.error_msg": - return x.ErrorMsg != "" + case "uexecutor.v1.Originating_Pc_TX.log_index": + return x.LogIndex != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) } - panic(fmt.Errorf("message uexecutor.v1.PCTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) } } @@ -3450,25 +4236,17 @@ func (x *fastReflection_PCTx) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PCTx) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Originating_Pc_TX) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uexecutor.v1.PCTx.tx_hash": + case "uexecutor.v1.Originating_Pc_TX.tx_hash": x.TxHash = "" - case "uexecutor.v1.PCTx.sender": - x.Sender = "" - case "uexecutor.v1.PCTx.gas_used": - x.GasUsed = uint64(0) - case "uexecutor.v1.PCTx.block_height": - x.BlockHeight = uint64(0) - case "uexecutor.v1.PCTx.status": - x.Status = "" - case "uexecutor.v1.PCTx.error_msg": - x.ErrorMsg = "" + case "uexecutor.v1.Originating_Pc_TX.log_index": + x.LogIndex = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) } - panic(fmt.Errorf("message uexecutor.v1.PCTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) } } @@ -3478,31 +4256,19 @@ func (x *fastReflection_PCTx) Clear(fd protoreflect.FieldDescriptor) { // 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_PCTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Originating_Pc_TX) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uexecutor.v1.PCTx.tx_hash": + case "uexecutor.v1.Originating_Pc_TX.tx_hash": value := x.TxHash return protoreflect.ValueOfString(value) - case "uexecutor.v1.PCTx.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "uexecutor.v1.PCTx.gas_used": - value := x.GasUsed - return protoreflect.ValueOfUint64(value) - case "uexecutor.v1.PCTx.block_height": - value := x.BlockHeight - return protoreflect.ValueOfUint64(value) - case "uexecutor.v1.PCTx.status": - value := x.Status - return protoreflect.ValueOfString(value) - case "uexecutor.v1.PCTx.error_msg": - value := x.ErrorMsg + case "uexecutor.v1.Originating_Pc_TX.log_index": + value := x.LogIndex return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) } - panic(fmt.Errorf("message uexecutor.v1.PCTx does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", descriptor.FullName())) } } @@ -3516,25 +4282,17 @@ func (x *fastReflection_PCTx) Get(descriptor protoreflect.FieldDescriptor) proto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PCTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Originating_Pc_TX) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uexecutor.v1.PCTx.tx_hash": + case "uexecutor.v1.Originating_Pc_TX.tx_hash": x.TxHash = value.Interface().(string) - case "uexecutor.v1.PCTx.sender": - x.Sender = value.Interface().(string) - case "uexecutor.v1.PCTx.gas_used": - x.GasUsed = value.Uint() - case "uexecutor.v1.PCTx.block_height": - x.BlockHeight = value.Uint() - case "uexecutor.v1.PCTx.status": - x.Status = value.Interface().(string) - case "uexecutor.v1.PCTx.error_msg": - x.ErrorMsg = value.Interface().(string) + case "uexecutor.v1.Originating_Pc_TX.log_index": + x.LogIndex = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) } - panic(fmt.Errorf("message uexecutor.v1.PCTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) } } @@ -3548,60 +4306,44 @@ func (x *fastReflection_PCTx) Set(fd protoreflect.FieldDescriptor, value protore // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PCTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Originating_Pc_TX) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.PCTx.tx_hash": - panic(fmt.Errorf("field tx_hash of message uexecutor.v1.PCTx is not mutable")) - case "uexecutor.v1.PCTx.sender": - panic(fmt.Errorf("field sender of message uexecutor.v1.PCTx is not mutable")) - case "uexecutor.v1.PCTx.gas_used": - panic(fmt.Errorf("field gas_used of message uexecutor.v1.PCTx is not mutable")) - case "uexecutor.v1.PCTx.block_height": - panic(fmt.Errorf("field block_height of message uexecutor.v1.PCTx is not mutable")) - case "uexecutor.v1.PCTx.status": - panic(fmt.Errorf("field status of message uexecutor.v1.PCTx is not mutable")) - case "uexecutor.v1.PCTx.error_msg": - panic(fmt.Errorf("field error_msg of message uexecutor.v1.PCTx is not mutable")) + case "uexecutor.v1.Originating_Pc_TX.tx_hash": + panic(fmt.Errorf("field tx_hash of message uexecutor.v1.Originating_Pc_TX is not mutable")) + case "uexecutor.v1.Originating_Pc_TX.log_index": + panic(fmt.Errorf("field log_index of message uexecutor.v1.Originating_Pc_TX is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) } - panic(fmt.Errorf("message uexecutor.v1.PCTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX 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_PCTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Originating_Pc_TX) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.PCTx.tx_hash": - return protoreflect.ValueOfString("") - case "uexecutor.v1.PCTx.sender": - return protoreflect.ValueOfString("") - case "uexecutor.v1.PCTx.gas_used": - return protoreflect.ValueOfUint64(uint64(0)) - case "uexecutor.v1.PCTx.block_height": - return protoreflect.ValueOfUint64(uint64(0)) - case "uexecutor.v1.PCTx.status": + case "uexecutor.v1.Originating_Pc_TX.tx_hash": return protoreflect.ValueOfString("") - case "uexecutor.v1.PCTx.error_msg": + case "uexecutor.v1.Originating_Pc_TX.log_index": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.PCTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) } - panic(fmt.Errorf("message uexecutor.v1.PCTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX 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_PCTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Originating_Pc_TX) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.PCTx", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.Originating_Pc_TX", d.FullName())) } panic("unreachable") } @@ -3609,7 +4351,7 @@ func (x *fastReflection_PCTx) WhichOneof(d protoreflect.OneofDescriptor) protore // 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_PCTx) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Originating_Pc_TX) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3620,7 +4362,7 @@ func (x *fastReflection_PCTx) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PCTx) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Originating_Pc_TX) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3632,7 +4374,7 @@ func (x *fastReflection_PCTx) SetUnknown(fields protoreflect.RawFields) { // 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_PCTx) IsValid() bool { +func (x *fastReflection_Originating_Pc_TX) IsValid() bool { return x != nil } @@ -3642,9 +4384,9 @@ func (x *fastReflection_PCTx) 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_PCTx) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Originating_Pc_TX) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PCTx) + x := input.Message.Interface().(*Originating_Pc_TX) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3660,21 +4402,7 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.GasUsed)) - } - if x.BlockHeight != 0 { - n += 1 + runtime.Sov(uint64(x.BlockHeight)) - } - l = len(x.Status) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ErrorMsg) + l = len(x.LogIndex) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -3688,7 +4416,7 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PCTx) + x := input.Message.Interface().(*Originating_Pc_TX) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3707,34 +4435,10 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.ErrorMsg) > 0 { - i -= len(x.ErrorMsg) - copy(dAtA[i:], x.ErrorMsg) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ErrorMsg))) - i-- - dAtA[i] = 0x3a - } - if len(x.Status) > 0 { - i -= len(x.Status) - copy(dAtA[i:], x.Status) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Status))) - i-- - dAtA[i] = 0x32 - } - if x.BlockHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) - i-- - dAtA[i] = 0x20 - } - if x.GasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasUsed)) - i-- - dAtA[i] = 0x18 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + if len(x.LogIndex) > 0 { + i -= len(x.LogIndex) + copy(dAtA[i:], x.LogIndex) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LogIndex))) i-- dAtA[i] = 0x12 } @@ -3756,7 +4460,7 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*PCTx) + x := input.Message.Interface().(*Originating_Pc_TX) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3788,10 +4492,10 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PCTx: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Originating_Pc_TX: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PCTx: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Originating_Pc_TX: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3828,109 +4532,7 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - x.GasUsed = 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.GasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ErrorMsg", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LogIndex", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3958,7 +4560,7 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.ErrorMsg = string(dAtA[iNdEx:postIndex]) + x.LogIndex = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3998,20 +4600,34 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { var ( md_OutboundTx protoreflect.MessageDescriptor fd_OutboundTx_destination_chain protoreflect.FieldDescriptor - fd_OutboundTx_tx_hash protoreflect.FieldDescriptor fd_OutboundTx_recipient protoreflect.FieldDescriptor fd_OutboundTx_amount protoreflect.FieldDescriptor fd_OutboundTx_asset_addr protoreflect.FieldDescriptor + fd_OutboundTx_sender protoreflect.FieldDescriptor + fd_OutboundTx_payload protoreflect.FieldDescriptor + fd_OutboundTx_gas_limit protoreflect.FieldDescriptor + fd_OutboundTx_tx_type protoreflect.FieldDescriptor + fd_OutboundTx_pc_tx protoreflect.FieldDescriptor + fd_OutboundTx_observed_tx protoreflect.FieldDescriptor + fd_OutboundTx_id protoreflect.FieldDescriptor + fd_OutboundTx_outbound_status protoreflect.FieldDescriptor ) func init() { file_uexecutor_v1_types_proto_init() md_OutboundTx = File_uexecutor_v1_types_proto.Messages().ByName("OutboundTx") fd_OutboundTx_destination_chain = md_OutboundTx.Fields().ByName("destination_chain") - fd_OutboundTx_tx_hash = md_OutboundTx.Fields().ByName("tx_hash") fd_OutboundTx_recipient = md_OutboundTx.Fields().ByName("recipient") fd_OutboundTx_amount = md_OutboundTx.Fields().ByName("amount") fd_OutboundTx_asset_addr = md_OutboundTx.Fields().ByName("asset_addr") + fd_OutboundTx_sender = md_OutboundTx.Fields().ByName("sender") + fd_OutboundTx_payload = md_OutboundTx.Fields().ByName("payload") + fd_OutboundTx_gas_limit = md_OutboundTx.Fields().ByName("gas_limit") + fd_OutboundTx_tx_type = md_OutboundTx.Fields().ByName("tx_type") + fd_OutboundTx_pc_tx = md_OutboundTx.Fields().ByName("pc_tx") + fd_OutboundTx_observed_tx = md_OutboundTx.Fields().ByName("observed_tx") + fd_OutboundTx_id = md_OutboundTx.Fields().ByName("id") + fd_OutboundTx_outbound_status = md_OutboundTx.Fields().ByName("outbound_status") } var _ protoreflect.Message = (*fastReflection_OutboundTx)(nil) @@ -4023,7 +4639,7 @@ func (x *OutboundTx) ProtoReflect() protoreflect.Message { } func (x *OutboundTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[6] + mi := &file_uexecutor_v1_types_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4085,12 +4701,6 @@ func (x *fastReflection_OutboundTx) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.TxHash != "" { - value := protoreflect.ValueOfString(x.TxHash) - if !f(fd_OutboundTx_tx_hash, value) { - return - } - } if x.Recipient != "" { value := protoreflect.ValueOfString(x.Recipient) if !f(fd_OutboundTx_recipient, value) { @@ -4109,6 +4719,54 @@ func (x *fastReflection_OutboundTx) Range(f func(protoreflect.FieldDescriptor, p return } } + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_OutboundTx_sender, value) { + return + } + } + if x.Payload != "" { + value := protoreflect.ValueOfString(x.Payload) + if !f(fd_OutboundTx_payload, value) { + return + } + } + if x.GasLimit != "" { + value := protoreflect.ValueOfString(x.GasLimit) + if !f(fd_OutboundTx_gas_limit, value) { + return + } + } + if x.TxType != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.TxType)) + if !f(fd_OutboundTx_tx_type, value) { + return + } + } + if x.PcTx != nil { + value := protoreflect.ValueOfMessage(x.PcTx.ProtoReflect()) + if !f(fd_OutboundTx_pc_tx, value) { + return + } + } + if x.ObservedTx != nil { + value := protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) + if !f(fd_OutboundTx_observed_tx, value) { + return + } + } + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_OutboundTx_id, value) { + return + } + } + if x.OutboundStatus != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.OutboundStatus)) + if !f(fd_OutboundTx_outbound_status, value) { + return + } + } } // Has reports whether a field is populated. @@ -4126,14 +4784,28 @@ func (x *fastReflection_OutboundTx) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "uexecutor.v1.OutboundTx.destination_chain": return x.DestinationChain != "" - case "uexecutor.v1.OutboundTx.tx_hash": - return x.TxHash != "" case "uexecutor.v1.OutboundTx.recipient": return x.Recipient != "" case "uexecutor.v1.OutboundTx.amount": return x.Amount != "" case "uexecutor.v1.OutboundTx.asset_addr": return x.AssetAddr != "" + case "uexecutor.v1.OutboundTx.sender": + return x.Sender != "" + case "uexecutor.v1.OutboundTx.payload": + return x.Payload != "" + case "uexecutor.v1.OutboundTx.gas_limit": + return x.GasLimit != "" + case "uexecutor.v1.OutboundTx.tx_type": + return x.TxType != 0 + case "uexecutor.v1.OutboundTx.pc_tx": + return x.PcTx != nil + case "uexecutor.v1.OutboundTx.observed_tx": + return x.ObservedTx != nil + case "uexecutor.v1.OutboundTx.id": + return x.Id != "" + case "uexecutor.v1.OutboundTx.outbound_status": + return x.OutboundStatus != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4152,14 +4824,28 @@ func (x *fastReflection_OutboundTx) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "uexecutor.v1.OutboundTx.destination_chain": x.DestinationChain = "" - case "uexecutor.v1.OutboundTx.tx_hash": - x.TxHash = "" case "uexecutor.v1.OutboundTx.recipient": x.Recipient = "" case "uexecutor.v1.OutboundTx.amount": x.Amount = "" case "uexecutor.v1.OutboundTx.asset_addr": x.AssetAddr = "" + case "uexecutor.v1.OutboundTx.sender": + x.Sender = "" + case "uexecutor.v1.OutboundTx.payload": + x.Payload = "" + case "uexecutor.v1.OutboundTx.gas_limit": + x.GasLimit = "" + case "uexecutor.v1.OutboundTx.tx_type": + x.TxType = 0 + case "uexecutor.v1.OutboundTx.pc_tx": + x.PcTx = nil + case "uexecutor.v1.OutboundTx.observed_tx": + x.ObservedTx = nil + case "uexecutor.v1.OutboundTx.id": + x.Id = "" + case "uexecutor.v1.OutboundTx.outbound_status": + x.OutboundStatus = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4179,9 +4865,6 @@ func (x *fastReflection_OutboundTx) Get(descriptor protoreflect.FieldDescriptor) case "uexecutor.v1.OutboundTx.destination_chain": value := x.DestinationChain return protoreflect.ValueOfString(value) - case "uexecutor.v1.OutboundTx.tx_hash": - value := x.TxHash - return protoreflect.ValueOfString(value) case "uexecutor.v1.OutboundTx.recipient": value := x.Recipient return protoreflect.ValueOfString(value) @@ -4191,6 +4874,30 @@ func (x *fastReflection_OutboundTx) Get(descriptor protoreflect.FieldDescriptor) case "uexecutor.v1.OutboundTx.asset_addr": value := x.AssetAddr return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.payload": + value := x.Payload + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.gas_limit": + value := x.GasLimit + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.tx_type": + value := x.TxType + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uexecutor.v1.OutboundTx.pc_tx": + value := x.PcTx + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "uexecutor.v1.OutboundTx.observed_tx": + value := x.ObservedTx + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "uexecutor.v1.OutboundTx.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.outbound_status": + value := x.OutboundStatus + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4213,14 +4920,28 @@ func (x *fastReflection_OutboundTx) Set(fd protoreflect.FieldDescriptor, value p switch fd.FullName() { case "uexecutor.v1.OutboundTx.destination_chain": x.DestinationChain = value.Interface().(string) - case "uexecutor.v1.OutboundTx.tx_hash": - x.TxHash = value.Interface().(string) case "uexecutor.v1.OutboundTx.recipient": x.Recipient = value.Interface().(string) case "uexecutor.v1.OutboundTx.amount": x.Amount = value.Interface().(string) case "uexecutor.v1.OutboundTx.asset_addr": x.AssetAddr = value.Interface().(string) + case "uexecutor.v1.OutboundTx.sender": + x.Sender = value.Interface().(string) + case "uexecutor.v1.OutboundTx.payload": + x.Payload = value.Interface().(string) + case "uexecutor.v1.OutboundTx.gas_limit": + x.GasLimit = value.Interface().(string) + case "uexecutor.v1.OutboundTx.tx_type": + x.TxType = (TxType)(value.Enum()) + case "uexecutor.v1.OutboundTx.pc_tx": + x.PcTx = value.Message().Interface().(*Originating_Pc_TX) + case "uexecutor.v1.OutboundTx.observed_tx": + x.ObservedTx = value.Message().Interface().(*OutboundObservation) + case "uexecutor.v1.OutboundTx.id": + x.Id = value.Interface().(string) + case "uexecutor.v1.OutboundTx.outbound_status": + x.OutboundStatus = (Status)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4241,16 +4962,36 @@ func (x *fastReflection_OutboundTx) Set(fd protoreflect.FieldDescriptor, value p // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_OutboundTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "uexecutor.v1.OutboundTx.pc_tx": + if x.PcTx == nil { + x.PcTx = new(Originating_Pc_TX) + } + return protoreflect.ValueOfMessage(x.PcTx.ProtoReflect()) + case "uexecutor.v1.OutboundTx.observed_tx": + if x.ObservedTx == nil { + x.ObservedTx = new(OutboundObservation) + } + return protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) case "uexecutor.v1.OutboundTx.destination_chain": panic(fmt.Errorf("field destination_chain of message uexecutor.v1.OutboundTx is not mutable")) - case "uexecutor.v1.OutboundTx.tx_hash": - panic(fmt.Errorf("field tx_hash of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.recipient": panic(fmt.Errorf("field recipient of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.amount": panic(fmt.Errorf("field amount of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.asset_addr": panic(fmt.Errorf("field asset_addr of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.sender": + panic(fmt.Errorf("field sender of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.payload": + panic(fmt.Errorf("field payload of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.gas_limit": + panic(fmt.Errorf("field gas_limit of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.tx_type": + panic(fmt.Errorf("field tx_type of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.id": + panic(fmt.Errorf("field id of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.outbound_status": + panic(fmt.Errorf("field outbound_status of message uexecutor.v1.OutboundTx is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4266,14 +5007,30 @@ func (x *fastReflection_OutboundTx) NewField(fd protoreflect.FieldDescriptor) pr switch fd.FullName() { case "uexecutor.v1.OutboundTx.destination_chain": return protoreflect.ValueOfString("") - case "uexecutor.v1.OutboundTx.tx_hash": - return protoreflect.ValueOfString("") case "uexecutor.v1.OutboundTx.recipient": return protoreflect.ValueOfString("") case "uexecutor.v1.OutboundTx.amount": return protoreflect.ValueOfString("") case "uexecutor.v1.OutboundTx.asset_addr": return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.sender": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.payload": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.gas_limit": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.tx_type": + return protoreflect.ValueOfEnum(0) + case "uexecutor.v1.OutboundTx.pc_tx": + m := new(Originating_Pc_TX) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "uexecutor.v1.OutboundTx.observed_tx": + m := new(OutboundObservation) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "uexecutor.v1.OutboundTx.id": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.outbound_status": + return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4347,10 +5104,6 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.TxHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.Recipient) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -4363,6 +5116,36 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Payload) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.GasLimit) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TxType != 0 { + n += 1 + runtime.Sov(uint64(x.TxType)) + } + if x.PcTx != nil { + l = options.Size(x.PcTx) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ObservedTx != nil { + l = options.Size(x.ObservedTx) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.OutboundStatus != 0 { + n += 1 + runtime.Sov(uint64(x.OutboundStatus)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4392,32 +5175,91 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.OutboundStatus != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.OutboundStatus)) + i-- + dAtA[i] = 0x60 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0x5a + } + if x.ObservedTx != nil { + encoded, err := options.Marshal(x.ObservedTx) + 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] = 0x52 + } + if x.PcTx != nil { + encoded, err := options.Marshal(x.PcTx) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + if x.TxType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TxType)) + i-- + dAtA[i] = 0x40 + } + if len(x.GasLimit) > 0 { + i -= len(x.GasLimit) + copy(dAtA[i:], x.GasLimit) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GasLimit))) + i-- + dAtA[i] = 0x3a + } + if len(x.Payload) > 0 { + i -= len(x.Payload) + copy(dAtA[i:], x.Payload) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payload))) + i-- + dAtA[i] = 0x32 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0x2a + } if len(x.AssetAddr) > 0 { i -= len(x.AssetAddr) copy(dAtA[i:], x.AssetAddr) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetAddr))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(x.Amount) > 0 { i -= len(x.Amount) copy(dAtA[i:], x.Amount) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(x.Recipient) > 0 { i -= len(x.Recipient) copy(dAtA[i:], x.Recipient) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) i-- - dAtA[i] = 0x1a - } - if len(x.TxHash) > 0 { - i -= len(x.TxHash) - copy(dAtA[i:], x.TxHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) - i-- dAtA[i] = 0x12 } if len(x.DestinationChain) > 0 { @@ -4510,7 +5352,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4538,11 +5380,11 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.TxHash = string(dAtA[iNdEx:postIndex]) + x.Recipient = 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 Recipient", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4570,11 +5412,11 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Recipient = string(dAtA[iNdEx:postIndex]) + x.Amount = 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 Amount", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4602,11 +5444,11 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Amount = string(dAtA[iNdEx:postIndex]) + x.AssetAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4634,8 +5476,214 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.AssetAddr = string(dAtA[iNdEx:postIndex]) + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payload", 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.Payload = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasLimit", 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.GasLimit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) + } + x.TxType = 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.TxType |= TxType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PcTx", 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.PcTx == nil { + x.PcTx = &Originating_Pc_TX{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PcTx); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", 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.ObservedTx == nil { + x.ObservedTx = &OutboundObservation{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ObservedTx); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutboundStatus", wireType) + } + x.OutboundStatus = 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.OutboundStatus |= Status(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4671,59 +5719,111 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_UniversalTx_2_list)(nil) +var _ protoreflect.List = (*_UniversalTx_3_list)(nil) -type _UniversalTx_2_list struct { +type _UniversalTx_3_list struct { list *[]*PCTx } -func (x *_UniversalTx_2_list) Len() int { +func (x *_UniversalTx_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_UniversalTx_2_list) Get(i int) protoreflect.Value { +func (x *_UniversalTx_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_UniversalTx_2_list) Set(i int, value protoreflect.Value) { +func (x *_UniversalTx_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*PCTx) (*x.list)[i] = concreteValue } -func (x *_UniversalTx_2_list) Append(value protoreflect.Value) { +func (x *_UniversalTx_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*PCTx) *x.list = append(*x.list, concreteValue) } -func (x *_UniversalTx_2_list) AppendMutable() protoreflect.Value { +func (x *_UniversalTx_3_list) AppendMutable() protoreflect.Value { v := new(PCTx) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_UniversalTx_2_list) Truncate(n int) { +func (x *_UniversalTx_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_UniversalTx_2_list) NewElement() protoreflect.Value { +func (x *_UniversalTx_3_list) NewElement() protoreflect.Value { v := new(PCTx) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_UniversalTx_2_list) IsValid() bool { +func (x *_UniversalTx_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_UniversalTx_4_list)(nil) + +type _UniversalTx_4_list struct { + list *[]*OutboundTx +} + +func (x *_UniversalTx_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_UniversalTx_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_UniversalTx_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*OutboundTx) + (*x.list)[i] = concreteValue +} + +func (x *_UniversalTx_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*OutboundTx) + *x.list = append(*x.list, concreteValue) +} + +func (x *_UniversalTx_4_list) AppendMutable() protoreflect.Value { + v := new(OutboundTx) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_UniversalTx_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_UniversalTx_4_list) NewElement() protoreflect.Value { + v := new(OutboundTx) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_UniversalTx_4_list) IsValid() bool { return x.list != nil } var ( md_UniversalTx protoreflect.MessageDescriptor + fd_UniversalTx_id protoreflect.FieldDescriptor fd_UniversalTx_inbound_tx protoreflect.FieldDescriptor fd_UniversalTx_pc_tx protoreflect.FieldDescriptor fd_UniversalTx_outbound_tx protoreflect.FieldDescriptor @@ -4733,6 +5833,7 @@ var ( func init() { file_uexecutor_v1_types_proto_init() md_UniversalTx = File_uexecutor_v1_types_proto.Messages().ByName("UniversalTx") + fd_UniversalTx_id = md_UniversalTx.Fields().ByName("id") fd_UniversalTx_inbound_tx = md_UniversalTx.Fields().ByName("inbound_tx") fd_UniversalTx_pc_tx = md_UniversalTx.Fields().ByName("pc_tx") fd_UniversalTx_outbound_tx = md_UniversalTx.Fields().ByName("outbound_tx") @@ -4748,7 +5849,7 @@ func (x *UniversalTx) ProtoReflect() protoreflect.Message { } func (x *UniversalTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[7] + mi := &file_uexecutor_v1_types_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4804,6 +5905,12 @@ func (x *fastReflection_UniversalTx) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UniversalTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_UniversalTx_id, value) { + return + } + } if x.InboundTx != nil { value := protoreflect.ValueOfMessage(x.InboundTx.ProtoReflect()) if !f(fd_UniversalTx_inbound_tx, value) { @@ -4811,13 +5918,13 @@ func (x *fastReflection_UniversalTx) Range(f func(protoreflect.FieldDescriptor, } } if len(x.PcTx) != 0 { - value := protoreflect.ValueOfList(&_UniversalTx_2_list{list: &x.PcTx}) + value := protoreflect.ValueOfList(&_UniversalTx_3_list{list: &x.PcTx}) if !f(fd_UniversalTx_pc_tx, value) { return } } - if x.OutboundTx != nil { - value := protoreflect.ValueOfMessage(x.OutboundTx.ProtoReflect()) + if len(x.OutboundTx) != 0 { + value := protoreflect.ValueOfList(&_UniversalTx_4_list{list: &x.OutboundTx}) if !f(fd_UniversalTx_outbound_tx, value) { return } @@ -4843,12 +5950,14 @@ func (x *fastReflection_UniversalTx) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_UniversalTx) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "uexecutor.v1.UniversalTx.id": + return x.Id != "" case "uexecutor.v1.UniversalTx.inbound_tx": return x.InboundTx != nil case "uexecutor.v1.UniversalTx.pc_tx": return len(x.PcTx) != 0 case "uexecutor.v1.UniversalTx.outbound_tx": - return x.OutboundTx != nil + return len(x.OutboundTx) != 0 case "uexecutor.v1.UniversalTx.universal_status": return x.UniversalStatus != 0 default: @@ -4867,6 +5976,8 @@ func (x *fastReflection_UniversalTx) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UniversalTx) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "uexecutor.v1.UniversalTx.id": + x.Id = "" case "uexecutor.v1.UniversalTx.inbound_tx": x.InboundTx = nil case "uexecutor.v1.UniversalTx.pc_tx": @@ -4891,18 +6002,24 @@ func (x *fastReflection_UniversalTx) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UniversalTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "uexecutor.v1.UniversalTx.id": + value := x.Id + return protoreflect.ValueOfString(value) case "uexecutor.v1.UniversalTx.inbound_tx": value := x.InboundTx return protoreflect.ValueOfMessage(value.ProtoReflect()) case "uexecutor.v1.UniversalTx.pc_tx": if len(x.PcTx) == 0 { - return protoreflect.ValueOfList(&_UniversalTx_2_list{}) + return protoreflect.ValueOfList(&_UniversalTx_3_list{}) } - listValue := &_UniversalTx_2_list{list: &x.PcTx} + listValue := &_UniversalTx_3_list{list: &x.PcTx} return protoreflect.ValueOfList(listValue) case "uexecutor.v1.UniversalTx.outbound_tx": - value := x.OutboundTx - return protoreflect.ValueOfMessage(value.ProtoReflect()) + if len(x.OutboundTx) == 0 { + return protoreflect.ValueOfList(&_UniversalTx_4_list{}) + } + listValue := &_UniversalTx_4_list{list: &x.OutboundTx} + return protoreflect.ValueOfList(listValue) case "uexecutor.v1.UniversalTx.universal_status": value := x.UniversalStatus return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) @@ -4926,14 +6043,18 @@ func (x *fastReflection_UniversalTx) Get(descriptor protoreflect.FieldDescriptor // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UniversalTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "uexecutor.v1.UniversalTx.id": + x.Id = value.Interface().(string) case "uexecutor.v1.UniversalTx.inbound_tx": x.InboundTx = value.Message().Interface().(*Inbound) case "uexecutor.v1.UniversalTx.pc_tx": lv := value.List() - clv := lv.(*_UniversalTx_2_list) + clv := lv.(*_UniversalTx_3_list) x.PcTx = *clv.list case "uexecutor.v1.UniversalTx.outbound_tx": - x.OutboundTx = value.Message().Interface().(*OutboundTx) + lv := value.List() + clv := lv.(*_UniversalTx_4_list) + x.OutboundTx = *clv.list case "uexecutor.v1.UniversalTx.universal_status": x.UniversalStatus = (UniversalTxStatus)(value.Enum()) default: @@ -4965,13 +6086,16 @@ func (x *fastReflection_UniversalTx) Mutable(fd protoreflect.FieldDescriptor) pr if x.PcTx == nil { x.PcTx = []*PCTx{} } - value := &_UniversalTx_2_list{list: &x.PcTx} + value := &_UniversalTx_3_list{list: &x.PcTx} return protoreflect.ValueOfList(value) case "uexecutor.v1.UniversalTx.outbound_tx": if x.OutboundTx == nil { - x.OutboundTx = new(OutboundTx) + x.OutboundTx = []*OutboundTx{} } - return protoreflect.ValueOfMessage(x.OutboundTx.ProtoReflect()) + value := &_UniversalTx_4_list{list: &x.OutboundTx} + return protoreflect.ValueOfList(value) + case "uexecutor.v1.UniversalTx.id": + panic(fmt.Errorf("field id of message uexecutor.v1.UniversalTx is not mutable")) case "uexecutor.v1.UniversalTx.universal_status": panic(fmt.Errorf("field universal_status of message uexecutor.v1.UniversalTx is not mutable")) default: @@ -4987,15 +6111,17 @@ func (x *fastReflection_UniversalTx) Mutable(fd protoreflect.FieldDescriptor) pr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UniversalTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "uexecutor.v1.UniversalTx.id": + return protoreflect.ValueOfString("") case "uexecutor.v1.UniversalTx.inbound_tx": m := new(Inbound) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "uexecutor.v1.UniversalTx.pc_tx": list := []*PCTx{} - return protoreflect.ValueOfList(&_UniversalTx_2_list{list: &list}) + return protoreflect.ValueOfList(&_UniversalTx_3_list{list: &list}) case "uexecutor.v1.UniversalTx.outbound_tx": - m := new(OutboundTx) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + list := []*OutboundTx{} + return protoreflect.ValueOfList(&_UniversalTx_4_list{list: &list}) case "uexecutor.v1.UniversalTx.universal_status": return protoreflect.ValueOfEnum(0) default: @@ -5067,6 +6193,10 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.InboundTx != nil { l = options.Size(x.InboundTx) n += 1 + l + runtime.Sov(uint64(l)) @@ -5077,9 +6207,11 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.OutboundTx != nil { - l = options.Size(x.OutboundTx) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.OutboundTx) > 0 { + for _, e := range x.OutboundTx { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.UniversalStatus != 0 { n += 1 + runtime.Sov(uint64(x.UniversalStatus)) @@ -5116,21 +6248,23 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { if x.UniversalStatus != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.UniversalStatus)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } - if x.OutboundTx != nil { - encoded, err := options.Marshal(x.OutboundTx) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err + if len(x.OutboundTx) > 0 { + for iNdEx := len(x.OutboundTx) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.OutboundTx[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] = 0x22 } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a } if len(x.PcTx) > 0 { for iNdEx := len(x.PcTx) - 1; iNdEx >= 0; iNdEx-- { @@ -5145,7 +6279,7 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } if x.InboundTx != nil { @@ -5160,6 +6294,13 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -5212,6 +6353,38 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = 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 InboundTx", wireType) } @@ -5247,7 +6420,7 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) } @@ -5281,7 +6454,7 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutboundTx", wireType) } @@ -5310,14 +6483,12 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.OutboundTx == nil { - x.OutboundTx = &OutboundTx{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OutboundTx); err != nil { + x.OutboundTx = append(x.OutboundTx, &OutboundTx{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OutboundTx[len(x.OutboundTx)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 4: + case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UniversalStatus", wireType) } @@ -5506,7 +6677,7 @@ type Status int32 const ( Status_UNSPECIFIED Status = 0 Status_PENDING Status = 1 - Status_FINALIZED Status = 2 + Status_OBSERVED Status = 2 ) // Enum value maps for Status. @@ -5514,12 +6685,12 @@ var ( Status_name = map[int32]string{ 0: "UNSPECIFIED", 1: "PENDING", - 2: "FINALIZED", + 2: "OBSERVED", } Status_value = map[string]int32{ "UNSPECIFIED": 0, "PENDING": 1, - "FINALIZED": 2, + "OBSERVED": 2, } ) @@ -5550,58 +6721,61 @@ func (Status) EnumDescriptor() ([]byte, []int) { return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{2} } -type InboundTxType int32 +type TxType int32 const ( - InboundTxType_UNSPECIFIED_TX InboundTxType = 0 - InboundTxType_GAS InboundTxType = 1 // fee abstraction - InboundTxType_FUNDS InboundTxType = 2 // synthetic - InboundTxType_FUNDS_AND_PAYLOAD InboundTxType = 3 // synthetic + payload exec - InboundTxType_GAS_AND_PAYLOAD InboundTxType = 4 // fee abstraction + payload exec + TxType_UNSPECIFIED_TX TxType = 0 + TxType_GAS TxType = 1 // fee abstraction + TxType_FUNDS TxType = 2 // synthetic + TxType_FUNDS_AND_PAYLOAD TxType = 3 // synthetic + payload exec + TxType_GAS_AND_PAYLOAD TxType = 4 // fee abstraction + payload exec + TxType_PAYLOAD TxType = 5 ) -// Enum value maps for InboundTxType. +// Enum value maps for TxType. var ( - InboundTxType_name = map[int32]string{ + TxType_name = map[int32]string{ 0: "UNSPECIFIED_TX", 1: "GAS", 2: "FUNDS", 3: "FUNDS_AND_PAYLOAD", 4: "GAS_AND_PAYLOAD", + 5: "PAYLOAD", } - InboundTxType_value = map[string]int32{ + TxType_value = map[string]int32{ "UNSPECIFIED_TX": 0, "GAS": 1, "FUNDS": 2, "FUNDS_AND_PAYLOAD": 3, "GAS_AND_PAYLOAD": 4, + "PAYLOAD": 5, } ) -func (x InboundTxType) Enum() *InboundTxType { - p := new(InboundTxType) +func (x TxType) Enum() *TxType { + p := new(TxType) *p = x return p } -func (x InboundTxType) String() string { +func (x TxType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (InboundTxType) Descriptor() protoreflect.EnumDescriptor { +func (TxType) Descriptor() protoreflect.EnumDescriptor { return file_uexecutor_v1_types_proto_enumTypes[3].Descriptor() } -func (InboundTxType) Type() protoreflect.EnumType { +func (TxType) Type() protoreflect.EnumType { return &file_uexecutor_v1_types_proto_enumTypes[3] } -func (x InboundTxType) Number() protoreflect.EnumNumber { +func (x TxType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use InboundTxType.Descriptor instead. -func (InboundTxType) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use TxType.Descriptor instead. +func (TxType) EnumDescriptor() ([]byte, []int) { return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{3} } @@ -5793,62 +6967,27 @@ func (x *UniversalAccountId) GetOwner() string { return "" } -type InboundStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=uexecutor.v1.Status" json:"status,omitempty"` -} - -func (x *InboundStatus) Reset() { - *x = InboundStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InboundStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InboundStatus) ProtoMessage() {} - -// Deprecated: Use InboundStatus.ProtoReflect.Descriptor instead. -func (*InboundStatus) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{3} -} - -func (x *InboundStatus) GetStatus() Status { - if x != nil { - return x.Status - } - return Status_UNSPECIFIED -} - type Inbound struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` // origin chain caip2 id (e.g. eip155:11155111) - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // unique tx hash / identifier from source chain - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` // sender address on source chain - Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient address on destination chain - Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` // synthetic token amount bridged in - AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // address of erc20 token address on source chain - LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // log index that originated the cross chain tx - TxType InboundTxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.InboundTxType" json:"tx_type,omitempty"` // inbound tx type - UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` // payload is the universal payload to be executed - VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` // verification_data is the bytes passed as verifier data for the given payload. + SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` // origin chain caip2 id (e.g. eip155:11155111) + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // unique tx hash / identifier from source chain + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` // sender address on source chain + Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient address on destination chain + Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` // synthetic token amount bridged in + AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // address of erc20 token address on source chain + LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // log index that originated the cross chain tx + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // inbound tx type + UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` // payload is the universal payload to be executed + VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` // verification_data is the bytes passed as verifier data for the given payload. } func (x *Inbound) Reset() { *x = Inbound{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[4] + mi := &file_uexecutor_v1_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5862,7 +7001,7 @@ func (*Inbound) ProtoMessage() {} // Deprecated: Use Inbound.ProtoReflect.Descriptor instead. func (*Inbound) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{4} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{3} } func (x *Inbound) GetSourceChain() string { @@ -5914,11 +7053,11 @@ func (x *Inbound) GetLogIndex() string { return "" } -func (x *Inbound) GetTxType() InboundTxType { +func (x *Inbound) GetTxType() TxType { if x != nil { return x.TxType } - return InboundTxType_UNSPECIFIED_TX + return TxType_UNSPECIFIED_TX } func (x *Inbound) GetUniversalPayload() *UniversalPayload { @@ -5951,7 +7090,7 @@ type PCTx struct { func (x *PCTx) Reset() { *x = PCTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[5] + mi := &file_uexecutor_v1_types_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5965,7 +7104,7 @@ func (*PCTx) ProtoMessage() {} // Deprecated: Use PCTx.ProtoReflect.Descriptor instead. func (*PCTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{5} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{4} } func (x *PCTx) GetTxHash() string { @@ -6010,22 +7149,123 @@ func (x *PCTx) GetErrorMsg() string { return "" } +type OutboundObservation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // whether execution succeeded + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // block height on external chain + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // external chain tx hash +} + +func (x *OutboundObservation) Reset() { + *x = OutboundObservation{} + if protoimpl.UnsafeEnabled { + mi := &file_uexecutor_v1_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutboundObservation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutboundObservation) ProtoMessage() {} + +// Deprecated: Use OutboundObservation.ProtoReflect.Descriptor instead. +func (*OutboundObservation) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{5} +} + +func (x *OutboundObservation) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *OutboundObservation) GetBlockHeight() uint64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *OutboundObservation) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +type Originating_Pc_TX struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // pc_tx hash that initiated the outbound + LogIndex string `protobuf:"bytes,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // log_index that initiated the outbound +} + +func (x *Originating_Pc_TX) Reset() { + *x = Originating_Pc_TX{} + if protoimpl.UnsafeEnabled { + mi := &file_uexecutor_v1_types_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Originating_Pc_TX) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Originating_Pc_TX) ProtoMessage() {} + +// Deprecated: Use Originating_Pc_TX.ProtoReflect.Descriptor instead. +func (*Originating_Pc_TX) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{6} +} + +func (x *Originating_Pc_TX) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +func (x *Originating_Pc_TX) GetLogIndex() string { + if x != nil { + return x.LogIndex + } + return "" +} + type OutboundTx struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where this outbound is sent - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // outbound tx hash on destination chain - Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient on destination chain - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` // token amount or payload - AssetAddr string `protobuf:"bytes,5,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // token contract if applicable + DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where this outbound is sent + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient on destination chain + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` // token amount + AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // token contract if applicable + Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` // sender of the outbound tx + Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // payload to be executed + GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // gas limit to be used for the outbound tx + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // outbound tx type + PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // pc_tx that originated the outbound + ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain + Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` // id of outbound tx + OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` // status of outbound tx } func (x *OutboundTx) Reset() { *x = OutboundTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[6] + mi := &file_uexecutor_v1_types_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6039,7 +7279,7 @@ func (*OutboundTx) ProtoMessage() {} // Deprecated: Use OutboundTx.ProtoReflect.Descriptor instead. func (*OutboundTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{6} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{7} } func (x *OutboundTx) GetDestinationChain() string { @@ -6049,13 +7289,6 @@ func (x *OutboundTx) GetDestinationChain() string { return "" } -func (x *OutboundTx) GetTxHash() string { - if x != nil { - return x.TxHash - } - return "" -} - func (x *OutboundTx) GetRecipient() string { if x != nil { return x.Recipient @@ -6077,21 +7310,78 @@ func (x *OutboundTx) GetAssetAddr() string { return "" } +func (x *OutboundTx) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *OutboundTx) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + +func (x *OutboundTx) GetGasLimit() string { + if x != nil { + return x.GasLimit + } + return "" +} + +func (x *OutboundTx) GetTxType() TxType { + if x != nil { + return x.TxType + } + return TxType_UNSPECIFIED_TX +} + +func (x *OutboundTx) GetPcTx() *Originating_Pc_TX { + if x != nil { + return x.PcTx + } + return nil +} + +func (x *OutboundTx) GetObservedTx() *OutboundObservation { + if x != nil { + return x.ObservedTx + } + return nil +} + +func (x *OutboundTx) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *OutboundTx) GetOutboundStatus() Status { + if x != nil { + return x.OutboundStatus + } + return Status_UNSPECIFIED +} + type UniversalTx struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - InboundTx *Inbound `protobuf:"bytes,1,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` // Full inbound tx data - PcTx []*PCTx `protobuf:"bytes,2,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // Execution details on Push Chain - OutboundTx *OutboundTx `protobuf:"bytes,3,opt,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` // Outbound tx triggered by this tx - UniversalStatus UniversalTxStatus `protobuf:"varint,4,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` // Current status + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + InboundTx *Inbound `protobuf:"bytes,2,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` // Full inbound tx data + PcTx []*PCTx `protobuf:"bytes,3,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // Execution details on Push Chain + OutboundTx []*OutboundTx `protobuf:"bytes,4,rep,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` // Outbound tx triggered by this tx + UniversalStatus UniversalTxStatus `protobuf:"varint,5,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` // Current status } func (x *UniversalTx) Reset() { *x = UniversalTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[7] + mi := &file_uexecutor_v1_types_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6105,7 +7395,14 @@ func (*UniversalTx) ProtoMessage() {} // Deprecated: Use UniversalTx.ProtoReflect.Descriptor instead. func (*UniversalTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{7} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{8} +} + +func (x *UniversalTx) GetId() string { + if x != nil { + return x.Id + } + return "" } func (x *UniversalTx) GetInboundTx() *Inbound { @@ -6122,7 +7419,7 @@ func (x *UniversalTx) GetPcTx() []*PCTx { return nil } -func (x *UniversalTx) GetOutboundTx() *OutboundTx { +func (x *UniversalTx) GetOutboundTx() []*OutboundTx { if x != nil { return x.OutboundTx } @@ -6180,74 +7477,106 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x28, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x3d, 0x0a, 0x0d, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x9f, 0x03, 0x0a, 0x07, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, - 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x34, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, - 0x61, 0x74, 0x61, 0x3a, 0x1e, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, - 0x2a, 0x11, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x22, 0xc8, 0x01, 0x0a, 0x04, 0x50, 0x43, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, - 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0xcb, - 0x01, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, - 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x6e, 0x74, 0x22, 0x98, 0x03, 0x0a, 0x07, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, + 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x1e, 0x98, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0xc8, 0x01, + 0x0a, 0x04, 0x50, 0x43, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, + 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, + 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, + 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x27, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x1e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x6f, 0x0a, 0x11, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, + 0x63, 0x5f, 0x54, 0x58, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, + 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, + 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, + 0x22, 0xf9, 0x03, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, + 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, + 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x34, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, 0x52, + 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0f, 0x6f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, 0x98, 0x02, 0x0a, - 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, 0x34, 0x0a, 0x0a, - 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, + 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, + 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, @@ -6274,28 +7603,29 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, - 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x35, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x63, 0x0a, - 0x0d, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, - 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, - 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, - 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, - 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, - 0x10, 0x04, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, - 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, - 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, + 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x69, 0x0a, 0x06, + 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, + 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, + 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, + 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, + 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, + 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, + 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6311,35 +7641,39 @@ func file_uexecutor_v1_types_proto_rawDescGZIP() []byte { } var file_uexecutor_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_uexecutor_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_uexecutor_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_uexecutor_v1_types_proto_goTypes = []interface{}{ - (VerificationType)(0), // 0: uexecutor.v1.VerificationType - (UniversalTxStatus)(0), // 1: uexecutor.v1.UniversalTxStatus - (Status)(0), // 2: uexecutor.v1.Status - (InboundTxType)(0), // 3: uexecutor.v1.InboundTxType - (*Params)(nil), // 4: uexecutor.v1.Params - (*UniversalPayload)(nil), // 5: uexecutor.v1.UniversalPayload - (*UniversalAccountId)(nil), // 6: uexecutor.v1.UniversalAccountId - (*InboundStatus)(nil), // 7: uexecutor.v1.InboundStatus - (*Inbound)(nil), // 8: uexecutor.v1.Inbound - (*PCTx)(nil), // 9: uexecutor.v1.PCTx - (*OutboundTx)(nil), // 10: uexecutor.v1.OutboundTx - (*UniversalTx)(nil), // 11: uexecutor.v1.UniversalTx + (VerificationType)(0), // 0: uexecutor.v1.VerificationType + (UniversalTxStatus)(0), // 1: uexecutor.v1.UniversalTxStatus + (Status)(0), // 2: uexecutor.v1.Status + (TxType)(0), // 3: uexecutor.v1.TxType + (*Params)(nil), // 4: uexecutor.v1.Params + (*UniversalPayload)(nil), // 5: uexecutor.v1.UniversalPayload + (*UniversalAccountId)(nil), // 6: uexecutor.v1.UniversalAccountId + (*Inbound)(nil), // 7: uexecutor.v1.Inbound + (*PCTx)(nil), // 8: uexecutor.v1.PCTx + (*OutboundObservation)(nil), // 9: uexecutor.v1.OutboundObservation + (*Originating_Pc_TX)(nil), // 10: uexecutor.v1.Originating_Pc_TX + (*OutboundTx)(nil), // 11: uexecutor.v1.OutboundTx + (*UniversalTx)(nil), // 12: uexecutor.v1.UniversalTx } var file_uexecutor_v1_types_proto_depIdxs = []int32{ 0, // 0: uexecutor.v1.UniversalPayload.v_type:type_name -> uexecutor.v1.VerificationType - 2, // 1: uexecutor.v1.InboundStatus.status:type_name -> uexecutor.v1.Status - 3, // 2: uexecutor.v1.Inbound.tx_type:type_name -> uexecutor.v1.InboundTxType - 5, // 3: uexecutor.v1.Inbound.universal_payload:type_name -> uexecutor.v1.UniversalPayload - 8, // 4: uexecutor.v1.UniversalTx.inbound_tx:type_name -> uexecutor.v1.Inbound - 9, // 5: uexecutor.v1.UniversalTx.pc_tx:type_name -> uexecutor.v1.PCTx - 10, // 6: uexecutor.v1.UniversalTx.outbound_tx:type_name -> uexecutor.v1.OutboundTx - 1, // 7: uexecutor.v1.UniversalTx.universal_status:type_name -> uexecutor.v1.UniversalTxStatus - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 3, // 1: uexecutor.v1.Inbound.tx_type:type_name -> uexecutor.v1.TxType + 5, // 2: uexecutor.v1.Inbound.universal_payload:type_name -> uexecutor.v1.UniversalPayload + 3, // 3: uexecutor.v1.OutboundTx.tx_type:type_name -> uexecutor.v1.TxType + 10, // 4: uexecutor.v1.OutboundTx.pc_tx:type_name -> uexecutor.v1.Originating_Pc_TX + 9, // 5: uexecutor.v1.OutboundTx.observed_tx:type_name -> uexecutor.v1.OutboundObservation + 2, // 6: uexecutor.v1.OutboundTx.outbound_status:type_name -> uexecutor.v1.Status + 7, // 7: uexecutor.v1.UniversalTx.inbound_tx:type_name -> uexecutor.v1.Inbound + 8, // 8: uexecutor.v1.UniversalTx.pc_tx:type_name -> uexecutor.v1.PCTx + 11, // 9: uexecutor.v1.UniversalTx.outbound_tx:type_name -> uexecutor.v1.OutboundTx + 1, // 10: uexecutor.v1.UniversalTx.universal_status:type_name -> uexecutor.v1.UniversalTxStatus + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] 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_uexecutor_v1_types_proto_init() } @@ -6385,7 +7719,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InboundStatus); i { + switch v := v.(*Inbound); i { case 0: return &v.state case 1: @@ -6397,7 +7731,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Inbound); i { + switch v := v.(*PCTx); i { case 0: return &v.state case 1: @@ -6409,7 +7743,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PCTx); i { + switch v := v.(*OutboundObservation); i { case 0: return &v.state case 1: @@ -6421,7 +7755,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutboundTx); i { + switch v := v.(*Originating_Pc_TX); i { case 0: return &v.state case 1: @@ -6433,6 +7767,18 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutboundTx); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uexecutor_v1_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UniversalTx); i { case 0: return &v.state @@ -6451,7 +7797,7 @@ func file_uexecutor_v1_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uexecutor_v1_types_proto_rawDesc, NumEnums: 4, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, 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..2eeacdb6 100644 --- a/api/uvalidator/v1/tx.pulsar.go +++ b/api/uvalidator/v1/tx.pulsar.go @@ -875,6 +875,8 @@ var ( md_MsgAddUniversalValidator protoreflect.MessageDescriptor fd_MsgAddUniversalValidator_signer protoreflect.FieldDescriptor fd_MsgAddUniversalValidator_core_validator_address protoreflect.FieldDescriptor + fd_MsgAddUniversalValidator_pubkey protoreflect.FieldDescriptor + fd_MsgAddUniversalValidator_network protoreflect.FieldDescriptor ) func init() { @@ -882,6 +884,8 @@ 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_pubkey = md_MsgAddUniversalValidator.Fields().ByName("pubkey") + fd_MsgAddUniversalValidator_network = md_MsgAddUniversalValidator.Fields().ByName("network") } var _ protoreflect.Message = (*fastReflection_MsgAddUniversalValidator)(nil) @@ -961,6 +965,18 @@ func (x *fastReflection_MsgAddUniversalValidator) Range(f func(protoreflect.Fiel return } } + if x.Pubkey != "" { + value := protoreflect.ValueOfString(x.Pubkey) + if !f(fd_MsgAddUniversalValidator_pubkey, value) { + 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. @@ -980,6 +996,10 @@ func (x *fastReflection_MsgAddUniversalValidator) Has(fd protoreflect.FieldDescr return x.Signer != "" case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": return x.CoreValidatorAddress != "" + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + return x.Pubkey != "" + 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")) @@ -1000,6 +1020,10 @@ func (x *fastReflection_MsgAddUniversalValidator) Clear(fd protoreflect.FieldDes x.Signer = "" case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": x.CoreValidatorAddress = "" + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + x.Pubkey = "" + 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")) @@ -1022,6 +1046,12 @@ func (x *fastReflection_MsgAddUniversalValidator) Get(descriptor protoreflect.Fi case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": value := x.CoreValidatorAddress return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + value := x.Pubkey + 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")) @@ -1046,6 +1076,10 @@ func (x *fastReflection_MsgAddUniversalValidator) Set(fd protoreflect.FieldDescr x.Signer = value.Interface().(string) case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": x.CoreValidatorAddress = value.Interface().(string) + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + x.Pubkey = 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")) @@ -1066,10 +1100,17 @@ func (x *fastReflection_MsgAddUniversalValidator) Set(fd protoreflect.FieldDescr // 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")) + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + panic(fmt.Errorf("field pubkey 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")) @@ -1083,25 +1124,1013 @@ func (x *fastReflection_MsgAddUniversalValidator) Mutable(fd protoreflect.FieldD // 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": + case "uvalidator.v1.MsgAddUniversalValidator.signer": + return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": + return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + 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)) + } + l = len(x.Pubkey) + 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.Pubkey) > 0 { + i -= len(x.Pubkey) + copy(dAtA[i:], x.Pubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) + i-- + dAtA[i] = 0x1a + } + 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 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = 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_core_validator_address protoreflect.FieldDescriptor + fd_MsgUpdateUniversalValidator_pubkey 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_core_validator_address = md_MsgUpdateUniversalValidator.Fields().ByName("core_validator_address") + fd_MsgUpdateUniversalValidator_pubkey = md_MsgUpdateUniversalValidator.Fields().ByName("pubkey") + 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.CoreValidatorAddress != "" { + value := protoreflect.ValueOfString(x.CoreValidatorAddress) + if !f(fd_MsgUpdateUniversalValidator_core_validator_address, value) { + return + } + } + if x.Pubkey != "" { + value := protoreflect.ValueOfString(x.Pubkey) + if !f(fd_MsgUpdateUniversalValidator_pubkey, 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. +// +// 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_MsgUpdateUniversalValidator) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + return x.Signer != "" + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + return x.CoreValidatorAddress != "" + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + return x.Pubkey != "" + 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.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator 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_MsgUpdateUniversalValidator) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + x.Signer = "" + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + x.CoreValidatorAddress = "" + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + x.Pubkey = "" + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + x.Network = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator 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_MsgUpdateUniversalValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + value := x.CoreValidatorAddress + return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + value := x.Pubkey + 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.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator 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_MsgUpdateUniversalValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + x.Signer = value.Interface().(string) + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + x.CoreValidatorAddress = value.Interface().(string) + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + x.Pubkey = 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.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator 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_MsgUpdateUniversalValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + 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")) + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + panic(fmt.Errorf("field pubkey of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) + } + 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_MsgUpdateUniversalValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": return protoreflect.ValueOfString("") - case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + 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 +2138,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 +2149,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 +2161,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 +2171,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, @@ -1164,6 +2193,14 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Pubkey) + 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) } @@ -1174,7 +2211,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,6 +2230,27 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met 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.Pubkey) > 0 { + i -= len(x.Pubkey) + copy(dAtA[i:], x.Pubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) + i-- + dAtA[i] = 0x1a + } if len(x.CoreValidatorAddress) > 0 { i -= len(x.CoreValidatorAddress) copy(dAtA[i:], x.CoreValidatorAddress) @@ -1218,7 +2276,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 +2308,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: @@ -1320,6 +2378,74 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met } x.CoreValidatorAddress = 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 Pubkey", 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.Pubkey = 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:]) @@ -1356,24 +2482,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 +2510,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 +2554,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 +2568,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 +2584,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 +2600,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 +2620,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 +2640,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 +2677,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 +2688,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 +2700,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 +2710,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 +2734,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 +2764,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 +2796,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 +2859,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 +3339,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 +3779,10 @@ 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"` + // pubkey is the consensus public key for this universal validator + Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,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 +3819,20 @@ func (x *MsgAddUniversalValidator) GetCoreValidatorAddress() string { return "" } +func (x *MsgAddUniversalValidator) GetPubkey() string { + if x != nil { + return x.Pubkey + } + 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 +3859,95 @@ 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"` + // 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"` + // pubkey is the consensus public key for this universal validator + Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // network metadata for validator node (IP, etc.) + Network *NetworkInfo `protobuf:"bytes,4,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) GetCoreValidatorAddress() string { + if x != nil { + return x.CoreValidatorAddress + } + return "" +} + +func (x *MsgUpdateUniversalValidator) GetPubkey() string { + if x != nil { + return x.Pubkey + } + 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 +3962,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 +3976,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 +4002,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 +4016,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 +4033,120 @@ 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, - 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, + 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, 0xa8, 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, + 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 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, 0xae, 0x02, 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, 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, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 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, + 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, 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, 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, + 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, 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, + 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, 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, 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, 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, - 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, + 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 +4161,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 +4200,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 +4251,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 +4263,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 +4305,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..b34f0a2d --- /dev/null +++ b/api/uvalidator/v1/validator.pulsar.go @@ -0,0 +1,3000 @@ +// 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 + fd_IdentityInfo_pubkey 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") + fd_IdentityInfo_pubkey = md_IdentityInfo.Fields().ByName("pubkey") +} + +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 + } + } + if x.Pubkey != "" { + value := protoreflect.ValueOfString(x.Pubkey) + if !f(fd_IdentityInfo_pubkey, 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 != "" + case "uvalidator.v1.IdentityInfo.pubkey": + return x.Pubkey != "" + 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 = "" + case "uvalidator.v1.IdentityInfo.pubkey": + x.Pubkey = "" + 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) + case "uvalidator.v1.IdentityInfo.pubkey": + value := x.Pubkey + 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) + case "uvalidator.v1.IdentityInfo.pubkey": + x.Pubkey = 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")) + case "uvalidator.v1.IdentityInfo.pubkey": + panic(fmt.Errorf("field pubkey 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("") + case "uvalidator.v1.IdentityInfo.pubkey": + 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)) + } + l = len(x.Pubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*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.Pubkey) > 0 { + i -= len(x.Pubkey) + copy(dAtA[i:], x.Pubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) + i-- + dAtA[i] = 0x12 + } + 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 + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var 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.Pubkey = 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_NetworkInfo protoreflect.MessageDescriptor + fd_NetworkInfo_ip protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_NetworkInfo = File_uvalidator_v1_validator_proto.Messages().ByName("NetworkInfo") + fd_NetworkInfo_ip = md_NetworkInfo.Fields().ByName("ip") +} + +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.Ip != "" { + value := protoreflect.ValueOfString(x.Ip) + if !f(fd_NetworkInfo_ip, 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.ip": + return x.Ip != "" + 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.ip": + x.Ip = "" + 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.ip": + value := x.Ip + return protoreflect.ValueOfString(value) + 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.ip": + x.Ip = value.Interface().(string) + 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.ip": + panic(fmt.Errorf("field ip 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.ip": + return protoreflect.ValueOfString("") + 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.Ip) + 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().(*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.Ip) > 0 { + i -= len(x.Ip) + copy(dAtA[i:], x.Ip) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Ip))) + 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 Ip", 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.Ip = 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 + Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // Validator consensus public key +} + +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 "" +} + +func (x *IdentityInfo) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + +// Validator network metadata +type NetworkInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // Node IP address +} + +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) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +// 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, 0x7f, 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, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x75, 0x62, 0x6b, 0x65, 0x79, 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, 0x3f, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 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..32a426b3 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,8 +752,26 @@ 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(), + ), + ) + + app.EVMKeeper.SetHooks(uexecutorkeeper.NewEVMHooks(app.UexecutorKeeper)) + // NOTE: we are adding all available EVM extensions. // Not all of them need to be enabled, which can be configured on a per-chain basis. corePrecompiles := NewAvailableStaticPrecompiles( @@ -1017,7 +1040,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 +1091,7 @@ func NewChainApp( utxverifiertypes.ModuleName, uregistrytypes.ModuleName, uvalidatortypes.ModuleName, + utsstypes.ModuleName, ) app.ModuleManager.SetOrderEndBlockers( @@ -1090,6 +1115,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 +1166,7 @@ func NewChainApp( utxverifiertypes.ModuleName, uregistrytypes.ModuleName, uvalidatortypes.ModuleName, + utsstypes.ModuleName, } app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...) @@ -1580,6 +1607,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/uexecutor/v1/tx.proto b/proto/uexecutor/v1/tx.proto index 007013c6..79a7d788 100755 --- a/proto/uexecutor/v1/tx.proto +++ b/proto/uexecutor/v1/tx.proto @@ -30,6 +30,9 @@ service Msg { // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC rpc VoteInbound(MsgVoteInbound) returns (MsgVoteInboundResponse); + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + rpc VoteOutbound(MsgVoteOutbound) returns (MsgVoteOutboundResponse); + // VoteGasPrice defines a message for universal validators to vote on the gas price rpc VoteGasPrice(MsgVoteGasPrice) returns (MsgVoteGasPriceResponse); } @@ -130,6 +133,21 @@ message MsgVoteInbound { // MsgVoteInboundResponse defines the response for MsgExecutePayload. message MsgVoteInboundResponse {} +// MsgVoteOutbound allows a universal validator to vote on an outbound tx observation. +message MsgVoteOutbound { + option (amino.name) = "ue/MsgVoteOutbound"; + option (cosmos.msg.v1.signer) = "signer"; + + // signer is the Cosmos address initiating the tx (used for tx signing) + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string utx_id = 2; // UniversalTx Id + string outbound_id = 3; // index of outbound tx + OutboundObservation observed_tx = 4; // observed tx on destination chain +} + +// MsgVoteInboundResponse defines the response for MsgExecutePayload. +message MsgVoteOutboundResponse {} + // MsgVoteGasPrice is broadcasted by Universal Validators to submit their observed gas prices message MsgVoteGasPrice { option (amino.name) = "uexecutor/MsgVoteGasPrice"; diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index f5ab0f36..41742656 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -65,19 +65,16 @@ enum UniversalTxStatus { enum Status { UNSPECIFIED = 0; PENDING = 1; - FINALIZED = 2; + OBSERVED = 2; } -message InboundStatus { - Status status = 1; -} - -enum InboundTxType { +enum TxType { UNSPECIFIED_TX = 0; GAS = 1; // fee abstraction FUNDS = 2; // synthetic FUNDS_AND_PAYLOAD = 3; // synthetic + payload exec GAS_AND_PAYLOAD = 4; // fee abstraction + payload exec + PAYLOAD = 5; } message Inbound { @@ -92,7 +89,7 @@ message Inbound { string amount = 5; // synthetic token amount bridged in string asset_addr = 6; // address of erc20 token address on source chain string log_index = 7; // log index that originated the cross chain tx - InboundTxType tx_type = 8; // inbound tx type + TxType tx_type = 8; // inbound tx type UniversalPayload universal_payload = 9; // payload is the universal payload to be executed string verification_data = 10; // verification_data is the bytes passed as verifier data for the given payload. } @@ -110,16 +107,40 @@ message PCTx { string error_msg = 7; // optional error info if failed } +message OutboundObservation { + option (amino.name) = "uexecutor/outbound_observation"; + option (gogoproto.equal) = true; + + bool success = 1; // whether execution succeeded + uint64 block_height = 2; // block height on external chain + string tx_hash = 3; // external chain tx hash +} + +message Originating_Pc_TX { + option (amino.name) = "uexecutor/originating_pc_tx"; + option (gogoproto.equal) = true; + + string tx_hash = 1; // pc_tx hash that initiated the outbound + string log_index = 2; // log_index that initiated the outbound +} + message OutboundTx { option (amino.name) = "uexecutor/outbound_tx"; option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; string destination_chain = 1; // chain where this outbound is sent - string tx_hash = 2; // outbound tx hash on destination chain - string recipient = 3; // recipient on destination chain - string amount = 4; // token amount or payload - string asset_addr = 5; // token contract if applicable + string recipient = 2; // recipient on destination chain + string amount = 3; // token amount + string asset_addr = 4; // token contract if applicable + string sender = 5; // sender of the outbound tx + string payload = 6; // payload to be executed + string gas_limit = 7; // gas limit to be used for the outbound tx + TxType tx_type = 8; // outbound tx type + Originating_Pc_TX pc_tx = 9; // pc_tx that originated the outbound + OutboundObservation observed_tx = 10; // observed tx on destination chain + string id = 11; // id of outbound tx + Status outbound_status = 12; // status of outbound tx } message UniversalTx { @@ -127,8 +148,9 @@ message UniversalTx { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - Inbound inbound_tx = 1; // Full inbound tx data - repeated PCTx pc_tx = 2; // Execution details on Push Chain - OutboundTx outbound_tx = 3; // Outbound tx triggered by this tx - UniversalTxStatus universal_status = 4; // Current status + string id = 1; + Inbound inbound_tx = 2; // Full inbound tx data + repeated PCTx pc_tx = 3; // Execution details on Push Chain + repeated OutboundTx outbound_tx = 4; // Outbound tx triggered by this tx + UniversalTxStatus universal_status = 5; // Current status } 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..b000898a 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,35 @@ message MsgAddUniversalValidator { // core_validator_address is the address of the core validator. string core_validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // pubkey is the consensus public key for this universal validator + string pubkey = 3; + + // 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"]; + + // core_validator_address is the address of the core validator. + string core_validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // pubkey is the consensus public key for this universal validator + string pubkey = 3; + + // network metadata for validator node (IP, etc.) + NetworkInfo network = 4; +} + +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..66ac59d3 --- /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 + string pubkey = 2; // Validator consensus public key +} + +// Validator network metadata +message NetworkInfo { + option (amino.name) = "uvalidator/network_info"; + option (gogoproto.equal) = true; + + string ip = 1; // Node IP address +} + +// 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/test/integration/uexecutor/inbound_initiated_outbound_test.go b/test/integration/uexecutor/inbound_initiated_outbound_test.go new file mode 100644 index 00000000..60a832fc --- /dev/null +++ b/test/integration/uexecutor/inbound_initiated_outbound_test.go @@ -0,0 +1,195 @@ +package integrationtest + +import ( + "fmt" + "testing" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + authz "github.com/cosmos/cosmos-sdk/x/authz" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + 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" +) + +// This is the SELECTOR for withdraw(address,bytes,address,uint,uint,RevertInstructions) +var withdrawSelector = "0x720b3fbf" + +// Hardcoded test event signature of UniversalTxWithdraw +const UniversalTxWithdrawEventSig = "UniversalTxWithdraw" + +func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []string, *uexecutortypes.Inbound, []stakingtypes.Validator, common.Address) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + + chainConfigTest := uregistrytypes.ChainConfig{ + Chain: "eip155:11155111", + VmType: uregistrytypes.VmType_EVM, + PublicRpcUrl: "https://sepolia.drpc.org", + GatewayAddress: "0x28E0F09bE2321c1420Dc60Ee146aACbD68B335Fe", + BlockConfirmation: &uregistrytypes.BlockConfirmation{ + FastInbound: 5, + StandardInbound: 12, + }, + GatewayMethods: []*uregistrytypes.GatewayMethods{{ + Name: "addFunds", + Identifier: "", + EventIdentifier: "0xb28f49668e7e76dc96d7aabe5b7f63fecfbd1c3574774c05e8204e749fd96fbd", + ConfirmationType: 5, + }}, + Enabled: &uregistrytypes.ChainEnabled{ + IsInboundEnabled: true, + IsOutboundEnabled: true, + }, + } + + prc20Address := utils.GetDefaultAddresses().PRC20USDCAddr + testAddress := utils.GetDefaultAddresses().DefaultTestAddr + + tokenConfigTest := uregistrytypes.TokenConfig{ + Chain: "eip155:11155111", + Address: prc20Address.String(), + Name: "USD Coin", + Symbol: "USDC", + Decimals: 6, + Enabled: true, + LiquidityCap: "1000000000000000000000000", + TokenType: 1, + NativeRepresentation: &uregistrytypes.NativeRepresentation{ + Denom: "", + ContractAddress: prc20Address.String(), + }, + } + + app.UregistryKeeper.AddChainConfig(ctx, &chainConfigTest) + app.UregistryKeeper.AddTokenConfig(ctx, &tokenConfigTest) + + // Register each validator with a universal validator + universalVals := make([]string, len(validators)) + for i, val := range validators { + coreValAddr := val.OperatorAddress + universalValAddr := sdk.AccAddress([]byte( + fmt.Sprintf("universal-validator-%d", i), + )).String() + + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + require.NoError(t, err) + + universalVals[i] = universalValAddr + } + + // Grant authz permission: core validator -> universal validator + for i, val := range validators { + accAddr, err := sdk.ValAddressFromBech32(val.OperatorAddress) // gives ValAddress + require.NoError(t, err) + + coreValAddr := sdk.AccAddress(accAddr) // converts to normal account address + + uniValAddr := sdk.MustAccAddressFromBech32(universalVals[i]) + + // Define grant for MsgVoteInbound + msgType := sdk.MsgTypeURL(&uexecutortypes.MsgVoteInbound{}) + auth := authz.NewGenericAuthorization(msgType) + + // Expiration + exp := ctx.BlockTime().Add(time.Hour) + + // SaveGrant takes (ctx, grantee, granter, authz.Authorization, *time.Time) + err = app.AuthzKeeper.SaveGrant(ctx, uniValAddr, coreValAddr, auth, &exp) + require.NoError(t, err) + } + + validUA := &uexecutortypes.UniversalAccountId{ + ChainNamespace: "eip155", + ChainId: "11155111", + Owner: testAddress, + } + + ueModuleAccAddress, _ := app.UexecutorKeeper.GetUeModuleAddress(ctx) + receipt, err := app.UexecutorKeeper.DeployUEAV2(ctx, ueModuleAccAddress, validUA) + ueaAddrHex := common.BytesToAddress(receipt.Ret) + require.NoError(t, err) + + // signature + validVerificationData := "0x4ac452e4e2db243b06e58d3720aeecf690c3636d9b407e1207d66c4118a1b17541a142b25108540a15b2ccbdd6dd7c16d541e3bde52679194bc76ecfad3b1fd11b" + + validUP := &uexecutortypes.UniversalPayload{ + To: utils.GetDefaultAddresses().UniversalGatewayPCAddr.Hex(), + Value: "0", + Data: "0x720b3fbf00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000141234567890abcdef1234567890abcdef12345678000000000000000000000000000000000000000000000000f1000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000009726566756e642d6d650000000000000000000000000000000000000000000000", + GasLimit: "21000000", + MaxFeePerGas: "1000000000", + MaxPriorityFeePerGas: "200000000", + Nonce: "0", + Deadline: "0", + VType: uexecutortypes.VerificationType(0), + } + + inbound := &uexecutortypes.Inbound{ + SourceChain: "eip155:11155111", + TxHash: "0xabcd", + Sender: testAddress, + Recipient: "", + Amount: "1000000", + AssetAddr: prc20Address.String(), + LogIndex: "1", + TxType: uexecutortypes.TxType_FUNDS_AND_PAYLOAD, + UniversalPayload: validUP, + VerificationData: validVerificationData, + } + + return app, ctx, universalVals, inbound, validators, ueaAddrHex +} + +func TestInboundInitiatedOutbound(t *testing.T) { + + t.Run("successfully creates outbound in the UniversalTx when payload invokes Gateway's withdraw fn", func(t *testing.T) { + app, ctx, vals, inbound, coreVals, _ := setupInboundInitiatedOutboundTest(t, 4) + + // --- Quorum reached --- + for i := 0; i < 3; i++ { + valAddr, err := sdk.ValAddressFromBech32(coreVals[i].OperatorAddress) + require.NoError(t, err) + coreValAcc := sdk.AccAddress(valAddr).String() + + err = utils.ExecVoteInbound(t, ctx, app, vals[i], coreValAcc, inbound) + require.NoError(t, err) + } + + utxKey := uexecutortypes.GetInboundUniversalTxKey(*inbound) + utx, _, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxKey) + require.NoError(t, err) + + require.NotEmpty(t, utx.OutboundTx, "OutboundTx should exist after successful withdraw event") + require.Len(t, utx.OutboundTx, 1, "Only one outbound expected") + + out := utx.OutboundTx[0] + + // Validate outbound params + require.Equal(t, + "eip155:11155111", + out.DestinationChain, + "Destination chain must be correct", + ) + + require.Equal(t, + "222", + out.GasLimit, + "Gas limit must match event (gasFeeUsed) value", + ) + + // checks + require.Equal(t, "0x1234567890abcdef1234567890abcdef12345678", out.Recipient) + require.Equal(t, "1000000", out.Amount) + require.Equal(t, uexecutortypes.TxType_FUNDS_AND_PAYLOAD, out.TxType) + require.Equal(t, uexecutortypes.Status_PENDING, out.OutboundStatus) + }) +} 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 95% 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..5b4fbf31 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,10 @@ func setupInboundBridgePayloadTest(t *testing.T, numVals int) (*app.ChainApp, sd fmt.Sprintf("universal-validator-%d", i), )).String() - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr) + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) require.NoError(t, err) universalVals[i] = universalValAddr @@ -131,7 +135,7 @@ func setupInboundBridgePayloadTest(t *testing.T, numVals int) (*app.ChainApp, sd Amount: "1000000", AssetAddr: prc20Address.String(), LogIndex: "1", - TxType: uexecutortypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uexecutortypes.TxType_FUNDS_AND_PAYLOAD, UniversalPayload: validUP, VerificationData: validVerificationData, } @@ -197,7 +201,7 @@ func TestInboundSyntheticBridgePayload(t *testing.T) { Amount: "1000000", AssetAddr: prc20Address.String(), LogIndex: "1", - TxType: uexecutortypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uexecutortypes.TxType_FUNDS_AND_PAYLOAD, UniversalPayload: validUP, VerificationData: "", } @@ -219,7 +223,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 +301,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..1fff6f09 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,10 @@ func setupInboundBridgeTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte fmt.Sprintf("universal-validator-%d", i), )).String() - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr) + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) require.NoError(t, err) universalVals[i] = universalValAddr @@ -112,7 +116,7 @@ func setupInboundBridgeTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte Amount: "1000000", AssetAddr: prc20Address.String(), LogIndex: "1", - TxType: uexecutortypes.InboundTxType_FUNDS, + TxType: uexecutortypes.TxType_FUNDS, UniversalPayload: nil, VerificationData: "", } 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..fa6b9af0 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,10 @@ 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)) + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + + require.NoError(t, app.UvalidatorKeeper.AddUniversalValidator(ctx, val.OperatorAddress, pubkey, 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..503d1545 --- /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{Ip: "192.168.1." + string(rune(i+1))} + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, 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..faaf7005 --- /dev/null +++ b/test/integration/uvalidator/msg_add_universal_validator_test.go @@ -0,0 +1,111 @@ +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 + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.1.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, 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, pubkey, uv.IdentifyInfo.Pubkey) + } + }) + + 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, Pubkey: "old-pub"}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_INACTIVE, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, old)) + + pubkey := "new-pub" + network := uvalidatortypes.NetworkInfo{Ip: "10.0.0.1"} + err := k.AddUniversalValidator(ctx, val.OperatorAddress, pubkey, 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, pubkey, uv.IdentifyInfo.Pubkey) + }) + + 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, "pub", 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(), "pub", 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", "pub", 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..f51a7367 --- /dev/null +++ b/test/integration/uvalidator/msg_update_universal_validator_test.go @@ -0,0 +1,81 @@ +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 + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.1.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, 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"} + + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, newPubkey, 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, newPubkey, updatedVal.IdentifyInfo.Pubkey) + require.Equal(t, newNetwork.Ip, updatedVal.NetworkInfo.Ip) + }) + + t.Run("fails when validator does not exist", func(t *testing.T) { + app, ctx, _ := setupUpdateUniversalValidatorTest(t, 1) + + coreVal := "pushvaloper1invalidaddress00000000000000000000000" + pubkey := "somekey" + network := uvalidatortypes.NetworkInfo{Ip: "10.0.0.2"} + + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, pubkey, 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 + + pubkey := "random" + network := uvalidatortypes.NetworkInfo{Ip: "10.0.0.4"} + + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, pubkey, 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 59% rename from testutils/bytecode.go rename to test/utils/bytecode.go index 2acd8244..1c32ba3e 100644 --- a/testutils/bytecode.go +++ b/test/utils/bytecode.go @@ -1,6 +1,6 @@ -package testutils +package utils -const UEA_EVM_BYTECODE = "6080604052348015600e575f80fd5b5060015f55611a2d806100205f395ff3fe6080604052600436106100bb575f3560e01c8063affed0e011610071578063f698da251161004c578063f698da2514610208578063f85135cc1461021c578063ffa1ad741461023d575f80fd5b8063affed0e0146101a5578063ebcd653b146101ba578063f0a136bc146101e9575f80fd5b80633042c33e116100a15780633042c33e1461012b57806338e198011461014c578063872347cf14610186575f80fd5b80631db61b54146100c65780632f546ac91461010c575f80fd5b366100c257005b5f80fd5b3480156100d1575f80fd5b506100f97f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd81565b6040519081526020015b60405180910390f35b348015610117575f80fd5b506100f961012636600461102f565b610292565b348015610136575f80fd5b5061014a61014536600461116e565b610451565b005b348015610157575f80fd5b5061016161090181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610103565b348015610191575f80fd5b5061014a6101a0366004611275565b6104fd565b3480156101b0575f80fd5b506100f960055481565b3480156101c5575f80fd5b506101d96101d43660046112de565b610740565b6040519015158152602001610103565b3480156101f4575f80fd5b506101d9610203366004611322565b610793565b348015610213575f80fd5b506100f96108d3565b348015610227575f80fd5b50610230610a17565b60405161010391906113bc565b348015610248575f80fd5b506102856040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b6040516101039190611457565b5f60e0820135156102db578160e001354211156102db576040517ff87d927100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f1d8b43e5066bd20bfdacf7b8f4790c0309403b18434e3699ce3c5e57502ed8c461030a6020850185611470565b602085013561031c60408701876114a3565b60405161032a929190611504565b6040518091039020866060013587608001358860a001356005548a60e001358b61010001602081019061035d9190611513565b600181111561036e5761036e611531565b60408051602081019b909b5273ffffffffffffffffffffffffffffffffffffffff909916988a01989098526060890196909652608088019490945260a087019290925260c086015260e085015261010084015261012083015260ff16610140820152610160016040516020818303038152906040528051906020012090505f6103f56108d3565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101829052604281018490529091506062016040516020818303038152906040528051906020012092505050919050565b60045460ff161561048e576040517f69783db700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815182919081906104cd90826115f4565b50602082015160018201906104e290826115f4565b50604082015160028201906104f790826115f4565b50505050565b610505610bfc565b5f61050f84610292565b9050600161052561012086016101008701611513565b600181111561053657610536611531565b0361058c57811580610550575061054e818484610793565b155b15610587576040517fce5a759800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610601565b6105cb8184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061074092505050565b610601576040517fc7dbd31d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805460010190555f806106196020870187611470565b73ffffffffffffffffffffffffffffffffffffffff16602087013561064160408901896114a3565b60405161064f929190611504565b5f6040518083038185875af1925050503d805f8114610689576040519150601f19603f3d011682016040523d82523d5f602084013e61068e565b606091505b5091509150816106da578051156106a85780518082602001fd5b6040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fafc6dd5d2ec56ba31e4cd9723889549a104622ecdb580761d055cde575365b7d600361070a6020890189611470565b61071760408a018a6114a3565b60405161072794939291906117ef565b60405180910390a150505061073b60015f55565b505050565b5f8061074c8484610c3d565b9050610758600361183b565b60601c73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150505b92915050565b6040515f9081908190610901906107bb906001906002906003908b908b908b906024016118c0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f45048e03000000000000000000000000000000000000000000000000000000001790525161083c9190611920565b5f60405180830381855afa9150503d805f8114610874576040519150601f19603f3d011682016040523d82523d5f602084013e610879565b606091505b5091509150816108b5576040517ffd23ff6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808060200190518101906108c9919061193b565b9695505050505050565b5f806109686001800180546108e79061155e565b80601f01602080910402602001604051908101604052809291908181526020018280546109139061155e565b801561095e5780601f106109355761010080835404028352916020019161095e565b820191905f5260205f20905b81548152906001019060200180831161094157829003601f168201915b5050505050610c65565b604080518082018252600581527f302e312e3000000000000000000000000000000000000000000000000000000060209182015281517f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd818301527faa7cdbe2cce2ec7b606b0e199ddd9b264a6e645e767fb8479a7917dcd1b8693f818401526060810193909352306080808501919091528251808503909101815260a0909301909152815191012092915050565b610a3b60405180606001604052806060815260200160608152602001606081525090565b60016040518060600160405290815f82018054610a579061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610a839061155e565b8015610ace5780601f10610aa557610100808354040283529160200191610ace565b820191905f5260205f20905b815481529060010190602001808311610ab157829003601f168201915b50505050508152602001600182018054610ae79061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610b139061155e565b8015610b5e5780601f10610b3557610100808354040283529160200191610b5e565b820191905f5260205f20905b815481529060010190602001808311610b4157829003601f168201915b50505050508152602001600282018054610b779061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba39061155e565b8015610bee5780601f10610bc557610100808354040283529160200191610bee565b820191905f5260205f20905b815481529060010190602001808311610bd157829003601f168201915b505050505081525050905090565b60025f5403610c37576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b5f805f80610c4b8686610dd5565b925092509250610c5b8282610e1e565b5090949350505050565b80515f90829080610cfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f456d70747920737472696e672063616e6e6f7420626520636f6e76657274656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5f5b81811015610dcd575f838281518110610d1a57610d1a61195a565b016020015160f81c905060308110801590610d39575060398160ff1611155b610d9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f6e2d64696769742063686172616374657220666f756e642e0000000000006044820152606401610cf4565b610daa6030826119b4565b60ff16610db886600a6119cd565b610dc291906119e4565b945050600101610cff565b505050919050565b5f805f8351604103610e0c576020840151604085015160608601515f1a610dfe88828585610f25565b955095509550505050610e17565b505081515f91506002905b9250925092565b5f826003811115610e3157610e31611531565b03610e3a575050565b6001826003811115610e4e57610e4e611531565b03610e85576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115610e9957610e99611531565b03610ed3576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610cf4565b6003826003811115610ee757610ee7611531565b03610f21576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610cf4565b5050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610f5e57505f9150600390508261100e565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610faf573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661100557505f92506001915082905061100e565b92505f91508190505b9450945094915050565b5f6101208284031215611029575f80fd5b50919050565b5f6020828403121561103f575f80fd5b813567ffffffffffffffff811115611055575f80fd5b61106184828501611018565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156110b9576110b9611069565b60405290565b5f82601f8301126110ce575f80fd5b8135602083015f8067ffffffffffffffff8411156110ee576110ee611069565b506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85018116603f0116810181811067ffffffffffffffff8211171561113b5761113b611069565b604052838152905080828401871015611152575f80fd5b838360208301375f602085830101528094505050505092915050565b5f6020828403121561117e575f80fd5b813567ffffffffffffffff811115611194575f80fd5b8201606081850312156111a5575f80fd5b6111ad611096565b813567ffffffffffffffff8111156111c3575f80fd5b6111cf868285016110bf565b825250602082013567ffffffffffffffff8111156111eb575f80fd5b6111f7868285016110bf565b602083015250604082013567ffffffffffffffff811115611216575f80fd5b611222868285016110bf565b604083015250949350505050565b5f8083601f840112611240575f80fd5b50813567ffffffffffffffff811115611257575f80fd5b60208301915083602082850101111561126e575f80fd5b9250929050565b5f805f60408486031215611287575f80fd5b833567ffffffffffffffff81111561129d575f80fd5b6112a986828701611018565b935050602084013567ffffffffffffffff8111156112c5575f80fd5b6112d186828701611230565b9497909650939450505050565b5f80604083850312156112ef575f80fd5b82359150602083013567ffffffffffffffff81111561130c575f80fd5b611318858286016110bf565b9150509250929050565b5f805f60408486031215611334575f80fd5b83359250602084013567ffffffffffffffff8111156112c5575f80fd5b5f5b8381101561136b578181015183820152602001611353565b50505f910152565b5f815180845261138a816020860160208601611351565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f8251606060208401526113d76080840182611373565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160408501526114128282611373565b91505060408401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301606085015261144e8282611373565b95945050505050565b602081525f6114696020830184611373565b9392505050565b5f60208284031215611480575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114611469575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126114d6575f80fd5b83018035915067ffffffffffffffff8211156114f0575f80fd5b60200191503681900382131561126e575f80fd5b818382375f9101908152919050565b5f60208284031215611523575f80fd5b813560028110611469575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600181811c9082168061157257607f821691505b602082108103611029577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f82111561073b57805f5260205f20601f840160051c810160208510156115ce5750805b601f840160051c820191505b818110156115ed575f81556001016115da565b5050505050565b815167ffffffffffffffff81111561160e5761160e611069565b6116228161161c845461155e565b846115a9565b6020601f821160018114611673575f831561163d5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1784556115ed565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156116c057878501518255602094850194600190920191016116a0565b50848210156116fc57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b5f81546117178161155e565b808552600182168015611731576001811461176b5761179f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020870152602082151560051b870101935061179f565b845f5260205f205f5b838110156117965781546020828a010152600182019150602081019050611774565b87016020019450505b50505092915050565b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081525f611801606083018761170b565b73ffffffffffffffffffffffffffffffffffffffff8616602084015282810360408401526118308185876117a8565b979650505050505050565b5f611846825461155e565b82601f82111561185a57835f5260205f2090505b547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008116925060148210156118b9577fffffffffffffffffffffffffffffffffffffffff000000000000000000000000808360140360031b1b82161692505b5050919050565b60a081525f6118d260a083018961170b565b82810360208401526118e4818961170b565b905082810360408401526118f8818861170b565b905085606084015282810360808401526119138185876117a8565b9998505050505050505050565b5f8251611931818460208701611351565b9190910192915050565b5f6020828403121561194b575f80fd5b81518015158114611469575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60ff828116828216039081111561078d5761078d611987565b808202811582820484141761078d5761078d611987565b8082018082111561078d5761078d61198756fea2646970667358221220cd3107c9a2166b22a9f2db8af03f9834a7f41cdf5fd1af8ad7c1b47e3378c18e64736f6c634300081a0033" +const UEA_EVM_BYTECODE = "6080604052600436106100d1575f3560e01c8063872347cf1161007c578063f0a136bc11610057578063f0a136bc1461023c578063f698da251461025b578063f85135cc1461026f578063ffa1ad7414610290575f80fd5b8063872347cf146101d9578063affed0e0146101f8578063ebcd653b1461020d575f80fd5b80632f546ac9116100ac5780632f546ac9146101625780633042c33e1461018157806338e19801146101a0575f80fd5b8063070beb7f146100dc578063113e1ca81461010e5780631db61b541461012f575f80fd5b366100d857005b5f80fd5b3480156100e7575f80fd5b506100fb6100f636600461154a565b6102e5565b6040519081526020015b60405180910390f35b348015610119575f80fd5b5061012d6101283660046115d1565b610415565b005b34801561013a575f80fd5b506100fb7f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd81565b34801561016d575f80fd5b506100fb61017c36600461163e565b610614565b34801561018c575f80fd5b5061012d61019b366004611708565b61075b565b3480156101ab575f80fd5b506101b460cb81565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610105565b3480156101e4575f80fd5b5061012d6101f33660046117ca565b610807565b348015610203575f80fd5b506100fb60055481565b348015610218575f80fd5b5061022c61022736600461181a565b610b11565b6040519015158152602001610105565b348015610247575f80fd5b5061022c61025636600461185e565b610b64565b348015610266575f80fd5b506100fb610ca3565b34801561027a575f80fd5b50610283610de7565b60405161010591906118f8565b34801561029b575f80fd5b506102d86040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516101059190611993565b5f8082604001511180156102fc5750816040015142115b15610333576040517ff87d927100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160055460408085015181517fdf4902934e0ff647f420563d8015e84af8b95595f538c71618622fe3ea2bbb0c602082015273ffffffffffffffffffffffffffffffffffffffff90941691840191909152606083019190915260808201525f9060a0015b6040516020818303038152906040528051906020012090505f6103b9610ca3565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101829052604281018490529091506062016040516020818303038152906040528051906020012092505050919050565b61041d610fcc565b5f6104306100f63686900386018661154a565b90506104718184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b1192505050565b6104a7576040517fc7dbd31d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600580546001019055604080516004815260248101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f52fa5c22000000000000000000000000000000000000000000000000000000001790525f908190610518908801886119a5565b73ffffffffffffffffffffffffffffffffffffffff168360405161053c91906119be565b5f60405180830381855af49150503d805f8114610574576040519150601f19603f3d011682016040523d82523d5f602084013e610579565b606091505b5091509150816105c5578051156105935780518082602001fd5b6040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546040517f3c72595b43537fb9a702f683573f82d3b3ad19487fd74cbb94728a41ec76d1cb916105fa9160039190611ac1565b60405180910390a15050505061060f60015f55565b505050565b5f60e08201351561065d578160e0013542111561065d576040517ff87d927100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f1d8b43e5066bd20bfdacf7b8f4790c0309403b18434e3699ce3c5e57502ed8c461068c60208501856119a5565b602085013561069e6040870187611ae2565b6040516106ac929190611b43565b6040518091039020866060013587608001358860a001356005548a60e001358b6101000160208101906106df9190611b52565b60018111156106f0576106f0611b70565b60408051602081019b909b5273ffffffffffffffffffffffffffffffffffffffff909916988a01989098526060890196909652608088019490945260a087019290925260c086015260e085015261010084015261012083015260ff1661014082015261016001610398565b60045460ff1615610798576040517f69783db700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815182919081906107d79082611be8565b50602082015160018201906107ec9082611be8565b50604082015160028201906108019082611be8565b50505050565b61080f610fcc565b5f61081984610614565b9050600161082f61012086016101008701611b52565b600181111561084057610840611b70565b036108965781158061085a5750610858818484610b64565b155b15610891576040517fce5a759800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61090b565b6108d58184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b1192505050565b61090b576040517fc7dbd31d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805460010190555f606061092c6109276040880188611ae2565b61100d565b15610a2a575f6109476109426040890189611ae2565b61107f565b90505f5b8151811015610a235781818151811061096657610966611cff565b60200260200101515f015173ffffffffffffffffffffffffffffffffffffffff1682828151811061099957610999611cff565b6020026020010151602001518383815181106109b7576109b7611cff565b6020026020010151604001516040516109d091906119be565b5f6040518083038185875af1925050503d805f8114610a0a576040519150601f19603f3d011682016040523d82523d5f602084013e610a0f565b606091505b5090945092508315610a235760010161094b565b5050610ab3565b610a3760208701876119a5565b73ffffffffffffffffffffffffffffffffffffffff166020870135610a5f6040890189611ae2565b604051610a6d929190611b43565b5f6040518083038185875af1925050503d805f8114610aa7576040519150601f19603f3d011682016040523d82523d5f602084013e610aac565b606091505b5090925090505b81610ac8578051156105935780518082602001fd5b6005546040517f3c72595b43537fb9a702f683573f82d3b3ad19487fd74cbb94728a41ec76d1cb91610afd9160039190611ac1565b60405180910390a150505061060f60015f55565b5f80610b1d84846110a2565b9050610b296003611d2c565b60601c73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150505b92915050565b6040515f908190819060cb90610b8b906001906002906003908b908b908b90602401611db1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f45048e030000000000000000000000000000000000000000000000000000000017905251610c0c91906119be565b5f60405180830381855afa9150503d805f8114610c44576040519150601f19603f3d011682016040523d82523d5f602084013e610c49565b606091505b509150915081610c85576040517ffd23ff6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80806020019051810190610c999190611e44565b9695505050505050565b5f80610d38600180018054610cb7906119d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce3906119d9565b8015610d2e5780601f10610d0557610100808354040283529160200191610d2e565b820191905f5260205f20905b815481529060010190602001808311610d1157829003601f168201915b50505050506110ca565b604080518082018252600581527f312e302e3000000000000000000000000000000000000000000000000000000060209182015281517f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd818301527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c818401526060810193909352306080808501919091528251808503909101815260a0909301909152815191012092915050565b610e0b60405180606001604052806060815260200160608152602001606081525090565b60016040518060600160405290815f82018054610e27906119d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e53906119d9565b8015610e9e5780601f10610e7557610100808354040283529160200191610e9e565b820191905f5260205f20905b815481529060010190602001808311610e8157829003601f168201915b50505050508152602001600182018054610eb7906119d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee3906119d9565b8015610f2e5780601f10610f0557610100808354040283529160200191610f2e565b820191905f5260205f20905b815481529060010190602001808311610f1157829003601f168201915b50505050508152602001600282018054610f47906119d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610f73906119d9565b8015610fbe5780601f10610f9557610100808354040283529160200191610fbe565b820191905f5260205f20905b815481529060010190602001808311610fa157829003601f168201915b505050505081525050905090565b60025f5403611007576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b5f600482101561101e57505f610b5e565b7f2cc2842d0000000000000000000000000000000000000000000000000000000061104c60045f8587611e63565b61105591611e8a565b7fffffffff0000000000000000000000000000000000000000000000000000000016149392505050565b606061108e8260048186611e63565b81019061109b9190611ef0565b9392505050565b5f805f806110b0868661123a565b9250925092506110c08282611283565b5090949350505050565b80515f90829080611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f456d70747920737472696e672063616e6e6f7420626520636f6e76657274656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5f5b81811015611232575f83828151811061117f5761117f611cff565b016020015160f81c90506030811080159061119e575060398160ff1611155b611204576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f6e2d64696769742063686172616374657220666f756e642e0000000000006044820152606401611159565b61120f60308261205b565b60ff1661121d86600a612074565b611227919061208b565b945050600101611164565b505050919050565b5f805f8351604103611271576020840151604085015160608601515f1a6112638882858561138a565b95509550955050505061127c565b505081515f91506002905b9250925092565b5f82600381111561129657611296611b70565b0361129f575050565b60018260038111156112b3576112b3611b70565b036112ea576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156112fe576112fe611b70565b03611338576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401611159565b600382600381111561134c5761134c611b70565b03611386576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401611159565b5050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156113c357505f91506003905082611473565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611414573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661146a57505f925060019150829050611473565b92505f91508190505b9450945094915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156114cd576114cd61147d565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561151a5761151a61147d565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611545575f80fd5b919050565b5f606082840312801561155b575f80fd5b506115646114aa565b61156d83611522565b8152602083810135908201526040928301359281019290925250919050565b5f8083601f84011261159c575f80fd5b50813567ffffffffffffffff8111156115b3575f80fd5b6020830191508360208285010111156115ca575f80fd5b9250929050565b5f805f83850360808112156115e4575f80fd5b60608112156115f1575f80fd5b50839250606084013567ffffffffffffffff81111561160e575f80fd5b61161a8682870161158c565b9497909650939450505050565b5f6101208284031215611638575f80fd5b50919050565b5f6020828403121561164e575f80fd5b813567ffffffffffffffff811115611664575f80fd5b61167084828501611627565b949350505050565b5f82601f830112611687575f80fd5b8135602083015f8067ffffffffffffffff8411156116a7576116a761147d565b50601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020016116da816114d3565b9150508281528583830111156116ee575f80fd5b828260208301375f92810160200192909252509392505050565b5f60208284031215611718575f80fd5b813567ffffffffffffffff81111561172e575f80fd5b82016060818503121561173f575f80fd5b6117476114aa565b813567ffffffffffffffff81111561175d575f80fd5b61176986828501611678565b825250602082013567ffffffffffffffff811115611785575f80fd5b61179186828501611678565b602083015250604082013567ffffffffffffffff8111156117b0575f80fd5b6117bc86828501611678565b604083015250949350505050565b5f805f604084860312156117dc575f80fd5b833567ffffffffffffffff8111156117f2575f80fd5b6117fe86828701611627565b935050602084013567ffffffffffffffff81111561160e575f80fd5b5f806040838503121561182b575f80fd5b82359150602083013567ffffffffffffffff811115611848575f80fd5b61185485828601611678565b9150509250929050565b5f805f60408486031215611870575f80fd5b83359250602084013567ffffffffffffffff81111561160e575f80fd5b5f5b838110156118a757818101518382015260200161188f565b50505f910152565b5f81518084526118c681602086016020860161188d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f82516060602084015261191360808401826118af565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301604085015261194e82826118af565b91505060408401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301606085015261198a82826118af565b95945050505050565b602081525f61109b60208301846118af565b5f602082840312156119b5575f80fd5b61109b82611522565b5f82516119cf81846020870161188d565b9190910192915050565b600181811c908216806119ed57607f821691505b602082108103611638577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f8154611a30816119d9565b808552600182168015611a4a5760018114611a8457611ab8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020870152602082151560051b8701019350611ab8565b845f5260205f205f5b83811015611aaf5781546020828a010152600182019150602081019050611a8d565b87016020019450505b50505092915050565b604081525f611ad36040830185611a24565b90508260208301529392505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611b15575f80fd5b83018035915067ffffffffffffffff821115611b2f575f80fd5b6020019150368190038213156115ca575f80fd5b818382375f9101908152919050565b5f60208284031215611b62575f80fd5b81356002811061109b575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b601f82111561060f57805f5260205f20601f840160051c81016020851015611bc25750805b601f840160051c820191505b81811015611be1575f8155600101611bce565b5050505050565b815167ffffffffffffffff811115611c0257611c0261147d565b611c1681611c1084546119d9565b84611b9d565b6020601f821160018114611c67575f8315611c315750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455611be1565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015611cb45787850151825560209485019460019092019101611c94565b5084821015611cf057868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f611d3782546119d9565b82601f821115611d4b57835f5260205f2090505b547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000811692506014821015611daa577fffffffffffffffffffffffffffffffffffffffff000000000000000000000000808360140360031b1b82161692505b5050919050565b60a081525f611dc360a0830189611a24565b8281036020840152611dd58189611a24565b90508281036040840152611de98188611a24565b90508560608401528281036080840152838152838560208301375f6020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116820101915050979650505050505050565b5f60208284031215611e54575f80fd5b8151801515811461109b575f80fd5b5f8085851115611e71575f80fd5b83861115611e7d575f80fd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015611ee9577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b5f60208284031215611f00575f80fd5b813567ffffffffffffffff811115611f16575f80fd5b8201601f81018413611f26575f80fd5b803567ffffffffffffffff811115611f4057611f4061147d565b8060051b611f50602082016114d3565b91825260208184018101929081019087841115611f6b575f80fd5b6020850192505b8383101561202357823567ffffffffffffffff811115611f90575f80fd5b85016060818a037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0011215611fc3575f80fd5b611fcb6114aa565b611fd760208301611522565b815260408201356020820152606082013567ffffffffffffffff811115611ffc575f80fd5b61200b8b602083860101611678565b60408301525083525060209283019290910190611f72565b979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60ff8281168282160390811115610b5e57610b5e61202e565b8082028115828204841417610b5e57610b5e61202e565b80820180821115610b5e57610b5e61202e56fea2646970667358221220e0d6bccbb261ade6ccedb9c39ac92f9babbf5842194ed72ec5a49b6fd9f70ec664736f6c634300081a0033" const UEA_PROXY_BYTECODE = "608060405260043610610028575f3560e01c806323efa7ec14610032578063aaf10f4214610051575b6100306100a8565b005b34801561003d575f80fd5b5061003061004c366004610368565b6100ba565b34801561005c575f80fd5b507f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d5460405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b86100b36102cc565b61034a565b565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f811580156101045750825b90505f8267ffffffffffffffff1660011480156101205750303b155b90508115801561012e575080155b15610165576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156101c65784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b5f6101ef7f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d5490565b905073ffffffffffffffffffffffffffffffffffffffff81161561023f576040517fae962d4e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b867f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d555083156102c45784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b5f806102f67f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610345576040517fae962d4e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b365f80375f80365f845af43d5f803e808015610364573d5ff35b3d5ffd5b5f60208284031215610378575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461039b575f80fd5b939250505056fea2646970667358221220c4b8f9457567bdcd08b95faef7df86de4e9daead65e2db22018126d9eb77d85864736f6c634300081a0033" @@ -8,6 +8,8 @@ const HANDLER_CONTRACT_BYTECODE = "6080604052600436106102ae575f3560e01c80638456c const PRC20_CREATION_BYTECODE = "608060405234801561000f575f80fd5b50600436106101a5575f3560e01c806374be2150116100e8578063c701262611610093578063eddeb1231161006e578063eddeb12314610457578063f687d12a1461046a578063f97c007a1461047d578063fc5fecd514610486575f80fd5b8063c7012626146103cb578063d9eeebed146103de578063dd62ed3e14610412575f80fd5b8063b84c8246116100c3578063b84c82461461037e578063c47f002714610391578063c6f1b7e7146103a4575f80fd5b806374be21501461033c57806395d89b4114610363578063a9059cbb1461036b575f80fd5b806323b872dd1161015357806347e7ef241161012e57806347e7ef24146102a1578063609c92b8146102b4578063701cd43b146102e857806370a0823114610307575f80fd5b806323b872dd14610266578063313ce5671461027957806342966c681461028e575f80fd5b8063091d278811610183578063091d278814610224578063095ea7b31461023b57806318160ddd1461025e575f80fd5b8063044d9371146101a957806306fdde03146101fa57806307e2bd8d1461020f575b5f80fd5b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610202610499565b6040516101f1919061143c565b61022261021d366004611479565b610529565b005b61022d60015481565b6040519081526020016101f1565b61024e610249366004611494565b6105ef565b60405190151581526020016101f1565b60065461022d565b61024e6102743660046114be565b6106ae565b60055460405160ff90911681526020016101f1565b61024e61029c3660046114fc565b61079b565b61024e6102af366004611494565b6107ae565b6102db7f000000000000000000000000000000000000000000000000000000000000000081565b6040516101f19190611513565b5f546101d09073ffffffffffffffffffffffffffffffffffffffff1681565b61022d610315366004611479565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b610202610879565b61024e610379366004611494565b610888565b61022261038c36600461157f565b61089d565b61022261039f36600461157f565b61091c565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b61024e6103d936600461166f565b610997565b6103e6610af9565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016101f1565b61022d6104203660046116e1565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260086020908152604080832093909416825291909152205490565b6102226104653660046114fc565b610d04565b6102226104783660046114fc565b610da8565b61022d60025481565b6103e66104943660046114fc565b610e4c565b6060600380546104a890611718565b80601f01602080910402602001604051908101604052809291908181526020018280546104d490611718565b801561051f5780601f106104f65761010080835404028352916020019161051f565b820191905f5260205f20905b81548152906001019060200180831161050257829003601f168201915b5050505050905090565b73ffffffffffffffffffffffffffffffffffffffff8116610576576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f412d5a95dc32cbb6bd9319bccf1bc1febeda71e734893a440f1f6853252fe99f906020015b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff831661063d576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060015b92915050565b5f6106ba848484611055565b73ffffffffffffffffffffffffffffffffffffffff84165f90815260086020908152604080832033845290915290205482811015610724576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85165f81815260086020908152604080832033808552908352928190208786039081905590519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3506001949350505050565b5f6107a6338361119c565b506001919050565b5f6107b983836112ed565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b1660208201527f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab390603401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526108689186908690611769565b60405180910390a150600192915050565b6060600480546104a890611718565b5f610894338484611055565b50600192915050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461090c576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600461091882826117ef565b5050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461098b576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600361091882826117ef565b5f805f6109a2610af9565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018390529294509092505f918416906323b872dd906064016020604051808303815f875af1158015610a42573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a669190611906565b905080610a9f576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aa9338661119c565b7f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d9553388888886600254604051610ae496959493929190611925565b60405180910390a15060019695505050505050565b5f80546040517f7471e6970000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152829173ffffffffffffffffffffffffffffffffffffffff1690637471e69790602401602060405180830381865afa158015610b85573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ba991906119a5565b915073ffffffffffffffffffffffffffffffffffffffff8216610bf8576040517f3d5729c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80546040517fd7fd7afb0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff9091169063d7fd7afb90602401602060405180830381865afa158015610c84573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ca891906119c0565b9050805f03610ce3576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254600154610cf39083611a04565b610cfd9190611a1b565b9150509091565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d73576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028190556040518181527fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f906020016105e4565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e17576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018190556040518181527fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a906020016105e4565b5f80546040517f7471e6970000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152829173ffffffffffffffffffffffffffffffffffffffff1690637471e69790602401602060405180830381865afa158015610ed8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc91906119a5565b915073ffffffffffffffffffffffffffffffffffffffff8216610f4b576040517f3d5729c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80546040517fd7fd7afb0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff9091169063d7fd7afb90602401602060405180830381865afa158015610fd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ffb91906119c0565b9050805f03611036576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546110438583611a04565b61104d9190611a1b565b915050915091565b73ffffffffffffffffffffffffffffffffffffffff8316158061108c575073ffffffffffffffffffffffffffffffffffffffff8216155b156110c3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f9081526007602052604090205481811015611122576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526007602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061118e9086815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff82166111e9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611222576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f9081526007602052604090205481811015611281576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f8181526007602090815260408083208686039055600680548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff821661133a576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611373576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600680548201905573ffffffffffffffffffffffffffffffffffffffff82165f818152600760209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f81518084525f5b818110156113ff576020818501810151868301820152016113e3565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61144e60208301846113db565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114611476575f80fd5b50565b5f60208284031215611489575f80fd5b813561144e81611455565b5f80604083850312156114a5575f80fd5b82356114b081611455565b946020939093013593505050565b5f805f606084860312156114d0575f80fd5b83356114db81611455565b925060208401356114eb81611455565b929592945050506040919091013590565b5f6020828403121561150c575f80fd5b5035919050565b602081016003831061154c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f6020828403121561158f575f80fd5b813567ffffffffffffffff8111156115a5575f80fd5b8201601f810184136115b5575f80fd5b803567ffffffffffffffff8111156115cf576115cf611552565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561163b5761163b611552565b604052818152828201602001861015611652575f80fd5b816020840160208301375f91810160200191909152949350505050565b5f805f60408486031215611681575f80fd5b833567ffffffffffffffff811115611697575f80fd5b8401601f810186136116a7575f80fd5b803567ffffffffffffffff8111156116bd575f80fd5b8660208284010111156116ce575f80fd5b6020918201979096509401359392505050565b5f80604083850312156116f2575f80fd5b82356116fd81611455565b9150602083013561170d81611455565b809150509250929050565b600181811c9082168061172c57607f821691505b602082108103611763577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b606081525f61177b60608301866113db565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b601f8211156117ea57805f5260205f20601f840160051c810160208510156117c85750805b601f840160051c820191505b818110156117e7575f81556001016117d4565b50505b505050565b815167ffffffffffffffff81111561180957611809611552565b61181d816118178454611718565b846117a3565b6020601f82116001811461186e575f83156118385750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1784556117e7565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156118bb578785015182556020948501946001909201910161189b565b50848210156118f757868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b5f60208284031215611916575f80fd5b8151801515811461144e575f80fd5b73ffffffffffffffffffffffffffffffffffffffff8716815260a060208201528460a0820152848660c08301375f60c086830101525f60c07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8801168301019050846040830152836060830152826080830152979650505050505050565b5f602082840312156119b5575f80fd5b815161144e81611455565b5f602082840312156119d0575f80fd5b5051919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820281158282048414176106a8576106a86119d7565b808201808211156106a8576106a86119d756fea26469706673582212206be692aa215f21df823c52c689a11caa03254730bfade7b8b36788d6a72ba61764736f6c634300081a0033" +const UNIVERSAL_GATEWAY_PC_BYTECODE = "6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610f0c57508063248a9ca314610e9c5780632f2ff15d14610e2157806336568abe14610d995780633f4ba83a14610cc15780635c975abb14610c62578063720b3fbf14610a955780637f57735014610a455780638456cb591461096a5780638e6185601461084157806391d14854146107ad578063a217fddf14610775578063bdfd61ce1461058e578063c1ee135a1461053d578063d547741f146104bb578063e63ab1e9146104635763f8c8765e146100d7575f80fd5b3461045f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761010e610feb565b610116610fc8565b9060443573ffffffffffffffffffffffffffffffffffffffff811680910361045f576064359173ffffffffffffffffffffffffffffffffffffffff831680930361045f577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610457575b600114908161044d575b159081610444575b5061041c578560017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556103c7575b5073ffffffffffffffffffffffffffffffffffffffff82161580156103a9575b80156103a1575b8015610399575b61037157610281610287926102406117b5565b6102486117b5565b6102506117b5565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005561027c6117b5565b611292565b50611379565b507fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f557fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001556102de57005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b50831561022d565b508215610226565b5073ffffffffffffffffffffffffffffffffffffffff81161561021f565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f6101ff565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b9050155f6101ac565b303b1591506101a4565b87915061019a565b5f80fd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b6004356104f8610fc8565b90610536610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b61120c565b61158f565b005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461045f5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f576105dd90369060040161100e565b6105e5610fc8565b9160643567ffffffffffffffff811161045f5761060690369060040161100e565b91909260a4359367ffffffffffffffff851161045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc863603011261045f5773ffffffffffffffffffffffffffffffffffffffff61072e61074c927fd06cdc8c91fe8c2e8750b89bd0805f8111fb1bed700d3c2a4394c3aca1993239966106f06106e2976106956116eb565b61069d61173e565b6106a561103c565b977f6569703135353a3131313535313131000000000000000000000000000000000060208a0152604051998a996101208b526101208b0190611060565b9189830360208b01526110bd565b91604435604088015273778d3206374f8ac265728e18e3fe2ae6b93e4ce46060880152606f608088015260de60a088015286830360c08801526110bd565b9661014d60e0850152838803610100850152169533956004016110fb565b0390a360017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040515f8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576107e4610fc8565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610878610feb565b335f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff161561093a5773ffffffffffffffffffffffffffffffffffffffff906108cc6116eb565b1680156103715773ffffffffffffffffffffffffffffffffffffffff600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167fd0ef78509e8ed82196200827f0d10672cfab667994f990456881f413c1c475eb5f80a3005b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004525f60245260445ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576109a0611184565b6109a86116eb565b6109b06116eb565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b3461045f5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f57610ae490369060040161100e565b90610aed610fc8565b916084359167ffffffffffffffff831161045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc843603011261045f57610b356116eb565b610b3d61173e565b610b4561103c565b7f6569703135353a31313135353131310000000000000000000000000000000000602082015260405191602083019083821067ffffffffffffffff831117610c355761072e610be994610bf773ffffffffffffffffffffffffffffffffffffffff937fd06cdc8c91fe8c2e8750b89bd0805f8111fb1bed700d3c2a4394c3aca19932399861074c966040525f84526040519889986101208a526101208a0190611060565b9188830360208a01526110bd565b90604435604087015273778d3206374f8ac265728e18e3fe2ae6b93e4ce46060870152606f608087015260de60a087015285820360c0870152611060565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610cf7611184565b610cff611697565b610d07611697565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610dd0610fc8565b3373ffffffffffffffffffffffffffffffffffffffff821603610df95761053b9060043561158f565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b600435610e5e610fc8565b90610e97610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b61147d565b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576020610f046004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57600435907fffffffff00000000000000000000000000000000000000000000000000000000821680920361045f57817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115610f9e575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610f97565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b9181601f8401121561045f5782359167ffffffffffffffff831161045f576020838186019501011161045f57565b604051906040820182811067ffffffffffffffff821117610c3557604052600f8252565b91908251928382525f5b8481106110a85750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b8060208092840101518282860101520161106a565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b803573ffffffffffffffffffffffffffffffffffffffff811680910361045f57825260208101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561045f57016020813591019067ffffffffffffffff811161045f57803603821361045f5760408381602061118196015201916110bd565b90565b335f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff16156111bc57565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f205416156112635750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff166113745773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff166113745773ffffffffffffffffffffffffffffffffffffffff165f8181527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461158957805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461158957805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416156116c357565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661171657565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00541461178d5760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156117e457565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffdfea2646970667358221220bb7a75539e61b76064a9aab2c5227e4c770c8dc2778e33d796b5ae3e5c51fb1c64736f6c634300081a0033" + // GetUEAProxyBytecode returns the UEA proxy contract bytecode func GetUEAProxyBytecode() string { return UEA_PROXY_BYTECODE diff --git a/test/utils/constants.go b/test/utils/constants.go new file mode 100644 index 00000000..13f02331 --- /dev/null +++ b/test/utils/constants.go @@ -0,0 +1,49 @@ +package utils + +import ( + "github.com/ethereum/go-ethereum/common" +) + +const MintModule string = "mint" + +type Addresses struct { + // Contract addresses + FactoryAddr common.Address + UEProxyAddr common.Address + EVMImplAddr common.Address + HandlerAddr common.Address + PRC20USDCAddr common.Address + UniversalGatewayPCAddr common.Address + + // Account addresses (hex format) + DefaultTestAddr string + CosmosTestAddr string + TargetAddr string + TargetAddr2 string +} +type TestConfig struct { + BaseCoinDenom string + DefaultCoinAmt int64 +} + +func GetDefaultAddresses() Addresses { + return Addresses{ + FactoryAddr: common.HexToAddress("0x00000000000000000000000000000000000000ea"), + UEProxyAddr: common.HexToAddress("0x0000000000000000000000000000000000000e09"), + EVMImplAddr: common.HexToAddress("0x0000000000000000000000000000000000000e01"), + HandlerAddr: common.HexToAddress("0x00000000000000000000000000000000000000C0"), + PRC20USDCAddr: common.HexToAddress("0x0000000000000000000000000000000000000e06"), + UniversalGatewayPCAddr: common.HexToAddress("0x00000000000000000000000000000000000000B0"), + DefaultTestAddr: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", + CosmosTestAddr: "cosmos18pjnzwr9xdnx2vnpv5mxywfnv56xxef5cludl5", + TargetAddr: "\x86i\xbe\xd1!\xfe\xfa=\x9c\xf2\x82\x12s\xf4\x89\xe7\x17̩]", + TargetAddr2: "0x527F3692F5C53CfA83F7689885995606F93b6164", + } +} + +func GetDefaultTestConfig() TestConfig { + return TestConfig{ + BaseCoinDenom: "upc", + DefaultCoinAmt: 23748000000000, + } +} diff --git a/testutils/contracts_setup.go b/test/utils/contracts_setup.go similarity index 76% rename from testutils/contracts_setup.go rename to test/utils/contracts_setup.go index d54611db..10853914 100644 --- a/testutils/contracts_setup.go +++ b/test/utils/contracts_setup.go @@ -1,6 +1,7 @@ -package testutils +package utils import ( + "math/big" "testing" sdk "github.com/cosmos/cosmos-sdk/types" @@ -51,6 +52,10 @@ func setupUESystem( err = setupPrc20Contract(t, app, ctx, prc20ABI, opts, accounts) require.NoError(t, err) + // setup UniversalGatewayPC + err = setupUniversalGatewayPC(t, app, ctx, prc20ABI, opts) + require.NoError(t, err) + return nil } @@ -280,3 +285,67 @@ func DeployContract( return contractAddr } + +// --------------------------------------------------------------------------------------- +// NOTE: The UniversalGatewayPC contract deployed here is a TEST-ONLY version. +// +// The withdraw() and withdrawAndExecute() functions inside this test contract: +// +// - DO NOT run validation (_validateCommon) +// - DO NOT compute gas fees via UniversalCore +// - DO NOT pull PRC20 fees into VaultPC +// - DO NOT burn PRC20 tokens +// - DO NOT interact with any external contracts +// +// Instead, both functions simply **emit UniversalTxWithdraw with hardcoded values**: +// +// chainId = "eip155:11155111" +// gasToken = fixed test address +// gasFee = 111 +// +// This behavior is intentional because Cosmos integration tests only need to verify: +// - ABI correctness +// - Event emission structure +// - Outbound pipeline handling +// - UE/UEM processing logic on the Cosmos side +func setupUniversalGatewayPC( + t *testing.T, + app *app.ChainApp, + ctx sdk.Context, + gatewayABI abi.ABI, + opts AppSetupOptions, +) error { + + gatewayAddr := opts.Addresses.UniversalGatewayPCAddr + universalCoreAddr := opts.Addresses.HandlerAddr + vaultPCAddr := opts.Addresses.EVMImplAddr + + // 1. Deploy bytecode of UniversalGatewayPC at reserved address + _ = DeployContract( + t, + app, + ctx, + gatewayAddr, + UNIVERSAL_GATEWAY_PC_BYTECODE, + ) + + // 2. Manually set storage because initialize() cannot be used + // + // Storage layout: + // slot 0 → UNIVERSAL_CORE (address) + // slot 1 → VAULT_PC (address) + app.EVMKeeper.SetState( + ctx, + gatewayAddr, + common.BigToHash(big.NewInt(0)), // key + common.LeftPadBytes(universalCoreAddr.Bytes(), 32), // value []byte + ) + + app.EVMKeeper.SetState( + ctx, + gatewayAddr, + common.BigToHash(big.NewInt(1)), // key + common.LeftPadBytes(vaultPCAddr.Bytes(), 32), // value []byte + ) + return nil +} 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/testutils/constants.go b/testutils/constants.go deleted file mode 100644 index 4e4e7b38..00000000 --- a/testutils/constants.go +++ /dev/null @@ -1,47 +0,0 @@ -package testutils - -import ( - "github.com/ethereum/go-ethereum/common" -) - -const MintModule string = "mint" - -type Addresses struct { - // Contract addresses - FactoryAddr common.Address - UEProxyAddr common.Address - EVMImplAddr common.Address - HandlerAddr common.Address - PRC20USDCAddr common.Address - - // Account addresses (hex format) - DefaultTestAddr string - CosmosTestAddr string - TargetAddr string - TargetAddr2 string -} -type TestConfig struct { - BaseCoinDenom string - DefaultCoinAmt int64 -} - -func GetDefaultAddresses() Addresses { - return Addresses{ - FactoryAddr: common.HexToAddress("0x00000000000000000000000000000000000000ea"), - UEProxyAddr: common.HexToAddress("0x0000000000000000000000000000000000000e09"), - EVMImplAddr: common.HexToAddress("0x0000000000000000000000000000000000000e01"), - HandlerAddr: common.HexToAddress("0x00000000000000000000000000000000000000C0"), - PRC20USDCAddr: common.HexToAddress("0x0000000000000000000000000000000000000e06"), - DefaultTestAddr: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - CosmosTestAddr: "cosmos18pjnzwr9xdnx2vnpv5mxywfnv56xxef5cludl5", - TargetAddr: "\x86i\xbe\xd1!\xfe\xfa=\x9c\xf2\x82\x12s\xf4\x89\xe7\x17̩]", - TargetAddr2: "0x527F3692F5C53CfA83F7689885995606F93b6164", - } -} - -func GetDefaultTestConfig() TestConfig { - return TestConfig{ - BaseCoinDenom: "upc", - DefaultCoinAmt: 23748000000000, - } -} diff --git a/universalClient/authz/tx_signer_test.go b/universalClient/authz/tx_signer_test.go index 090fbb69..d9017de3 100644 --- a/universalClient/authz/tx_signer_test.go +++ b/universalClient/authz/tx_signer_test.go @@ -250,7 +250,7 @@ func TestTxSigner_WrapMessagesWithAuthZ(t *testing.T) { Amount: "1000", AssetAddr: "asset_address", LogIndex: "0", - TxType: uetypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uetypes.TxType_FUNDS_AND_PAYLOAD, }, }, }, @@ -343,7 +343,7 @@ func TestTxSigner_ValidateMessages(t *testing.T) { Amount: "1000", AssetAddr: "asset_address", LogIndex: "0", - TxType: uetypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uetypes.TxType_FUNDS_AND_PAYLOAD, }, }, }, @@ -392,7 +392,7 @@ func TestTxSigner_SignAndBroadcastAuthZTx(t *testing.T) { Amount: "1000", AssetAddr: "asset_address", LogIndex: "0", - TxType: uetypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uetypes.TxType_FUNDS_AND_PAYLOAD, }, }, } diff --git a/universalClient/core/vote_handler.go b/universalClient/core/vote_handler.go index 3875ef75..fa7a48a9 100644 --- a/universalClient/core/vote_handler.go +++ b/universalClient/core/vote_handler.go @@ -180,19 +180,19 @@ func (vh *VoteHandler) constructInbound(tx *store.ChainTransaction) (*uetypes.In // Map txType from eventData to proper enum value // Event data uses: 0=GAS, 1=GAS_AND_PAYLOAD, 2=FUNDS, 3=FUNDS_AND_PAYLOAD // Enum values are: 0=UNSPECIFIED_TX, 1=GAS, 2=FUNDS, 3=FUNDS_AND_PAYLOAD, 4=GAS_AND_PAYLOAD - txType := uetypes.InboundTxType_UNSPECIFIED_TX + txType := uetypes.TxType_UNSPECIFIED_TX switch eventData.TxType { case 0: - txType = uetypes.InboundTxType_GAS + txType = uetypes.TxType_GAS case 1: - txType = uetypes.InboundTxType_GAS_AND_PAYLOAD + txType = uetypes.TxType_GAS_AND_PAYLOAD case 2: - txType = uetypes.InboundTxType_FUNDS + txType = uetypes.TxType_FUNDS case 3: - txType = uetypes.InboundTxType_FUNDS_AND_PAYLOAD + txType = uetypes.TxType_FUNDS_AND_PAYLOAD default: // For any unknown value, default to GAS - txType = uetypes.InboundTxType_UNSPECIFIED_TX + txType = uetypes.TxType_UNSPECIFIED_TX } // Convert tx.TxHash to hex format if it's in base58 @@ -215,12 +215,12 @@ func (vh *VoteHandler) constructInbound(tx *store.ChainTransaction) (*uetypes.In TxType: txType, } - if txType == uetypes.InboundTxType_FUNDS_AND_PAYLOAD || txType == uetypes.InboundTxType_GAS_AND_PAYLOAD { + if txType == uetypes.TxType_FUNDS_AND_PAYLOAD || txType == uetypes.TxType_GAS_AND_PAYLOAD { inboundMsg.UniversalPayload = &eventData.Payload } // Set recipient for transactions that involve funds - if txType == uetypes.InboundTxType_FUNDS || txType == uetypes.InboundTxType_GAS { + if txType == uetypes.TxType_FUNDS || txType == uetypes.TxType_GAS { inboundMsg.Recipient = eventData.Recipient } diff --git a/universalClient/core/vote_handler_test.go b/universalClient/core/vote_handler_test.go index e33fc6e8..896618f8 100644 --- a/universalClient/core/vote_handler_test.go +++ b/universalClient/core/vote_handler_test.go @@ -127,12 +127,12 @@ func TestVoteHandler_VoteAndConfirm(t *testing.T) { { name: "vote transaction fails with non-zero code", tx: &store.ChainTransaction{ - TxHash: "0x456", - BlockNumber: 200, - EventIdentifier: "add_funds", - Status: "pending", - Confirmations: 15, - Data: json.RawMessage(`{}`), + TxHash: "0x456", + BlockNumber: 200, + EventIdentifier: "add_funds", + Status: "pending", + Confirmations: 15, + Data: json.RawMessage(`{}`), }, setupMock: func(m *MockTxSigner) { m.On("SignAndBroadcastAuthZTx", @@ -152,12 +152,12 @@ func TestVoteHandler_VoteAndConfirm(t *testing.T) { { name: "broadcast error", tx: &store.ChainTransaction{ - TxHash: "0x789", - BlockNumber: 300, - EventIdentifier: "addFunds", - Status: "pending", - Confirmations: 20, - Data: json.RawMessage(`{}`), + TxHash: "0x789", + BlockNumber: 300, + EventIdentifier: "addFunds", + Status: "pending", + Confirmations: 20, + Data: json.RawMessage(`{}`), }, setupMock: func(m *MockTxSigner) { m.On("SignAndBroadcastAuthZTx", @@ -228,7 +228,7 @@ func TestVoteHandler_constructInbound(t *testing.T) { { name: "complete data for EVM transaction", tx: &store.ChainTransaction{ - TxHash: "0xabc123", + TxHash: "0xabc123", EventIdentifier: "addFunds", Data: json.RawMessage(`{ "sourceChain": "eip155:1", @@ -248,15 +248,15 @@ func TestVoteHandler_constructInbound(t *testing.T) { Amount: "1000000", AssetAddr: "0x333", LogIndex: "5", - TxType: uetypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uetypes.TxType_FUNDS_AND_PAYLOAD, }, }, { name: "minimal data with defaults", tx: &store.ChainTransaction{ - TxHash: "0xdef456", + TxHash: "0xdef456", EventIdentifier: "add_funds", - Data: json.RawMessage(`{}`), + Data: json.RawMessage(`{}`), }, expected: &uetypes.Inbound{ SourceChain: "", @@ -266,15 +266,15 @@ func TestVoteHandler_constructInbound(t *testing.T) { Amount: "", AssetAddr: "", LogIndex: "0", - TxType: uetypes.InboundTxType_GAS, + TxType: uetypes.TxType_GAS, }, }, { name: "nil data returns error", tx: &store.ChainTransaction{ - TxHash: "0x789", + TxHash: "0x789", EventIdentifier: "addFunds", - Data: nil, + Data: nil, }, wantError: true, }, @@ -565,7 +565,7 @@ func TestVoteHandler_VoteTxHashNotOverwritten(t *testing.T) { // Create transaction that already has a vote tx hash existingVoteTxHash := "existing_vote_tx_123" tx := &store.ChainTransaction{ - TxHash: "0xalready_voted", + TxHash: "0xalready_voted", BlockNumber: 2000, EventIdentifier: "0xf9bfe8a7", Status: "confirmed", diff --git a/utils/conversion.go b/utils/conversion.go index 880a4ad3..e82bf0bc 100644 --- a/utils/conversion.go +++ b/utils/conversion.go @@ -2,6 +2,7 @@ package utils import ( "encoding/hex" + "fmt" "math/big" "strings" ) @@ -14,3 +15,16 @@ func StringToBigInt(s string) *big.Int { bi, _ := new(big.Int).SetString(s, 10) return bi } + +// Returns evm chainId, e.g. push-chain-42101 -> 42101 +func ExtractEvmChainID(chainID string) (string, error) { + parts := strings.Split(chainID, "-") + last := parts[len(parts)-1] + + // Ensure numeric + if _, ok := new(big.Int).SetString(last, 10); !ok { + return "", fmt.Errorf("invalid EVM chain id in tendermint chain-id: %s", chainID) + } + + return last, nil +} diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go new file mode 100644 index 00000000..8061962e --- /dev/null +++ b/x/uexecutor/keeper/create_outbound.go @@ -0,0 +1,184 @@ +package keeper + +import ( + "context" + "fmt" + "strings" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + evmtypes "github.com/cosmos/evm/x/vm/types" + "github.com/pushchain/push-chain-node/x/uexecutor/types" + uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" +) + +func (k Keeper) BuildOutboundsFromReceipt( + utxId string, + receipt *evmtypes.MsgEthereumTxResponse, +) ([]*types.OutboundTx, error) { + + outbounds := []*types.OutboundTx{} + universalGatewayPC := strings.ToLower(uregistrytypes.SYSTEM_CONTRACTS["UNIVERSAL_GATEWAY_PC"].Address) + + for _, lg := range receipt.Logs { + if lg.Removed { + continue + } + + if strings.ToLower(lg.Address) != universalGatewayPC { + continue + } + + if len(lg.Topics) == 0 { + continue + } + + if strings.ToLower(lg.Topics[0]) != strings.ToLower(types.UniversalTxWithdrawEventSig) { + continue + } + + event, err := types.DecodeUniversalTxWithdrawFromLog(lg) + if err != nil { + return nil, fmt.Errorf("failed to decode UniversalTxWithdraw: %w", err) + } + + outbound := &types.OutboundTx{ + DestinationChain: event.ChainId, + Recipient: event.Target, + Amount: event.Amount.String(), + AssetAddr: event.Token, + Sender: event.Sender, + Payload: event.Payload, + GasLimit: event.GasLimit.String(), + TxType: types.TxType_FUNDS_AND_PAYLOAD, + PcTx: &types.Originating_Pc_TX{ + TxHash: receipt.Hash, + LogIndex: fmt.Sprintf("%d", lg.Index), + }, + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundId(utxId, receipt.Hash, lg.Index), + } + + outbounds = append(outbounds, outbound) + } + + return outbounds, nil +} + +func (k Keeper) CreateUniversalTxFromPCTx( + ctx context.Context, + pcTx types.PCTx, +) (*types.UniversalTx, error) { + + universalTxKey, err := k.BuildPcUniversalTxKey(ctx, pcTx) + if err != nil { + return nil, errors.Wrap(err, "failed to create UniversalTx key") + } + + found, err := k.HasUniversalTx(ctx, universalTxKey) + if err != nil { + return nil, errors.Wrap(err, "failed to check UniversalTx") + } + if found { + return nil, fmt.Errorf("universal tx already exists for pc tx %s", pcTx.TxHash) + } + + utx := types.UniversalTx{ + Id: universalTxKey, + InboundTx: nil, // no inbound + PcTx: []*types.PCTx{&pcTx}, // origin is PC + OutboundTx: nil, + UniversalStatus: types.UniversalTxStatus_PC_EXECUTED_SUCCESS, + } + + if err := k.CreateUniversalTx(ctx, universalTxKey, utx); err != nil { + return nil, err + } + + return &utx, nil +} + +// AttachOutboundsToExistingUniversalTx +// Used when UniversalTx already exists (e.g. inbound execution) +// It attaches outbounds extracted from receipt to the existing utx. +func (k Keeper) AttachOutboundsToExistingUniversalTx( + ctx sdk.Context, + receipt *evmtypes.MsgEthereumTxResponse, + utx types.UniversalTx, +) error { + outbounds, err := k.BuildOutboundsFromReceipt(utx.Id, receipt) + if err != nil { + return err + } + + return k.attachOutboundsToUtx(ctx, utx.Id, outbounds) +} + +// CreateUniversalTxFromReceiptIfOutbound +// Creates a UniversalTx ONLY if outbound events exist in the receipt. +// Safe to call from ExecutePayload, EVM hooks +func (k Keeper) CreateUniversalTxFromReceiptIfOutbound( + ctx sdk.Context, + receipt *evmtypes.MsgEthereumTxResponse, + pcTx types.PCTx, +) error { + universalTxKey, err := k.BuildPcUniversalTxKey(ctx, pcTx) + if err != nil { + return errors.Wrap(err, "failed to create UniversalTx key") + } + + outbounds, err := k.BuildOutboundsFromReceipt(universalTxKey, receipt) + if err != nil { + return err + } + + if len(outbounds) == 0 { + return nil + } + + utx, err := k.CreateUniversalTxFromPCTx(ctx, pcTx) + if err != nil { + return err + } + + return k.attachOutboundsToUtx(ctx, utx.Id, outbounds) +} + +func (k Keeper) attachOutboundsToUtx( + ctx sdk.Context, + utxId string, + outbounds []*types.OutboundTx, +) error { + + if len(outbounds) == 0 { + return nil + } + + return k.UpdateUniversalTx(ctx, utxId, func(utx *types.UniversalTx) error { + + for _, outbound := range outbounds { + + utx.OutboundTx = append(utx.OutboundTx, outbound) + + evt, err := types.NewOutboundCreatedEvent(types.OutboundCreatedEvent{ + UniversalTxId: utxId, + OutboundId: outbound.Id, + DestinationChain: outbound.DestinationChain, + Recipient: outbound.Recipient, + Amount: outbound.Amount, + AssetAddr: outbound.AssetAddr, + Sender: outbound.Sender, + Payload: outbound.Payload, + GasLimit: outbound.GasLimit, + TxType: outbound.TxType.String(), + PcTxHash: outbound.PcTx.TxHash, + LogIndex: outbound.PcTx.LogIndex, + }) + if err == nil { + ctx.EventManager().EmitEvent(evt) + } + } + + return nil + }) +} diff --git a/x/uexecutor/keeper/evm_hooks.go b/x/uexecutor/keeper/evm_hooks.go new file mode 100644 index 00000000..d65dc5fa --- /dev/null +++ b/x/uexecutor/keeper/evm_hooks.go @@ -0,0 +1,87 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + evmtypes "github.com/cosmos/evm/x/vm/types" + "github.com/ethereum/go-ethereum/common" + core "github.com/ethereum/go-ethereum/core" + ethtypes "github.com/ethereum/go-ethereum/core/types" + + "github.com/pushchain/push-chain-node/x/uexecutor/types" +) + +// EVMHooks implements the EVM post-processing hooks. +// This hook will be invoked after every EVM transaction execution +// and is responsible for detecting outbound events and creating UniversalTx if needed. +type EVMHooks struct { + k Keeper +} + +// NewEVMHooks creates a new instance of EVMHooks. +func NewEVMHooks(k Keeper) evmtypes.EvmHooks { + return EVMHooks{k: k} +} + +// PostTxProcessing is called by the EVM module after transaction execution. +// It inspects the receipt and creates UniversalTx + Outbound only if +// UniversalTxWithdraw event is detected. +func (h EVMHooks) PostTxProcessing( + ctx sdk.Context, + sender common.Address, + msg core.Message, + receipt *ethtypes.Receipt, +) error { + if receipt == nil || len(receipt.Logs) == 0 { + return nil + } + + protoReceipt := &evmtypes.MsgEthereumTxResponse{ + Hash: receipt.TxHash.Hex(), + GasUsed: receipt.GasUsed, + Logs: convertReceiptLogs(receipt.Logs), + } + + // Build pcTx representation + pcTx := types.PCTx{ + Sender: sender.Hex(), + TxHash: protoReceipt.Hash, + GasUsed: protoReceipt.GasUsed, + BlockHeight: uint64(ctx.BlockHeight()), + Status: "SUCCESS", + } + + // This will: + // - check if outbound exists + // - create universal tx if needed + // - attach outbounds + // - emit events + return h.k.CreateUniversalTxFromReceiptIfOutbound(ctx, protoReceipt, pcTx) +} + +func convertReceiptLogs(logs []*ethtypes.Log) []*evmtypes.Log { + out := make([]*evmtypes.Log, 0, len(logs)) + + for _, l := range logs { + out = append(out, &evmtypes.Log{ + Address: l.Address.Hex(), + Topics: convertTopics(l.Topics), + Data: l.Data, + BlockNumber: l.BlockNumber, + TxHash: l.TxHash.Hex(), + TxIndex: uint64(l.TxIndex), + BlockHash: l.BlockHash.Hex(), + Index: uint64(l.Index), + Removed: l.Removed, + }) + } + + return out +} + +func convertTopics(topics []common.Hash) []string { + out := make([]string, len(topics)) + for i, t := range topics { + out[i] = t.Hex() + } + return out +} diff --git a/x/uexecutor/keeper/execute_inbound.go b/x/uexecutor/keeper/execute_inbound.go index 9c949924..2bbf9f0c 100644 --- a/x/uexecutor/keeper/execute_inbound.go +++ b/x/uexecutor/keeper/execute_inbound.go @@ -9,16 +9,16 @@ import ( func (k Keeper) ExecuteInbound(ctx context.Context, utx types.UniversalTx) error { switch utx.InboundTx.TxType { - case types.InboundTxType_GAS: // fee abstraction + case types.TxType_GAS: // fee abstraction return k.ExecuteInboundGas(ctx, *utx.InboundTx) - case types.InboundTxType_FUNDS: // synthetic + case types.TxType_FUNDS: // synthetic return k.ExecuteInboundFunds(ctx, utx) - case types.InboundTxType_FUNDS_AND_PAYLOAD: // synthetic + payload + case types.TxType_FUNDS_AND_PAYLOAD: // synthetic + payload return k.ExecuteInboundFundsAndPayload(ctx, utx) - case types.InboundTxType_GAS_AND_PAYLOAD: // fee abstraction + payload + case types.TxType_GAS_AND_PAYLOAD: // fee abstraction + payload return k.ExecuteInboundGasAndPayload(ctx, utx) default: 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..f2f9c579 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{ @@ -112,6 +112,10 @@ func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.Uni payloadPcTx.TxHash = receipt.Hash payloadPcTx.GasUsed = receipt.GasUsed payloadPcTx.Status = "SUCCESS" + + if receipt != nil { + _ = k.AttachOutboundsToExistingUniversalTx(sdkCtx, receipt, utx) + } } updateErr = k.UpdateUniversalTx(ctx, universalTxKey, func(utx *types.UniversalTx) error { 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..de264b5e 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], @@ -143,6 +143,10 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive payloadPcTx.TxHash = receipt.Hash payloadPcTx.GasUsed = receipt.GasUsed payloadPcTx.Status = "SUCCESS" + + if receipt != nil { + _ = k.AttachOutboundsToExistingUniversalTx(sdkCtx, receipt, utx) + } } updateErr = k.UpdateUniversalTx(ctx, universalTxKey, func(utx *types.UniversalTx) error { 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_execute_payload.go b/x/uexecutor/keeper/msg_execute_payload.go index 473b760a..59144d54 100644 --- a/x/uexecutor/keeper/msg_execute_payload.go +++ b/x/uexecutor/keeper/msg_execute_payload.go @@ -59,10 +59,24 @@ func (k Keeper) ExecutePayload(ctx context.Context, evmFrom common.Address, univ return err } + // Step 4 + pcTx := types.PCTx{ + Sender: evmFrom.Hex(), + TxHash: receipt.Hash, + GasUsed: receipt.GasUsed, + BlockHeight: uint64(sdkCtx.BlockHeight()), + Status: "SUCCESS", + } + + // Step 5: create outbound + UTX only if needed + if err := k.CreateUniversalTxFromReceiptIfOutbound(sdkCtx, receipt, pcTx); err != nil { + return err + } + gasUnitsUsed := receipt.GasUsed gasUnitsUsedBig := new(big.Int).SetUint64(gasUnitsUsed) - // Step 4: Handle fee calculation and deduction + // Step 6: Handle fee calculation and deduction ueaAccAddr := sdk.AccAddress(ueaAddr.Bytes()) baseFee := k.feemarketKeeper.GetBaseFee(sdkCtx) diff --git a/x/uexecutor/keeper/msg_server.go b/x/uexecutor/keeper/msg_server.go index f0c2d0cb..aa344492 100755 --- a/x/uexecutor/keeper/msg_server.go +++ b/x/uexecutor/keeper/msg_server.go @@ -153,3 +153,38 @@ func (ms msgServer) VoteGasPrice(ctx context.Context, msg *types.MsgVoteGasPrice } return &types.MsgVoteGasPriceResponse{}, nil } + +// VoteOutbound implements types.MsgServer. +func (ms msgServer) VoteOutbound(ctx context.Context, msg *types.MsgVoteOutbound) (*types.MsgVoteOutboundResponse, 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.VoteOutbound(ctx, signerValAddr, msg.UtxId, msg.OutboundId, *msg.ObservedTx) + if err != nil { + return nil, err + } + + return &types.MsgVoteOutboundResponse{}, nil +} diff --git a/x/uexecutor/keeper/msg_vote_inbound.go b/x/uexecutor/keeper/msg_vote_inbound.go index ca6aceae..1bcc460d 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 @@ -46,14 +46,13 @@ func (k Keeper) VoteInbound(ctx context.Context, universalValidator sdk.ValAddre // Voting is finalized utx := types.UniversalTx{ + Id: universalTxKey, InboundTx: &inbound, PcTx: nil, OutboundTx: nil, 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/msg_vote_outbound.go b/x/uexecutor/keeper/msg_vote_outbound.go new file mode 100644 index 00000000..cc59c314 --- /dev/null +++ b/x/uexecutor/keeper/msg_vote_outbound.go @@ -0,0 +1,89 @@ +package keeper + +import ( + "context" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uexecutor/types" +) + +// VoteOutbound is for uvalidators for voting on observed outbound tx on external chain +func (k Keeper) VoteOutbound( + ctx context.Context, + universalValidator sdk.ValAddress, + utxId string, + outboundId string, + observedTx types.OutboundObservation, +) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Step 1: Fetch UniversalTx + utx, found, err := k.GetUniversalTx(ctx, utxId) + if err != nil { + return err + } + if !found { + return errors.Wrap(err, "UniversalTx not found") + } + if utx.OutboundTx == nil { + return errors.Wrap(err, "No outbound tx found in the specified UniversalTx") + } + + // Step 2: Find outbound by id + var outbound types.OutboundTx + found = false + for _, ob := range utx.OutboundTx { + if ob.Id == outboundId { + outbound = *ob + found = true + break + } + } + if !found { + return errors.Wrap(err, "Outbound not found") + } + + // Prevent double-finalization + if outbound.OutboundStatus == types.Status_OBSERVED { + return nil + } + + // Use temp context to prevent partial writes + tmpCtx, commit := sdkCtx.CacheContext() + + // Step 3: Vote on outbound ballot + isFinalized, _, err := k.VoteOnOutboundBallot( + tmpCtx, + universalValidator, + utxId, + outboundId, + observedTx, + ) + if err != nil { + return err + } + + commit() + + // Step 4: Exit if not finalized yet + if !isFinalized { + return nil + } + + // Step 5: Update outbound state to OBSERVED + outbound.OutboundStatus = types.Status_OBSERVED + outbound.ObservedTx = &observedTx + + // Persist the state inside UniversalTx + if err := k.UpdateOutbound(ctx, utxId, outbound); err != nil { + return err + } + + // Step 6: Finalize outbound (refund if failed) + if err := k.FinalizeOutbound(ctx, utxId, outbound); err != nil { + return err + } + + return nil +} diff --git a/x/uexecutor/keeper/outbound.go b/x/uexecutor/keeper/outbound.go new file mode 100644 index 00000000..592b8aea --- /dev/null +++ b/x/uexecutor/keeper/outbound.go @@ -0,0 +1,63 @@ +package keeper + +import ( + "context" + "fmt" + + "github.com/pushchain/push-chain-node/x/uexecutor/types" +) + +func (k Keeper) UpdateOutbound(ctx context.Context, utxId string, outbound types.OutboundTx) error { + return k.UpdateUniversalTx(ctx, utxId, func(utx *types.UniversalTx) error { + if utx.OutboundTx == nil { + return fmt.Errorf("outbound tx list is not initialized for utx %s", utxId) + } + + updated := false + for i, ob := range utx.OutboundTx { + if ob.Id == outbound.Id { + utx.OutboundTx[i] = &outbound + updated = true + break + } + } + + if !updated { + return fmt.Errorf( + "outbound with id %s not found in utx %s", + outbound.Id, + utxId, + ) + } + + return nil + }) +} + +func (k Keeper) FinalizeOutbound(ctx context.Context, utxId string, outbound types.OutboundTx) error { + // If not observed yet, do nothing + if outbound.OutboundStatus != types.Status_OBSERVED { + return nil + } + + obs := outbound.ObservedTx + if obs == nil { + return nil + } + + // If outbound succeeded -> nothing to do + if obs.Success { + return nil + } + + // Only refund for funds-related tx types + if outbound.TxType != types.TxType_FUNDS && + outbound.TxType != types.TxType_FUNDS_AND_PAYLOAD { + return nil + } + + // Parse amount and mint as per revert Instruction + // TODO + // Store Reverted tx in Outbound + return nil +} diff --git a/x/uexecutor/keeper/universal_tx.go b/x/uexecutor/keeper/universal_tx.go index 0d1ec929..d260c026 100644 --- a/x/uexecutor/keeper/universal_tx.go +++ b/x/uexecutor/keeper/universal_tx.go @@ -7,6 +7,8 @@ import ( // sdk "github.com/cosmos/cosmos-sdk/types" "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/utils" "github.com/pushchain/push-chain-node/x/uexecutor/types" ) @@ -87,3 +89,16 @@ func (k Keeper) GetUniversalTxStatus(ctx context.Context, key string) (types.Uni } return utx.UniversalStatus, true, nil } + +func (k Keeper) BuildPcUniversalTxKey(ctx context.Context, pc types.PCTx) (string, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + evmChainID, err := utils.ExtractEvmChainID(sdkCtx.ChainID()) + if err != nil { + return "", err + } + + pcCaip := fmt.Sprintf("eip155:%s", evmChainID) + + return types.GetPcUniversalTxKey(pcCaip, pc), nil +} diff --git a/x/uexecutor/keeper/voting.go b/x/uexecutor/keeper/voting.go index ccb62f6a..19674823 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 @@ -62,3 +65,53 @@ func (k Keeper) VoteOnInboundBallot( return isFinalized, isNew, nil } + +func (k Keeper) VoteOnOutboundBallot( + ctx context.Context, + universalValidator sdk.ValAddress, + utxId string, + outboundId string, + observedTx types.OutboundObservation, +) (isFinalized bool, + isNew bool, + err error) { + ballotKey, err := types.GetOutboundBallotKey(utxId, outboundId, observedTx) + if err != nil { + return false, false, err + } + + universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) + if err != nil { + return false, false, err + } + + // number of validators + totalValidators := len(universalValidatorSet) + + // votesNeeded = ceil(2/3 * totalValidators) + // >2/3 quorum similar to tendermint + votesNeeded := (types.VotesThresholdNumerator*totalValidators)/types.VotesThresholdDenominator + 1 + + // Convert []sdk.ValAddress → []string + universalValidatorSetStrs := make([]string, len(universalValidatorSet)) + for i, v := range universalValidatorSet { + universalValidatorSetStrs[i] = v.IdentifyInfo.CoreValidatorAddress + } + + // Step 2: Call VoteOnBallot for this inbound synthetic + _, isFinalized, isNew, err = k.uvalidatorKeeper.VoteOnBallot( + ctx, + ballotKey, + uvalidatortypes.BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX, + universalValidator.String(), + uvalidatortypes.VoteResult_VOTE_RESULT_SUCCESS, + universalValidatorSetStrs, + int64(votesNeeded), + int64(types.DefaultExpiryAfterBlocks), + ) + if err != nil { + return false, false, err + } + + return isFinalized, isNew, nil +} diff --git a/x/uexecutor/types/abi.go b/x/uexecutor/types/abi.go index 5b2bb248..f2a7720c 100644 --- a/x/uexecutor/types/abi.go +++ b/x/uexecutor/types/abi.go @@ -1,9 +1,12 @@ package types import ( + "encoding/hex" + fmt "fmt" "math/big" "strings" + evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/pushchain/push-chain-node/utils" @@ -717,3 +720,61 @@ func NewAbiUniversalAccountId(proto *UniversalAccountId) (AbiUniversalAccountId, Owner: owner, }, nil } + +type UniversalWithdrawEvent struct { + Sender string + ChainId string + Token string + Target string + Amount *big.Int + GasToken string + GasFee *big.Int + GasLimit *big.Int + Payload string + ProtocolFee *big.Int +} + +func DecodeUniversalTxWithdrawFromLog(log *evmtypes.Log) (*UniversalWithdrawEvent, error) { + if len(log.Topics) < 3 { + return nil, fmt.Errorf("insufficient topics for UniversalTxWithdraw") + } + + event := &UniversalWithdrawEvent{} + + // Indexed params + event.Sender = common.HexToAddress(log.Topics[1]).Hex() + event.Token = common.HexToAddress(log.Topics[2]).Hex() + + // ABI types + stringType, _ := abi.NewType("string", "", nil) + bytesType, _ := abi.NewType("bytes", "", nil) + uint256Type, _ := abi.NewType("uint256", "", nil) + addressType, _ := abi.NewType("address", "", nil) + + arguments := abi.Arguments{ + {Type: stringType}, // chainId + {Type: bytesType}, // target + {Type: uint256Type}, // amount + {Type: addressType}, // gasToken + {Type: uint256Type}, // gasFee + {Type: uint256Type}, // gasLimit + {Type: bytesType}, // payload + {Type: uint256Type}, // protocolFee + } + + values, err := arguments.Unpack(log.Data) + if err != nil { + return nil, err + } + + event.ChainId = values[0].(string) + event.Target = "0x" + hex.EncodeToString(values[1].([]byte)) + event.Amount = values[2].(*big.Int) + event.GasToken = values[3].(common.Address).Hex() + event.GasFee = values[4].(*big.Int) + event.GasLimit = values[5].(*big.Int) + event.Payload = "0x" + hex.EncodeToString(values[6].([]byte)) + event.ProtocolFee = values[7].(*big.Int) + + return event, nil +} diff --git a/x/uexecutor/types/constants.go b/x/uexecutor/types/constants.go index 989fec97..02b6f7e7 100644 --- a/x/uexecutor/types/constants.go +++ b/x/uexecutor/types/constants.go @@ -1,6 +1,9 @@ package types -import "github.com/ethereum/go-ethereum/common" +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) const ( FACTORY_PROXY_ADDRESS_HEX = "0x00000000000000000000000000000000000000eA" @@ -38,3 +41,7 @@ const ( // Default number of blocks after which ballot expires DefaultExpiryAfterBlocks = 10000 ) + +var UniversalTxWithdrawEventSig = crypto.Keccak256Hash([]byte( + "UniversalTxWithdraw(address,string,address,bytes,uint256,address,uint256,uint256,bytes,uint256,(address,bytes))", +)).Hex() diff --git a/x/uexecutor/types/events.go b/x/uexecutor/types/events.go new file mode 100644 index 00000000..5da024f7 --- /dev/null +++ b/x/uexecutor/types/events.go @@ -0,0 +1,55 @@ +package types + +import ( + "encoding/json" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + EventTypeOutboundCreated = "outbound_created" +) + +// OutboundCreatedEvent represents an emitted outbound transaction. +type OutboundCreatedEvent struct { + UniversalTxId string `json:"utx_id"` + OutboundId string `json:"outbound_id"` + DestinationChain string `json:"destination_chain"` + Recipient string `json:"recipient"` + Amount string `json:"amount"` + AssetAddr string `json:"asset_addr"` + Sender string `json:"sender"` + Payload string `json:"payload"` + GasLimit string `json:"gas_limit"` + TxType string `json:"tx_type"` + PcTxHash string `json:"pc_tx_hash"` + LogIndex string `json:"log_index"` +} + +// NewOutboundCreatedEvent creates a Cosmos SDK event for outbound creation. +func NewOutboundCreatedEvent(e OutboundCreatedEvent) (sdk.Event, error) { + bz, err := json.Marshal(e) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal outbound event: %w", err) + } + + event := sdk.NewEvent( + EventTypeOutboundCreated, + sdk.NewAttribute("utx_id", e.UniversalTxId), + sdk.NewAttribute("outbound_id", e.OutboundId), + sdk.NewAttribute("destination_chain", e.DestinationChain), + sdk.NewAttribute("recipient", e.Recipient), + sdk.NewAttribute("amount", e.Amount), + sdk.NewAttribute("asset_addr", e.AssetAddr), + sdk.NewAttribute("sender", e.Sender), + sdk.NewAttribute("payload", e.Payload), + sdk.NewAttribute("gas_limit", e.GasLimit), + sdk.NewAttribute("tx_type", e.TxType), + sdk.NewAttribute("pc_tx_hash", e.PcTxHash), + sdk.NewAttribute("log_index", e.LogIndex), + sdk.NewAttribute("data", string(bz)), // full JSON payload for indexers + ) + + return event, nil +} 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/inbound.go b/x/uexecutor/types/inbound.go index b7aab960..2a641b1e 100644 --- a/x/uexecutor/types/inbound.go +++ b/x/uexecutor/types/inbound.go @@ -60,13 +60,13 @@ func (p Inbound) ValidateBasic() error { } // Validate tx_type enum - if _, ok := InboundTxType_name[int32(p.TxType)]; !ok || p.TxType == InboundTxType_UNSPECIFIED_TX { + if _, ok := TxType_name[int32(p.TxType)]; !ok || p.TxType == TxType_UNSPECIFIED_TX { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid tx_type: %v", p.TxType) } // Validate payload only if tx_type requires it switch p.TxType { - case InboundTxType_FUNDS_AND_PAYLOAD, InboundTxType_GAS_AND_PAYLOAD: + case TxType_FUNDS_AND_PAYLOAD, TxType_GAS_AND_PAYLOAD: if p.UniversalPayload == nil { return errors.Wrap(sdkerrors.ErrInvalidRequest, "payload is required for payload tx types") } diff --git a/x/uexecutor/types/inbound_test.go b/x/uexecutor/types/inbound_test.go index e08a2ca4..0cf55b98 100644 --- a/x/uexecutor/types/inbound_test.go +++ b/x/uexecutor/types/inbound_test.go @@ -16,7 +16,7 @@ func TestInbound_ValidateBasic(t *testing.T) { Amount: "1000", AssetAddr: "0x000000000000000000000000000000000000cafe", LogIndex: "1", - TxType: types.InboundTxType_FUNDS, + TxType: types.TxType_FUNDS, } tests := []struct { @@ -134,7 +134,7 @@ func TestInbound_ValidateBasic(t *testing.T) { name: "unspecified tx_type", inbound: func() types.Inbound { ib := validInbound - ib.TxType = types.InboundTxType_UNSPECIFIED_TX + ib.TxType = types.TxType_UNSPECIFIED_TX return ib }(), expectError: true, diff --git a/x/uexecutor/types/keys.go b/x/uexecutor/types/keys.go index 17ad7d36..2e26b7e3 100755 --- a/x/uexecutor/types/keys.go +++ b/x/uexecutor/types/keys.go @@ -40,8 +40,48 @@ 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 +} + +func GetPcUniversalTxKey(pcCaip string, pc PCTx) string { + data := fmt.Sprintf("%s:%s", pcCaip, pc.TxHash) + hash := sha256.Sum256([]byte(data)) + return hex.EncodeToString(hash[:]) +} + +func GetOutboundBallotKey( + utxId string, + outboundIndex string, + observedTx OutboundObservation, +) (string, error) { + + bz, err := observedTx.Marshal() + if err != nil { + return "", err + } + + data := append([]byte(utxId+":"+outboundIndex+":"), bz...) + hash := sha256.Sum256(data) + + return hex.EncodeToString(hash[:]), nil +} + +func GetOutboundId( + utxId, pcTxHash string, + logIndex uint64, +) string { + data := fmt.Sprintf("%s:%s:%d", utxId, pcTxHash, logIndex) + hash := sha256.Sum256([]byte(data)) + return hex.EncodeToString(hash[:]) +} diff --git a/x/uexecutor/types/outbound_tx.go b/x/uexecutor/types/outbound_tx.go index fb066192..d8e20229 100644 --- a/x/uexecutor/types/outbound_tx.go +++ b/x/uexecutor/types/outbound_tx.go @@ -31,30 +31,122 @@ func (p OutboundTx) ValidateBasic() error { return errors.Wrap(sdkerrors.ErrInvalidRequest, "destination_chain must be in CAIP-2 format :") } - // Validate tx_hash (non-empty) - if strings.TrimSpace(p.TxHash) == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "tx_hash cannot be empty") - } - - // Validate recipient (non-empty, valid hex address) + // recipient must not be empty if strings.TrimSpace(p.Recipient) == "" { return errors.Wrap(sdkerrors.ErrInvalidAddress, "recipient cannot be empty") } - if !utils.IsValidAddress(p.Recipient, utils.HEX) { - return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid recipient address: %s", p.Recipient) + + // sender + if strings.TrimSpace(p.Sender) == "" { + return errors.Wrap(sdkerrors.ErrInvalidAddress, "sender cannot be empty") + } + if !utils.IsValidAddress(p.Sender, utils.HEX) { + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address: %s", p.Sender) + } + + // tx type support + switch p.TxType { + case TxType_FUNDS, TxType_FUNDS_AND_PAYLOAD, TxType_PAYLOAD: + // supported + default: + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "unsupported tx_type: %s", p.TxType.String()) + } + + // amount validation (only for funds-related txs) + if p.TxType == TxType_FUNDS || p.TxType == TxType_FUNDS_AND_PAYLOAD { + if strings.TrimSpace(p.Amount) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "amount cannot be empty for funds tx") + } + if bi, ok := new(big.Int).SetString(p.Amount, 10); !ok || bi.Sign() <= 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "amount must be a valid positive uint256") + } + } + + // payload validation (required for payload txs) + if p.TxType == TxType_PAYLOAD || p.TxType == TxType_FUNDS_AND_PAYLOAD { + if strings.TrimSpace(p.Payload) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "payload cannot be empty for payload tx") + } } - // Validate amount as uint256 (non-empty, >0) - if strings.TrimSpace(p.Amount) == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "amount cannot be empty") + // asset_addr required when amount is involved + if (p.TxType == TxType_FUNDS || p.TxType == TxType_FUNDS_AND_PAYLOAD) && strings.TrimSpace(p.AssetAddr) == "" { + return errors.Wrap(sdkerrors.ErrInvalidAddress, "asset_addr cannot be empty for funds tx") } - if bi, ok := new(big.Int).SetString(p.Amount, 10); !ok || bi.Sign() <= 0 { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "amount must be a valid positive uint256") + + // gas_limit (uint) + if strings.TrimSpace(p.GasLimit) != "" { + if _, ok := new(big.Int).SetString(p.GasLimit, 10); !ok { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "gas_limit must be a valid uint") + } } - // Validate asset_addr (non-empty) - if strings.TrimSpace(p.AssetAddr) == "" { - return errors.Wrap(sdkerrors.ErrInvalidAddress, "asset_addr cannot be empty") + // pc_tx validation + if strings.TrimSpace(p.PcTx.TxHash) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pc_tx.tx_hash cannot be empty") + } + if strings.TrimSpace(p.PcTx.LogIndex) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pc_tx.log_index cannot be empty") + } + + // observed tx validation (if present) + if p.ObservedTx != nil { + if strings.TrimSpace(p.ObservedTx.TxHash) != "" { + if p.ObservedTx.BlockHeight == 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx.block_height must be > 0") + } + } + } + + // index + if strings.TrimSpace(p.Id) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "id cannot be empty") + } + + // status validation + // outbound_status validation + switch p.OutboundStatus { + case Status_UNSPECIFIED: + return errors.Wrap(sdkerrors.ErrInvalidRequest, "outbound_status cannot be UNSPECIFIED") + + case Status_PENDING: + // PENDING must NOT have observed tx data + if p.ObservedTx != nil && strings.TrimSpace(p.ObservedTx.TxHash) != "" { + return errors.Wrap( + sdkerrors.ErrInvalidRequest, + "observed_tx must be empty when outbound_status is PENDING", + ) + } + + case Status_OBSERVED: + // OBSERVED must have observed tx + if p.ObservedTx == nil { + return errors.Wrap( + sdkerrors.ErrInvalidRequest, + "observed_tx is required when outbound_status is OBSERVED", + ) + } + + if strings.TrimSpace(p.ObservedTx.TxHash) == "" { + return errors.Wrap( + sdkerrors.ErrInvalidRequest, + "observed_tx.tx_hash is required when outbound_status is OBSERVED", + ) + } + + if p.ObservedTx.BlockHeight == 0 { + return errors.Wrap( + sdkerrors.ErrInvalidRequest, + "observed_tx.block_height must be > 0 when outbound_status is OBSERVED", + ) + } + + default: + return errors.Wrapf( + sdkerrors.ErrInvalidRequest, + "invalid outbound_status: %d", + p.OutboundStatus, + ) } return nil diff --git a/x/uexecutor/types/outbound_tx_test.go b/x/uexecutor/types/outbound_tx_test.go index 09a0b85f..e65271d9 100644 --- a/x/uexecutor/types/outbound_tx_test.go +++ b/x/uexecutor/types/outbound_tx_test.go @@ -7,15 +7,25 @@ import ( "github.com/stretchr/testify/require" ) -func TestOutboundTx_ValidateBasic(t *testing.T) { - validOutbound := types.OutboundTx{ +func baseValidOutbound() types.OutboundTx { + return types.OutboundTx{ DestinationChain: "eip155:11155111", - TxHash: "0x123abc", Recipient: "0x000000000000000000000000000000000000beef", + Sender: "0x000000000000000000000000000000000000dead", Amount: "1000", AssetAddr: "0x000000000000000000000000000000000000cafe", + Payload: "0xabcdef", + GasLimit: "21000", + TxType: types.TxType_FUNDS_AND_PAYLOAD, + PcTx: &types.Originating_Pc_TX{ + TxHash: "0xpc123", + LogIndex: "1", + }, + Id: "0", } +} +func TestOutboundTx_ValidateBasic(t *testing.T) { tests := []struct { name string outbound types.OutboundTx @@ -23,64 +33,71 @@ func TestOutboundTx_ValidateBasic(t *testing.T) { errContains string }{ { - name: "valid outbound", - outbound: validOutbound, + name: "valid FUNDS tx", + outbound: func() types.OutboundTx { + ob := baseValidOutbound() + ob.TxType = types.TxType_FUNDS + ob.Payload = "" + return ob + }(), expectError: false, }, { - name: "empty destination chain", + name: "valid PAYLOAD tx", outbound: func() types.OutboundTx { - ob := validOutbound - ob.DestinationChain = "" + ob := baseValidOutbound() + ob.TxType = types.TxType_PAYLOAD + ob.Amount = "" + ob.AssetAddr = "" return ob }(), - expectError: true, - errContains: "destination_chain cannot be empty", + expectError: false, }, { - name: "invalid destination chain format", + name: "empty destination_chain", outbound: func() types.OutboundTx { - ob := validOutbound - ob.DestinationChain = "eip155" // missing ":" + ob := baseValidOutbound() + ob.DestinationChain = "" return ob }(), expectError: true, - errContains: "CAIP-2 format", + errContains: "destination_chain cannot be empty", }, { - name: "empty tx_hash", + name: "invalid CAIP-2 chain", outbound: func() types.OutboundTx { - ob := validOutbound - ob.TxHash = "" + ob := baseValidOutbound() + ob.DestinationChain = "eip155" return ob }(), expectError: true, - errContains: "tx_hash cannot be empty", + errContains: "CAIP-2", }, { - name: "empty recipient", + name: "empty sender", outbound: func() types.OutboundTx { - ob := validOutbound - ob.Recipient = "" + ob := baseValidOutbound() + ob.Sender = "" return ob }(), expectError: true, - errContains: "recipient cannot be empty", + errContains: "sender cannot be empty", }, { - name: "invalid recipient address", + name: "unsupported tx type", outbound: func() types.OutboundTx { - ob := validOutbound - ob.Recipient = "0xzzzzzzzz" + ob := baseValidOutbound() + ob.TxType = types.TxType_GAS return ob }(), expectError: true, - errContains: "invalid recipient address", + errContains: "unsupported tx_type", }, { - name: "empty amount", + name: "FUNDS tx missing amount", outbound: func() types.OutboundTx { - ob := validOutbound + ob := baseValidOutbound() + ob.TxType = types.TxType_FUNDS ob.Amount = "" return ob }(), @@ -88,25 +105,57 @@ func TestOutboundTx_ValidateBasic(t *testing.T) { errContains: "amount cannot be empty", }, { - name: "negative amount", + name: "PAYLOAD tx missing payload", outbound: func() types.OutboundTx { - ob := validOutbound - ob.Amount = "-100" + ob := baseValidOutbound() + ob.TxType = types.TxType_PAYLOAD + ob.Payload = "" return ob }(), expectError: true, - errContains: "amount must be a valid positive uint256", + errContains: "payload cannot be empty", }, { - name: "empty asset_addr", + name: "FUNDS tx missing asset_addr", outbound: func() types.OutboundTx { - ob := validOutbound + ob := baseValidOutbound() + ob.TxType = types.TxType_FUNDS ob.AssetAddr = "" return ob }(), expectError: true, errContains: "asset_addr cannot be empty", }, + { + name: "empty pc_tx hash", + outbound: func() types.OutboundTx { + ob := baseValidOutbound() + ob.PcTx.TxHash = "" + return ob + }(), + expectError: true, + errContains: "pc_tx.tx_hash cannot be empty", + }, + { + name: "empty pc_tx log_index", + outbound: func() types.OutboundTx { + ob := baseValidOutbound() + ob.PcTx.LogIndex = "" + return ob + }(), + expectError: true, + errContains: "pc_tx.log_index cannot be empty", + }, + { + name: "empty index", + outbound: func() types.OutboundTx { + ob := baseValidOutbound() + ob.Id = "" + return ob + }(), + expectError: true, + errContains: "id cannot be empty", + }, } for _, tc := range tests { diff --git a/x/uexecutor/types/tx.pb.go b/x/uexecutor/types/tx.pb.go index cdaff70f..6fe87f22 100644 --- a/x/uexecutor/types/tx.pb.go +++ b/x/uexecutor/types/tx.pb.go @@ -543,6 +543,113 @@ func (m *MsgVoteInboundResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgVoteInboundResponse proto.InternalMessageInfo +// MsgVoteOutbound allows a universal validator to vote on an outbound tx observation. +type MsgVoteOutbound struct { + // signer is the Cosmos address initiating the tx (used for tx signing) + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + UtxId string `protobuf:"bytes,2,opt,name=utx_id,json=utxId,proto3" json:"utx_id,omitempty"` + OutboundId string `protobuf:"bytes,3,opt,name=outbound_id,json=outboundId,proto3" json:"outbound_id,omitempty"` + ObservedTx *OutboundObservation `protobuf:"bytes,4,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` +} + +func (m *MsgVoteOutbound) Reset() { *m = MsgVoteOutbound{} } +func (m *MsgVoteOutbound) String() string { return proto.CompactTextString(m) } +func (*MsgVoteOutbound) ProtoMessage() {} +func (*MsgVoteOutbound) Descriptor() ([]byte, []int) { + return fileDescriptor_88d6216044506365, []int{10} +} +func (m *MsgVoteOutbound) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteOutbound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteOutbound.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 *MsgVoteOutbound) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteOutbound.Merge(m, src) +} +func (m *MsgVoteOutbound) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteOutbound) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteOutbound.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteOutbound proto.InternalMessageInfo + +func (m *MsgVoteOutbound) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgVoteOutbound) GetUtxId() string { + if m != nil { + return m.UtxId + } + return "" +} + +func (m *MsgVoteOutbound) GetOutboundId() string { + if m != nil { + return m.OutboundId + } + return "" +} + +func (m *MsgVoteOutbound) GetObservedTx() *OutboundObservation { + if m != nil { + return m.ObservedTx + } + return nil +} + +// MsgVoteInboundResponse defines the response for MsgExecutePayload. +type MsgVoteOutboundResponse struct { +} + +func (m *MsgVoteOutboundResponse) Reset() { *m = MsgVoteOutboundResponse{} } +func (m *MsgVoteOutboundResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteOutboundResponse) ProtoMessage() {} +func (*MsgVoteOutboundResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_88d6216044506365, []int{11} +} +func (m *MsgVoteOutboundResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteOutboundResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteOutboundResponse.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 *MsgVoteOutboundResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteOutboundResponse.Merge(m, src) +} +func (m *MsgVoteOutboundResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteOutboundResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteOutboundResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteOutboundResponse proto.InternalMessageInfo + // MsgVoteGasPrice is broadcasted by Universal Validators to submit their observed gas prices type MsgVoteGasPrice struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` @@ -555,7 +662,7 @@ func (m *MsgVoteGasPrice) Reset() { *m = MsgVoteGasPrice{} } func (m *MsgVoteGasPrice) String() string { return proto.CompactTextString(m) } func (*MsgVoteGasPrice) ProtoMessage() {} func (*MsgVoteGasPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{10} + return fileDescriptor_88d6216044506365, []int{12} } func (m *MsgVoteGasPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -620,7 +727,7 @@ func (m *MsgVoteGasPriceResponse) Reset() { *m = MsgVoteGasPriceResponse func (m *MsgVoteGasPriceResponse) String() string { return proto.CompactTextString(m) } func (*MsgVoteGasPriceResponse) ProtoMessage() {} func (*MsgVoteGasPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{11} + return fileDescriptor_88d6216044506365, []int{13} } func (m *MsgVoteGasPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -660,6 +767,8 @@ func init() { proto.RegisterType((*MsgExecutePayloadResponse)(nil), "uexecutor.v1.MsgExecutePayloadResponse") proto.RegisterType((*MsgVoteInbound)(nil), "uexecutor.v1.MsgVoteInbound") proto.RegisterType((*MsgVoteInboundResponse)(nil), "uexecutor.v1.MsgVoteInboundResponse") + proto.RegisterType((*MsgVoteOutbound)(nil), "uexecutor.v1.MsgVoteOutbound") + proto.RegisterType((*MsgVoteOutboundResponse)(nil), "uexecutor.v1.MsgVoteOutboundResponse") proto.RegisterType((*MsgVoteGasPrice)(nil), "uexecutor.v1.MsgVoteGasPrice") proto.RegisterType((*MsgVoteGasPriceResponse)(nil), "uexecutor.v1.MsgVoteGasPriceResponse") } @@ -667,58 +776,63 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/tx.proto", fileDescriptor_88d6216044506365) } var fileDescriptor_88d6216044506365 = []byte{ - // 807 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0xda, 0x48, - 0x14, 0xc6, 0x81, 0x10, 0x31, 0xa0, 0x24, 0x38, 0x24, 0x80, 0xb3, 0x21, 0x89, 0xf7, 0x57, 0x96, - 0x6c, 0xf0, 0x86, 0x95, 0x72, 0xe0, 0x06, 0x49, 0xb4, 0x1b, 0x45, 0xac, 0x58, 0x37, 0xf4, 0x90, - 0x0b, 0x1a, 0xec, 0xa9, 0xb1, 0x0a, 0x1e, 0xcb, 0x33, 0x46, 0x70, 0xab, 0x7a, 0xec, 0xa9, 0xa7, - 0xfe, 0x13, 0xbd, 0xe4, 0xd0, 0x3f, 0xa0, 0xc7, 0xdc, 0x1a, 0xb5, 0xaa, 0xd4, 0x53, 0x55, 0x25, - 0x87, 0xfc, 0x0b, 0x3d, 0x56, 0x1e, 0x1b, 0x83, 0x4d, 0x7e, 0x48, 0x39, 0xe5, 0x82, 0x66, 0xbe, - 0xef, 0xbd, 0xcf, 0xef, 0x7b, 0x33, 0x3c, 0x0d, 0x58, 0xb6, 0xd1, 0x00, 0x29, 0x36, 0xc5, 0x96, - 0xd4, 0xdf, 0x95, 0xe8, 0xa0, 0x64, 0x5a, 0x98, 0x62, 0x3e, 0xe5, 0xc3, 0xa5, 0xfe, 0xae, 0x90, - 0x86, 0x3d, 0xdd, 0xc0, 0x12, 0xfb, 0x75, 0x03, 0x84, 0xac, 0x82, 0x49, 0x0f, 0x13, 0xa9, 0x47, - 0x34, 0x27, 0xb1, 0x47, 0x34, 0x8f, 0xc8, 0x05, 0x05, 0x87, 0x26, 0x22, 0x1e, 0x93, 0xd1, 0xb0, - 0x86, 0xd9, 0x52, 0x72, 0x56, 0x1e, 0x9a, 0x77, 0x85, 0x5a, 0x2e, 0xe1, 0x6e, 0x5c, 0x4a, 0x7c, - 0xcb, 0x81, 0x85, 0x3a, 0xd1, 0x9a, 0xa6, 0x0a, 0x29, 0x6a, 0x40, 0x0b, 0xf6, 0x08, 0xbf, 0x07, - 0x12, 0xd0, 0xa6, 0x1d, 0x6c, 0xe9, 0x74, 0x98, 0xe3, 0x36, 0xb8, 0xad, 0x44, 0x2d, 0xf7, 0xf1, - 0xdd, 0x4e, 0xc6, 0x4b, 0xac, 0xaa, 0xaa, 0x85, 0x08, 0x79, 0x42, 0x2d, 0xdd, 0xd0, 0xe4, 0x71, - 0x28, 0x5f, 0x06, 0x71, 0x93, 0x29, 0xe4, 0x66, 0x36, 0xb8, 0xad, 0x64, 0x39, 0x53, 0x9a, 0x74, - 0x58, 0x72, 0xd5, 0x6b, 0xb1, 0xf3, 0xaf, 0xeb, 0x11, 0xd9, 0x8b, 0xac, 0xfc, 0xf9, 0xf2, 0xfa, - 0xac, 0x38, 0xd6, 0x78, 0x75, 0x7d, 0x56, 0xcc, 0x8f, 0xdd, 0x85, 0x2a, 0x13, 0xf3, 0x20, 0x1b, - 0x82, 0x64, 0x44, 0x4c, 0x6c, 0x10, 0x24, 0x7e, 0xe6, 0x40, 0xaa, 0x4e, 0xb4, 0x03, 0x64, 0x76, - 0xf1, 0xb0, 0x79, 0x58, 0xe5, 0xff, 0x02, 0x71, 0xa2, 0x6b, 0x06, 0xb2, 0xee, 0xb5, 0xe0, 0xc5, - 0xf1, 0x32, 0xc8, 0xd8, 0x86, 0xde, 0x47, 0x16, 0x81, 0xdd, 0x16, 0x54, 0x14, 0x6c, 0x1b, 0xb4, - 0xa5, 0xab, 0x9e, 0x9b, 0x8d, 0xa0, 0x9b, 0xe6, 0x28, 0xb2, 0xea, 0x06, 0x1e, 0xa9, 0x32, 0x6f, - 0x4f, 0x61, 0x7c, 0x16, 0xcc, 0xd1, 0x41, 0xab, 0x03, 0x49, 0x27, 0x17, 0x75, 0xca, 0x90, 0xe3, - 0x74, 0xf0, 0x2f, 0x24, 0x9d, 0xca, 0x6f, 0x8e, 0x71, 0xef, 0xcb, 0x8e, 0xeb, 0x95, 0x80, 0x6b, - 0xdf, 0x86, 0xb8, 0x05, 0x32, 0x93, 0xfb, 0x91, 0x5f, 0x7e, 0x11, 0x44, 0x9b, 0x87, 0x55, 0xe6, - 0x2d, 0x25, 0x3b, 0x4b, 0xf1, 0x03, 0x07, 0x12, 0x75, 0xa2, 0xd5, 0x75, 0x83, 0x36, 0xf6, 0x1f, - 0xbb, 0xfd, 0x9f, 0x43, 0xf6, 0x97, 0x02, 0xf6, 0x5d, 0x0f, 0xe2, 0x12, 0x48, 0xfb, 0x1b, 0xff, - 0xa0, 0xdf, 0xcf, 0x30, 0xf4, 0x90, 0x85, 0xa3, 0x06, 0x1c, 0x76, 0x31, 0x54, 0x1f, 0x89, 0xdd, - 0x63, 0x90, 0x1e, 0x6b, 0x9a, 0x6e, 0x69, 0xcc, 0x78, 0xb2, 0x5c, 0xb8, 0x45, 0xd0, 0x33, 0x20, - 0x2f, 0xda, 0x21, 0x84, 0xdf, 0x06, 0xe9, 0x3e, 0xb2, 0xf4, 0x67, 0xba, 0x02, 0xa9, 0x8e, 0x8d, - 0x96, 0x0a, 0x29, 0xcc, 0xc5, 0x58, 0x17, 0x17, 0x27, 0x89, 0x03, 0x48, 0x61, 0x65, 0x3b, 0xd4, - 0xcf, 0xd5, 0x40, 0x3f, 0x83, 0xcd, 0x12, 0x57, 0x41, 0x7e, 0x0a, 0xf4, 0xfb, 0xfb, 0x86, 0x03, - 0xf3, 0x75, 0xa2, 0x3d, 0xc5, 0x14, 0x1d, 0x19, 0x6d, 0x6c, 0x1b, 0x0f, 0x69, 0xae, 0x04, 0xe6, - 0x74, 0x37, 0xd9, 0xeb, 0xe7, 0x72, 0xd0, 0xbe, 0xa7, 0x2c, 0x8f, 0xa2, 0x2a, 0x9b, 0xa1, 0xfa, - 0xd3, 0x36, 0x92, 0x82, 0x55, 0x88, 0x39, 0xb0, 0x12, 0x44, 0xfc, 0x92, 0x3f, 0xb9, 0x43, 0xcc, - 0xa1, 0xfe, 0x81, 0xa4, 0x61, 0xe9, 0x0a, 0x7a, 0x40, 0xcd, 0x45, 0x90, 0xc6, 0x6d, 0x82, 0xac, - 0x3e, 0x52, 0x5b, 0x4a, 0x07, 0xea, 0xc6, 0xe8, 0x36, 0x24, 0xe4, 0x85, 0x11, 0xb1, 0xef, 0xe0, - 0x47, 0x2a, 0x9f, 0x01, 0xb3, 0xa6, 0xf3, 0x19, 0x76, 0xb8, 0x31, 0xd9, 0xdd, 0xf0, 0x9b, 0x20, - 0xd5, 0xee, 0x62, 0xe5, 0x79, 0xcb, 0xb0, 0x7b, 0x6d, 0x64, 0xb1, 0xc3, 0x8a, 0xc9, 0x49, 0x86, - 0xfd, 0xc7, 0xa0, 0xca, 0x1f, 0x21, 0x9f, 0xc1, 0x61, 0x37, 0xe9, 0xc0, 0x1b, 0x76, 0x93, 0xd0, - 0xc8, 0x70, 0xf9, 0x7b, 0x14, 0x44, 0xeb, 0x44, 0xe3, 0x4f, 0x40, 0x2a, 0x30, 0xb9, 0xd7, 0x82, - 0x5d, 0x0e, 0xcd, 0x4a, 0xe1, 0xd7, 0x3b, 0x69, 0x7f, 0xb4, 0x1c, 0x83, 0xc4, 0x78, 0x8c, 0x0a, - 0x53, 0x39, 0x3e, 0x27, 0x88, 0xb7, 0x73, 0xbe, 0x58, 0x0d, 0xc4, 0xbd, 0x89, 0x94, 0x9d, 0x8a, - 0x76, 0x09, 0x61, 0xfd, 0x16, 0xc2, 0xd7, 0x38, 0x05, 0xf3, 0xa1, 0xbf, 0xfb, 0x74, 0x4a, 0x30, - 0x40, 0xf8, 0xfd, 0x9e, 0x00, 0x5f, 0xfb, 0x7f, 0x90, 0x9c, 0xbc, 0xea, 0x3f, 0x4d, 0xe5, 0x4d, - 0xb0, 0xc2, 0x2f, 0x77, 0xb1, 0xbe, 0xe4, 0x09, 0x48, 0x05, 0xae, 0xe2, 0xda, 0x8d, 0x59, 0x23, - 0xfa, 0x86, 0x53, 0xb9, 0xe9, 0xcc, 0x85, 0xd9, 0x17, 0xd7, 0x67, 0x45, 0xae, 0xd6, 0x38, 0xbf, - 0x2c, 0x70, 0x17, 0x97, 0x05, 0xee, 0xdb, 0x65, 0x81, 0x7b, 0x7d, 0x55, 0x88, 0x5c, 0x5c, 0x15, - 0x22, 0x5f, 0xae, 0x0a, 0x91, 0xd3, 0x3d, 0x4d, 0xa7, 0x1d, 0xbb, 0x5d, 0x52, 0x70, 0x4f, 0x32, - 0x6d, 0xd2, 0x61, 0x77, 0x98, 0xad, 0x76, 0xd8, 0x72, 0xc7, 0xc0, 0x2a, 0x92, 0x06, 0xd2, 0xf8, - 0xc6, 0xb1, 0x97, 0x43, 0x3b, 0xce, 0x5e, 0x02, 0x7f, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xad, - 0xe3, 0x80, 0xc5, 0xa7, 0x08, 0x00, 0x00, + // 893 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, + 0x18, 0x35, 0x63, 0x59, 0x81, 0x3e, 0x09, 0x89, 0xc5, 0xc8, 0xb1, 0xcc, 0x34, 0xb2, 0xcd, 0xfe, + 0x72, 0x9d, 0x5a, 0x6c, 0x54, 0x20, 0x83, 0x36, 0x2b, 0x31, 0x5a, 0x21, 0x50, 0xa3, 0xb2, 0x56, + 0x87, 0x2c, 0xc2, 0x89, 0xbc, 0x52, 0x44, 0x25, 0x1e, 0xc1, 0x3b, 0x0a, 0xd4, 0x56, 0x74, 0xec, + 0xd4, 0xa9, 0xff, 0x44, 0x17, 0x0f, 0xfd, 0x03, 0x3a, 0x66, 0x6a, 0x83, 0x16, 0x05, 0x3a, 0x15, + 0x85, 0x35, 0xf8, 0xdf, 0x08, 0x78, 0xfc, 0x4d, 0x49, 0x09, 0xe0, 0xc9, 0x8b, 0x70, 0x7c, 0xef, + 0xfb, 0x9e, 0xbe, 0xf7, 0x78, 0x3c, 0x12, 0x76, 0x5c, 0xec, 0x61, 0xcd, 0x65, 0xc4, 0x51, 0x66, + 0x8f, 0x15, 0xe6, 0x35, 0x6d, 0x87, 0x30, 0x22, 0x56, 0x62, 0xb8, 0x39, 0x7b, 0x2c, 0x55, 0xd1, + 0xd4, 0xb4, 0x88, 0xc2, 0x7f, 0x83, 0x02, 0x69, 0x57, 0x23, 0x74, 0x4a, 0xa8, 0x32, 0xa5, 0x86, + 0xdf, 0x38, 0xa5, 0x46, 0x48, 0xd4, 0xb3, 0x82, 0x73, 0x1b, 0xd3, 0x90, 0xa9, 0x19, 0xc4, 0x20, + 0x7c, 0xa9, 0xf8, 0xab, 0x10, 0xdd, 0x0b, 0x84, 0x86, 0x01, 0x11, 0x5c, 0x04, 0x94, 0xfc, 0xab, + 0x00, 0x77, 0x7b, 0xd4, 0x18, 0xd8, 0x3a, 0x62, 0xb8, 0x8f, 0x1c, 0x34, 0xa5, 0xe2, 0x13, 0x28, + 0x21, 0x97, 0x8d, 0x89, 0x63, 0xb2, 0x79, 0x5d, 0x38, 0x10, 0x8e, 0x4a, 0x9d, 0xfa, 0x5f, 0xbf, + 0x9d, 0xd4, 0xc2, 0xc6, 0x53, 0x5d, 0x77, 0x30, 0xa5, 0xdf, 0x30, 0xc7, 0xb4, 0x0c, 0x35, 0x29, + 0x15, 0x5b, 0x50, 0xb4, 0xb9, 0x42, 0xfd, 0xd6, 0x81, 0x70, 0x54, 0x6e, 0xd5, 0x9a, 0x69, 0x87, + 0xcd, 0x40, 0xbd, 0x53, 0x78, 0xf5, 0xdf, 0xfe, 0x86, 0x1a, 0x56, 0xb6, 0x3f, 0xfd, 0xf1, 0xea, + 0xe2, 0x38, 0xd1, 0xf8, 0xe9, 0xea, 0xe2, 0x78, 0x2f, 0x71, 0x97, 0x9b, 0x4c, 0xde, 0x83, 0xdd, + 0x1c, 0xa4, 0x62, 0x6a, 0x13, 0x8b, 0x62, 0xf9, 0x1f, 0x01, 0x2a, 0x3d, 0x6a, 0x3c, 0xc3, 0xf6, + 0x84, 0xcc, 0x07, 0x67, 0xa7, 0xe2, 0x67, 0x50, 0xa4, 0xa6, 0x61, 0x61, 0xe7, 0x9d, 0x16, 0xc2, + 0x3a, 0x51, 0x85, 0x9a, 0x6b, 0x99, 0x33, 0xec, 0x50, 0x34, 0x19, 0x22, 0x4d, 0x23, 0xae, 0xc5, + 0x86, 0xa6, 0x1e, 0xba, 0x39, 0xc8, 0xba, 0x19, 0x44, 0x95, 0xa7, 0x41, 0x61, 0x57, 0x57, 0x45, + 0x77, 0x09, 0x13, 0x77, 0xe1, 0x36, 0xf3, 0x86, 0x63, 0x44, 0xc7, 0xf5, 0x4d, 0x7f, 0x0c, 0xb5, + 0xc8, 0xbc, 0x2f, 0x11, 0x1d, 0xb7, 0x3f, 0xf2, 0x8d, 0x87, 0xff, 0xec, 0xbb, 0xbe, 0x9f, 0x71, + 0x1d, 0xdb, 0x90, 0x8f, 0xa0, 0x96, 0xbe, 0x8e, 0xfc, 0x8a, 0xdb, 0xb0, 0x39, 0x38, 0x3b, 0xe5, + 0xde, 0x2a, 0xaa, 0xbf, 0x94, 0xff, 0x14, 0xa0, 0xd4, 0xa3, 0x46, 0xcf, 0xb4, 0x58, 0xff, 0xe9, + 0x4d, 0xb7, 0xff, 0x7e, 0xce, 0xfe, 0xbd, 0x8c, 0xfd, 0xc0, 0x83, 0x7c, 0x0f, 0xaa, 0xf1, 0x45, + 0x7c, 0xa3, 0x7f, 0xbf, 0xc5, 0xd1, 0x33, 0x5e, 0x8e, 0xfb, 0x68, 0x3e, 0x21, 0x48, 0xbf, 0x21, + 0x76, 0x9f, 0x43, 0x35, 0xd1, 0xb4, 0x83, 0xd1, 0xb8, 0xf1, 0x72, 0xab, 0xb1, 0x46, 0x30, 0x34, + 0xa0, 0x6e, 0xbb, 0x39, 0x44, 0x7c, 0x04, 0xd5, 0x19, 0x76, 0xcc, 0xef, 0x4c, 0x0d, 0x31, 0x93, + 0x58, 0x43, 0x1d, 0x31, 0x54, 0x2f, 0xf0, 0x14, 0xb7, 0xd3, 0xc4, 0x33, 0xc4, 0x50, 0xfb, 0x51, + 0x2e, 0xcf, 0x07, 0x99, 0x3c, 0xb3, 0x61, 0xc9, 0x0f, 0x60, 0x6f, 0x09, 0x8c, 0xf3, 0xfd, 0x45, + 0x80, 0x3b, 0x3d, 0x6a, 0x7c, 0x4b, 0x18, 0xee, 0x5a, 0x23, 0xe2, 0x5a, 0xd7, 0x09, 0x57, 0x81, + 0xdb, 0x66, 0xd0, 0x1c, 0xe6, 0xb9, 0x93, 0xb5, 0x1f, 0x2a, 0xab, 0x51, 0x55, 0xfb, 0x30, 0x37, + 0x7f, 0xd5, 0xc5, 0x4a, 0x76, 0x0a, 0xb9, 0x0e, 0xf7, 0xb3, 0x48, 0x3c, 0xf2, 0x22, 0x38, 0xc4, + 0x7c, 0xea, 0x85, 0xcb, 0xae, 0x3b, 0xf3, 0x0e, 0x14, 0x5d, 0xe6, 0x45, 0x5b, 0xa0, 0xa4, 0x6e, + 0xb9, 0xcc, 0xeb, 0xea, 0xe2, 0x3e, 0x94, 0x49, 0x28, 0xea, 0x73, 0xc1, 0x36, 0x86, 0x08, 0xea, + 0xea, 0x62, 0x07, 0xca, 0x64, 0x44, 0xb1, 0x33, 0xc3, 0xfa, 0x90, 0x79, 0xfc, 0x0e, 0x95, 0x5b, + 0x87, 0x59, 0xbf, 0xd1, 0x58, 0x2f, 0x78, 0x21, 0xbf, 0x6d, 0x2a, 0x44, 0x5d, 0xe7, 0x5e, 0x5b, + 0xce, 0xd9, 0x17, 0x13, 0xfb, 0x51, 0x6b, 0x78, 0xf8, 0xa5, 0xa1, 0x38, 0x80, 0xbf, 0x93, 0x00, + 0xbe, 0x40, 0xb4, 0xef, 0x98, 0x1a, 0xbe, 0x46, 0x00, 0xc7, 0x50, 0x8d, 0x8d, 0x68, 0x63, 0x64, + 0x5a, 0x49, 0x16, 0x77, 0x23, 0xe2, 0xa9, 0x8f, 0x77, 0x75, 0xb1, 0x06, 0x5b, 0xb6, 0xff, 0x37, + 0x3c, 0x8f, 0x82, 0x1a, 0x5c, 0x88, 0x87, 0x50, 0x19, 0x4d, 0x88, 0xf6, 0xfd, 0xd0, 0x72, 0xa7, + 0x23, 0xec, 0xf0, 0x2c, 0x0a, 0x6a, 0x99, 0x63, 0x5f, 0x71, 0xa8, 0xfd, 0x49, 0xce, 0x69, 0xf6, + 0xb4, 0x4f, 0x3b, 0x48, 0x19, 0x8e, 0xa0, 0xc8, 0x70, 0xeb, 0x8f, 0x02, 0x6c, 0xf6, 0xa8, 0x21, + 0x9e, 0x43, 0x25, 0xf3, 0xea, 0x7a, 0x98, 0x8d, 0x3d, 0xf7, 0xb2, 0x90, 0x3e, 0x7c, 0x2b, 0x1d, + 0x9f, 0xad, 0xcf, 0xa1, 0x94, 0xbc, 0x47, 0xa4, 0xa5, 0x9e, 0x98, 0x93, 0xe4, 0xf5, 0x5c, 0x2c, + 0xd6, 0x81, 0x62, 0x78, 0x24, 0xef, 0x2e, 0x55, 0x07, 0x84, 0xb4, 0xbf, 0x86, 0x88, 0x35, 0x5e, + 0xc2, 0x9d, 0xdc, 0x79, 0xb7, 0xdc, 0x92, 0x2d, 0x90, 0x3e, 0x7e, 0x47, 0x41, 0xac, 0xfd, 0x35, + 0x94, 0xd3, 0xcf, 0xfa, 0x7b, 0x4b, 0x7d, 0x29, 0x56, 0xfa, 0xe0, 0x6d, 0x6c, 0x2c, 0x79, 0x0e, + 0x95, 0xcc, 0xb3, 0xf8, 0x70, 0x65, 0x57, 0x44, 0xaf, 0xb8, 0x2b, 0xab, 0x36, 0x79, 0xa4, 0x1a, + 0x6f, 0xf0, 0xd5, 0xaa, 0x11, 0xbd, 0x46, 0x35, 0xbf, 0x93, 0xa4, 0xad, 0x1f, 0xae, 0x2e, 0x8e, + 0x85, 0x4e, 0xff, 0xd5, 0x65, 0x43, 0x78, 0x7d, 0xd9, 0x10, 0xfe, 0xbf, 0x6c, 0x08, 0x3f, 0x2f, + 0x1a, 0x1b, 0xaf, 0x17, 0x8d, 0x8d, 0x7f, 0x17, 0x8d, 0x8d, 0x97, 0x4f, 0x0c, 0x93, 0x8d, 0xdd, + 0x51, 0x53, 0x23, 0x53, 0xc5, 0x76, 0xe9, 0x98, 0x3f, 0x19, 0x7c, 0x75, 0xc2, 0x97, 0x27, 0x16, + 0xd1, 0xb1, 0xe2, 0x29, 0xc9, 0x3e, 0xe6, 0x1f, 0x64, 0xa3, 0x22, 0xff, 0xc0, 0xfa, 0xfc, 0x4d, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xa3, 0x2b, 0x16, 0xfe, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -745,6 +859,8 @@ type MsgClient interface { ExecutePayload(ctx context.Context, in *MsgExecutePayload, opts ...grpc.CallOption) (*MsgExecutePayloadResponse, error) // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC VoteInbound(ctx context.Context, in *MsgVoteInbound, opts ...grpc.CallOption) (*MsgVoteInboundResponse, error) + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + VoteOutbound(ctx context.Context, in *MsgVoteOutbound, opts ...grpc.CallOption) (*MsgVoteOutboundResponse, error) // VoteGasPrice defines a message for universal validators to vote on the gas price VoteGasPrice(ctx context.Context, in *MsgVoteGasPrice, opts ...grpc.CallOption) (*MsgVoteGasPriceResponse, error) } @@ -802,6 +918,15 @@ func (c *msgClient) VoteInbound(ctx context.Context, in *MsgVoteInbound, opts .. return out, nil } +func (c *msgClient) VoteOutbound(ctx context.Context, in *MsgVoteOutbound, opts ...grpc.CallOption) (*MsgVoteOutboundResponse, error) { + out := new(MsgVoteOutboundResponse) + err := c.cc.Invoke(ctx, "/uexecutor.v1.Msg/VoteOutbound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) VoteGasPrice(ctx context.Context, in *MsgVoteGasPrice, opts ...grpc.CallOption) (*MsgVoteGasPriceResponse, error) { out := new(MsgVoteGasPriceResponse) err := c.cc.Invoke(ctx, "/uexecutor.v1.Msg/VoteGasPrice", in, out, opts...) @@ -825,6 +950,8 @@ type MsgServer interface { ExecutePayload(context.Context, *MsgExecutePayload) (*MsgExecutePayloadResponse, error) // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC VoteInbound(context.Context, *MsgVoteInbound) (*MsgVoteInboundResponse, error) + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + VoteOutbound(context.Context, *MsgVoteOutbound) (*MsgVoteOutboundResponse, error) // VoteGasPrice defines a message for universal validators to vote on the gas price VoteGasPrice(context.Context, *MsgVoteGasPrice) (*MsgVoteGasPriceResponse, error) } @@ -848,6 +975,9 @@ func (*UnimplementedMsgServer) ExecutePayload(ctx context.Context, req *MsgExecu func (*UnimplementedMsgServer) VoteInbound(ctx context.Context, req *MsgVoteInbound) (*MsgVoteInboundResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteInbound not implemented") } +func (*UnimplementedMsgServer) VoteOutbound(ctx context.Context, req *MsgVoteOutbound) (*MsgVoteOutboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteOutbound not implemented") +} func (*UnimplementedMsgServer) VoteGasPrice(ctx context.Context, req *MsgVoteGasPrice) (*MsgVoteGasPriceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteGasPrice not implemented") } @@ -946,6 +1076,24 @@ func _Msg_VoteInbound_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Msg_VoteOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteOutbound) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteOutbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/uexecutor.v1.Msg/VoteOutbound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteOutbound(ctx, req.(*MsgVoteOutbound)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_VoteGasPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgVoteGasPrice) if err := dec(in); err != nil { @@ -988,6 +1136,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "VoteInbound", Handler: _Msg_VoteInbound_Handler, }, + { + MethodName: "VoteOutbound", + Handler: _Msg_VoteOutbound_Handler, + }, { MethodName: "VoteGasPrice", Handler: _Msg_VoteGasPrice_Handler, @@ -1360,6 +1512,85 @@ func (m *MsgVoteInboundResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgVoteOutbound) 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 *MsgVoteOutbound) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteOutbound) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ObservedTx != nil { + { + size, err := m.ObservedTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.OutboundId) > 0 { + i -= len(m.OutboundId) + copy(dAtA[i:], m.OutboundId) + i = encodeVarintTx(dAtA, i, uint64(len(m.OutboundId))) + i-- + dAtA[i] = 0x1a + } + if len(m.UtxId) > 0 { + i -= len(m.UtxId) + copy(dAtA[i:], m.UtxId) + i = encodeVarintTx(dAtA, i, uint64(len(m.UtxId))) + 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 *MsgVoteOutboundResponse) 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 *MsgVoteOutboundResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteOutboundResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgVoteGasPrice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1589,6 +1820,40 @@ func (m *MsgVoteInboundResponse) Size() (n int) { return n } +func (m *MsgVoteOutbound) 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.UtxId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OutboundId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ObservedTx != nil { + l = m.ObservedTx.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgVoteOutboundResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgVoteGasPrice) Size() (n int) { if m == nil { return 0 @@ -2630,6 +2895,238 @@ func (m *MsgVoteInboundResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgVoteOutbound) 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: MsgVoteOutbound: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteOutbound: 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 UtxId", 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.UtxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutboundId", 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.OutboundId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", 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.ObservedTx == nil { + m.ObservedTx = &OutboundObservation{} + } + if err := m.ObservedTx.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 *MsgVoteOutboundResponse) 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: MsgVoteOutboundResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteOutboundResponse: 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 *MsgVoteGasPrice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/uexecutor/types/types.pb.go b/x/uexecutor/types/types.pb.go index e17c8361..b5111d2b 100644 --- a/x/uexecutor/types/types.pb.go +++ b/x/uexecutor/types/types.pb.go @@ -104,19 +104,19 @@ type Status int32 const ( Status_UNSPECIFIED Status = 0 Status_PENDING Status = 1 - Status_FINALIZED Status = 2 + Status_OBSERVED Status = 2 ) var Status_name = map[int32]string{ 0: "UNSPECIFIED", 1: "PENDING", - 2: "FINALIZED", + 2: "OBSERVED", } var Status_value = map[string]int32{ "UNSPECIFIED": 0, "PENDING": 1, - "FINALIZED": 2, + "OBSERVED": 2, } func (x Status) String() string { @@ -127,37 +127,40 @@ func (Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor_fab6d3ca71d1e2a5, []int{2} } -type InboundTxType int32 +type TxType int32 const ( - InboundTxType_UNSPECIFIED_TX InboundTxType = 0 - InboundTxType_GAS InboundTxType = 1 - InboundTxType_FUNDS InboundTxType = 2 - InboundTxType_FUNDS_AND_PAYLOAD InboundTxType = 3 - InboundTxType_GAS_AND_PAYLOAD InboundTxType = 4 + TxType_UNSPECIFIED_TX TxType = 0 + TxType_GAS TxType = 1 + TxType_FUNDS TxType = 2 + TxType_FUNDS_AND_PAYLOAD TxType = 3 + TxType_GAS_AND_PAYLOAD TxType = 4 + TxType_PAYLOAD TxType = 5 ) -var InboundTxType_name = map[int32]string{ +var TxType_name = map[int32]string{ 0: "UNSPECIFIED_TX", 1: "GAS", 2: "FUNDS", 3: "FUNDS_AND_PAYLOAD", 4: "GAS_AND_PAYLOAD", + 5: "PAYLOAD", } -var InboundTxType_value = map[string]int32{ +var TxType_value = map[string]int32{ "UNSPECIFIED_TX": 0, "GAS": 1, "FUNDS": 2, "FUNDS_AND_PAYLOAD": 3, "GAS_AND_PAYLOAD": 4, + "PAYLOAD": 5, } -func (x InboundTxType) String() string { - return proto.EnumName(InboundTxType_name, int32(x)) +func (x TxType) String() string { + return proto.EnumName(TxType_name, int32(x)) } -func (InboundTxType) EnumDescriptor() ([]byte, []int) { +func (TxType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_fab6d3ca71d1e2a5, []int{3} } @@ -373,50 +376,6 @@ func (m *UniversalAccountId) GetOwner() string { return "" } -type InboundStatus struct { - Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=uexecutor.v1.Status" json:"status,omitempty"` -} - -func (m *InboundStatus) Reset() { *m = InboundStatus{} } -func (m *InboundStatus) String() string { return proto.CompactTextString(m) } -func (*InboundStatus) ProtoMessage() {} -func (*InboundStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{3} -} -func (m *InboundStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InboundStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InboundStatus.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 *InboundStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_InboundStatus.Merge(m, src) -} -func (m *InboundStatus) XXX_Size() int { - return m.Size() -} -func (m *InboundStatus) XXX_DiscardUnknown() { - xxx_messageInfo_InboundStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_InboundStatus proto.InternalMessageInfo - -func (m *InboundStatus) GetStatus() Status { - if m != nil { - return m.Status - } - return Status_UNSPECIFIED -} - type Inbound struct { SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` @@ -425,7 +384,7 @@ type Inbound struct { Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` - TxType InboundTxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.InboundTxType" json:"tx_type,omitempty"` + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` } @@ -433,7 +392,7 @@ type Inbound struct { func (m *Inbound) Reset() { *m = Inbound{} } func (*Inbound) ProtoMessage() {} func (*Inbound) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{4} + return fileDescriptor_fab6d3ca71d1e2a5, []int{3} } func (m *Inbound) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -511,11 +470,11 @@ func (m *Inbound) GetLogIndex() string { return "" } -func (m *Inbound) GetTxType() InboundTxType { +func (m *Inbound) GetTxType() TxType { if m != nil { return m.TxType } - return InboundTxType_UNSPECIFIED_TX + return TxType_UNSPECIFIED_TX } func (m *Inbound) GetUniversalPayload() *UniversalPayload { @@ -544,7 +503,7 @@ type PCTx struct { func (m *PCTx) Reset() { *m = PCTx{} } func (*PCTx) ProtoMessage() {} func (*PCTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{5} + return fileDescriptor_fab6d3ca71d1e2a5, []int{4} } func (m *PCTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -615,18 +574,137 @@ func (m *PCTx) GetErrorMsg() string { return "" } +type OutboundObservation struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` +} + +func (m *OutboundObservation) Reset() { *m = OutboundObservation{} } +func (m *OutboundObservation) String() string { return proto.CompactTextString(m) } +func (*OutboundObservation) ProtoMessage() {} +func (*OutboundObservation) Descriptor() ([]byte, []int) { + return fileDescriptor_fab6d3ca71d1e2a5, []int{5} +} +func (m *OutboundObservation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OutboundObservation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OutboundObservation.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 *OutboundObservation) XXX_Merge(src proto.Message) { + xxx_messageInfo_OutboundObservation.Merge(m, src) +} +func (m *OutboundObservation) XXX_Size() int { + return m.Size() +} +func (m *OutboundObservation) XXX_DiscardUnknown() { + xxx_messageInfo_OutboundObservation.DiscardUnknown(m) +} + +var xxx_messageInfo_OutboundObservation proto.InternalMessageInfo + +func (m *OutboundObservation) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *OutboundObservation) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *OutboundObservation) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +type Originating_Pc_TX struct { + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + LogIndex string `protobuf:"bytes,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` +} + +func (m *Originating_Pc_TX) Reset() { *m = Originating_Pc_TX{} } +func (m *Originating_Pc_TX) String() string { return proto.CompactTextString(m) } +func (*Originating_Pc_TX) ProtoMessage() {} +func (*Originating_Pc_TX) Descriptor() ([]byte, []int) { + return fileDescriptor_fab6d3ca71d1e2a5, []int{6} +} +func (m *Originating_Pc_TX) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Originating_Pc_TX) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Originating_Pc_TX.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 *Originating_Pc_TX) XXX_Merge(src proto.Message) { + xxx_messageInfo_Originating_Pc_TX.Merge(m, src) +} +func (m *Originating_Pc_TX) XXX_Size() int { + return m.Size() +} +func (m *Originating_Pc_TX) XXX_DiscardUnknown() { + xxx_messageInfo_Originating_Pc_TX.DiscardUnknown(m) +} + +var xxx_messageInfo_Originating_Pc_TX proto.InternalMessageInfo + +func (m *Originating_Pc_TX) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *Originating_Pc_TX) GetLogIndex() string { + if m != nil { + return m.LogIndex + } + return "" +} + type OutboundTx struct { - DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` - AssetAddr string `protobuf:"bytes,5,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` + DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` + Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` + Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` + GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` + PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` + ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` + Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` + OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` } func (m *OutboundTx) Reset() { *m = OutboundTx{} } func (*OutboundTx) ProtoMessage() {} func (*OutboundTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{6} + return fileDescriptor_fab6d3ca71d1e2a5, []int{7} } func (m *OutboundTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,13 +740,6 @@ func (m *OutboundTx) GetDestinationChain() string { return "" } -func (m *OutboundTx) GetTxHash() string { - if m != nil { - return m.TxHash - } - return "" -} - func (m *OutboundTx) GetRecipient() string { if m != nil { return m.Recipient @@ -690,17 +761,74 @@ func (m *OutboundTx) GetAssetAddr() string { return "" } +func (m *OutboundTx) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *OutboundTx) GetPayload() string { + if m != nil { + return m.Payload + } + return "" +} + +func (m *OutboundTx) GetGasLimit() string { + if m != nil { + return m.GasLimit + } + return "" +} + +func (m *OutboundTx) GetTxType() TxType { + if m != nil { + return m.TxType + } + return TxType_UNSPECIFIED_TX +} + +func (m *OutboundTx) GetPcTx() *Originating_Pc_TX { + if m != nil { + return m.PcTx + } + return nil +} + +func (m *OutboundTx) GetObservedTx() *OutboundObservation { + if m != nil { + return m.ObservedTx + } + return nil +} + +func (m *OutboundTx) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *OutboundTx) GetOutboundStatus() Status { + if m != nil { + return m.OutboundStatus + } + return Status_UNSPECIFIED +} + type UniversalTx struct { - InboundTx *Inbound `protobuf:"bytes,1,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` - PcTx []*PCTx `protobuf:"bytes,2,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` - OutboundTx *OutboundTx `protobuf:"bytes,3,opt,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` - UniversalStatus UniversalTxStatus `protobuf:"varint,4,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + InboundTx *Inbound `protobuf:"bytes,2,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` + PcTx []*PCTx `protobuf:"bytes,3,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` + OutboundTx []*OutboundTx `protobuf:"bytes,4,rep,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` + UniversalStatus UniversalTxStatus `protobuf:"varint,5,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` } func (m *UniversalTx) Reset() { *m = UniversalTx{} } func (*UniversalTx) ProtoMessage() {} func (*UniversalTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{7} + return fileDescriptor_fab6d3ca71d1e2a5, []int{8} } func (m *UniversalTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -729,6 +857,13 @@ func (m *UniversalTx) XXX_DiscardUnknown() { var xxx_messageInfo_UniversalTx proto.InternalMessageInfo +func (m *UniversalTx) GetId() string { + if m != nil { + return m.Id + } + return "" +} + func (m *UniversalTx) GetInboundTx() *Inbound { if m != nil { return m.InboundTx @@ -743,7 +878,7 @@ func (m *UniversalTx) GetPcTx() []*PCTx { return nil } -func (m *UniversalTx) GetOutboundTx() *OutboundTx { +func (m *UniversalTx) GetOutboundTx() []*OutboundTx { if m != nil { return m.OutboundTx } @@ -761,13 +896,14 @@ func init() { proto.RegisterEnum("uexecutor.v1.VerificationType", VerificationType_name, VerificationType_value) proto.RegisterEnum("uexecutor.v1.UniversalTxStatus", UniversalTxStatus_name, UniversalTxStatus_value) proto.RegisterEnum("uexecutor.v1.Status", Status_name, Status_value) - proto.RegisterEnum("uexecutor.v1.InboundTxType", InboundTxType_name, InboundTxType_value) + proto.RegisterEnum("uexecutor.v1.TxType", TxType_name, TxType_value) proto.RegisterType((*Params)(nil), "uexecutor.v1.Params") proto.RegisterType((*UniversalPayload)(nil), "uexecutor.v1.UniversalPayload") proto.RegisterType((*UniversalAccountId)(nil), "uexecutor.v1.UniversalAccountId") - proto.RegisterType((*InboundStatus)(nil), "uexecutor.v1.InboundStatus") proto.RegisterType((*Inbound)(nil), "uexecutor.v1.Inbound") proto.RegisterType((*PCTx)(nil), "uexecutor.v1.PCTx") + proto.RegisterType((*OutboundObservation)(nil), "uexecutor.v1.OutboundObservation") + proto.RegisterType((*Originating_Pc_TX)(nil), "uexecutor.v1.Originating_Pc_TX") proto.RegisterType((*OutboundTx)(nil), "uexecutor.v1.OutboundTx") proto.RegisterType((*UniversalTx)(nil), "uexecutor.v1.UniversalTx") } @@ -775,83 +911,91 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/types.proto", fileDescriptor_fab6d3ca71d1e2a5) } var fileDescriptor_fab6d3ca71d1e2a5 = []byte{ - // 1203 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x6f, 0xdb, 0xc6, - 0x12, 0x17, 0xf5, 0x5f, 0x23, 0xc7, 0xa6, 0x37, 0x4e, 0xa2, 0xc4, 0x89, 0xec, 0xa7, 0xe0, 0x21, - 0x86, 0xdf, 0x8b, 0x85, 0xf8, 0xbd, 0x04, 0xa8, 0x81, 0x1e, 0x14, 0x89, 0x76, 0xd8, 0xba, 0xb2, - 0x40, 0x51, 0x46, 0x9a, 0xcb, 0x62, 0x4d, 0x6e, 0x28, 0xa2, 0x12, 0x57, 0xe0, 0x92, 0x2a, 0x7d, - 0xee, 0xad, 0xa7, 0x1e, 0x73, 0x6b, 0x3e, 0x42, 0x3f, 0x46, 0x80, 0x5e, 0x72, 0x2c, 0xd0, 0x4b, - 0x91, 0x1c, 0xda, 0x8f, 0x51, 0xec, 0x92, 0x12, 0x29, 0x27, 0x69, 0x7b, 0x11, 0x77, 0x7e, 0x33, - 0xb3, 0x9c, 0xf9, 0xcd, 0x6f, 0x57, 0x84, 0x46, 0x48, 0x23, 0x6a, 0x85, 0x01, 0xf3, 0xdb, 0xf3, - 0x47, 0xed, 0xe0, 0x72, 0x46, 0xf9, 0xc1, 0xcc, 0x67, 0x01, 0x43, 0x6b, 0x4b, 0xcf, 0xc1, 0xfc, - 0xd1, 0x9d, 0x2d, 0x87, 0x39, 0x4c, 0x3a, 0xda, 0x62, 0x15, 0xc7, 0xdc, 0xd9, 0x24, 0x53, 0xd7, - 0x63, 0x6d, 0xf9, 0x1b, 0x43, 0xad, 0x63, 0x28, 0x0f, 0x88, 0x4f, 0xa6, 0x1c, 0xdd, 0x03, 0xe0, - 0x6c, 0x4a, 0xf1, 0x9c, 0x4c, 0x42, 0xda, 0xc8, 0xef, 0x2a, 0x7b, 0x55, 0xa3, 0x26, 0x90, 0x73, - 0x01, 0x1c, 0xdd, 0x7b, 0xf5, 0x7a, 0x27, 0xf7, 0xc7, 0xeb, 0x1d, 0xe5, 0xfb, 0xdf, 0x7f, 0xda, - 0x57, 0xd3, 0x32, 0x66, 0x32, 0xbb, 0xf5, 0x6b, 0x1e, 0xd4, 0x91, 0xe7, 0xce, 0xa9, 0xcf, 0xc9, - 0x64, 0x40, 0x2e, 0x27, 0x8c, 0xd8, 0x68, 0x1d, 0xf2, 0x01, 0x6b, 0x28, 0xbb, 0xca, 0x5e, 0xcd, - 0xc8, 0x07, 0x0c, 0x6d, 0x41, 0x29, 0xdd, 0xbd, 0x66, 0xc4, 0x06, 0x42, 0x50, 0xb4, 0x49, 0x40, - 0x1a, 0x05, 0x09, 0xca, 0x35, 0xda, 0x86, 0x9a, 0x43, 0x38, 0x9e, 0xb8, 0x53, 0x37, 0x68, 0x14, - 0xa5, 0xa3, 0xea, 0x10, 0x7e, 0x2a, 0x6c, 0xf4, 0x6f, 0xd8, 0x98, 0x92, 0x08, 0xbf, 0xa4, 0x14, - 0xcf, 0xa8, 0x8f, 0x1d, 0xc2, 0x1b, 0x25, 0x19, 0xb2, 0x36, 0x25, 0xd1, 0x31, 0xa5, 0x03, 0xea, - 0x9f, 0x10, 0x8e, 0x9e, 0x40, 0x43, 0x84, 0xcd, 0x7c, 0x97, 0xf9, 0x6e, 0x70, 0xb9, 0x12, 0x5f, - 0x96, 0xf1, 0x5b, 0x53, 0x12, 0x0d, 0x12, 0x77, 0x9a, 0xb7, 0x05, 0x25, 0x8f, 0x79, 0x16, 0x6d, - 0x54, 0xe2, 0x2a, 0xa5, 0x81, 0xee, 0x40, 0xd5, 0xa6, 0xc4, 0x9e, 0xb8, 0x1e, 0x6d, 0x54, 0xe3, - 0x82, 0x16, 0x36, 0x7a, 0x0c, 0xe5, 0x39, 0x16, 0xc3, 0x68, 0xd4, 0x76, 0x95, 0xbd, 0xf5, 0xc3, - 0xe6, 0x41, 0x76, 0x18, 0x07, 0xe7, 0xd4, 0x77, 0x5f, 0xba, 0x16, 0x09, 0x5c, 0xe6, 0x99, 0x97, - 0x33, 0x6a, 0x94, 0xe6, 0xe2, 0x71, 0xb4, 0x97, 0xa5, 0x74, 0x3b, 0xa5, 0x34, 0x5c, 0xf0, 0x88, - 0x67, 0x31, 0x91, 0xad, 0x57, 0x0a, 0xa0, 0x25, 0xbb, 0x1d, 0xcb, 0x62, 0xa1, 0x17, 0xe8, 0x36, - 0x7a, 0x00, 0x1b, 0xd6, 0x98, 0xb8, 0x1e, 0xf6, 0xc8, 0x94, 0xf2, 0x19, 0xb1, 0x68, 0x42, 0xf6, - 0xba, 0x84, 0xfb, 0x0b, 0x14, 0xdd, 0x86, 0x6a, 0x1c, 0xe8, 0xda, 0x09, 0xf7, 0x15, 0x69, 0xeb, - 0xb6, 0xe8, 0x96, 0x7d, 0xeb, 0x51, 0x3f, 0xa1, 0x3f, 0x36, 0xfe, 0x41, 0x69, 0x24, 0xae, 0xa2, - 0xf5, 0x39, 0x5c, 0xd3, 0xbd, 0x0b, 0x16, 0x7a, 0xf6, 0x30, 0x20, 0x41, 0xc8, 0xd1, 0x7f, 0xa1, - 0xcc, 0xe5, 0x4a, 0xd6, 0xb2, 0x7e, 0xb8, 0xb5, 0x4a, 0x46, 0x1c, 0x65, 0x24, 0x31, 0xad, 0x1f, - 0x0b, 0x50, 0x49, 0xf2, 0xd1, 0xbf, 0x60, 0x8d, 0xb3, 0xd0, 0xb7, 0x28, 0x96, 0xc5, 0x25, 0xbd, - 0xd4, 0x63, 0xac, 0x2b, 0x20, 0x74, 0x0b, 0x2a, 0x41, 0x84, 0xc7, 0x84, 0x8f, 0x93, 0x3e, 0xca, - 0x41, 0xf4, 0x8c, 0xf0, 0x31, 0xba, 0x09, 0x65, 0x4e, 0x3d, 0x7b, 0xd9, 0x47, 0x62, 0xa1, 0xbb, - 0x50, 0xf3, 0xa9, 0xe5, 0xce, 0x5c, 0xea, 0x2d, 0x84, 0x94, 0x02, 0x22, 0x8b, 0x4c, 0x45, 0x1b, - 0x89, 0x80, 0x12, 0x4b, 0x9c, 0x05, 0xc2, 0x39, 0x0d, 0x30, 0xb1, 0x6d, 0x3f, 0x11, 0x4b, 0x4d, - 0x22, 0x1d, 0xdb, 0xf6, 0x85, 0x3a, 0x27, 0xcc, 0xc1, 0xae, 0x67, 0xd3, 0x28, 0x51, 0x49, 0x75, - 0xc2, 0x1c, 0x5d, 0xd8, 0xe8, 0xff, 0xb2, 0x44, 0xa9, 0x86, 0xaa, 0x24, 0x60, 0x7b, 0x95, 0x80, - 0xa4, 0x5b, 0x33, 0x92, 0x52, 0x28, 0x07, 0xf2, 0x89, 0xbe, 0x84, 0xcd, 0x0f, 0xc6, 0x2e, 0xd5, - 0x54, 0xbf, 0xaa, 0xa6, 0xab, 0xa7, 0xcc, 0x50, 0xc3, 0xab, 0xe7, 0xee, 0x3f, 0xb0, 0x39, 0xcf, - 0x68, 0x0e, 0xcb, 0xe3, 0x05, 0xb2, 0x4e, 0x35, 0xeb, 0xe8, 0x91, 0x80, 0x1c, 0x35, 0xb3, 0xa3, - 0xde, 0x4c, 0x47, 0xed, 0xc6, 0x75, 0xb6, 0xde, 0x28, 0x50, 0x1c, 0x74, 0xcd, 0x28, 0xcb, 0xbd, - 0xf2, 0x09, 0xee, 0xf3, 0x2b, 0xdc, 0xdf, 0x06, 0x71, 0x66, 0x71, 0xc8, 0xa9, 0x2d, 0xa7, 0x52, - 0x34, 0x2a, 0x0e, 0xe1, 0x23, 0x4e, 0xe5, 0xa8, 0x2f, 0x26, 0xcc, 0xfa, 0x06, 0x8f, 0xa9, 0xeb, - 0x8c, 0xe3, 0xc9, 0x14, 0x8d, 0xba, 0xc4, 0x9e, 0x49, 0x48, 0xee, 0x1a, 0xeb, 0xa8, 0x9c, 0xec, - 0x1a, 0xeb, 0x6b, 0x1b, 0x6a, 0xd4, 0xf7, 0x99, 0x8f, 0xa7, 0xdc, 0x59, 0x90, 0x2f, 0x81, 0xaf, - 0xb8, 0x73, 0x74, 0x37, 0xdb, 0xcc, 0x46, 0xe6, 0x96, 0xb2, 0x70, 0x10, 0xb5, 0x7e, 0x56, 0x00, - 0xce, 0xc2, 0x20, 0xe1, 0x5f, 0xd0, 0x64, 0x53, 0x1e, 0xb8, 0x5e, 0xcc, 0x52, 0x56, 0x74, 0x6a, - 0xc6, 0xf1, 0x37, 0xca, 0x5b, 0x51, 0x58, 0xe1, 0xd3, 0x0a, 0x2b, 0xfe, 0x85, 0xc2, 0x4a, 0x57, - 0x14, 0x76, 0xd4, 0xca, 0xf6, 0x71, 0x23, 0xed, 0x83, 0x25, 0xd5, 0x8b, 0x6e, 0x5e, 0xe5, 0xa1, - 0xbe, 0x14, 0x83, 0x29, 0x84, 0x07, 0xc9, 0xcc, 0x70, 0x10, 0xc9, 0x3e, 0xea, 0x87, 0x37, 0x3e, - 0xaa, 0x3d, 0xa3, 0xe6, 0x2e, 0x44, 0x88, 0x1e, 0x40, 0x49, 0x92, 0xd3, 0xc8, 0xef, 0x16, 0xf6, - 0xea, 0x87, 0x68, 0x35, 0x41, 0x0c, 0xde, 0x28, 0xce, 0x2c, 0x33, 0x42, 0x9f, 0x41, 0x3d, 0xf3, - 0x76, 0xd9, 0x69, 0xfd, 0xb0, 0xb1, 0x1a, 0x9e, 0x92, 0x6b, 0x00, 0x4b, 0x89, 0xfe, 0x02, 0x52, - 0x8d, 0xe2, 0x64, 0xa8, 0x45, 0x79, 0x36, 0x76, 0x3e, 0xa1, 0x6d, 0x33, 0x4a, 0xee, 0x89, 0x8d, - 0x65, 0x62, 0x0c, 0x1c, 0xdd, 0xcf, 0x32, 0x73, 0xf3, 0x63, 0x37, 0x53, 0x10, 0xed, 0x9f, 0x80, - 0x7a, 0xf5, 0xd2, 0x45, 0x37, 0x01, 0x71, 0xd7, 0xf1, 0xa8, 0x9d, 0xf5, 0xa8, 0x39, 0xb4, 0x0d, - 0xb7, 0xc2, 0xf4, 0xb5, 0x2b, 0x4e, 0x65, 0xff, 0xbb, 0x3c, 0x6c, 0x7e, 0x50, 0x14, 0xba, 0x0f, - 0x3b, 0xa3, 0xbe, 0x7e, 0xae, 0x19, 0xc3, 0xce, 0x29, 0x36, 0x9f, 0xe3, 0xa1, 0xd9, 0x31, 0x47, - 0x43, 0x3c, 0xea, 0x0f, 0x07, 0x5a, 0x57, 0x3f, 0xd6, 0xb5, 0x9e, 0x9a, 0x43, 0xd7, 0x61, 0x43, - 0xef, 0x3f, 0x3d, 0x1b, 0xf5, 0x7b, 0x78, 0x38, 0xea, 0x76, 0xb5, 0xe1, 0x50, 0x55, 0xd0, 0x3d, - 0xb8, 0x3d, 0xd0, 0xfa, 0x3d, 0xbd, 0x7f, 0x82, 0x17, 0x4e, 0xed, 0xb9, 0xd6, 0x1d, 0x99, 0xfa, - 0x59, 0x5f, 0xcd, 0xa3, 0x5b, 0x70, 0x7d, 0xd0, 0x4d, 0x10, 0x2d, 0xcd, 0x2b, 0x88, 0xe2, 0xb3, - 0x8e, 0xe3, 0x8e, 0x7e, 0xaa, 0xf5, 0xd4, 0x22, 0xba, 0x01, 0x9b, 0x83, 0x2e, 0x5e, 0x6c, 0x69, - 0x68, 0xe7, 0x9a, 0x61, 0xaa, 0x25, 0xb4, 0x05, 0xea, 0xd9, 0xc8, 0x8c, 0xf7, 0x4f, 0x9c, 0x6a, - 0x79, 0x05, 0x5d, 0x6c, 0x5d, 0x11, 0x75, 0x2e, 0xd1, 0x64, 0xdf, 0x2a, 0x5a, 0x83, 0x6a, 0xb7, - 0xd3, 0xef, 0x6a, 0xc2, 0xaa, 0xed, 0x3f, 0x86, 0x72, 0xd2, 0xf9, 0x06, 0xd4, 0x57, 0xbb, 0xac, - 0x43, 0x65, 0xf1, 0x02, 0x05, 0x5d, 0x83, 0xda, 0xb1, 0xde, 0xef, 0x9c, 0xea, 0x2f, 0xb4, 0x9e, - 0x9a, 0xdf, 0xb7, 0x96, 0x7f, 0x0d, 0xf1, 0x65, 0x87, 0x10, 0xac, 0x67, 0xb2, 0xb1, 0xf9, 0x5c, - 0xcd, 0xa1, 0x0a, 0x14, 0x4e, 0x3a, 0x82, 0x9a, 0x1a, 0x94, 0x8e, 0x47, 0xfd, 0xde, 0x50, 0xcd, - 0x8b, 0xae, 0xe4, 0x12, 0x77, 0x44, 0xfd, 0x9d, 0xaf, 0x4f, 0xcf, 0x3a, 0x3d, 0xb5, 0x20, 0x2a, - 0x3d, 0xe9, 0xac, 0x82, 0xc5, 0xa7, 0x83, 0x37, 0xef, 0x9a, 0xca, 0xdb, 0x77, 0x4d, 0xe5, 0xb7, - 0x77, 0x4d, 0xe5, 0x87, 0xf7, 0xcd, 0xdc, 0xdb, 0xf7, 0xcd, 0xdc, 0x2f, 0xef, 0x9b, 0xb9, 0x17, - 0x4f, 0x1c, 0x37, 0x18, 0x87, 0x17, 0x07, 0x16, 0x9b, 0xb6, 0x67, 0x21, 0x1f, 0xcb, 0xf3, 0x2d, - 0x57, 0x0f, 0xe5, 0xf2, 0xa1, 0xc7, 0x6c, 0xda, 0x8e, 0xda, 0xa9, 0x86, 0xe4, 0xf7, 0xd4, 0x45, - 0x59, 0x7e, 0x19, 0xfd, 0xef, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x45, 0x04, 0x15, 0xfa, 0x6c, - 0x09, 0x00, 0x00, + // 1341 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x3d, 0x6f, 0xdb, 0x46, + 0x18, 0x36, 0xf5, 0xad, 0x57, 0x86, 0x4d, 0x5f, 0x9c, 0x84, 0xf9, 0x92, 0x1d, 0xa5, 0x45, 0x0c, + 0x17, 0xb1, 0x91, 0x34, 0x0d, 0x50, 0x03, 0x1d, 0x64, 0x49, 0x76, 0xd4, 0xba, 0x92, 0x40, 0x51, + 0x86, 0xdb, 0xe5, 0x70, 0x26, 0x2f, 0x14, 0x51, 0x89, 0x27, 0xf0, 0x43, 0xa5, 0xe7, 0x6e, 0x9d, + 0x3a, 0x74, 0xc8, 0x98, 0xb1, 0x63, 0x7f, 0x46, 0xc6, 0x8c, 0x05, 0xba, 0x14, 0xc9, 0xd0, 0xfe, + 0x85, 0x6e, 0xc5, 0x1d, 0x49, 0x91, 0x94, 0xed, 0xa2, 0x5d, 0xec, 0x7b, 0xbf, 0xee, 0x9e, 0x7b, + 0xde, 0xe7, 0x3d, 0x0a, 0x14, 0x9f, 0x06, 0x54, 0xf7, 0x3d, 0xe6, 0xec, 0xcf, 0x9f, 0xee, 0x7b, + 0x17, 0x33, 0xea, 0xee, 0xcd, 0x1c, 0xe6, 0x31, 0xb4, 0xba, 0x88, 0xec, 0xcd, 0x9f, 0xde, 0xdd, + 0x34, 0x99, 0xc9, 0x44, 0x60, 0x9f, 0xaf, 0xc2, 0x9c, 0xbb, 0x1b, 0x64, 0x6a, 0xd9, 0x6c, 0x5f, + 0xfc, 0x0d, 0x5d, 0x8d, 0x23, 0x28, 0x0d, 0x88, 0x43, 0xa6, 0x2e, 0x7a, 0x00, 0xe0, 0xb2, 0x29, + 0xc5, 0x73, 0x32, 0xf1, 0xa9, 0x92, 0xdb, 0x96, 0x76, 0x2a, 0x6a, 0x95, 0x7b, 0x4e, 0xb9, 0xe3, + 0xe0, 0xc1, 0xeb, 0x37, 0x5b, 0x2b, 0x7f, 0xbd, 0xd9, 0x92, 0x7e, 0xfc, 0xf3, 0xd7, 0x5d, 0x39, + 0x81, 0x31, 0x13, 0xd5, 0x8d, 0xdf, 0x73, 0x20, 0x8f, 0x6c, 0x6b, 0x4e, 0x1d, 0x97, 0x4c, 0x06, + 0xe4, 0x62, 0xc2, 0x88, 0x81, 0xd6, 0x20, 0xe7, 0x31, 0x45, 0xda, 0x96, 0x76, 0xaa, 0x6a, 0xce, + 0x63, 0x68, 0x13, 0x8a, 0xc9, 0xee, 0x55, 0x35, 0x34, 0x10, 0x82, 0x82, 0x41, 0x3c, 0xa2, 0xe4, + 0x85, 0x53, 0xac, 0xd1, 0x3d, 0xa8, 0x9a, 0xc4, 0xc5, 0x13, 0x6b, 0x6a, 0x79, 0x4a, 0x41, 0x04, + 0x2a, 0x26, 0x71, 0x4f, 0xb8, 0x8d, 0x3e, 0x86, 0xf5, 0x29, 0x09, 0xf0, 0x2b, 0x4a, 0xf1, 0x8c, + 0x3a, 0xd8, 0x24, 0xae, 0x52, 0x14, 0x29, 0xab, 0x53, 0x12, 0x1c, 0x51, 0x3a, 0xa0, 0xce, 0x31, + 0x71, 0xd1, 0x0b, 0x50, 0x78, 0xda, 0xcc, 0xb1, 0x98, 0x63, 0x79, 0x17, 0x99, 0xfc, 0x92, 0xc8, + 0xdf, 0x9c, 0x92, 0x60, 0x10, 0x85, 0x93, 0xba, 0x4d, 0x28, 0xda, 0xcc, 0xd6, 0xa9, 0x52, 0x0e, + 0x51, 0x0a, 0x03, 0xdd, 0x85, 0x8a, 0x41, 0x89, 0x31, 0xb1, 0x6c, 0xaa, 0x54, 0x42, 0x40, 0xb1, + 0x8d, 0x3e, 0x83, 0xd2, 0x1c, 0xf3, 0x66, 0x28, 0xd5, 0x6d, 0x69, 0x67, 0xed, 0x59, 0x7d, 0x2f, + 0xdd, 0x8c, 0xbd, 0x53, 0xea, 0x58, 0xaf, 0x2c, 0x9d, 0x78, 0x16, 0xb3, 0xb5, 0x8b, 0x19, 0x55, + 0x8b, 0x73, 0xfe, 0xef, 0x60, 0x27, 0x4d, 0xe9, 0xbd, 0x84, 0x52, 0x3f, 0xe6, 0x11, 0xcf, 0x42, + 0x22, 0x1b, 0xaf, 0x25, 0x40, 0x0b, 0x76, 0x9b, 0xba, 0xce, 0x7c, 0xdb, 0xeb, 0x1a, 0xe8, 0x31, + 0xac, 0xeb, 0x63, 0x62, 0xd9, 0xd8, 0x26, 0x53, 0xea, 0xce, 0x88, 0x4e, 0x23, 0xb2, 0xd7, 0x84, + 0xbb, 0x17, 0x7b, 0xd1, 0x1d, 0xa8, 0x84, 0x89, 0x96, 0x11, 0x71, 0x5f, 0x16, 0x76, 0xd7, 0xe0, + 0xb7, 0x65, 0xdf, 0xdb, 0xd4, 0x89, 0xe8, 0x0f, 0x8d, 0xff, 0x00, 0x8d, 0x84, 0x28, 0x1a, 0xaf, + 0xf3, 0x50, 0xee, 0xda, 0xe7, 0xcc, 0xb7, 0x0d, 0xf4, 0x10, 0x56, 0x5d, 0xe6, 0x3b, 0x3a, 0xc5, + 0x62, 0xf7, 0x08, 0x4c, 0x2d, 0xf4, 0xb5, 0xb8, 0x0b, 0xdd, 0x86, 0xb2, 0x17, 0xe0, 0x31, 0x71, + 0xc7, 0x11, 0x90, 0x92, 0x17, 0xbc, 0x24, 0xee, 0x18, 0xdd, 0x82, 0x92, 0x4b, 0x6d, 0x63, 0x01, + 0x24, 0xb2, 0xd0, 0x7d, 0xa8, 0x3a, 0x54, 0xb7, 0x66, 0x16, 0xb5, 0x63, 0x25, 0x24, 0x0e, 0x5e, + 0x45, 0xa6, 0x1c, 0x47, 0xa4, 0x80, 0xc8, 0xe2, 0x62, 0x26, 0xae, 0x4b, 0x3d, 0x4c, 0x0c, 0xc3, + 0x89, 0xba, 0x5d, 0x15, 0x9e, 0xa6, 0x61, 0x38, 0x5c, 0x5e, 0x13, 0x66, 0x62, 0xcb, 0x36, 0x68, + 0x10, 0xb5, 0xb9, 0x32, 0x61, 0x66, 0x97, 0xdb, 0xe8, 0x89, 0x80, 0x28, 0xda, 0x59, 0x11, 0xed, + 0xdc, 0xcc, 0xb6, 0x53, 0x0b, 0x44, 0x13, 0x4b, 0x9e, 0xf8, 0x8f, 0xbe, 0x82, 0x8d, 0x4b, 0x0d, + 0x13, 0x3a, 0xa8, 0x2d, 0xeb, 0x60, 0x79, 0x3e, 0x54, 0xd9, 0x5f, 0x9e, 0x98, 0x4f, 0x60, 0x63, + 0x9e, 0x52, 0x0b, 0x16, 0x83, 0x01, 0x02, 0xa0, 0x9c, 0x0e, 0xb4, 0x89, 0x47, 0x0e, 0xea, 0xe9, + 0x26, 0x6d, 0x24, 0x4d, 0xb2, 0xc2, 0x76, 0x34, 0xde, 0x4a, 0x50, 0x18, 0xb4, 0xb4, 0x20, 0x4d, + 0xba, 0x74, 0x0d, 0xe9, 0xb9, 0x0c, 0xe9, 0x77, 0x80, 0x4f, 0x1b, 0xf6, 0x5d, 0x6a, 0x88, 0x76, + 0x14, 0xd4, 0xb2, 0x49, 0xdc, 0x91, 0x4b, 0x45, 0x8f, 0xcf, 0x27, 0x4c, 0xff, 0x0e, 0x8f, 0xa9, + 0x65, 0x8e, 0xc3, 0x96, 0x14, 0xd4, 0x9a, 0xf0, 0xbd, 0x14, 0x2e, 0xb1, 0xab, 0x47, 0x3c, 0x3f, + 0x1e, 0xb3, 0xc8, 0xe2, 0xac, 0x53, 0xc7, 0x61, 0x0e, 0x9e, 0xba, 0x66, 0xcc, 0xba, 0x70, 0x7c, + 0xed, 0x9a, 0x07, 0xf7, 0xd3, 0x97, 0x59, 0x4f, 0xbd, 0x2f, 0x3a, 0xf6, 0x82, 0xc6, 0xcf, 0x12, + 0xdc, 0xe8, 0xfb, 0x9e, 0xb8, 0x57, 0xff, 0xdc, 0xa5, 0xce, 0x5c, 0xd0, 0x80, 0x14, 0x28, 0xbb, + 0xbe, 0xae, 0x53, 0xd7, 0x15, 0x37, 0xab, 0xa8, 0xb1, 0x79, 0x09, 0x67, 0xee, 0x32, 0xce, 0x14, + 0x2d, 0xf9, 0x34, 0x2d, 0x07, 0x8f, 0x63, 0x1c, 0xf5, 0x04, 0x07, 0x8b, 0x4e, 0xc7, 0x2c, 0x39, + 0xbe, 0xc1, 0x60, 0xa3, 0xef, 0x58, 0xa6, 0x65, 0x13, 0xcf, 0xb2, 0x4d, 0x3c, 0xd0, 0xb1, 0x76, + 0x76, 0x3d, 0xdb, 0x19, 0xd5, 0xe5, 0xb2, 0xaa, 0x3b, 0xf8, 0xe8, 0x8a, 0x69, 0x63, 0xa9, 0xbd, + 0x43, 0x1e, 0xfe, 0xce, 0x03, 0xc4, 0x3c, 0x68, 0x01, 0x97, 0x8b, 0x41, 0x5d, 0x4f, 0xe4, 0x30, + 0x3b, 0x33, 0x75, 0x72, 0x2a, 0x10, 0x8e, 0x5e, 0x66, 0x92, 0x72, 0xd7, 0x4f, 0x52, 0xfe, 0x5f, + 0x26, 0xa9, 0xb0, 0x3c, 0x49, 0x89, 0x82, 0x8a, 0x19, 0x05, 0x29, 0x50, 0x8e, 0x67, 0x21, 0x14, + 0x41, 0x6c, 0x66, 0x9f, 0xf6, 0xf2, 0xd2, 0xd3, 0xfe, 0x3f, 0x67, 0xef, 0x39, 0x14, 0x05, 0x2f, + 0xd1, 0xbc, 0x6d, 0x65, 0x93, 0x2f, 0xb5, 0x46, 0x2d, 0xcc, 0x74, 0x2d, 0x40, 0x87, 0x50, 0x0b, + 0x9b, 0x48, 0x0d, 0x5e, 0x0b, 0xa2, 0xf6, 0xe1, 0x52, 0xed, 0x65, 0xb1, 0xa9, 0x10, 0x57, 0x69, + 0x01, 0xff, 0xb4, 0x59, 0x86, 0x52, 0x0b, 0x3f, 0x6d, 0x96, 0x81, 0xbe, 0x80, 0xf5, 0x85, 0x42, + 0x22, 0xf1, 0xaf, 0x5e, 0x75, 0x81, 0xa1, 0x88, 0xa9, 0x6b, 0x71, 0x72, 0x68, 0x1f, 0x34, 0xd2, + 0xea, 0xbf, 0x79, 0x85, 0xea, 0xbc, 0xa0, 0xf1, 0x4b, 0x0e, 0x6a, 0x8b, 0x27, 0x64, 0x01, 0x41, + 0x5a, 0x40, 0x78, 0x0e, 0x10, 0x4d, 0x3e, 0xbf, 0x55, 0x4e, 0xdc, 0xea, 0x66, 0xf6, 0xf4, 0xe8, + 0xa1, 0x56, 0xab, 0x51, 0xa2, 0x16, 0xa0, 0xc7, 0x31, 0x85, 0xf9, 0xed, 0xfc, 0x4e, 0xed, 0x19, + 0xca, 0x16, 0xf0, 0xe7, 0x23, 0x62, 0xed, 0x73, 0xa8, 0xa5, 0xd0, 0x28, 0x05, 0x91, 0xae, 0x5c, + 0xcd, 0x9a, 0x16, 0xa8, 0xc0, 0x12, 0x99, 0x7e, 0x09, 0xc9, 0x4b, 0x17, 0xb3, 0x53, 0x14, 0xec, + 0x6c, 0x5d, 0xf3, 0x42, 0x6a, 0x41, 0x44, 0xd4, 0xfa, 0xa2, 0x30, 0x62, 0xea, 0x51, 0x9a, 0xa9, + 0x5b, 0x57, 0x7d, 0x99, 0xbc, 0x60, 0xf7, 0x18, 0xe4, 0xe5, 0x8f, 0x2e, 0xba, 0x05, 0xc8, 0xb5, + 0x4c, 0x9b, 0x1a, 0xe9, 0x88, 0xbc, 0x82, 0xee, 0xc1, 0x6d, 0x3f, 0x39, 0x36, 0x13, 0x94, 0x76, + 0x7f, 0xc8, 0xc1, 0xc6, 0x25, 0x50, 0xe8, 0x11, 0x6c, 0x8d, 0x7a, 0xdd, 0xd3, 0x8e, 0x3a, 0x6c, + 0x9e, 0x60, 0xed, 0x0c, 0x0f, 0xb5, 0xa6, 0x36, 0x1a, 0xe2, 0x51, 0x6f, 0x38, 0xe8, 0xb4, 0xba, + 0x47, 0xdd, 0x4e, 0x5b, 0x5e, 0x41, 0x37, 0x60, 0xbd, 0xdb, 0x3b, 0xec, 0x8f, 0x7a, 0x6d, 0x3c, + 0x1c, 0xb5, 0x5a, 0x9d, 0xe1, 0x50, 0x96, 0xd0, 0x03, 0xb8, 0x33, 0xe8, 0xf4, 0xda, 0xdd, 0xde, + 0x31, 0x8e, 0x83, 0x9d, 0xb3, 0x4e, 0x6b, 0xa4, 0x75, 0xfb, 0x3d, 0x39, 0x87, 0x6e, 0xc3, 0x8d, + 0x41, 0x2b, 0xf2, 0x74, 0x92, 0xba, 0x3c, 0x07, 0x9f, 0x0e, 0x1c, 0x35, 0xbb, 0x27, 0x9d, 0xb6, + 0x5c, 0x40, 0x37, 0x61, 0x63, 0xd0, 0xc2, 0xf1, 0x96, 0x6a, 0xe7, 0xb4, 0xa3, 0x6a, 0x72, 0x11, + 0x6d, 0x82, 0xdc, 0x1f, 0x69, 0xe1, 0xfe, 0x51, 0x50, 0x2e, 0x65, 0xbc, 0xf1, 0xd6, 0x65, 0x8e, + 0x73, 0xe1, 0x8d, 0xf6, 0xad, 0xa0, 0x55, 0xa8, 0xb4, 0x9a, 0xbd, 0x56, 0x87, 0x5b, 0xd5, 0xdd, + 0xe7, 0x50, 0x8a, 0x6e, 0xbe, 0x0e, 0xb5, 0xec, 0x2d, 0x6b, 0x50, 0x8e, 0x0f, 0x90, 0x78, 0x55, + 0xff, 0x70, 0xd8, 0x51, 0x4f, 0x3b, 0x6d, 0x39, 0xb7, 0x6b, 0x41, 0x29, 0x1c, 0x57, 0x84, 0x60, + 0x2d, 0x55, 0x85, 0xb5, 0x33, 0x79, 0x05, 0x95, 0x21, 0x7f, 0xdc, 0xe4, 0x94, 0x54, 0xa1, 0x78, + 0x34, 0xea, 0xb5, 0x87, 0x72, 0x8e, 0xdf, 0x46, 0x2c, 0x71, 0x93, 0xe3, 0x6e, 0x7e, 0x73, 0xd2, + 0x6f, 0xb6, 0xe5, 0x3c, 0x47, 0x78, 0xdc, 0xcc, 0x3a, 0x0b, 0xe2, 0xe0, 0xc8, 0x28, 0x1e, 0x0e, + 0xde, 0xbe, 0xaf, 0x4b, 0xef, 0xde, 0xd7, 0xa5, 0x3f, 0xde, 0xd7, 0xa5, 0x9f, 0x3e, 0xd4, 0x57, + 0xde, 0x7d, 0xa8, 0xaf, 0xfc, 0xf6, 0xa1, 0xbe, 0xf2, 0xed, 0x0b, 0xd3, 0xf2, 0xc6, 0xfe, 0xf9, + 0x9e, 0xce, 0xa6, 0xfb, 0x33, 0xdf, 0x1d, 0x8b, 0x27, 0x52, 0xac, 0x9e, 0x88, 0xe5, 0x13, 0x9b, + 0x19, 0x74, 0x3f, 0xd8, 0x4f, 0x84, 0x24, 0x7e, 0x54, 0x9f, 0x97, 0xc4, 0xcf, 0xe3, 0x4f, 0xff, + 0x09, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x10, 0x80, 0x01, 0x71, 0x0b, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1046,6 +1190,63 @@ func (this *PCTx) Equal(that interface{}) bool { } return true } +func (this *OutboundObservation) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OutboundObservation) + if !ok { + that2, ok := that.(OutboundObservation) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Success != that1.Success { + return false + } + if this.BlockHeight != that1.BlockHeight { + return false + } + if this.TxHash != that1.TxHash { + return false + } + return true +} +func (this *Originating_Pc_TX) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Originating_Pc_TX) + if !ok { + that2, ok := that.(Originating_Pc_TX) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.TxHash != that1.TxHash { + return false + } + if this.LogIndex != that1.LogIndex { + return false + } + return true +} func (this *OutboundTx) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1068,9 +1269,6 @@ func (this *OutboundTx) Equal(that interface{}) bool { if this.DestinationChain != that1.DestinationChain { return false } - if this.TxHash != that1.TxHash { - return false - } if this.Recipient != that1.Recipient { return false } @@ -1080,6 +1278,30 @@ func (this *OutboundTx) Equal(that interface{}) bool { if this.AssetAddr != that1.AssetAddr { return false } + if this.Sender != that1.Sender { + return false + } + if this.Payload != that1.Payload { + return false + } + if this.GasLimit != that1.GasLimit { + return false + } + if this.TxType != that1.TxType { + return false + } + if !this.PcTx.Equal(that1.PcTx) { + return false + } + if !this.ObservedTx.Equal(that1.ObservedTx) { + return false + } + if this.Id != that1.Id { + return false + } + if this.OutboundStatus != that1.OutboundStatus { + return false + } return true } func (this *UniversalTx) Equal(that interface{}) bool { @@ -1101,6 +1323,9 @@ func (this *UniversalTx) Equal(that interface{}) bool { } else if this == nil { return false } + if this.Id != that1.Id { + return false + } if !this.InboundTx.Equal(that1.InboundTx) { return false } @@ -1112,9 +1337,14 @@ func (this *UniversalTx) Equal(that interface{}) bool { return false } } - if !this.OutboundTx.Equal(that1.OutboundTx) { + if len(this.OutboundTx) != len(that1.OutboundTx) { return false } + for i := range this.OutboundTx { + if !this.OutboundTx[i].Equal(that1.OutboundTx[i]) { + return false + } + } if this.UniversalStatus != that1.UniversalStatus { return false } @@ -1281,7 +1511,7 @@ func (m *UniversalAccountId) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *InboundStatus) Marshal() (dAtA []byte, err error) { +func (m *Inbound) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1291,50 +1521,22 @@ func (m *InboundStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *InboundStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *Inbound) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *InboundStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Inbound) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Status != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + if len(m.VerificationData) > 0 { + i -= len(m.VerificationData) + copy(dAtA[i:], m.VerificationData) + i = encodeVarintTypes(dAtA, i, uint64(len(m.VerificationData))) i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Inbound) 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 *Inbound) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Inbound) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VerificationData) > 0 { - i -= len(m.VerificationData) - copy(dAtA[i:], m.VerificationData) - i = encodeVarintTypes(dAtA, i, uint64(len(m.VerificationData))) - i-- - dAtA[i] = 0x52 + dAtA[i] = 0x52 } if m.UniversalPayload != nil { { @@ -1466,6 +1668,88 @@ func (m *PCTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *OutboundObservation) 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 *OutboundObservation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OutboundObservation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0x1a + } + if m.BlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Originating_Pc_TX) 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 *Originating_Pc_TX) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Originating_Pc_TX) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.LogIndex) > 0 { + i -= len(m.LogIndex) + copy(dAtA[i:], m.LogIndex) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LogIndex))) + i-- + dAtA[i] = 0x12 + } + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *OutboundTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1486,32 +1770,87 @@ func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.OutboundStatus != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.OutboundStatus)) + i-- + dAtA[i] = 0x60 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x5a + } + if m.ObservedTx != nil { + { + size, err := m.ObservedTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.PcTx != nil { + { + size, err := m.PcTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if m.TxType != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.TxType)) + i-- + dAtA[i] = 0x40 + } + if len(m.GasLimit) > 0 { + i -= len(m.GasLimit) + copy(dAtA[i:], m.GasLimit) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GasLimit))) + i-- + dAtA[i] = 0x3a + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x32 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x2a + } if len(m.AssetAddr) > 0 { i -= len(m.AssetAddr) copy(dAtA[i:], m.AssetAddr) i = encodeVarintTypes(dAtA, i, uint64(len(m.AssetAddr))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(m.Amount) > 0 { i -= len(m.Amount) copy(dAtA[i:], m.Amount) i = encodeVarintTypes(dAtA, i, uint64(len(m.Amount))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(m.Recipient) > 0 { i -= len(m.Recipient) copy(dAtA[i:], m.Recipient) i = encodeVarintTypes(dAtA, i, uint64(len(m.Recipient))) i-- - dAtA[i] = 0x1a - } - if len(m.TxHash) > 0 { - i -= len(m.TxHash) - copy(dAtA[i:], m.TxHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.TxHash))) - i-- dAtA[i] = 0x12 } if len(m.DestinationChain) > 0 { @@ -1547,19 +1886,21 @@ func (m *UniversalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.UniversalStatus != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.UniversalStatus)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } - if m.OutboundTx != nil { - { - size, err := m.OutboundTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.OutboundTx) > 0 { + for iNdEx := len(m.OutboundTx) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OutboundTx[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x1a } if len(m.PcTx) > 0 { for iNdEx := len(m.PcTx) - 1; iNdEx >= 0; iNdEx-- { @@ -1572,7 +1913,7 @@ func (m *UniversalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } if m.InboundTx != nil { @@ -1585,6 +1926,13 @@ func (m *UniversalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1678,18 +2026,6 @@ func (m *UniversalAccountId) Size() (n int) { return n } -func (m *InboundStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != 0 { - n += 1 + sovTypes(uint64(m.Status)) - } - return n -} - func (m *Inbound) Size() (n int) { if m == nil { return 0 @@ -1769,20 +2105,52 @@ func (m *PCTx) Size() (n int) { return n } -func (m *OutboundTx) Size() (n int) { +func (m *OutboundObservation) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.DestinationChain) + if m.Success { + n += 2 + } + if m.BlockHeight != 0 { + n += 1 + sovTypes(uint64(m.BlockHeight)) + } + l = len(m.TxHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + return n +} + +func (m *Originating_Pc_TX) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l l = len(m.TxHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + l = len(m.LogIndex) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *OutboundTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DestinationChain) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } l = len(m.Recipient) if l > 0 { n += 1 + l + sovTypes(uint64(l)) @@ -1795,6 +2163,36 @@ func (m *OutboundTx) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.GasLimit) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.TxType != 0 { + n += 1 + sovTypes(uint64(m.TxType)) + } + if m.PcTx != nil { + l = m.PcTx.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.ObservedTx != nil { + l = m.ObservedTx.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.OutboundStatus != 0 { + n += 1 + sovTypes(uint64(m.OutboundStatus)) + } return n } @@ -1804,6 +2202,10 @@ func (m *UniversalTx) Size() (n int) { } var l int _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } if m.InboundTx != nil { l = m.InboundTx.Size() n += 1 + l + sovTypes(uint64(l)) @@ -1814,9 +2216,11 @@ func (m *UniversalTx) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } - if m.OutboundTx != nil { - l = m.OutboundTx.Size() - n += 1 + l + sovTypes(uint64(l)) + if len(m.OutboundTx) > 0 { + for _, e := range m.OutboundTx { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } } if m.UniversalStatus != 0 { n += 1 + sovTypes(uint64(m.UniversalStatus)) @@ -2371,7 +2775,7 @@ func (m *UniversalAccountId) Unmarshal(dAtA []byte) error { } return nil } -func (m *InboundStatus) Unmarshal(dAtA []byte) error { +func (m *Inbound) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2394,17 +2798,17 @@ func (m *InboundStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: InboundStatus: wiretype end group for non-group") + return fmt.Errorf("proto: Inbound: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: InboundStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Inbound: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) } - m.Status = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -2414,76 +2818,7 @@ func (m *InboundStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= Status(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 *Inbound) 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: Inbound: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inbound: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceChain", 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 + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2707,7 +3042,7 @@ func (m *Inbound) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TxType |= InboundTxType(b&0x7F) << shift + m.TxType |= TxType(b&0x7F) << shift if b < 0x80 { break } @@ -3017,7 +3352,7 @@ func (m *PCTx) Unmarshal(dAtA []byte) error { } return nil } -func (m *OutboundTx) Unmarshal(dAtA []byte) error { +func (m *OutboundObservation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3040,17 +3375,17 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OutboundTx: wiretype end group for non-group") + return fmt.Errorf("proto: OutboundObservation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OutboundTx: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OutboundObservation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3060,29 +3395,17 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(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.DestinationChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.Success = bool(v != 0) case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } - var stringLen uint64 + m.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3092,27 +3415,14 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.BlockHeight |= 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.TxHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3140,11 +3450,61 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Recipient = string(dAtA[iNdEx:postIndex]) + m.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + 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 *Originating_Pc_TX) 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: Originating_Pc_TX: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Originating_Pc_TX: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3172,11 +3532,11 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = string(dAtA[iNdEx:postIndex]) + m.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LogIndex", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3204,7 +3564,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AssetAddr = string(dAtA[iNdEx:postIndex]) + m.LogIndex = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3227,7 +3587,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } return nil } -func (m *UniversalTx) Unmarshal(dAtA []byte) error { +func (m *OutboundTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3250,17 +3610,17 @@ func (m *UniversalTx) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UniversalTx: wiretype end group for non-group") + return fmt.Errorf("proto: OutboundTx: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UniversalTx: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OutboundTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InboundTx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3270,33 +3630,29 @@ func (m *UniversalTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if m.InboundTx == nil { - m.InboundTx = &Inbound{} - } - if err := m.InboundTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.DestinationChain = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3306,31 +3662,29 @@ func (m *UniversalTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.PcTx = append(m.PcTx, &PCTx{}) - if err := m.PcTx[len(m.PcTx)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Recipient = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutboundTx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3340,29 +3694,481 @@ func (m *UniversalTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if m.OutboundTx == nil { - m.OutboundTx = &OutboundTx{} + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", 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 } - if err := m.OutboundTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF } + m.AssetAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", 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.Payload = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", 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.GasLimit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) + } + m.TxType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxType |= TxType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PcTx == nil { + m.PcTx = &Originating_Pc_TX{} + } + if err := m.PcTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObservedTx == nil { + m.ObservedTx = &OutboundObservation{} + } + if err := m.ObservedTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutboundStatus", wireType) + } + m.OutboundStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OutboundStatus |= Status(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 *UniversalTx) 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: UniversalTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UniversalTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InboundTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.InboundTx == nil { + m.InboundTx = &Inbound{} + } + if err := m.InboundTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PcTx = append(m.PcTx, &PCTx{}) + if err := m.PcTx[len(m.PcTx)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutboundTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OutboundTx = append(m.OutboundTx, &OutboundTx{}) + if err := m.OutboundTx[len(m.OutboundTx)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UniversalStatus", wireType) } diff --git a/x/uexecutor/types/universal_tx.go b/x/uexecutor/types/universal_tx.go index 66f515d2..f25a38a5 100644 --- a/x/uexecutor/types/universal_tx.go +++ b/x/uexecutor/types/universal_tx.go @@ -20,6 +20,11 @@ func (p UniversalTx) String() string { // ValidateBasic does the sanity check on the UniversalTx fields. func (p UniversalTx) ValidateBasic() error { + // Validate Id is non-empty + if len(p.Id) == 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "id cannot be empty") + } + // Validate inbound_tx if err := p.InboundTx.ValidateBasic(); err != nil { return errors.Wrap(err, "invalid inbound_tx") @@ -37,8 +42,14 @@ func (p UniversalTx) ValidateBasic() error { } // Validate outbound_tx - if err := p.OutboundTx.ValidateBasic(); err != nil { - return errors.Wrap(err, "invalid outbound_tx") + // Validate each outbound_tx + for i, tx := range p.OutboundTx { + if tx == nil { + return fmt.Errorf("pc_tx[%d] is nil", i) + } + if err := tx.ValidateBasic(); err != nil { + return errors.Wrapf(err, "invalid outbound_tx at index %d", i) + } } // Validate universal_status (must be a valid enum) diff --git a/x/uexecutor/types/universal_tx_test.go b/x/uexecutor/types/universal_tx_test.go index 57976ad1..070a9127 100644 --- a/x/uexecutor/types/universal_tx_test.go +++ b/x/uexecutor/types/universal_tx_test.go @@ -9,6 +9,7 @@ import ( func TestUniversalTx_ValidateBasic(t *testing.T) { validUniversal := types.UniversalTx{ + Id: "1", InboundTx: &types.Inbound{ SourceChain: "eip155:11155111", TxHash: "0x123abc", @@ -17,7 +18,7 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { Amount: "1000", AssetAddr: "0x000000000000000000000000000000000000cafe", LogIndex: "1", - TxType: types.InboundTxType_FUNDS, + TxType: types.TxType_FUNDS, }, PcTx: []*types.PCTx{ { @@ -28,12 +29,22 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { Status: "SUCCESS", }, }, - OutboundTx: &types.OutboundTx{ - DestinationChain: "eip155:11155111", - TxHash: "0x456def", - Recipient: "0x000000000000000000000000000000000000beef", - Amount: "500", - AssetAddr: "0x000000000000000000000000000000000000cafe", + OutboundTx: []*types.OutboundTx{ + { + DestinationChain: "eip155:11155111", + Recipient: "0x000000000000000000000000000000000000beef", + Sender: "0x000000000000000000000000000000000000dead", + Amount: "1000", + AssetAddr: "0x000000000000000000000000000000000000cafe", + Payload: "0xabcdef", + GasLimit: "21000", + TxType: types.TxType_FUNDS_AND_PAYLOAD, + PcTx: &types.Originating_Pc_TX{ + TxHash: "0xpc123", + LogIndex: "1", + }, + Id: "0", + }, }, UniversalStatus: types.UniversalTxStatus_PC_EXECUTED_SUCCESS, } @@ -75,7 +86,9 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { name: "invalid outbound", universal: func() types.UniversalTx { utx := validUniversal - utx.OutboundTx = &types.OutboundTx{} // Recipient empty + utx.OutboundTx = []*types.OutboundTx{ + {}, + } // Recipient empty return utx }(), expectError: true, diff --git a/x/uregistry/types/constants.go b/x/uregistry/types/constants.go index 37d0c687..0e71d28f 100644 --- a/x/uregistry/types/constants.go +++ b/x/uregistry/types/constants.go @@ -40,7 +40,7 @@ var SYSTEM_CONTRACTS = map[string]ContractAddresses{ ProxyAdmin: "0xf2000000000000000000000000000000000000BC", Implementation: "0xF1000000000000000000000000000000000000Bc", }, - "RESERVED_0": { + "UNIVERSAL_GATEWAY_PC": { Address: "0x00000000000000000000000000000000000000B0", ProxyAdmin: "0xf2000000000000000000000000000000000000b0", Implementation: "0xF1000000000000000000000000000000000000b0", @@ -72,22 +72,22 @@ var BYTECODE = map[string]ByteCodes{ }, "UNIVERSAL_BATCH_CALL": { IMPL_RUNTIME: ReservedImplRuntimeBytecode, - PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000BC73ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), + PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f000000000000000000000000f2000000000000000000000000000000000000BC73ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), ADMIN_RUNTIME: ProxyAdminRuntimeBytecode, }, - "RESERVED_0": { + "UNIVERSAL_GATEWAY_PC": { IMPL_RUNTIME: ReservedImplRuntimeBytecode, - PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000b073ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), + PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f000000000000000000000000f2000000000000000000000000000000000000b073ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), ADMIN_RUNTIME: ProxyAdminRuntimeBytecode, }, "RESERVED_1": { IMPL_RUNTIME: ReservedImplRuntimeBytecode, - PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000b173ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), + PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f000000000000000000000000F2000000000000000000000000000000000000b173ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), ADMIN_RUNTIME: ProxyAdminRuntimeBytecode, }, "RESERVED_2": { IMPL_RUNTIME: ReservedImplRuntimeBytecode, - PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000b273ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), + PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f000000000000000000000000f2000000000000000000000000000000000000b273ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), ADMIN_RUNTIME: ProxyAdminRuntimeBytecode, }, } 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..8d32f5b5 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, + coreValidatorAddr, pubkey string, + networkInfo types.NetworkInfo, ) error { sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -21,27 +27,91 @@ 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.IdentifyInfo.Pubkey = pubkey + 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, + Pubkey: pubkey, + }, + 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..e372749f 100755 --- a/x/uvalidator/keeper/msg_server.go +++ b/x/uvalidator/keeper/msg_server.go @@ -48,7 +48,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.Pubkey, *msg.Network) if err != nil { return nil, err } @@ -75,3 +75,23 @@ 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) { + // 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.UpdateUniversalValidator(ctx, msg.CoreValidatorAddress, msg.Pubkey, *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..0f01414d --- /dev/null +++ b/x/uvalidator/keeper/msg_update_universal_validator.go @@ -0,0 +1,56 @@ +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, pubkey 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.IdentifyInfo.Pubkey = pubkey + 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..5b424355 --- /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(), + Pubkey: "pubkey-temp", + }, + NetworkInfo: &types.NetworkInfo{ + Ip: "1.1.1.1", + }, + 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..c3f1da6e --- /dev/null +++ b/x/uvalidator/types/identity_info.go @@ -0,0 +1,26 @@ +package types + +import ( + "strings" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// 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") + } + + // Validate pubkey is non-empty + pubkey := strings.TrimSpace(p.Pubkey) + if pubkey == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") + } + + 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..e8085a34 100644 --- a/x/uvalidator/types/msg_add_universal_validator.go +++ b/x/uvalidator/types/msg_add_universal_validator.go @@ -1,8 +1,11 @@ package types import ( + "strings" + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var ( @@ -13,11 +16,14 @@ 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(), + Pubkey: pubKey, + Network: &network, } } @@ -50,5 +56,11 @@ func (msg *MsgAddUniversalValidator) ValidateBasic() error { return errors.Wrap(err, "invalid core validator address") } - return nil + // Validate pubkey is non-empty + pubkey := strings.TrimSpace(msg.Pubkey) + if pubkey == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") + } + + 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..8a177e55 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, + Pubkey: "pubkey_temp", + Network: &types.NetworkInfo{ + Ip: "ip", + }, }, 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..4a1da6a0 --- /dev/null +++ b/x/uvalidator/types/msg_update_universal_validator.go @@ -0,0 +1,66 @@ +package types + +import ( + "strings" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var ( + _ sdk.Msg = &MsgUpdateUniversalValidator{} +) + +// NewMsgUpdateUniversalValidator creates new instance of MsgUpdateUniversalValidator +func NewMsgUpdateUniversalValidator( + sender sdk.Address, + coreValidatorAddress sdk.Address, + pubKey string, + network NetworkInfo, +) *MsgUpdateUniversalValidator { + return &MsgUpdateUniversalValidator{ + Signer: sender.String(), + CoreValidatorAddress: coreValidatorAddress.String(), + Pubkey: pubKey, + 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") + } + + // Validate core validator address (must be a valid valoper address) + _, err := sdk.ValAddressFromBech32(msg.CoreValidatorAddress) + if err != nil { + return errors.Wrap(err, "invalid core validator address") + } + + // Validate pubkey is non-empty + pubkey := strings.TrimSpace(msg.Pubkey) + if pubkey == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") + } + + 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..88408f9e --- /dev/null +++ b/x/uvalidator/types/msg_update_universal_validator_test.go @@ -0,0 +1,104 @@ +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) + + validAdmin := "push1gjaw568e35hjc8udhat0xnsxxmkm2snrexxz20" + validCoreVal := "pushvaloper1gjaw568e35hjc8udhat0xnsxxmkm2snrjnakhg" + + tests := []struct { + name string + msg types.MsgUpdateUniversalValidator + wantErr bool + errMsg string + }{ + { + name: "valid message", + msg: types.MsgUpdateUniversalValidator{ + Signer: validAdmin, + CoreValidatorAddress: validCoreVal, + Pubkey: "updated_pubkey_123", + Network: &types.NetworkInfo{ + Ip: "127.0.0.1", + }, + }, + wantErr: false, + }, + { + name: "invalid signer address", + msg: types.MsgUpdateUniversalValidator{ + Signer: "invalid_signer", + CoreValidatorAddress: validCoreVal, + Pubkey: "pubkey_temp", + Network: &types.NetworkInfo{ + Ip: "10.0.0.1", + }, + }, + wantErr: true, + errMsg: "invalid signer address", + }, + { + name: "invalid core validator address format", + msg: types.MsgUpdateUniversalValidator{ + Signer: validAdmin, + CoreValidatorAddress: "bad_valoper_format", + Pubkey: "pubkey_temp", + Network: &types.NetworkInfo{ + Ip: "10.0.0.1", + }, + }, + wantErr: true, + errMsg: "invalid core validator address", + }, + { + name: "empty pubkey should fail", + msg: types.MsgUpdateUniversalValidator{ + Signer: validAdmin, + CoreValidatorAddress: validCoreVal, + Pubkey: " ", + Network: &types.NetworkInfo{ + Ip: "10.0.0.1", + }, + }, + wantErr: true, + errMsg: "pubkey cannot be empty", + }, + { + name: "empty network info should fail", + msg: types.MsgUpdateUniversalValidator{ + Signer: validAdmin, + CoreValidatorAddress: validCoreVal, + Pubkey: "valid_pubkey", + Network: &types.NetworkInfo{Ip: ""}, + }, + wantErr: true, + errMsg: "ip cannot be empty", + }, + } + + 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..739f9fec --- /dev/null +++ b/x/uvalidator/types/network_info.go @@ -0,0 +1,19 @@ +package types + +import ( + "strings" + + "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Validate does the sanity check on the params. +func (p NetworkInfo) ValidateBasic() error { + // Validate ip is non-empty + ip := strings.TrimSpace(p.Ip) + if ip == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "ip cannot be empty") + } + + 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..599d3ee2 100644 --- a/x/uvalidator/types/tx.pb.go +++ b/x/uvalidator/types/tx.pb.go @@ -135,6 +135,10 @@ 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"` + // pubkey is the consensus public key for this universal validator + Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,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 +188,20 @@ func (m *MsgAddUniversalValidator) GetCoreValidatorAddress() string { return "" } +func (m *MsgAddUniversalValidator) GetPubkey() string { + if m != nil { + return m.Pubkey + } + return "" +} + +func (m *MsgAddUniversalValidator) GetNetwork() *NetworkInfo { + if m != nil { + return m.Network + } + return nil +} + type MsgAddUniversalValidatorResponse struct { } @@ -220,6 +238,114 @@ 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"` + // 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"` + // pubkey is the consensus public key for this universal validator + Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // network metadata for validator node (IP, etc.) + Network *NetworkInfo `protobuf:"bytes,4,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) GetCoreValidatorAddress() string { + if m != nil { + return m.CoreValidatorAddress + } + return "" +} + +func (m *MsgUpdateUniversalValidator) GetPubkey() string { + if m != nil { + return m.Pubkey + } + 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 +357,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 +407,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 +441,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 +450,45 @@ 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, + // 600 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x95, 0x3d, 0x6f, 0xd3, 0x40, + 0x1c, 0xc6, 0xe3, 0xa4, 0x04, 0xe5, 0x78, 0x13, 0x56, 0x9a, 0xba, 0xae, 0x6a, 0x82, 0x2b, 0x4a, + 0x15, 0x29, 0x31, 0x4d, 0x50, 0x91, 0xba, 0x35, 0x1b, 0x43, 0x2a, 0x30, 0x6a, 0x91, 0x58, 0x22, + 0x27, 0x3e, 0x2e, 0x56, 0x6b, 0x9f, 0xf1, 0x39, 0xa1, 0x61, 0x42, 0x8c, 0x0c, 0x88, 0x8f, 0xc1, + 0x84, 0x32, 0xf4, 0x43, 0x74, 0xa3, 0xea, 0x02, 0x13, 0x42, 0xc9, 0x90, 0xaf, 0x81, 0x7c, 0x7e, + 0x49, 0x6c, 0x7c, 0x4d, 0x07, 0xb6, 0x2e, 0xd1, 0xd9, 0xcf, 0x93, 0xe7, 0xff, 0xe8, 0x77, 0xb6, + 0x0f, 0x94, 0xfa, 0x03, 0xed, 0xd8, 0xd0, 0x35, 0x17, 0x3b, 0xca, 0x60, 0x5b, 0x71, 0x4f, 0x6a, + 0xb6, 0x83, 0x5d, 0xcc, 0xdf, 0x99, 0xdd, 0xaf, 0x0d, 0xb6, 0xc5, 0xfb, 0x9a, 0x69, 0x58, 0x58, + 0xa1, 0xbf, 0xbe, 0x43, 0x5c, 0xe9, 0x62, 0x62, 0x62, 0xa2, 0x98, 0x04, 0x79, 0xff, 0x34, 0x09, + 0x0a, 0x84, 0xb5, 0x78, 0x24, 0x82, 0x16, 0x24, 0x06, 0x09, 0xc4, 0x22, 0xc2, 0x08, 0xd3, 0xa5, + 0xe2, 0xad, 0x82, 0xbb, 0xab, 0x7e, 0x56, 0xdb, 0x17, 0xfc, 0x8b, 0x50, 0x4a, 0x14, 0x1c, 0xda, + 0x30, 0x94, 0xd6, 0xe3, 0xd2, 0xac, 0x30, 0x95, 0xe5, 0x2f, 0x1c, 0xb8, 0xd7, 0x22, 0xe8, 0xc0, + 0xd6, 0x35, 0x17, 0xbe, 0xd0, 0x1c, 0xcd, 0x24, 0xfc, 0x0e, 0x28, 0x68, 0x7d, 0xb7, 0x87, 0x1d, + 0xc3, 0x1d, 0x0a, 0x5c, 0x99, 0xdb, 0x2a, 0x34, 0x85, 0x8b, 0xd3, 0x6a, 0x31, 0x18, 0xb9, 0xa7, + 0xeb, 0x0e, 0x24, 0xe4, 0x95, 0xeb, 0x18, 0x16, 0x52, 0x67, 0x56, 0xbe, 0x01, 0xf2, 0x36, 0x4d, + 0x10, 0xb2, 0x65, 0x6e, 0xeb, 0x56, 0x7d, 0xb9, 0x16, 0xe3, 0x53, 0xf3, 0xe3, 0x9b, 0x4b, 0x67, + 0xbf, 0x1f, 0x64, 0xd4, 0xc0, 0xba, 0x7b, 0xf7, 0xd3, 0x74, 0x54, 0x99, 0x85, 0xc8, 0xab, 0x60, + 0x25, 0xd1, 0x47, 0x85, 0xc4, 0xc6, 0x16, 0x81, 0xf2, 0xb7, 0x2c, 0x10, 0x5a, 0x04, 0xed, 0xe9, + 0xfa, 0x81, 0x65, 0x0c, 0xa0, 0x43, 0xb4, 0xe3, 0xc3, 0x30, 0x9f, 0x7f, 0x02, 0xf2, 0xc4, 0x40, + 0x16, 0x74, 0x16, 0x36, 0x0e, 0x7c, 0xfc, 0x6b, 0x50, 0xea, 0x62, 0x07, 0xb6, 0xa3, 0x8e, 0x6d, + 0xcd, 0xf7, 0xd1, 0xfa, 0x85, 0xe6, 0xc3, 0x8b, 0xd3, 0xea, 0x7a, 0x90, 0x10, 0xcd, 0x89, 0x47, + 0x15, 0xbd, 0x80, 0xa4, 0xc6, 0x97, 0x40, 0xde, 0xee, 0x77, 0x8e, 0xe0, 0x50, 0xc8, 0x79, 0x41, + 0x6a, 0x70, 0xc5, 0x3f, 0x05, 0x37, 0x2d, 0xe8, 0xbe, 0xc7, 0xce, 0x91, 0xb0, 0x44, 0x01, 0x89, + 0x09, 0x40, 0xfb, 0xbe, 0xfa, 0xdc, 0x7a, 0x8b, 0xd5, 0xd0, 0xba, 0xdb, 0xf0, 0x00, 0x05, 0x9d, + 0x3f, 0x4f, 0x47, 0x95, 0x8d, 0xb9, 0x0d, 0x65, 0xd1, 0x90, 0x65, 0x50, 0x66, 0x69, 0x11, 0xce, + 0xef, 0x59, 0xb0, 0x16, 0xa1, 0xbe, 0x4e, 0x44, 0x77, 0x12, 0x44, 0x37, 0xe3, 0x44, 0x59, 0x40, + 0xe4, 0x47, 0x60, 0xe3, 0x12, 0x39, 0xe2, 0xfa, 0x93, 0xa3, 0x5c, 0x55, 0x68, 0xe2, 0xc1, 0xff, + 0xe1, 0xba, 0xbf, 0x80, 0x2b, 0x3b, 0x21, 0x15, 0xe7, 0x22, 0x00, 0xac, 0xe6, 0x01, 0x00, 0x96, + 0x1c, 0x02, 0xa8, 0xff, 0xc8, 0x81, 0x5c, 0x8b, 0x20, 0xfe, 0x10, 0xdc, 0x8e, 0x7d, 0x57, 0xa4, + 0xc4, 0xe6, 0x24, 0xde, 0x73, 0x71, 0xf3, 0x72, 0x3d, 0xcc, 0xe7, 0xdf, 0x81, 0xe5, 0xf4, 0x6f, + 0xc0, 0xe3, 0x7f, 0x03, 0x52, 0x8d, 0xa2, 0x72, 0x45, 0x63, 0x34, 0xf2, 0x03, 0x10, 0x98, 0xef, + 0x49, 0x85, 0x55, 0x3b, 0x65, 0x70, 0xfd, 0xea, 0xde, 0xf9, 0xd9, 0xcc, 0x67, 0x29, 0x65, 0x36, + 0xcb, 0x9b, 0x36, 0x7b, 0xd1, 0x56, 0x8a, 0x37, 0x3e, 0x4e, 0x47, 0x15, 0xae, 0xf9, 0xf2, 0x6c, + 0x2c, 0x71, 0xe7, 0x63, 0x89, 0xfb, 0x33, 0x96, 0xb8, 0xaf, 0x13, 0x29, 0x73, 0x3e, 0x91, 0x32, + 0xbf, 0x26, 0x52, 0xe6, 0xcd, 0x33, 0x64, 0xb8, 0xbd, 0x7e, 0xa7, 0xd6, 0xc5, 0xa6, 0x62, 0xf7, + 0x49, 0xaf, 0xdb, 0xd3, 0x0c, 0x8b, 0xae, 0xaa, 0x74, 0x59, 0xb5, 0xb0, 0x0e, 0x95, 0x13, 0x65, + 0xee, 0x09, 0xa3, 0xa7, 0x53, 0x27, 0x4f, 0xcf, 0x9f, 0xc6, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xed, 0xa3, 0x26, 0xf8, 0x5c, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -376,6 +509,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 +541,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 +567,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 +583,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 +630,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 +678,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 +774,25 @@ 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.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintTx(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x1a + } if len(m.CoreValidatorAddress) > 0 { i -= len(m.CoreValidatorAddress) copy(dAtA[i:], m.CoreValidatorAddress) @@ -643,6 +833,85 @@ 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] = 0x22 + } + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintTx(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x1a + } + if len(m.CoreValidatorAddress) > 0 { + i -= len(m.CoreValidatorAddress) + copy(dAtA[i:], m.CoreValidatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.CoreValidatorAddress))) + 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 +1021,14 @@ func (m *MsgAddUniversalValidator) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.Pubkey) + 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 +1041,40 @@ 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)) + } + l = len(m.CoreValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Pubkey) + 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 +1365,74 @@ func (m *MsgAddUniversalValidator) Unmarshal(dAtA []byte) error { } m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = 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 +1504,238 @@ 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 CoreValidatorAddress", 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.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = 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:]) + 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..c65f3b38 --- /dev/null +++ b/x/uvalidator/types/validator.pb.go @@ -0,0 +1,1450 @@ +// 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"` + Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,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 "" +} + +func (m *IdentityInfo) GetPubkey() string { + if m != nil { + return m.Pubkey + } + return "" +} + +// Validator network metadata +type NetworkInfo struct { + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,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) GetIp() string { + if m != nil { + return m.Ip + } + return "" +} + +// 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{ + // 609 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0x8e, 0x93, 0xaa, 0xc0, 0x39, 0x89, 0xc2, 0xa9, 0xa4, 0xc5, 0xa5, 0xee, 0x0f, 0x96, 0xaa, + 0xa8, 0xb1, 0x1a, 0x90, 0x2a, 0x45, 0xe2, 0x47, 0x48, 0x0d, 0x18, 0x55, 0xa6, 0x38, 0x3f, 0x06, + 0x16, 0xcb, 0x71, 0x2e, 0xf1, 0x29, 0xae, 0xcf, 0xb2, 0xcf, 0x81, 0x4c, 0x8c, 0x08, 0x26, 0xc4, + 0xc4, 0xd8, 0x81, 0x01, 0x89, 0x85, 0x3f, 0x83, 0xb1, 0x23, 0x23, 0x4a, 0x06, 0xf8, 0x33, 0x50, + 0xce, 0x76, 0xec, 0x06, 0x90, 0x58, 0xac, 0x7b, 0xef, 0x7b, 0xf7, 0xbd, 0xef, 0x7d, 0xef, 0x0c, + 0x36, 0x82, 0x91, 0x61, 0xe3, 0x9e, 0x41, 0x89, 0x27, 0x8d, 0x0e, 0xa4, 0x79, 0x50, 0x71, 0x3d, + 0x42, 0x09, 0x2c, 0x24, 0x70, 0x65, 0x74, 0x20, 0xac, 0x0c, 0xc8, 0x80, 0x30, 0x44, 0x9a, 0x9d, + 0xc2, 0x22, 0xe1, 0xaa, 0x71, 0x8a, 0x1d, 0x22, 0xb1, 0x6f, 0x98, 0xda, 0x79, 0x0d, 0xf2, 0x4a, + 0x0f, 0x39, 0x14, 0xd3, 0xb1, 0xe2, 0xf4, 0x09, 0xbc, 0x03, 0xca, 0x26, 0xf1, 0x90, 0x3e, 0x67, + 0xd3, 0x8d, 0x5e, 0xcf, 0x43, 0xbe, 0xbf, 0xc6, 0x6d, 0x71, 0xbb, 0x57, 0xb4, 0x95, 0x19, 0xda, + 0x89, 0xc1, 0x7a, 0x88, 0xc1, 0x32, 0x58, 0x76, 0x83, 0xee, 0x10, 0x8d, 0xd7, 0xb2, 0xac, 0x2a, + 0x8a, 0x6a, 0xdb, 0xbf, 0xce, 0x36, 0xb9, 0x77, 0x3f, 0xbf, 0xee, 0xad, 0xa5, 0xd4, 0xe3, 0xa8, + 0x9f, 0x8e, 0x9d, 0x3e, 0xd9, 0xb9, 0x0f, 0x78, 0x15, 0xd1, 0x97, 0xc4, 0x1b, 0xb2, 0xfe, 0x45, + 0x90, 0xc5, 0x6e, 0xd4, 0x2b, 0x8b, 0xdd, 0xda, 0x56, 0xcc, 0xb0, 0x9a, 0x62, 0x70, 0xc2, 0x0b, + 0x21, 0xc1, 0x5b, 0x0e, 0x14, 0x8f, 0x71, 0x1f, 0x99, 0x63, 0xd3, 0x46, 0xf2, 0x08, 0x39, 0x14, + 0x4a, 0x60, 0xd9, 0xa7, 0x06, 0x0d, 0x42, 0xd1, 0xc5, 0xea, 0x6a, 0xe5, 0x82, 0x3b, 0x95, 0x76, + 0xa7, 0xc9, 0x60, 0x2d, 0x2a, 0x83, 0xdb, 0x20, 0xdf, 0xb5, 0x89, 0x39, 0xd4, 0x2d, 0x84, 0x07, + 0x16, 0x65, 0x53, 0xe4, 0x34, 0x9e, 0xe5, 0x9e, 0xb0, 0x54, 0xed, 0x66, 0x2c, 0x44, 0x48, 0x09, + 0xb1, 0xe3, 0xbe, 0x3a, 0x9a, 0x35, 0xde, 0xf9, 0xc2, 0x81, 0xc2, 0x5c, 0x0b, 0x9b, 0xe7, 0x1e, + 0x28, 0x9a, 0x81, 0xe7, 0x21, 0x87, 0xea, 0xff, 0x27, 0xa9, 0x10, 0x95, 0x87, 0x21, 0x3c, 0x04, + 0x97, 0x2c, 0xec, 0x53, 0xe2, 0xcd, 0xac, 0xcd, 0xed, 0xf2, 0xd5, 0x8d, 0x85, 0x8b, 0x17, 0x47, + 0xd7, 0xe2, 0xea, 0xbf, 0x5b, 0x1f, 0xea, 0xb5, 0x51, 0xe8, 0xdc, 0x9b, 0x2c, 0x80, 0x6d, 0x07, + 0x8f, 0x90, 0xe7, 0x1b, 0xf6, 0x7c, 0xa7, 0xf0, 0x01, 0x28, 0x84, 0x2b, 0xea, 0x87, 0x2b, 0x62, + 0x8a, 0xf9, 0xea, 0xfa, 0x42, 0xe3, 0xf4, 0xb3, 0xd1, 0xf2, 0xf1, 0x0d, 0x36, 0xf4, 0x5d, 0x90, + 0x4f, 0xaf, 0x88, 0xd9, 0xc9, 0x57, 0x85, 0x05, 0x82, 0xd4, 0xda, 0x35, 0xde, 0x49, 0xbd, 0x81, + 0x06, 0x28, 0x26, 0xc6, 0x32, 0x82, 0x1c, 0x23, 0xb8, 0xf1, 0xaf, 0xd1, 0x19, 0x45, 0xc1, 0x4e, + 0x87, 0xb5, 0x5b, 0x1f, 0xcf, 0x36, 0x33, 0xb1, 0x07, 0x62, 0xca, 0x83, 0x20, 0x9e, 0x38, 0x79, + 0xe3, 0x7b, 0x1f, 0x38, 0x70, 0x39, 0xde, 0x00, 0xbc, 0x0e, 0xae, 0xb5, 0x3b, 0x7a, 0xb3, 0x55, + 0x6f, 0xb5, 0x9b, 0x7a, 0x5b, 0x6d, 0x9e, 0xc8, 0x0d, 0xe5, 0x91, 0x22, 0x1f, 0x95, 0x32, 0x70, + 0x05, 0x94, 0x12, 0xa8, 0xde, 0x68, 0x29, 0x1d, 0xb9, 0xc4, 0x41, 0x01, 0x94, 0x93, 0xec, 0x89, + 0xac, 0x1e, 0x29, 0xea, 0x63, 0xfd, 0xe9, 0x33, 0x45, 0x2d, 0x65, 0xe1, 0x3a, 0x58, 0xfd, 0x13, + 0x3b, 0x96, 0xeb, 0x1d, 0xb9, 0x94, 0x83, 0x65, 0x00, 0x13, 0x50, 0x51, 0x23, 0xc2, 0x25, 0x61, + 0xe9, 0xf3, 0x27, 0x91, 0x7b, 0xf8, 0xfc, 0xdb, 0x44, 0xe4, 0xce, 0x27, 0x22, 0xf7, 0x63, 0x22, + 0x72, 0xef, 0xa7, 0x62, 0xe6, 0x7c, 0x2a, 0x66, 0xbe, 0x4f, 0xc5, 0xcc, 0x8b, 0xc3, 0x01, 0xa6, + 0x56, 0xd0, 0xad, 0x98, 0xe4, 0x54, 0x72, 0x03, 0xdf, 0x32, 0x2d, 0x03, 0x3b, 0xec, 0xb4, 0xcf, + 0x8e, 0xfb, 0x0e, 0xe9, 0x21, 0xe9, 0x95, 0x94, 0x9a, 0x9a, 0x8e, 0x5d, 0xe4, 0x77, 0x97, 0xd9, + 0x4f, 0x7f, 0xfb, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xa2, 0xcf, 0xf6, 0x4d, 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 + } + if this.Pubkey != that1.Pubkey { + 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.Ip != that1.Ip { + 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.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintValidator(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x12 + } + 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.Ip) > 0 { + i -= len(m.Ip) + copy(dAtA[i:], m.Ip) + i = encodeVarintValidator(dAtA, i, uint64(len(m.Ip))) + 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)) + } + l = len(m.Pubkey) + 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.Ip) + if l > 0 { + 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 + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = 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 Ip", 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.Ip = 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") +)