From 8956dda2ef4cebef0b95e5594a42341be585cd24 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 19 May 2026 11:03:51 -0400 Subject: [PATCH 1/8] Orbis module --- api/sourcehub/bulletin/tx.pulsar.go | 4016 +------ api/sourcehub/bulletin/tx_grpc.pb.go | 86 +- api/sourcehub/orbis/document.pulsar.go | 1416 +++ api/sourcehub/orbis/events.pulsar.go | 2872 +++++ api/sourcehub/orbis/genesis.pulsar.go | 1060 ++ api/sourcehub/orbis/key_derivation.pulsar.go | 1084 ++ api/sourcehub/orbis/module/module.pulsar.go | 578 + api/sourcehub/orbis/params.pulsar.go | 499 + api/sourcehub/orbis/query.pulsar.go | 7736 ++++++++++++++ api/sourcehub/orbis/query_grpc.pb.go | 367 + api/sourcehub/orbis/ring.pulsar.go | 1491 +++ api/sourcehub/orbis/tx.pulsar.go | 9480 +++++++++++++++++ api/sourcehub/orbis/tx_grpc.pb.go | 317 + app/app.go | 3 + app/app_config.go | 8 + app/lanes/priority_lane.go | 5 + proto/sourcehub/bulletin/tx.proto | 40 +- proto/sourcehub/orbis/document.proto | 21 + proto/sourcehub/orbis/events.proto | 37 + proto/sourcehub/orbis/genesis.proto | 31 + proto/sourcehub/orbis/key_derivation.proto | 16 + proto/sourcehub/orbis/module/module.proto | 12 + proto/sourcehub/orbis/params.proto | 13 + proto/sourcehub/orbis/query.proto | 128 + proto/sourcehub/orbis/ring.proto | 21 + proto/sourcehub/orbis/tx.proto | 130 + sdk/listener.go | 2 + sdk/msgset.go | 19 + sdk/sdk.go | 6 + testutil/keeper/orbis.go | 96 + x/bulletin/keeper/msg_server.go | 153 - x/bulletin/keeper/msg_server_test.go | 1378 +-- x/bulletin/keeper/payload_validation.go | 141 - x/bulletin/keeper/payload_validation_test.go | 208 - x/bulletin/keeper/reshare_sign_bytes.go | 34 - x/bulletin/keeper/reshare_sign_bytes_test.go | 86 - .../ring_reshare_finalize_vector.json | 17 - x/bulletin/keeper/threshold_signature_test.go | 78 - x/bulletin/module/autocli.go | 16 - x/bulletin/types/codec.go | 2 - x/bulletin/types/errors.go | 6 - .../types/message_update_ring_post_by_acp.go | 30 - x/bulletin/types/tx.pb.go | 1935 +--- x/orbis/keeper/acp.go | 32 + x/orbis/keeper/grpc_query.go | 156 + x/orbis/keeper/keeper.go | 66 + x/orbis/keeper/msg_server.go | 305 + x/orbis/keeper/msg_server_test.go | 170 + x/orbis/keeper/params.go | 33 + x/orbis/keeper/reshare_sign_bytes.go | 32 + x/orbis/keeper/store.go | 135 + .../keeper/threshold_signature.go | 11 +- x/orbis/keeper/validation.go | 142 + x/orbis/module/autocli.go | 88 + x/orbis/module/genesis.go | 35 + x/orbis/module/module.go | 156 + x/orbis/module/simulation.go | 29 + x/orbis/types/codec.go | 20 + x/orbis/types/document.pb.go | 903 ++ x/orbis/types/errors.go | 27 + x/orbis/types/events.pb.go | 1450 +++ x/orbis/types/expected_keepers.go | 13 + x/orbis/types/genesis.go | 16 + x/orbis/types/genesis.pb.go | 516 + x/orbis/types/key_derivation.pb.go | 682 ++ x/orbis/types/keys.go | 172 + x/orbis/types/keys_test.go | 21 + x/orbis/types/message_create_ring.go | 38 + ...ze_ring_reshare_by_threshold_signature.go} | 23 +- x/orbis/types/message_store_document.go | 44 + x/orbis/types/message_store_key_derivation.go | 40 + x/orbis/types/message_update_ring_by_acp.go | 26 + x/orbis/types/msg_update_params.go | 21 + x/orbis/types/params.go | 30 + x/orbis/types/params.pb.go | 288 + x/orbis/types/query.pb.go | 3360 ++++++ x/orbis/types/query.pb.gw.go | 821 ++ x/orbis/types/ring.pb.go | 866 ++ x/orbis/types/tx.pb.go | 4761 +++++++++ 79 files changed, 43226 insertions(+), 7976 deletions(-) create mode 100644 api/sourcehub/orbis/document.pulsar.go create mode 100644 api/sourcehub/orbis/events.pulsar.go create mode 100644 api/sourcehub/orbis/genesis.pulsar.go create mode 100644 api/sourcehub/orbis/key_derivation.pulsar.go create mode 100644 api/sourcehub/orbis/module/module.pulsar.go create mode 100644 api/sourcehub/orbis/params.pulsar.go create mode 100644 api/sourcehub/orbis/query.pulsar.go create mode 100644 api/sourcehub/orbis/query_grpc.pb.go create mode 100644 api/sourcehub/orbis/ring.pulsar.go create mode 100644 api/sourcehub/orbis/tx.pulsar.go create mode 100644 api/sourcehub/orbis/tx_grpc.pb.go create mode 100644 proto/sourcehub/orbis/document.proto create mode 100644 proto/sourcehub/orbis/events.proto create mode 100644 proto/sourcehub/orbis/genesis.proto create mode 100644 proto/sourcehub/orbis/key_derivation.proto create mode 100644 proto/sourcehub/orbis/module/module.proto create mode 100644 proto/sourcehub/orbis/params.proto create mode 100644 proto/sourcehub/orbis/query.proto create mode 100644 proto/sourcehub/orbis/ring.proto create mode 100644 proto/sourcehub/orbis/tx.proto create mode 100644 testutil/keeper/orbis.go delete mode 100644 x/bulletin/keeper/payload_validation.go delete mode 100644 x/bulletin/keeper/payload_validation_test.go delete mode 100644 x/bulletin/keeper/reshare_sign_bytes.go delete mode 100644 x/bulletin/keeper/reshare_sign_bytes_test.go delete mode 100644 x/bulletin/keeper/testdata/ring_reshare_finalize_vector.json delete mode 100644 x/bulletin/keeper/threshold_signature_test.go delete mode 100644 x/bulletin/types/message_update_ring_post_by_acp.go create mode 100644 x/orbis/keeper/acp.go create mode 100644 x/orbis/keeper/grpc_query.go create mode 100644 x/orbis/keeper/keeper.go create mode 100644 x/orbis/keeper/msg_server.go create mode 100644 x/orbis/keeper/msg_server_test.go create mode 100644 x/orbis/keeper/params.go create mode 100644 x/orbis/keeper/reshare_sign_bytes.go create mode 100644 x/orbis/keeper/store.go rename x/{bulletin => orbis}/keeper/threshold_signature.go (91%) create mode 100644 x/orbis/keeper/validation.go create mode 100644 x/orbis/module/autocli.go create mode 100644 x/orbis/module/genesis.go create mode 100644 x/orbis/module/module.go create mode 100644 x/orbis/module/simulation.go create mode 100644 x/orbis/types/codec.go create mode 100644 x/orbis/types/document.pb.go create mode 100644 x/orbis/types/errors.go create mode 100644 x/orbis/types/events.pb.go create mode 100644 x/orbis/types/expected_keepers.go create mode 100644 x/orbis/types/genesis.go create mode 100644 x/orbis/types/genesis.pb.go create mode 100644 x/orbis/types/key_derivation.pb.go create mode 100644 x/orbis/types/keys.go create mode 100644 x/orbis/types/keys_test.go create mode 100644 x/orbis/types/message_create_ring.go rename x/{bulletin/types/message_update_post_by_threshold_signature.go => orbis/types/message_finalize_ring_reshare_by_threshold_signature.go} (59%) create mode 100644 x/orbis/types/message_store_document.go create mode 100644 x/orbis/types/message_store_key_derivation.go create mode 100644 x/orbis/types/message_update_ring_by_acp.go create mode 100644 x/orbis/types/msg_update_params.go create mode 100644 x/orbis/types/params.go create mode 100644 x/orbis/types/params.pb.go create mode 100644 x/orbis/types/query.pb.go create mode 100644 x/orbis/types/query.pb.gw.go create mode 100644 x/orbis/types/ring.pb.go create mode 100644 x/orbis/types/tx.pb.go diff --git a/api/sourcehub/bulletin/tx.pulsar.go b/api/sourcehub/bulletin/tx.pulsar.go index a90f75f9..c4c14f3e 100644 --- a/api/sourcehub/bulletin/tx.pulsar.go +++ b/api/sourcehub/bulletin/tx.pulsar.go @@ -1841,3165 +1841,6 @@ func (x *fastReflection_MsgCreatePostResponse) ProtoMethods() *protoiface.Method } } -var _ protoreflect.List = (*_MsgUpdateRingPostByAcp_5_list)(nil) - -type _MsgUpdateRingPostByAcp_5_list struct { - list *[]string -} - -func (x *_MsgUpdateRingPostByAcp_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgUpdateRingPostByAcp_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_MsgUpdateRingPostByAcp_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgUpdateRingPostByAcp_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgUpdateRingPostByAcp_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgUpdateRingPostByAcp at list field NewPeerIds as it is not of Message kind")) -} - -func (x *_MsgUpdateRingPostByAcp_5_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgUpdateRingPostByAcp_5_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_MsgUpdateRingPostByAcp_5_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgUpdateRingPostByAcp protoreflect.MessageDescriptor - fd_MsgUpdateRingPostByAcp_creator protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByAcp_namespace protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByAcp_post_id protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByAcp_artifact protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByAcp_new_peer_ids protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByAcp_new_threshold protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByAcp_pss_interval protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_bulletin_tx_proto_init() - md_MsgUpdateRingPostByAcp = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgUpdateRingPostByAcp") - fd_MsgUpdateRingPostByAcp_creator = md_MsgUpdateRingPostByAcp.Fields().ByName("creator") - fd_MsgUpdateRingPostByAcp_namespace = md_MsgUpdateRingPostByAcp.Fields().ByName("namespace") - fd_MsgUpdateRingPostByAcp_post_id = md_MsgUpdateRingPostByAcp.Fields().ByName("post_id") - fd_MsgUpdateRingPostByAcp_artifact = md_MsgUpdateRingPostByAcp.Fields().ByName("artifact") - fd_MsgUpdateRingPostByAcp_new_peer_ids = md_MsgUpdateRingPostByAcp.Fields().ByName("new_peer_ids") - fd_MsgUpdateRingPostByAcp_new_threshold = md_MsgUpdateRingPostByAcp.Fields().ByName("new_threshold") - fd_MsgUpdateRingPostByAcp_pss_interval = md_MsgUpdateRingPostByAcp.Fields().ByName("pss_interval") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateRingPostByAcp)(nil) - -type fastReflection_MsgUpdateRingPostByAcp MsgUpdateRingPostByAcp - -func (x *MsgUpdateRingPostByAcp) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateRingPostByAcp)(x) -} - -func (x *MsgUpdateRingPostByAcp) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_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_MsgUpdateRingPostByAcp_messageType fastReflection_MsgUpdateRingPostByAcp_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateRingPostByAcp_messageType{} - -type fastReflection_MsgUpdateRingPostByAcp_messageType struct{} - -func (x fastReflection_MsgUpdateRingPostByAcp_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateRingPostByAcp)(nil) -} -func (x fastReflection_MsgUpdateRingPostByAcp_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingPostByAcp) -} -func (x fastReflection_MsgUpdateRingPostByAcp_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingPostByAcp -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateRingPostByAcp) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingPostByAcp -} - -// 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_MsgUpdateRingPostByAcp) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateRingPostByAcp_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateRingPostByAcp) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingPostByAcp) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateRingPostByAcp) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateRingPostByAcp)(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_MsgUpdateRingPostByAcp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgUpdateRingPostByAcp_creator, value) { - return - } - } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_MsgUpdateRingPostByAcp_namespace, value) { - return - } - } - if x.PostId != "" { - value := protoreflect.ValueOfString(x.PostId) - if !f(fd_MsgUpdateRingPostByAcp_post_id, value) { - return - } - } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_MsgUpdateRingPostByAcp_artifact, value) { - return - } - } - if len(x.NewPeerIds) != 0 { - value := protoreflect.ValueOfList(&_MsgUpdateRingPostByAcp_5_list{list: &x.NewPeerIds}) - if !f(fd_MsgUpdateRingPostByAcp_new_peer_ids, value) { - return - } - } - if x.NewThreshold != nil { - value := protoreflect.ValueOfUint32(*x.NewThreshold) - if !f(fd_MsgUpdateRingPostByAcp_new_threshold, value) { - return - } - } - if x.PssInterval != nil { - value := protoreflect.ValueOfUint64(*x.PssInterval) - if !f(fd_MsgUpdateRingPostByAcp_pss_interval, 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_MsgUpdateRingPostByAcp) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.creator": - return x.Creator != "" - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.namespace": - return x.Namespace != "" - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.post_id": - return x.PostId != "" - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.artifact": - return x.Artifact != "" - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_peer_ids": - return len(x.NewPeerIds) != 0 - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_threshold": - return x.NewThreshold != nil - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.pss_interval": - return x.PssInterval != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcp")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcp 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_MsgUpdateRingPostByAcp) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.creator": - x.Creator = "" - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.namespace": - x.Namespace = "" - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.post_id": - x.PostId = "" - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.artifact": - x.Artifact = "" - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_peer_ids": - x.NewPeerIds = nil - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_threshold": - x.NewThreshold = nil - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.pss_interval": - x.PssInterval = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcp")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcp 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_MsgUpdateRingPostByAcp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.post_id": - value := x.PostId - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_peer_ids": - if len(x.NewPeerIds) == 0 { - return protoreflect.ValueOfList(&_MsgUpdateRingPostByAcp_5_list{}) - } - listValue := &_MsgUpdateRingPostByAcp_5_list{list: &x.NewPeerIds} - return protoreflect.ValueOfList(listValue) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_threshold": - if x.NewThreshold == nil { - return protoreflect.ValueOfUint32(uint32(0)) - } - return protoreflect.ValueOfUint32(*x.NewThreshold) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.pss_interval": - if x.PssInterval == nil { - return protoreflect.ValueOfUint64(uint64(0)) - } - return protoreflect.ValueOfUint64(*x.PssInterval) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcp")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcp 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_MsgUpdateRingPostByAcp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.creator": - x.Creator = value.Interface().(string) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.namespace": - x.Namespace = value.Interface().(string) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.post_id": - x.PostId = value.Interface().(string) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.artifact": - x.Artifact = value.Interface().(string) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_peer_ids": - lv := value.List() - clv := lv.(*_MsgUpdateRingPostByAcp_5_list) - x.NewPeerIds = *clv.list - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_threshold": - cv := uint32(value.Uint()) - x.NewThreshold = &cv - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.pss_interval": - cv := value.Uint() - x.PssInterval = &cv - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcp")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcp 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_MsgUpdateRingPostByAcp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_peer_ids": - if x.NewPeerIds == nil { - x.NewPeerIds = []string{} - } - value := &_MsgUpdateRingPostByAcp_5_list{list: &x.NewPeerIds} - return protoreflect.ValueOfList(value) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.creator": - panic(fmt.Errorf("field creator of message sourcehub.bulletin.MsgUpdateRingPostByAcp is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.bulletin.MsgUpdateRingPostByAcp is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.post_id": - panic(fmt.Errorf("field post_id of message sourcehub.bulletin.MsgUpdateRingPostByAcp is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.bulletin.MsgUpdateRingPostByAcp is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_threshold": - panic(fmt.Errorf("field new_threshold of message sourcehub.bulletin.MsgUpdateRingPostByAcp is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.pss_interval": - panic(fmt.Errorf("field pss_interval of message sourcehub.bulletin.MsgUpdateRingPostByAcp is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcp")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcp 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_MsgUpdateRingPostByAcp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.creator": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.namespace": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.post_id": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.artifact": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_peer_ids": - list := []string{} - return protoreflect.ValueOfList(&_MsgUpdateRingPostByAcp_5_list{list: &list}) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.new_threshold": - return protoreflect.ValueOfUint32(uint32(0)) - case "sourcehub.bulletin.MsgUpdateRingPostByAcp.pss_interval": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcp")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcp 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_MsgUpdateRingPostByAcp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByAcp._new_threshold": - if x.NewThreshold != nil { - return x.Descriptor().Fields().ByName("new_threshold") - } - return nil - case "sourcehub.bulletin.MsgUpdateRingPostByAcp._pss_interval": - if x.PssInterval != nil { - return x.Descriptor().Fields().ByName("pss_interval") - } - return nil - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgUpdateRingPostByAcp", d.FullName())) - } -} - -// 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_MsgUpdateRingPostByAcp) 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_MsgUpdateRingPostByAcp) 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_MsgUpdateRingPostByAcp) 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_MsgUpdateRingPostByAcp) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateRingPostByAcp) - 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.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PostId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.NewPeerIds) > 0 { - for _, s := range x.NewPeerIds { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.NewThreshold != nil { - n += 1 + runtime.Sov(uint64(*x.NewThreshold)) - } - if x.PssInterval != nil { - n += 1 + runtime.Sov(uint64(*x.PssInterval)) - } - 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().(*MsgUpdateRingPostByAcp) - 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.PssInterval != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) - i-- - dAtA[i] = 0x38 - } - if x.NewThreshold != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) - i-- - dAtA[i] = 0x30 - } - if len(x.NewPeerIds) > 0 { - for iNdEx := len(x.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.NewPeerIds[iNdEx]) - copy(dAtA[i:], x.NewPeerIds[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewPeerIds[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x22 - } - if len(x.PostId) > 0 { - i -= len(x.PostId) - copy(dAtA[i:], x.PostId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PostId))) - i-- - dAtA[i] = 0x1a - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - 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().(*MsgUpdateRingPostByAcp) - 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: MsgUpdateRingPostByAcp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRingPostByAcp: 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 Creator", 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.Creator = 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 Namespace", 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.Namespace = 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 PostId", 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.PostId = 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 Artifact", 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.Artifact = 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 NewPeerIds", 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.NewPeerIds = append(x.NewPeerIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.NewThreshold = &v - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) - } - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.PssInterval = &v - 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_MsgUpdateRingPostByAcpResponse protoreflect.MessageDescriptor -) - -func init() { - file_sourcehub_bulletin_tx_proto_init() - md_MsgUpdateRingPostByAcpResponse = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgUpdateRingPostByAcpResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateRingPostByAcpResponse)(nil) - -type fastReflection_MsgUpdateRingPostByAcpResponse MsgUpdateRingPostByAcpResponse - -func (x *MsgUpdateRingPostByAcpResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateRingPostByAcpResponse)(x) -} - -func (x *MsgUpdateRingPostByAcpResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_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_MsgUpdateRingPostByAcpResponse_messageType fastReflection_MsgUpdateRingPostByAcpResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateRingPostByAcpResponse_messageType{} - -type fastReflection_MsgUpdateRingPostByAcpResponse_messageType struct{} - -func (x fastReflection_MsgUpdateRingPostByAcpResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateRingPostByAcpResponse)(nil) -} -func (x fastReflection_MsgUpdateRingPostByAcpResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingPostByAcpResponse) -} -func (x fastReflection_MsgUpdateRingPostByAcpResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingPostByAcpResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateRingPostByAcpResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingPostByAcpResponse -} - -// 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_MsgUpdateRingPostByAcpResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateRingPostByAcpResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateRingPostByAcpResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingPostByAcpResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateRingPostByAcpResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateRingPostByAcpResponse)(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_MsgUpdateRingPostByAcpResponse) 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_MsgUpdateRingPostByAcpResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcpResponse 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_MsgUpdateRingPostByAcpResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcpResponse 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_MsgUpdateRingPostByAcpResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcpResponse 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_MsgUpdateRingPostByAcpResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcpResponse 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_MsgUpdateRingPostByAcpResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcpResponse 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_MsgUpdateRingPostByAcpResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByAcpResponse 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_MsgUpdateRingPostByAcpResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgUpdateRingPostByAcpResponse", 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_MsgUpdateRingPostByAcpResponse) 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_MsgUpdateRingPostByAcpResponse) 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_MsgUpdateRingPostByAcpResponse) 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_MsgUpdateRingPostByAcpResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateRingPostByAcpResponse) - 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().(*MsgUpdateRingPostByAcpResponse) - 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().(*MsgUpdateRingPostByAcpResponse) - 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: MsgUpdateRingPostByAcpResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRingPostByAcpResponse: 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_MsgUpdateRingPostByThresholdSignature protoreflect.MessageDescriptor - fd_MsgUpdateRingPostByThresholdSignature_creator protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByThresholdSignature_namespace protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByThresholdSignature_post_id protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByThresholdSignature_artifact protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByThresholdSignature_signature_scheme protoreflect.FieldDescriptor - fd_MsgUpdateRingPostByThresholdSignature_signature protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_bulletin_tx_proto_init() - md_MsgUpdateRingPostByThresholdSignature = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgUpdateRingPostByThresholdSignature") - fd_MsgUpdateRingPostByThresholdSignature_creator = md_MsgUpdateRingPostByThresholdSignature.Fields().ByName("creator") - fd_MsgUpdateRingPostByThresholdSignature_namespace = md_MsgUpdateRingPostByThresholdSignature.Fields().ByName("namespace") - fd_MsgUpdateRingPostByThresholdSignature_post_id = md_MsgUpdateRingPostByThresholdSignature.Fields().ByName("post_id") - fd_MsgUpdateRingPostByThresholdSignature_artifact = md_MsgUpdateRingPostByThresholdSignature.Fields().ByName("artifact") - fd_MsgUpdateRingPostByThresholdSignature_signature_scheme = md_MsgUpdateRingPostByThresholdSignature.Fields().ByName("signature_scheme") - fd_MsgUpdateRingPostByThresholdSignature_signature = md_MsgUpdateRingPostByThresholdSignature.Fields().ByName("signature") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateRingPostByThresholdSignature)(nil) - -type fastReflection_MsgUpdateRingPostByThresholdSignature MsgUpdateRingPostByThresholdSignature - -func (x *MsgUpdateRingPostByThresholdSignature) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateRingPostByThresholdSignature)(x) -} - -func (x *MsgUpdateRingPostByThresholdSignature) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_tx_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_MsgUpdateRingPostByThresholdSignature_messageType fastReflection_MsgUpdateRingPostByThresholdSignature_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateRingPostByThresholdSignature_messageType{} - -type fastReflection_MsgUpdateRingPostByThresholdSignature_messageType struct{} - -func (x fastReflection_MsgUpdateRingPostByThresholdSignature_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateRingPostByThresholdSignature)(nil) -} -func (x fastReflection_MsgUpdateRingPostByThresholdSignature_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingPostByThresholdSignature) -} -func (x fastReflection_MsgUpdateRingPostByThresholdSignature_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingPostByThresholdSignature -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateRingPostByThresholdSignature) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingPostByThresholdSignature -} - -// 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_MsgUpdateRingPostByThresholdSignature) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateRingPostByThresholdSignature_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateRingPostByThresholdSignature) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingPostByThresholdSignature) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateRingPostByThresholdSignature) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateRingPostByThresholdSignature)(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_MsgUpdateRingPostByThresholdSignature) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgUpdateRingPostByThresholdSignature_creator, value) { - return - } - } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_MsgUpdateRingPostByThresholdSignature_namespace, value) { - return - } - } - if x.PostId != "" { - value := protoreflect.ValueOfString(x.PostId) - if !f(fd_MsgUpdateRingPostByThresholdSignature_post_id, value) { - return - } - } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_MsgUpdateRingPostByThresholdSignature_artifact, value) { - return - } - } - if x.SignatureScheme != "" { - value := protoreflect.ValueOfString(x.SignatureScheme) - if !f(fd_MsgUpdateRingPostByThresholdSignature_signature_scheme, value) { - return - } - } - if len(x.Signature) != 0 { - value := protoreflect.ValueOfBytes(x.Signature) - if !f(fd_MsgUpdateRingPostByThresholdSignature_signature, 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_MsgUpdateRingPostByThresholdSignature) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.creator": - return x.Creator != "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.namespace": - return x.Namespace != "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.post_id": - return x.PostId != "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.artifact": - return x.Artifact != "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature_scheme": - return x.SignatureScheme != "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature": - return len(x.Signature) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature 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_MsgUpdateRingPostByThresholdSignature) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.creator": - x.Creator = "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.namespace": - x.Namespace = "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.post_id": - x.PostId = "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.artifact": - x.Artifact = "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature_scheme": - x.SignatureScheme = "" - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature": - x.Signature = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature 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_MsgUpdateRingPostByThresholdSignature) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.post_id": - value := x.PostId - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature_scheme": - value := x.SignatureScheme - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature": - value := x.Signature - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature 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_MsgUpdateRingPostByThresholdSignature) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.creator": - x.Creator = value.Interface().(string) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.namespace": - x.Namespace = value.Interface().(string) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.post_id": - x.PostId = value.Interface().(string) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.artifact": - x.Artifact = value.Interface().(string) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature_scheme": - x.SignatureScheme = value.Interface().(string) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature": - x.Signature = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature 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_MsgUpdateRingPostByThresholdSignature) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.creator": - panic(fmt.Errorf("field creator of message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.post_id": - panic(fmt.Errorf("field post_id of message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature_scheme": - panic(fmt.Errorf("field signature_scheme of message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature is not mutable")) - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature": - panic(fmt.Errorf("field signature of message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature 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_MsgUpdateRingPostByThresholdSignature) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.creator": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.namespace": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.post_id": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.artifact": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature_scheme": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature.signature": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature 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_MsgUpdateRingPostByThresholdSignature) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature", 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_MsgUpdateRingPostByThresholdSignature) 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_MsgUpdateRingPostByThresholdSignature) 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_MsgUpdateRingPostByThresholdSignature) 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_MsgUpdateRingPostByThresholdSignature) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateRingPostByThresholdSignature) - 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.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PostId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SignatureScheme) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Signature) - 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().(*MsgUpdateRingPostByThresholdSignature) - 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.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x32 - } - if len(x.SignatureScheme) > 0 { - i -= len(x.SignatureScheme) - copy(dAtA[i:], x.SignatureScheme) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignatureScheme))) - i-- - dAtA[i] = 0x2a - } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x22 - } - if len(x.PostId) > 0 { - i -= len(x.PostId) - copy(dAtA[i:], x.PostId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PostId))) - i-- - dAtA[i] = 0x1a - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - 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().(*MsgUpdateRingPostByThresholdSignature) - 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: MsgUpdateRingPostByThresholdSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRingPostByThresholdSignature: 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 Creator", 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.Creator = 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 Namespace", 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.Namespace = 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 PostId", 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.PostId = 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 Artifact", 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.Artifact = 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 SignatureScheme", 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.SignatureScheme = 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 Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) - if x.Signature == nil { - x.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateRingPostByThresholdSignatureResponse protoreflect.MessageDescriptor -) - -func init() { - file_sourcehub_bulletin_tx_proto_init() - md_MsgUpdateRingPostByThresholdSignatureResponse = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgUpdateRingPostByThresholdSignatureResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateRingPostByThresholdSignatureResponse)(nil) - -type fastReflection_MsgUpdateRingPostByThresholdSignatureResponse MsgUpdateRingPostByThresholdSignatureResponse - -func (x *MsgUpdateRingPostByThresholdSignatureResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateRingPostByThresholdSignatureResponse)(x) -} - -func (x *MsgUpdateRingPostByThresholdSignatureResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_tx_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_MsgUpdateRingPostByThresholdSignatureResponse_messageType fastReflection_MsgUpdateRingPostByThresholdSignatureResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateRingPostByThresholdSignatureResponse_messageType{} - -type fastReflection_MsgUpdateRingPostByThresholdSignatureResponse_messageType struct{} - -func (x fastReflection_MsgUpdateRingPostByThresholdSignatureResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateRingPostByThresholdSignatureResponse)(nil) -} -func (x fastReflection_MsgUpdateRingPostByThresholdSignatureResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingPostByThresholdSignatureResponse) -} -func (x fastReflection_MsgUpdateRingPostByThresholdSignatureResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingPostByThresholdSignatureResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateRingPostByThresholdSignatureResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingPostByThresholdSignatureResponse -} - -// 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_MsgUpdateRingPostByThresholdSignatureResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateRingPostByThresholdSignatureResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateRingPostByThresholdSignatureResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingPostByThresholdSignatureResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateRingPostByThresholdSignatureResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateRingPostByThresholdSignatureResponse)(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_MsgUpdateRingPostByThresholdSignatureResponse) 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_MsgUpdateRingPostByThresholdSignatureResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse 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_MsgUpdateRingPostByThresholdSignatureResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse 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_MsgUpdateRingPostByThresholdSignatureResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse 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_MsgUpdateRingPostByThresholdSignatureResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse 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_MsgUpdateRingPostByThresholdSignatureResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse 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_MsgUpdateRingPostByThresholdSignatureResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse 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_MsgUpdateRingPostByThresholdSignatureResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse", 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_MsgUpdateRingPostByThresholdSignatureResponse) 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_MsgUpdateRingPostByThresholdSignatureResponse) 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_MsgUpdateRingPostByThresholdSignatureResponse) 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_MsgUpdateRingPostByThresholdSignatureResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateRingPostByThresholdSignatureResponse) - 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().(*MsgUpdateRingPostByThresholdSignatureResponse) - 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().(*MsgUpdateRingPostByThresholdSignatureResponse) - 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: MsgUpdateRingPostByThresholdSignatureResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRingPostByThresholdSignatureResponse: 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_RingReshareFinalizeSignDoc protoreflect.MessageDescriptor - fd_RingReshareFinalizeSignDoc_domain protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_chain_id protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_namespace protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_post_id protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_ring_pk protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_current_payload_sha256 protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_finalized_payload_sha256 protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_block_number_nonce protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_bulletin_tx_proto_init() - md_RingReshareFinalizeSignDoc = File_sourcehub_bulletin_tx_proto.Messages().ByName("RingReshareFinalizeSignDoc") - fd_RingReshareFinalizeSignDoc_domain = md_RingReshareFinalizeSignDoc.Fields().ByName("domain") - fd_RingReshareFinalizeSignDoc_chain_id = md_RingReshareFinalizeSignDoc.Fields().ByName("chain_id") - fd_RingReshareFinalizeSignDoc_namespace = md_RingReshareFinalizeSignDoc.Fields().ByName("namespace") - fd_RingReshareFinalizeSignDoc_post_id = md_RingReshareFinalizeSignDoc.Fields().ByName("post_id") - fd_RingReshareFinalizeSignDoc_ring_pk = md_RingReshareFinalizeSignDoc.Fields().ByName("ring_pk") - fd_RingReshareFinalizeSignDoc_current_payload_sha256 = md_RingReshareFinalizeSignDoc.Fields().ByName("current_payload_sha256") - fd_RingReshareFinalizeSignDoc_finalized_payload_sha256 = md_RingReshareFinalizeSignDoc.Fields().ByName("finalized_payload_sha256") - fd_RingReshareFinalizeSignDoc_block_number_nonce = md_RingReshareFinalizeSignDoc.Fields().ByName("block_number_nonce") -} - -var _ protoreflect.Message = (*fastReflection_RingReshareFinalizeSignDoc)(nil) - -type fastReflection_RingReshareFinalizeSignDoc RingReshareFinalizeSignDoc - -func (x *RingReshareFinalizeSignDoc) ProtoReflect() protoreflect.Message { - return (*fastReflection_RingReshareFinalizeSignDoc)(x) -} - -func (x *RingReshareFinalizeSignDoc) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_tx_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_RingReshareFinalizeSignDoc_messageType fastReflection_RingReshareFinalizeSignDoc_messageType -var _ protoreflect.MessageType = fastReflection_RingReshareFinalizeSignDoc_messageType{} - -type fastReflection_RingReshareFinalizeSignDoc_messageType struct{} - -func (x fastReflection_RingReshareFinalizeSignDoc_messageType) Zero() protoreflect.Message { - return (*fastReflection_RingReshareFinalizeSignDoc)(nil) -} -func (x fastReflection_RingReshareFinalizeSignDoc_messageType) New() protoreflect.Message { - return new(fastReflection_RingReshareFinalizeSignDoc) -} -func (x fastReflection_RingReshareFinalizeSignDoc_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RingReshareFinalizeSignDoc -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RingReshareFinalizeSignDoc) Descriptor() protoreflect.MessageDescriptor { - return md_RingReshareFinalizeSignDoc -} - -// 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_RingReshareFinalizeSignDoc) Type() protoreflect.MessageType { - return _fastReflection_RingReshareFinalizeSignDoc_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RingReshareFinalizeSignDoc) New() protoreflect.Message { - return new(fastReflection_RingReshareFinalizeSignDoc) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RingReshareFinalizeSignDoc) Interface() protoreflect.ProtoMessage { - return (*RingReshareFinalizeSignDoc)(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_RingReshareFinalizeSignDoc) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Domain != "" { - value := protoreflect.ValueOfString(x.Domain) - if !f(fd_RingReshareFinalizeSignDoc_domain, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_RingReshareFinalizeSignDoc_chain_id, value) { - return - } - } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_RingReshareFinalizeSignDoc_namespace, value) { - return - } - } - if x.PostId != "" { - value := protoreflect.ValueOfString(x.PostId) - if !f(fd_RingReshareFinalizeSignDoc_post_id, value) { - return - } - } - if x.RingPk != "" { - value := protoreflect.ValueOfString(x.RingPk) - if !f(fd_RingReshareFinalizeSignDoc_ring_pk, value) { - return - } - } - if len(x.CurrentPayloadSha256) != 0 { - value := protoreflect.ValueOfBytes(x.CurrentPayloadSha256) - if !f(fd_RingReshareFinalizeSignDoc_current_payload_sha256, value) { - return - } - } - if len(x.FinalizedPayloadSha256) != 0 { - value := protoreflect.ValueOfBytes(x.FinalizedPayloadSha256) - if !f(fd_RingReshareFinalizeSignDoc_finalized_payload_sha256, value) { - return - } - } - if x.BlockNumberNonce != uint64(0) { - value := protoreflect.ValueOfUint64(x.BlockNumberNonce) - if !f(fd_RingReshareFinalizeSignDoc_block_number_nonce, 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_RingReshareFinalizeSignDoc) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.domain": - return x.Domain != "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.chain_id": - return x.ChainId != "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.namespace": - return x.Namespace != "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.post_id": - return x.PostId != "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.ring_pk": - return x.RingPk != "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.current_payload_sha256": - return len(x.CurrentPayloadSha256) != 0 - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.finalized_payload_sha256": - return len(x.FinalizedPayloadSha256) != 0 - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.block_number_nonce": - return x.BlockNumberNonce != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.bulletin.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.domain": - x.Domain = "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.chain_id": - x.ChainId = "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.namespace": - x.Namespace = "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.post_id": - x.PostId = "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.ring_pk": - x.RingPk = "" - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.current_payload_sha256": - x.CurrentPayloadSha256 = nil - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.finalized_payload_sha256": - x.FinalizedPayloadSha256 = nil - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.block_number_nonce": - x.BlockNumberNonce = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.bulletin.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.domain": - value := x.Domain - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.post_id": - value := x.PostId - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.ring_pk": - value := x.RingPk - return protoreflect.ValueOfString(value) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.current_payload_sha256": - value := x.CurrentPayloadSha256 - return protoreflect.ValueOfBytes(value) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.finalized_payload_sha256": - value := x.FinalizedPayloadSha256 - return protoreflect.ValueOfBytes(value) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.block_number_nonce": - value := x.BlockNumberNonce - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.bulletin.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.domain": - x.Domain = value.Interface().(string) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.chain_id": - x.ChainId = value.Interface().(string) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.namespace": - x.Namespace = value.Interface().(string) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.post_id": - x.PostId = value.Interface().(string) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.ring_pk": - x.RingPk = value.Interface().(string) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.current_payload_sha256": - x.CurrentPayloadSha256 = value.Bytes() - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.finalized_payload_sha256": - x.FinalizedPayloadSha256 = value.Bytes() - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.block_number_nonce": - x.BlockNumberNonce = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.bulletin.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.domain": - panic(fmt.Errorf("field domain of message sourcehub.bulletin.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.chain_id": - panic(fmt.Errorf("field chain_id of message sourcehub.bulletin.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.bulletin.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.post_id": - panic(fmt.Errorf("field post_id of message sourcehub.bulletin.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.ring_pk": - panic(fmt.Errorf("field ring_pk of message sourcehub.bulletin.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.current_payload_sha256": - panic(fmt.Errorf("field current_payload_sha256 of message sourcehub.bulletin.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.finalized_payload_sha256": - panic(fmt.Errorf("field finalized_payload_sha256 of message sourcehub.bulletin.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.block_number_nonce": - panic(fmt.Errorf("field block_number_nonce of message sourcehub.bulletin.RingReshareFinalizeSignDoc is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.bulletin.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.domain": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.chain_id": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.namespace": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.post_id": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.ring_pk": - return protoreflect.ValueOfString("") - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.current_payload_sha256": - return protoreflect.ValueOfBytes(nil) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.finalized_payload_sha256": - return protoreflect.ValueOfBytes(nil) - case "sourcehub.bulletin.RingReshareFinalizeSignDoc.block_number_nonce": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.bulletin.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.RingReshareFinalizeSignDoc", 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_RingReshareFinalizeSignDoc) 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_RingReshareFinalizeSignDoc) 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_RingReshareFinalizeSignDoc) 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_RingReshareFinalizeSignDoc) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RingReshareFinalizeSignDoc) - 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.Domain) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PostId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingPk) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CurrentPayloadSha256) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.FinalizedPayloadSha256) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.BlockNumberNonce != 0 { - n += 1 + runtime.Sov(uint64(x.BlockNumberNonce)) - } - 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().(*RingReshareFinalizeSignDoc) - 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.BlockNumberNonce != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockNumberNonce)) - i-- - dAtA[i] = 0x40 - } - if len(x.FinalizedPayloadSha256) > 0 { - i -= len(x.FinalizedPayloadSha256) - copy(dAtA[i:], x.FinalizedPayloadSha256) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FinalizedPayloadSha256))) - i-- - dAtA[i] = 0x3a - } - if len(x.CurrentPayloadSha256) > 0 { - i -= len(x.CurrentPayloadSha256) - copy(dAtA[i:], x.CurrentPayloadSha256) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CurrentPayloadSha256))) - i-- - dAtA[i] = 0x32 - } - if len(x.RingPk) > 0 { - i -= len(x.RingPk) - copy(dAtA[i:], x.RingPk) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingPk))) - i-- - dAtA[i] = 0x2a - } - if len(x.PostId) > 0 { - i -= len(x.PostId) - copy(dAtA[i:], x.PostId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PostId))) - i-- - dAtA[i] = 0x22 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Domain) > 0 { - i -= len(x.Domain) - copy(dAtA[i:], x.Domain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Domain))) - 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().(*RingReshareFinalizeSignDoc) - 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: RingReshareFinalizeSignDoc: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RingReshareFinalizeSignDoc: 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 Domain", 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.Domain = 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 ChainId", 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.ChainId = 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 Namespace", 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.Namespace = 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 PostId", 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.PostId = 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 RingPk", 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.RingPk = 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 CurrentPayloadSha256", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CurrentPayloadSha256 = append(x.CurrentPayloadSha256[:0], dAtA[iNdEx:postIndex]...) - if x.CurrentPayloadSha256 == nil { - x.CurrentPayloadSha256 = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FinalizedPayloadSha256", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.FinalizedPayloadSha256 = append(x.FinalizedPayloadSha256[:0], dAtA[iNdEx:postIndex]...) - if x.FinalizedPayloadSha256 == nil { - x.FinalizedPayloadSha256 = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) - } - x.BlockNumberNonce = 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.BlockNumberNonce |= 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_MsgRegisterNamespace protoreflect.MessageDescriptor fd_MsgRegisterNamespace_creator protoreflect.FieldDescriptor @@ -5022,7 +1863,7 @@ func (x *MsgRegisterNamespace) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterNamespace) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[9] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5504,7 +2345,7 @@ func (x *MsgRegisterNamespaceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterNamespaceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[10] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5943,7 +2784,7 @@ func (x *MsgAddCollaborator) ProtoReflect() protoreflect.Message { } func (x *MsgAddCollaborator) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[11] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6487,7 +3328,7 @@ func (x *MsgAddCollaboratorResponse) ProtoReflect() protoreflect.Message { } func (x *MsgAddCollaboratorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[12] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6911,7 +3752,7 @@ func (x *MsgRemoveCollaborator) ProtoReflect() protoreflect.Message { } func (x *MsgRemoveCollaborator) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[13] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7455,7 +4296,7 @@ func (x *MsgRemoveCollaboratorResponse) ProtoReflect() protoreflect.Message { } func (x *MsgRemoveCollaboratorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[14] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7855,477 +4696,176 @@ func (x *fastReflection_MsgRemoveCollaboratorResponse) ProtoMethods() *protoifac } } -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: sourcehub/bulletin/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. -type MsgUpdateParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // 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_sourcehub_bulletin_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_sourcehub_bulletin_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. -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_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_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{1} -} - -type MsgCreatePost struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` - Artifact string `protobuf:"bytes,5,opt,name=artifact,proto3" json:"artifact,omitempty"` -} - -func (x *MsgCreatePost) Reset() { - *x = MsgCreatePost{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreatePost) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreatePost) ProtoMessage() {} - -// Deprecated: Use MsgCreatePost.ProtoReflect.Descriptor instead. -func (*MsgCreatePost) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgCreatePost) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgCreatePost) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *MsgCreatePost) GetPayload() []byte { - if x != nil { - return x.Payload - } - return nil -} - -func (x *MsgCreatePost) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - -type MsgCreatePostResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgCreatePostResponse) Reset() { - *x = MsgCreatePostResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreatePostResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreatePostResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreatePostResponse.ProtoReflect.Descriptor instead. -func (*MsgCreatePostResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{3} -} - -type MsgUpdateRingPostByAcp struct { +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: sourcehub/bulletin/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. +type MsgUpdateParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - PostId string `protobuf:"bytes,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` - NewPeerIds []string `protobuf:"bytes,5,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - NewThreshold *uint32 `protobuf:"varint,6,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` - PssInterval *uint64 `protobuf:"varint,7,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` } -func (x *MsgUpdateRingPostByAcp) Reset() { - *x = MsgUpdateRingPostByAcp{} +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[4] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgUpdateRingPostByAcp) String() string { +func (x *MsgUpdateParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgUpdateRingPostByAcp) ProtoMessage() {} - -// Deprecated: Use MsgUpdateRingPostByAcp.ProtoReflect.Descriptor instead. -func (*MsgUpdateRingPostByAcp) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgUpdateRingPostByAcp) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgUpdateRingPostByAcp) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} +func (*MsgUpdateParams) ProtoMessage() {} -func (x *MsgUpdateRingPostByAcp) GetPostId() string { - if x != nil { - return x.PostId - } - return "" +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{0} } -func (x *MsgUpdateRingPostByAcp) GetArtifact() string { +func (x *MsgUpdateParams) GetAuthority() string { if x != nil { - return x.Artifact + return x.Authority } return "" } -func (x *MsgUpdateRingPostByAcp) GetNewPeerIds() []string { +func (x *MsgUpdateParams) GetParams() *Params { if x != nil { - return x.NewPeerIds + return x.Params } return nil } -func (x *MsgUpdateRingPostByAcp) GetNewThreshold() uint32 { - if x != nil && x.NewThreshold != nil { - return *x.NewThreshold - } - return 0 -} - -func (x *MsgUpdateRingPostByAcp) GetPssInterval() uint64 { - if x != nil && x.PssInterval != nil { - return *x.PssInterval - } - return 0 -} - -type MsgUpdateRingPostByAcpResponse struct { +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgUpdateRingPostByAcpResponse) Reset() { - *x = MsgUpdateRingPostByAcpResponse{} +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[5] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgUpdateRingPostByAcpResponse) String() string { +func (x *MsgUpdateParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgUpdateRingPostByAcpResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) ProtoMessage() {} -// Deprecated: Use MsgUpdateRingPostByAcpResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateRingPostByAcpResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{5} +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{1} } -type MsgUpdateRingPostByThresholdSignature struct { +type MsgCreatePost struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - PostId string `protobuf:"bytes,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` - SignatureScheme string `protobuf:"bytes,5,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` - Signature []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + Artifact string `protobuf:"bytes,5,opt,name=artifact,proto3" json:"artifact,omitempty"` } -func (x *MsgUpdateRingPostByThresholdSignature) Reset() { - *x = MsgUpdateRingPostByThresholdSignature{} +func (x *MsgCreatePost) Reset() { + *x = MsgCreatePost{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[6] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgUpdateRingPostByThresholdSignature) String() string { +func (x *MsgCreatePost) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgUpdateRingPostByThresholdSignature) ProtoMessage() {} +func (*MsgCreatePost) ProtoMessage() {} -// Deprecated: Use MsgUpdateRingPostByThresholdSignature.ProtoReflect.Descriptor instead. -func (*MsgUpdateRingPostByThresholdSignature) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{6} +// Deprecated: Use MsgCreatePost.ProtoReflect.Descriptor instead. +func (*MsgCreatePost) Descriptor() ([]byte, []int) { + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{2} } -func (x *MsgUpdateRingPostByThresholdSignature) GetCreator() string { +func (x *MsgCreatePost) GetCreator() string { if x != nil { return x.Creator } return "" } -func (x *MsgUpdateRingPostByThresholdSignature) GetNamespace() string { +func (x *MsgCreatePost) GetNamespace() string { if x != nil { return x.Namespace } return "" } -func (x *MsgUpdateRingPostByThresholdSignature) GetPostId() string { +func (x *MsgCreatePost) GetPayload() []byte { if x != nil { - return x.PostId + return x.Payload } - return "" + return nil } -func (x *MsgUpdateRingPostByThresholdSignature) GetArtifact() string { +func (x *MsgCreatePost) GetArtifact() string { if x != nil { return x.Artifact } return "" } -func (x *MsgUpdateRingPostByThresholdSignature) GetSignatureScheme() string { - if x != nil { - return x.SignatureScheme - } - return "" -} - -func (x *MsgUpdateRingPostByThresholdSignature) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type MsgUpdateRingPostByThresholdSignatureResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateRingPostByThresholdSignatureResponse) Reset() { - *x = MsgUpdateRingPostByThresholdSignatureResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateRingPostByThresholdSignatureResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateRingPostByThresholdSignatureResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateRingPostByThresholdSignatureResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateRingPostByThresholdSignatureResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{7} -} - -type RingReshareFinalizeSignDoc struct { +type MsgCreatePostResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` - PostId string `protobuf:"bytes,4,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` - RingPk string `protobuf:"bytes,5,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - CurrentPayloadSha256 []byte `protobuf:"bytes,6,opt,name=current_payload_sha256,json=currentPayloadSha256,proto3" json:"current_payload_sha256,omitempty"` - FinalizedPayloadSha256 []byte `protobuf:"bytes,7,opt,name=finalized_payload_sha256,json=finalizedPayloadSha256,proto3" json:"finalized_payload_sha256,omitempty"` - BlockNumberNonce uint64 `protobuf:"varint,8,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` } -func (x *RingReshareFinalizeSignDoc) Reset() { - *x = RingReshareFinalizeSignDoc{} +func (x *MsgCreatePostResponse) Reset() { + *x = MsgCreatePostResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[8] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RingReshareFinalizeSignDoc) String() string { +func (x *MsgCreatePostResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RingReshareFinalizeSignDoc) ProtoMessage() {} - -// Deprecated: Use RingReshareFinalizeSignDoc.ProtoReflect.Descriptor instead. -func (*RingReshareFinalizeSignDoc) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *RingReshareFinalizeSignDoc) GetDomain() string { - if x != nil { - return x.Domain - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetPostId() string { - if x != nil { - return x.PostId - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetRingPk() string { - if x != nil { - return x.RingPk - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetCurrentPayloadSha256() []byte { - if x != nil { - return x.CurrentPayloadSha256 - } - return nil -} - -func (x *RingReshareFinalizeSignDoc) GetFinalizedPayloadSha256() []byte { - if x != nil { - return x.FinalizedPayloadSha256 - } - return nil -} +func (*MsgCreatePostResponse) ProtoMessage() {} -func (x *RingReshareFinalizeSignDoc) GetBlockNumberNonce() uint64 { - if x != nil { - return x.BlockNumberNonce - } - return 0 +// Deprecated: Use MsgCreatePostResponse.ProtoReflect.Descriptor instead. +func (*MsgCreatePostResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{3} } type MsgRegisterNamespace struct { @@ -8340,7 +4880,7 @@ type MsgRegisterNamespace struct { func (x *MsgRegisterNamespace) Reset() { *x = MsgRegisterNamespace{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[9] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8354,7 +4894,7 @@ func (*MsgRegisterNamespace) ProtoMessage() {} // Deprecated: Use MsgRegisterNamespace.ProtoReflect.Descriptor instead. func (*MsgRegisterNamespace) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{9} + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgRegisterNamespace) GetCreator() string { @@ -8382,7 +4922,7 @@ type MsgRegisterNamespaceResponse struct { func (x *MsgRegisterNamespaceResponse) Reset() { *x = MsgRegisterNamespaceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[10] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8396,7 +4936,7 @@ func (*MsgRegisterNamespaceResponse) ProtoMessage() {} // Deprecated: Use MsgRegisterNamespaceResponse.ProtoReflect.Descriptor instead. func (*MsgRegisterNamespaceResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{10} + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{5} } func (x *MsgRegisterNamespaceResponse) GetNamespace() *Namespace { @@ -8419,7 +4959,7 @@ type MsgAddCollaborator struct { func (x *MsgAddCollaborator) Reset() { *x = MsgAddCollaborator{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[11] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8433,7 +4973,7 @@ func (*MsgAddCollaborator) ProtoMessage() {} // Deprecated: Use MsgAddCollaborator.ProtoReflect.Descriptor instead. func (*MsgAddCollaborator) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{11} + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgAddCollaborator) GetCreator() string { @@ -8468,7 +5008,7 @@ type MsgAddCollaboratorResponse struct { func (x *MsgAddCollaboratorResponse) Reset() { *x = MsgAddCollaboratorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[12] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8482,7 +5022,7 @@ func (*MsgAddCollaboratorResponse) ProtoMessage() {} // Deprecated: Use MsgAddCollaboratorResponse.ProtoReflect.Descriptor instead. func (*MsgAddCollaboratorResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{12} + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{7} } func (x *MsgAddCollaboratorResponse) GetCollaboratorDid() string { @@ -8505,7 +5045,7 @@ type MsgRemoveCollaborator struct { func (x *MsgRemoveCollaborator) Reset() { *x = MsgRemoveCollaborator{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[13] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8519,7 +5059,7 @@ func (*MsgRemoveCollaborator) ProtoMessage() {} // Deprecated: Use MsgRemoveCollaborator.ProtoReflect.Descriptor instead. func (*MsgRemoveCollaborator) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{13} + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgRemoveCollaborator) GetCreator() string { @@ -8554,7 +5094,7 @@ type MsgRemoveCollaboratorResponse struct { func (x *MsgRemoveCollaboratorResponse) Reset() { *x = MsgRemoveCollaboratorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_bulletin_tx_proto_msgTypes[14] + mi := &file_sourcehub_bulletin_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8568,7 +5108,7 @@ func (*MsgRemoveCollaboratorResponse) ProtoMessage() {} // Deprecated: Use MsgRemoveCollaboratorResponse.ProtoReflect.Descriptor instead. func (*MsgRemoveCollaboratorResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{14} + return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{9} } func (x *MsgRemoveCollaboratorResponse) GetCollaboratorDid() string { @@ -8589,11 +5129,11 @@ var file_sourcehub_bulletin_tx_proto_rawDesc = []byte{ 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, - 0x69, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, - 0x74, 0x69, 0x6e, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x69, 0x6e, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, + 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 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, @@ -8618,166 +5158,90 @@ var file_sourcehub_bulletin_tx_proto_rawDesc = []byte{ 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x02, 0x0a, 0x16, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x42, - 0x79, 0x41, 0x63, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, - 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, - 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, - 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x65, - 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, - 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x88, 0x01, 0x01, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x79, 0x41, 0x63, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xeb, 0x01, 0x0a, 0x25, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x79, - 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, - 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, - 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, - 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x2f, 0x0a, 0x2d, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x79, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, 0x02, 0x0a, 0x1a, 0x52, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, - 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, - 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x73, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, - 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x6b, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x68, 0x61, - 0x32, 0x35, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, - 0x38, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x16, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x5c, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x5b, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x22, 0x7e, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, - 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, - 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, - 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x15, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x22, 0x0a, - 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, - 0x4a, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, - 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, - 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x32, 0xb6, 0x06, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x12, 0x60, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, - 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x0a, 0x14, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x5b, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x22, 0x7e, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, + 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, + 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, + 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, + 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x22, 0x81, 0x01, + 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, + 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x22, 0x4a, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, + 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, + 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x32, 0x9a, 0x04, + 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x60, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 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, 0x5a, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 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, 0x5a, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, - 0x6f, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, - 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x75, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x50, - 0x6f, 0x73, 0x74, 0x42, 0x79, 0x41, 0x63, 0x70, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x42, - 0x79, 0x41, 0x63, 0x70, 0x1a, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x79, 0x41, 0x63, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x22, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x79, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, - 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, - 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, - 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x41, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, - 0x74, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, - 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, + 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x1a, 0x30, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x1a, 0x30, 0x2e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, - 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, - 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, - 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, - 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, - 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, - 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, - 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x31, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, - 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, - 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, - 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, - 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, - 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, + 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, + 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, + 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, + 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, + 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x72, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x1a, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, + 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, + 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x16, 0x63, + 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, + 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, + 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, + 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, + 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8792,45 +5256,36 @@ func file_sourcehub_bulletin_tx_proto_rawDescGZIP() []byte { return file_sourcehub_bulletin_tx_proto_rawDescData } -var file_sourcehub_bulletin_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_sourcehub_bulletin_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_sourcehub_bulletin_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: sourcehub.bulletin.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.bulletin.MsgUpdateParamsResponse - (*MsgCreatePost)(nil), // 2: sourcehub.bulletin.MsgCreatePost - (*MsgCreatePostResponse)(nil), // 3: sourcehub.bulletin.MsgCreatePostResponse - (*MsgUpdateRingPostByAcp)(nil), // 4: sourcehub.bulletin.MsgUpdateRingPostByAcp - (*MsgUpdateRingPostByAcpResponse)(nil), // 5: sourcehub.bulletin.MsgUpdateRingPostByAcpResponse - (*MsgUpdateRingPostByThresholdSignature)(nil), // 6: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature - (*MsgUpdateRingPostByThresholdSignatureResponse)(nil), // 7: sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse - (*RingReshareFinalizeSignDoc)(nil), // 8: sourcehub.bulletin.RingReshareFinalizeSignDoc - (*MsgRegisterNamespace)(nil), // 9: sourcehub.bulletin.MsgRegisterNamespace - (*MsgRegisterNamespaceResponse)(nil), // 10: sourcehub.bulletin.MsgRegisterNamespaceResponse - (*MsgAddCollaborator)(nil), // 11: sourcehub.bulletin.MsgAddCollaborator - (*MsgAddCollaboratorResponse)(nil), // 12: sourcehub.bulletin.MsgAddCollaboratorResponse - (*MsgRemoveCollaborator)(nil), // 13: sourcehub.bulletin.MsgRemoveCollaborator - (*MsgRemoveCollaboratorResponse)(nil), // 14: sourcehub.bulletin.MsgRemoveCollaboratorResponse - (*Params)(nil), // 15: sourcehub.bulletin.Params - (*Namespace)(nil), // 16: sourcehub.bulletin.Namespace + (*MsgUpdateParams)(nil), // 0: sourcehub.bulletin.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.bulletin.MsgUpdateParamsResponse + (*MsgCreatePost)(nil), // 2: sourcehub.bulletin.MsgCreatePost + (*MsgCreatePostResponse)(nil), // 3: sourcehub.bulletin.MsgCreatePostResponse + (*MsgRegisterNamespace)(nil), // 4: sourcehub.bulletin.MsgRegisterNamespace + (*MsgRegisterNamespaceResponse)(nil), // 5: sourcehub.bulletin.MsgRegisterNamespaceResponse + (*MsgAddCollaborator)(nil), // 6: sourcehub.bulletin.MsgAddCollaborator + (*MsgAddCollaboratorResponse)(nil), // 7: sourcehub.bulletin.MsgAddCollaboratorResponse + (*MsgRemoveCollaborator)(nil), // 8: sourcehub.bulletin.MsgRemoveCollaborator + (*MsgRemoveCollaboratorResponse)(nil), // 9: sourcehub.bulletin.MsgRemoveCollaboratorResponse + (*Params)(nil), // 10: sourcehub.bulletin.Params + (*Namespace)(nil), // 11: sourcehub.bulletin.Namespace } var file_sourcehub_bulletin_tx_proto_depIdxs = []int32{ - 15, // 0: sourcehub.bulletin.MsgUpdateParams.params:type_name -> sourcehub.bulletin.Params - 16, // 1: sourcehub.bulletin.MsgRegisterNamespaceResponse.namespace:type_name -> sourcehub.bulletin.Namespace + 10, // 0: sourcehub.bulletin.MsgUpdateParams.params:type_name -> sourcehub.bulletin.Params + 11, // 1: sourcehub.bulletin.MsgRegisterNamespaceResponse.namespace:type_name -> sourcehub.bulletin.Namespace 0, // 2: sourcehub.bulletin.Msg.UpdateParams:input_type -> sourcehub.bulletin.MsgUpdateParams 2, // 3: sourcehub.bulletin.Msg.CreatePost:input_type -> sourcehub.bulletin.MsgCreatePost - 4, // 4: sourcehub.bulletin.Msg.UpdateRingPostByAcp:input_type -> sourcehub.bulletin.MsgUpdateRingPostByAcp - 6, // 5: sourcehub.bulletin.Msg.UpdateRingPostByThresholdSignature:input_type -> sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature - 9, // 6: sourcehub.bulletin.Msg.RegisterNamespace:input_type -> sourcehub.bulletin.MsgRegisterNamespace - 11, // 7: sourcehub.bulletin.Msg.AddCollaborator:input_type -> sourcehub.bulletin.MsgAddCollaborator - 13, // 8: sourcehub.bulletin.Msg.RemoveCollaborator:input_type -> sourcehub.bulletin.MsgRemoveCollaborator - 1, // 9: sourcehub.bulletin.Msg.UpdateParams:output_type -> sourcehub.bulletin.MsgUpdateParamsResponse - 3, // 10: sourcehub.bulletin.Msg.CreatePost:output_type -> sourcehub.bulletin.MsgCreatePostResponse - 5, // 11: sourcehub.bulletin.Msg.UpdateRingPostByAcp:output_type -> sourcehub.bulletin.MsgUpdateRingPostByAcpResponse - 7, // 12: sourcehub.bulletin.Msg.UpdateRingPostByThresholdSignature:output_type -> sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse - 10, // 13: sourcehub.bulletin.Msg.RegisterNamespace:output_type -> sourcehub.bulletin.MsgRegisterNamespaceResponse - 12, // 14: sourcehub.bulletin.Msg.AddCollaborator:output_type -> sourcehub.bulletin.MsgAddCollaboratorResponse - 14, // 15: sourcehub.bulletin.Msg.RemoveCollaborator:output_type -> sourcehub.bulletin.MsgRemoveCollaboratorResponse - 9, // [9:16] is the sub-list for method output_type - 2, // [2:9] is the sub-list for method input_type + 4, // 4: sourcehub.bulletin.Msg.RegisterNamespace:input_type -> sourcehub.bulletin.MsgRegisterNamespace + 6, // 5: sourcehub.bulletin.Msg.AddCollaborator:input_type -> sourcehub.bulletin.MsgAddCollaborator + 8, // 6: sourcehub.bulletin.Msg.RemoveCollaborator:input_type -> sourcehub.bulletin.MsgRemoveCollaborator + 1, // 7: sourcehub.bulletin.Msg.UpdateParams:output_type -> sourcehub.bulletin.MsgUpdateParamsResponse + 3, // 8: sourcehub.bulletin.Msg.CreatePost:output_type -> sourcehub.bulletin.MsgCreatePostResponse + 5, // 9: sourcehub.bulletin.Msg.RegisterNamespace:output_type -> sourcehub.bulletin.MsgRegisterNamespaceResponse + 7, // 10: sourcehub.bulletin.Msg.AddCollaborator:output_type -> sourcehub.bulletin.MsgAddCollaboratorResponse + 9, // 11: sourcehub.bulletin.Msg.RemoveCollaborator:output_type -> sourcehub.bulletin.MsgRemoveCollaboratorResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] 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 @@ -8841,8 +5296,8 @@ func file_sourcehub_bulletin_tx_proto_init() { if File_sourcehub_bulletin_tx_proto != nil { return } - file_sourcehub_bulletin_params_proto_init() file_sourcehub_bulletin_namespace_proto_init() + file_sourcehub_bulletin_params_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { @@ -8893,66 +5348,6 @@ func file_sourcehub_bulletin_tx_proto_init() { } } file_sourcehub_bulletin_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateRingPostByAcp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_bulletin_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateRingPostByAcpResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_bulletin_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateRingPostByThresholdSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_bulletin_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateRingPostByThresholdSignatureResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_bulletin_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RingReshareFinalizeSignDoc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_bulletin_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterNamespace); i { case 0: return &v.state @@ -8964,7 +5359,7 @@ func file_sourcehub_bulletin_tx_proto_init() { return nil } } - file_sourcehub_bulletin_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_sourcehub_bulletin_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterNamespaceResponse); i { case 0: return &v.state @@ -8976,7 +5371,7 @@ func file_sourcehub_bulletin_tx_proto_init() { return nil } } - file_sourcehub_bulletin_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_sourcehub_bulletin_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAddCollaborator); i { case 0: return &v.state @@ -8988,7 +5383,7 @@ func file_sourcehub_bulletin_tx_proto_init() { return nil } } - file_sourcehub_bulletin_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_sourcehub_bulletin_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAddCollaboratorResponse); i { case 0: return &v.state @@ -9000,7 +5395,7 @@ func file_sourcehub_bulletin_tx_proto_init() { return nil } } - file_sourcehub_bulletin_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_sourcehub_bulletin_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveCollaborator); i { case 0: return &v.state @@ -9012,7 +5407,7 @@ func file_sourcehub_bulletin_tx_proto_init() { return nil } } - file_sourcehub_bulletin_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_sourcehub_bulletin_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveCollaboratorResponse); i { case 0: return &v.state @@ -9025,14 +5420,13 @@ func file_sourcehub_bulletin_tx_proto_init() { } } } - file_sourcehub_bulletin_tx_proto_msgTypes[4].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/sourcehub/bulletin/tx_grpc.pb.go b/api/sourcehub/bulletin/tx_grpc.pb.go index e7e165a1..c6dedd8d 100644 --- a/api/sourcehub/bulletin/tx_grpc.pb.go +++ b/api/sourcehub/bulletin/tx_grpc.pb.go @@ -19,13 +19,11 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Msg_UpdateParams_FullMethodName = "/sourcehub.bulletin.Msg/UpdateParams" - Msg_CreatePost_FullMethodName = "/sourcehub.bulletin.Msg/CreatePost" - Msg_UpdateRingPostByAcp_FullMethodName = "/sourcehub.bulletin.Msg/UpdateRingPostByAcp" - Msg_UpdateRingPostByThresholdSignature_FullMethodName = "/sourcehub.bulletin.Msg/UpdateRingPostByThresholdSignature" - Msg_RegisterNamespace_FullMethodName = "/sourcehub.bulletin.Msg/RegisterNamespace" - Msg_AddCollaborator_FullMethodName = "/sourcehub.bulletin.Msg/AddCollaborator" - Msg_RemoveCollaborator_FullMethodName = "/sourcehub.bulletin.Msg/RemoveCollaborator" + Msg_UpdateParams_FullMethodName = "/sourcehub.bulletin.Msg/UpdateParams" + Msg_CreatePost_FullMethodName = "/sourcehub.bulletin.Msg/CreatePost" + Msg_RegisterNamespace_FullMethodName = "/sourcehub.bulletin.Msg/RegisterNamespace" + Msg_AddCollaborator_FullMethodName = "/sourcehub.bulletin.Msg/AddCollaborator" + Msg_RemoveCollaborator_FullMethodName = "/sourcehub.bulletin.Msg/RemoveCollaborator" ) // MsgClient is the client API for Msg service. @@ -38,8 +36,6 @@ type MsgClient interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) CreatePost(ctx context.Context, in *MsgCreatePost, opts ...grpc.CallOption) (*MsgCreatePostResponse, error) - UpdateRingPostByAcp(ctx context.Context, in *MsgUpdateRingPostByAcp, opts ...grpc.CallOption) (*MsgUpdateRingPostByAcpResponse, error) - UpdateRingPostByThresholdSignature(ctx context.Context, in *MsgUpdateRingPostByThresholdSignature, opts ...grpc.CallOption) (*MsgUpdateRingPostByThresholdSignatureResponse, error) RegisterNamespace(ctx context.Context, in *MsgRegisterNamespace, opts ...grpc.CallOption) (*MsgRegisterNamespaceResponse, error) AddCollaborator(ctx context.Context, in *MsgAddCollaborator, opts ...grpc.CallOption) (*MsgAddCollaboratorResponse, error) RemoveCollaborator(ctx context.Context, in *MsgRemoveCollaborator, opts ...grpc.CallOption) (*MsgRemoveCollaboratorResponse, error) @@ -73,26 +69,6 @@ func (c *msgClient) CreatePost(ctx context.Context, in *MsgCreatePost, opts ...g return out, nil } -func (c *msgClient) UpdateRingPostByAcp(ctx context.Context, in *MsgUpdateRingPostByAcp, opts ...grpc.CallOption) (*MsgUpdateRingPostByAcpResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgUpdateRingPostByAcpResponse) - err := c.cc.Invoke(ctx, Msg_UpdateRingPostByAcp_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateRingPostByThresholdSignature(ctx context.Context, in *MsgUpdateRingPostByThresholdSignature, opts ...grpc.CallOption) (*MsgUpdateRingPostByThresholdSignatureResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgUpdateRingPostByThresholdSignatureResponse) - err := c.cc.Invoke(ctx, Msg_UpdateRingPostByThresholdSignature_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) RegisterNamespace(ctx context.Context, in *MsgRegisterNamespace, opts ...grpc.CallOption) (*MsgRegisterNamespaceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgRegisterNamespaceResponse) @@ -133,8 +109,6 @@ type MsgServer interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) CreatePost(context.Context, *MsgCreatePost) (*MsgCreatePostResponse, error) - UpdateRingPostByAcp(context.Context, *MsgUpdateRingPostByAcp) (*MsgUpdateRingPostByAcpResponse, error) - UpdateRingPostByThresholdSignature(context.Context, *MsgUpdateRingPostByThresholdSignature) (*MsgUpdateRingPostByThresholdSignatureResponse, error) RegisterNamespace(context.Context, *MsgRegisterNamespace) (*MsgRegisterNamespaceResponse, error) AddCollaborator(context.Context, *MsgAddCollaborator) (*MsgAddCollaboratorResponse, error) RemoveCollaborator(context.Context, *MsgRemoveCollaborator) (*MsgRemoveCollaboratorResponse, error) @@ -154,12 +128,6 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (* func (UnimplementedMsgServer) CreatePost(context.Context, *MsgCreatePost) (*MsgCreatePostResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePost not implemented") } -func (UnimplementedMsgServer) UpdateRingPostByAcp(context.Context, *MsgUpdateRingPostByAcp) (*MsgUpdateRingPostByAcpResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateRingPostByAcp not implemented") -} -func (UnimplementedMsgServer) UpdateRingPostByThresholdSignature(context.Context, *MsgUpdateRingPostByThresholdSignature) (*MsgUpdateRingPostByThresholdSignatureResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateRingPostByThresholdSignature not implemented") -} func (UnimplementedMsgServer) RegisterNamespace(context.Context, *MsgRegisterNamespace) (*MsgRegisterNamespaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterNamespace not implemented") } @@ -226,42 +194,6 @@ func _Msg_CreatePost_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Msg_UpdateRingPostByAcp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateRingPostByAcp) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateRingPostByAcp(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateRingPostByAcp_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateRingPostByAcp(ctx, req.(*MsgUpdateRingPostByAcp)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateRingPostByThresholdSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateRingPostByThresholdSignature) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateRingPostByThresholdSignature(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateRingPostByThresholdSignature_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateRingPostByThresholdSignature(ctx, req.(*MsgUpdateRingPostByThresholdSignature)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_RegisterNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRegisterNamespace) if err := dec(in); err != nil { @@ -331,14 +263,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreatePost", Handler: _Msg_CreatePost_Handler, }, - { - MethodName: "UpdateRingPostByAcp", - Handler: _Msg_UpdateRingPostByAcp_Handler, - }, - { - MethodName: "UpdateRingPostByThresholdSignature", - Handler: _Msg_UpdateRingPostByThresholdSignature_Handler, - }, { MethodName: "RegisterNamespace", Handler: _Msg_RegisterNamespace_Handler, diff --git a/api/sourcehub/orbis/document.pulsar.go b/api/sourcehub/orbis/document.pulsar.go new file mode 100644 index 00000000..fff2d9e9 --- /dev/null +++ b/api/sourcehub/orbis/document.pulsar.go @@ -0,0 +1,1416 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package orbis + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Document protoreflect.MessageDescriptor + fd_Document_id protoreflect.FieldDescriptor + fd_Document_namespace protoreflect.FieldDescriptor + fd_Document_creator_did protoreflect.FieldDescriptor + fd_Document_ring_id protoreflect.FieldDescriptor + fd_Document_document protoreflect.FieldDescriptor + fd_Document_proof protoreflect.FieldDescriptor + fd_Document_policy_id protoreflect.FieldDescriptor + fd_Document_resource protoreflect.FieldDescriptor + fd_Document_permission protoreflect.FieldDescriptor + fd_Document_tier protoreflect.FieldDescriptor + fd_Document_has_tier protoreflect.FieldDescriptor + fd_Document_timestamp protoreflect.FieldDescriptor + fd_Document_has_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_document_proto_init() + md_Document = File_sourcehub_orbis_document_proto.Messages().ByName("Document") + fd_Document_id = md_Document.Fields().ByName("id") + fd_Document_namespace = md_Document.Fields().ByName("namespace") + fd_Document_creator_did = md_Document.Fields().ByName("creator_did") + fd_Document_ring_id = md_Document.Fields().ByName("ring_id") + fd_Document_document = md_Document.Fields().ByName("document") + fd_Document_proof = md_Document.Fields().ByName("proof") + fd_Document_policy_id = md_Document.Fields().ByName("policy_id") + fd_Document_resource = md_Document.Fields().ByName("resource") + fd_Document_permission = md_Document.Fields().ByName("permission") + fd_Document_tier = md_Document.Fields().ByName("tier") + fd_Document_has_tier = md_Document.Fields().ByName("has_tier") + fd_Document_timestamp = md_Document.Fields().ByName("timestamp") + fd_Document_has_timestamp = md_Document.Fields().ByName("has_timestamp") +} + +var _ protoreflect.Message = (*fastReflection_Document)(nil) + +type fastReflection_Document Document + +func (x *Document) ProtoReflect() protoreflect.Message { + return (*fastReflection_Document)(x) +} + +func (x *Document) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_document_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_Document_messageType fastReflection_Document_messageType +var _ protoreflect.MessageType = fastReflection_Document_messageType{} + +type fastReflection_Document_messageType struct{} + +func (x fastReflection_Document_messageType) Zero() protoreflect.Message { + return (*fastReflection_Document)(nil) +} +func (x fastReflection_Document_messageType) New() protoreflect.Message { + return new(fastReflection_Document) +} +func (x fastReflection_Document_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Document +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Document) Descriptor() protoreflect.MessageDescriptor { + return md_Document +} + +// 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_Document) Type() protoreflect.MessageType { + return _fastReflection_Document_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Document) New() protoreflect.Message { + return new(fastReflection_Document) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Document) Interface() protoreflect.ProtoMessage { + return (*Document)(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_Document) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_Document_id, value) { + return + } + } + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_Document_namespace, value) { + return + } + } + if x.CreatorDid != "" { + value := protoreflect.ValueOfString(x.CreatorDid) + if !f(fd_Document_creator_did, value) { + return + } + } + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_Document_ring_id, value) { + return + } + } + if x.Document != "" { + value := protoreflect.ValueOfString(x.Document) + if !f(fd_Document_document, value) { + return + } + } + if x.Proof != "" { + value := protoreflect.ValueOfString(x.Proof) + if !f(fd_Document_proof, value) { + return + } + } + if x.PolicyId != "" { + value := protoreflect.ValueOfString(x.PolicyId) + if !f(fd_Document_policy_id, value) { + return + } + } + if x.Resource != "" { + value := protoreflect.ValueOfString(x.Resource) + if !f(fd_Document_resource, value) { + return + } + } + if x.Permission != "" { + value := protoreflect.ValueOfString(x.Permission) + if !f(fd_Document_permission, value) { + return + } + } + if x.Tier != "" { + value := protoreflect.ValueOfString(x.Tier) + if !f(fd_Document_tier, value) { + return + } + } + if x.HasTier != false { + value := protoreflect.ValueOfBool(x.HasTier) + if !f(fd_Document_has_tier, value) { + return + } + } + if x.Timestamp != uint64(0) { + value := protoreflect.ValueOfUint64(x.Timestamp) + if !f(fd_Document_timestamp, value) { + return + } + } + if x.HasTimestamp != false { + value := protoreflect.ValueOfBool(x.HasTimestamp) + if !f(fd_Document_has_timestamp, 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_Document) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.Document.id": + return x.Id != "" + case "sourcehub.orbis.Document.namespace": + return x.Namespace != "" + case "sourcehub.orbis.Document.creator_did": + return x.CreatorDid != "" + case "sourcehub.orbis.Document.ring_id": + return x.RingId != "" + case "sourcehub.orbis.Document.document": + return x.Document != "" + case "sourcehub.orbis.Document.proof": + return x.Proof != "" + case "sourcehub.orbis.Document.policy_id": + return x.PolicyId != "" + case "sourcehub.orbis.Document.resource": + return x.Resource != "" + case "sourcehub.orbis.Document.permission": + return x.Permission != "" + case "sourcehub.orbis.Document.tier": + return x.Tier != "" + case "sourcehub.orbis.Document.has_tier": + return x.HasTier != false + case "sourcehub.orbis.Document.timestamp": + return x.Timestamp != uint64(0) + case "sourcehub.orbis.Document.has_timestamp": + return x.HasTimestamp != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) + } + panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.Document.id": + x.Id = "" + case "sourcehub.orbis.Document.namespace": + x.Namespace = "" + case "sourcehub.orbis.Document.creator_did": + x.CreatorDid = "" + case "sourcehub.orbis.Document.ring_id": + x.RingId = "" + case "sourcehub.orbis.Document.document": + x.Document = "" + case "sourcehub.orbis.Document.proof": + x.Proof = "" + case "sourcehub.orbis.Document.policy_id": + x.PolicyId = "" + case "sourcehub.orbis.Document.resource": + x.Resource = "" + case "sourcehub.orbis.Document.permission": + x.Permission = "" + case "sourcehub.orbis.Document.tier": + x.Tier = "" + case "sourcehub.orbis.Document.has_tier": + x.HasTier = false + case "sourcehub.orbis.Document.timestamp": + x.Timestamp = uint64(0) + case "sourcehub.orbis.Document.has_timestamp": + x.HasTimestamp = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) + } + panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.Document.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.creator_did": + value := x.CreatorDid + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.document": + value := x.Document + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.proof": + value := x.Proof + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.policy_id": + value := x.PolicyId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.resource": + value := x.Resource + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.permission": + value := x.Permission + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.tier": + value := x.Tier + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Document.has_tier": + value := x.HasTier + return protoreflect.ValueOfBool(value) + case "sourcehub.orbis.Document.timestamp": + value := x.Timestamp + return protoreflect.ValueOfUint64(value) + case "sourcehub.orbis.Document.has_timestamp": + value := x.HasTimestamp + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) + } + panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.Document.id": + x.Id = value.Interface().(string) + case "sourcehub.orbis.Document.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.Document.creator_did": + x.CreatorDid = value.Interface().(string) + case "sourcehub.orbis.Document.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.Document.document": + x.Document = value.Interface().(string) + case "sourcehub.orbis.Document.proof": + x.Proof = value.Interface().(string) + case "sourcehub.orbis.Document.policy_id": + x.PolicyId = value.Interface().(string) + case "sourcehub.orbis.Document.resource": + x.Resource = value.Interface().(string) + case "sourcehub.orbis.Document.permission": + x.Permission = value.Interface().(string) + case "sourcehub.orbis.Document.tier": + x.Tier = value.Interface().(string) + case "sourcehub.orbis.Document.has_tier": + x.HasTier = value.Bool() + case "sourcehub.orbis.Document.timestamp": + x.Timestamp = value.Uint() + case "sourcehub.orbis.Document.has_timestamp": + x.HasTimestamp = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) + } + panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.Document.id": + panic(fmt.Errorf("field id of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.creator_did": + panic(fmt.Errorf("field creator_did of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.document": + panic(fmt.Errorf("field document of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.proof": + panic(fmt.Errorf("field proof of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.policy_id": + panic(fmt.Errorf("field policy_id of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.resource": + panic(fmt.Errorf("field resource of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.permission": + panic(fmt.Errorf("field permission of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.tier": + panic(fmt.Errorf("field tier of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.has_tier": + panic(fmt.Errorf("field has_tier of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.timestamp": + panic(fmt.Errorf("field timestamp of message sourcehub.orbis.Document is not mutable")) + case "sourcehub.orbis.Document.has_timestamp": + panic(fmt.Errorf("field has_timestamp of message sourcehub.orbis.Document is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) + } + panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.Document.id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.creator_did": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.document": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.proof": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.policy_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.resource": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.permission": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.tier": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Document.has_tier": + return protoreflect.ValueOfBool(false) + case "sourcehub.orbis.Document.timestamp": + return protoreflect.ValueOfUint64(uint64(0)) + case "sourcehub.orbis.Document.has_timestamp": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) + } + panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.Document", 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_Document) 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_Document) 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_Document) 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_Document) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Document) + 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.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CreatorDid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Document) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Proof) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PolicyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Resource) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Permission) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Tier) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.HasTier { + n += 2 + } + if x.Timestamp != 0 { + n += 1 + runtime.Sov(uint64(x.Timestamp)) + } + if x.HasTimestamp { + n += 2 + } + 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().(*Document) + 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.HasTimestamp { + i-- + if x.HasTimestamp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 + } + if x.Timestamp != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Timestamp)) + i-- + dAtA[i] = 0x60 + } + if x.HasTier { + i-- + if x.HasTier { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if len(x.Tier) > 0 { + i -= len(x.Tier) + copy(dAtA[i:], x.Tier) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tier))) + i-- + dAtA[i] = 0x52 + } + if len(x.Permission) > 0 { + i -= len(x.Permission) + copy(dAtA[i:], x.Permission) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permission))) + i-- + dAtA[i] = 0x4a + } + if len(x.Resource) > 0 { + i -= len(x.Resource) + copy(dAtA[i:], x.Resource) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resource))) + i-- + dAtA[i] = 0x42 + } + if len(x.PolicyId) > 0 { + i -= len(x.PolicyId) + copy(dAtA[i:], x.PolicyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) + i-- + dAtA[i] = 0x3a + } + if len(x.Proof) > 0 { + i -= len(x.Proof) + copy(dAtA[i:], x.Proof) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) + i-- + dAtA[i] = 0x32 + } + if len(x.Document) > 0 { + i -= len(x.Document) + copy(dAtA[i:], x.Document) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Document))) + i-- + dAtA[i] = 0x2a + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + i-- + dAtA[i] = 0x22 + } + if len(x.CreatorDid) > 0 { + i -= len(x.CreatorDid) + copy(dAtA[i:], x.CreatorDid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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 { + 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().(*Document) + 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: Document: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: 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 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 Namespace", 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.Namespace = 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 CreatorDid", 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.CreatorDid = 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 RingId", 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.RingId = 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 Document", 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.Document = 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 Proof", 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.Proof = 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 PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resource", 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.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permission", 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.Permission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tier", 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.Tier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasTier", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HasTier = bool(v != 0) + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + x.Timestamp = 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.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasTimestamp", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HasTimestamp = bool(v != 0) + 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: sourcehub/orbis/document.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) +) + +// Document stores an encrypted Orbis document and its policy binding metadata. +type Document struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` + Tier string `protobuf:"bytes,10,opt,name=tier,proto3" json:"tier,omitempty"` + HasTier bool `protobuf:"varint,11,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` + Timestamp uint64 `protobuf:"varint,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + HasTimestamp bool `protobuf:"varint,13,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` +} + +func (x *Document) Reset() { + *x = Document{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Document) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Document) ProtoMessage() {} + +// Deprecated: Use Document.ProtoReflect.Descriptor instead. +func (*Document) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_document_proto_rawDescGZIP(), []int{0} +} + +func (x *Document) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Document) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Document) GetCreatorDid() string { + if x != nil { + return x.CreatorDid + } + return "" +} + +func (x *Document) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *Document) GetDocument() string { + if x != nil { + return x.Document + } + return "" +} + +func (x *Document) GetProof() string { + if x != nil { + return x.Proof + } + return "" +} + +func (x *Document) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *Document) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *Document) GetPermission() string { + if x != nil { + return x.Permission + } + return "" +} + +func (x *Document) GetTier() string { + if x != nil { + return x.Tier + } + return "" +} + +func (x *Document) GetHasTier() bool { + if x != nil { + return x.HasTier + } + return false +} + +func (x *Document) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Document) GetHasTimestamp() bool { + if x != nil { + return x.HasTimestamp + } + return false +} + +var File_sourcehub_orbis_document_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_document_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x22, 0xef, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x69, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x65, + 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x54, 0x69, 0x65, 0x72, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, + 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0xa3, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0d, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, + 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_sourcehub_orbis_document_proto_rawDescOnce sync.Once + file_sourcehub_orbis_document_proto_rawDescData = file_sourcehub_orbis_document_proto_rawDesc +) + +func file_sourcehub_orbis_document_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_document_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_document_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_document_proto_rawDescData) + }) + return file_sourcehub_orbis_document_proto_rawDescData +} + +var file_sourcehub_orbis_document_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sourcehub_orbis_document_proto_goTypes = []interface{}{ + (*Document)(nil), // 0: sourcehub.orbis.Document +} +var file_sourcehub_orbis_document_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_sourcehub_orbis_document_proto_init() } +func file_sourcehub_orbis_document_proto_init() { + if File_sourcehub_orbis_document_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_document_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Document); 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_sourcehub_orbis_document_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_document_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_document_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_document_proto_msgTypes, + }.Build() + File_sourcehub_orbis_document_proto = out.File + file_sourcehub_orbis_document_proto_rawDesc = nil + file_sourcehub_orbis_document_proto_goTypes = nil + file_sourcehub_orbis_document_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/events.pulsar.go b/api/sourcehub/orbis/events.pulsar.go new file mode 100644 index 00000000..ecfdf338 --- /dev/null +++ b/api/sourcehub/orbis/events.pulsar.go @@ -0,0 +1,2872 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package orbis + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_EventRingCreated protoreflect.MessageDescriptor + fd_EventRingCreated_namespace protoreflect.FieldDescriptor + fd_EventRingCreated_ring_id protoreflect.FieldDescriptor + fd_EventRingCreated_creator_did protoreflect.FieldDescriptor + fd_EventRingCreated_artifact protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_events_proto_init() + md_EventRingCreated = File_sourcehub_orbis_events_proto.Messages().ByName("EventRingCreated") + fd_EventRingCreated_namespace = md_EventRingCreated.Fields().ByName("namespace") + fd_EventRingCreated_ring_id = md_EventRingCreated.Fields().ByName("ring_id") + fd_EventRingCreated_creator_did = md_EventRingCreated.Fields().ByName("creator_did") + fd_EventRingCreated_artifact = md_EventRingCreated.Fields().ByName("artifact") +} + +var _ protoreflect.Message = (*fastReflection_EventRingCreated)(nil) + +type fastReflection_EventRingCreated EventRingCreated + +func (x *EventRingCreated) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventRingCreated)(x) +} + +func (x *EventRingCreated) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_events_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_EventRingCreated_messageType fastReflection_EventRingCreated_messageType +var _ protoreflect.MessageType = fastReflection_EventRingCreated_messageType{} + +type fastReflection_EventRingCreated_messageType struct{} + +func (x fastReflection_EventRingCreated_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventRingCreated)(nil) +} +func (x fastReflection_EventRingCreated_messageType) New() protoreflect.Message { + return new(fastReflection_EventRingCreated) +} +func (x fastReflection_EventRingCreated_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventRingCreated +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventRingCreated) Descriptor() protoreflect.MessageDescriptor { + return md_EventRingCreated +} + +// 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_EventRingCreated) Type() protoreflect.MessageType { + return _fastReflection_EventRingCreated_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventRingCreated) New() protoreflect.Message { + return new(fastReflection_EventRingCreated) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventRingCreated) Interface() protoreflect.ProtoMessage { + return (*EventRingCreated)(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_EventRingCreated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_EventRingCreated_namespace, value) { + return + } + } + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_EventRingCreated_ring_id, value) { + return + } + } + if x.CreatorDid != "" { + value := protoreflect.ValueOfString(x.CreatorDid) + if !f(fd_EventRingCreated_creator_did, value) { + return + } + } + if x.Artifact != "" { + value := protoreflect.ValueOfString(x.Artifact) + if !f(fd_EventRingCreated_artifact, 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_EventRingCreated) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.EventRingCreated.namespace": + return x.Namespace != "" + case "sourcehub.orbis.EventRingCreated.ring_id": + return x.RingId != "" + case "sourcehub.orbis.EventRingCreated.creator_did": + return x.CreatorDid != "" + case "sourcehub.orbis.EventRingCreated.artifact": + return x.Artifact != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingCreated 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_EventRingCreated) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.EventRingCreated.namespace": + x.Namespace = "" + case "sourcehub.orbis.EventRingCreated.ring_id": + x.RingId = "" + case "sourcehub.orbis.EventRingCreated.creator_did": + x.CreatorDid = "" + case "sourcehub.orbis.EventRingCreated.artifact": + x.Artifact = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingCreated 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_EventRingCreated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.EventRingCreated.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventRingCreated.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventRingCreated.creator_did": + value := x.CreatorDid + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventRingCreated.artifact": + value := x.Artifact + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingCreated 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_EventRingCreated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.EventRingCreated.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.EventRingCreated.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.EventRingCreated.creator_did": + x.CreatorDid = value.Interface().(string) + case "sourcehub.orbis.EventRingCreated.artifact": + x.Artifact = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingCreated 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_EventRingCreated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventRingCreated.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.EventRingCreated is not mutable")) + case "sourcehub.orbis.EventRingCreated.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.EventRingCreated is not mutable")) + case "sourcehub.orbis.EventRingCreated.creator_did": + panic(fmt.Errorf("field creator_did of message sourcehub.orbis.EventRingCreated is not mutable")) + case "sourcehub.orbis.EventRingCreated.artifact": + panic(fmt.Errorf("field artifact of message sourcehub.orbis.EventRingCreated is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingCreated 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_EventRingCreated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventRingCreated.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventRingCreated.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventRingCreated.creator_did": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventRingCreated.artifact": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingCreated 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_EventRingCreated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.EventRingCreated", 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_EventRingCreated) 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_EventRingCreated) 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_EventRingCreated) 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_EventRingCreated) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventRingCreated) + 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.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CreatorDid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Artifact) + 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().(*EventRingCreated) + 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.Artifact) > 0 { + i -= len(x.Artifact) + copy(dAtA[i:], x.Artifact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) + i-- + dAtA[i] = 0x22 + } + if len(x.CreatorDid) > 0 { + i -= len(x.CreatorDid) + copy(dAtA[i:], x.CreatorDid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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().(*EventRingCreated) + 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: EventRingCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventRingCreated: 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 Namespace", 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.Namespace = 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 RingId", 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.RingId = 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 CreatorDid", 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.CreatorDid = 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 Artifact", 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.Artifact = 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_EventRingUpdated protoreflect.MessageDescriptor + fd_EventRingUpdated_namespace protoreflect.FieldDescriptor + fd_EventRingUpdated_ring_id protoreflect.FieldDescriptor + fd_EventRingUpdated_updater_did protoreflect.FieldDescriptor + fd_EventRingUpdated_artifact protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_events_proto_init() + md_EventRingUpdated = File_sourcehub_orbis_events_proto.Messages().ByName("EventRingUpdated") + fd_EventRingUpdated_namespace = md_EventRingUpdated.Fields().ByName("namespace") + fd_EventRingUpdated_ring_id = md_EventRingUpdated.Fields().ByName("ring_id") + fd_EventRingUpdated_updater_did = md_EventRingUpdated.Fields().ByName("updater_did") + fd_EventRingUpdated_artifact = md_EventRingUpdated.Fields().ByName("artifact") +} + +var _ protoreflect.Message = (*fastReflection_EventRingUpdated)(nil) + +type fastReflection_EventRingUpdated EventRingUpdated + +func (x *EventRingUpdated) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventRingUpdated)(x) +} + +func (x *EventRingUpdated) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_events_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_EventRingUpdated_messageType fastReflection_EventRingUpdated_messageType +var _ protoreflect.MessageType = fastReflection_EventRingUpdated_messageType{} + +type fastReflection_EventRingUpdated_messageType struct{} + +func (x fastReflection_EventRingUpdated_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventRingUpdated)(nil) +} +func (x fastReflection_EventRingUpdated_messageType) New() protoreflect.Message { + return new(fastReflection_EventRingUpdated) +} +func (x fastReflection_EventRingUpdated_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventRingUpdated +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventRingUpdated) Descriptor() protoreflect.MessageDescriptor { + return md_EventRingUpdated +} + +// 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_EventRingUpdated) Type() protoreflect.MessageType { + return _fastReflection_EventRingUpdated_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventRingUpdated) New() protoreflect.Message { + return new(fastReflection_EventRingUpdated) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventRingUpdated) Interface() protoreflect.ProtoMessage { + return (*EventRingUpdated)(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_EventRingUpdated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_EventRingUpdated_namespace, value) { + return + } + } + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_EventRingUpdated_ring_id, value) { + return + } + } + if x.UpdaterDid != "" { + value := protoreflect.ValueOfString(x.UpdaterDid) + if !f(fd_EventRingUpdated_updater_did, value) { + return + } + } + if x.Artifact != "" { + value := protoreflect.ValueOfString(x.Artifact) + if !f(fd_EventRingUpdated_artifact, 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_EventRingUpdated) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.EventRingUpdated.namespace": + return x.Namespace != "" + case "sourcehub.orbis.EventRingUpdated.ring_id": + return x.RingId != "" + case "sourcehub.orbis.EventRingUpdated.updater_did": + return x.UpdaterDid != "" + case "sourcehub.orbis.EventRingUpdated.artifact": + return x.Artifact != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingUpdated 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_EventRingUpdated) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.EventRingUpdated.namespace": + x.Namespace = "" + case "sourcehub.orbis.EventRingUpdated.ring_id": + x.RingId = "" + case "sourcehub.orbis.EventRingUpdated.updater_did": + x.UpdaterDid = "" + case "sourcehub.orbis.EventRingUpdated.artifact": + x.Artifact = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingUpdated 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_EventRingUpdated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.EventRingUpdated.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventRingUpdated.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventRingUpdated.updater_did": + value := x.UpdaterDid + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventRingUpdated.artifact": + value := x.Artifact + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingUpdated 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_EventRingUpdated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.EventRingUpdated.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.EventRingUpdated.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.EventRingUpdated.updater_did": + x.UpdaterDid = value.Interface().(string) + case "sourcehub.orbis.EventRingUpdated.artifact": + x.Artifact = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingUpdated 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_EventRingUpdated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventRingUpdated.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.EventRingUpdated is not mutable")) + case "sourcehub.orbis.EventRingUpdated.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.EventRingUpdated is not mutable")) + case "sourcehub.orbis.EventRingUpdated.updater_did": + panic(fmt.Errorf("field updater_did of message sourcehub.orbis.EventRingUpdated is not mutable")) + case "sourcehub.orbis.EventRingUpdated.artifact": + panic(fmt.Errorf("field artifact of message sourcehub.orbis.EventRingUpdated is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingUpdated 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_EventRingUpdated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventRingUpdated.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventRingUpdated.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventRingUpdated.updater_did": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventRingUpdated.artifact": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingUpdated 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_EventRingUpdated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.EventRingUpdated", 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_EventRingUpdated) 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_EventRingUpdated) 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_EventRingUpdated) 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_EventRingUpdated) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventRingUpdated) + 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.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.UpdaterDid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Artifact) + 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().(*EventRingUpdated) + 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.Artifact) > 0 { + i -= len(x.Artifact) + copy(dAtA[i:], x.Artifact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) + i-- + dAtA[i] = 0x22 + } + if len(x.UpdaterDid) > 0 { + i -= len(x.UpdaterDid) + copy(dAtA[i:], x.UpdaterDid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UpdaterDid))) + i-- + dAtA[i] = 0x1a + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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().(*EventRingUpdated) + 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: EventRingUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventRingUpdated: 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 Namespace", 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.Namespace = 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 RingId", 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.RingId = 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 UpdaterDid", 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.UpdaterDid = 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 Artifact", 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.Artifact = 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_EventDocumentStored protoreflect.MessageDescriptor + fd_EventDocumentStored_namespace protoreflect.FieldDescriptor + fd_EventDocumentStored_document_id protoreflect.FieldDescriptor + fd_EventDocumentStored_creator_did protoreflect.FieldDescriptor + fd_EventDocumentStored_artifact protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_events_proto_init() + md_EventDocumentStored = File_sourcehub_orbis_events_proto.Messages().ByName("EventDocumentStored") + fd_EventDocumentStored_namespace = md_EventDocumentStored.Fields().ByName("namespace") + fd_EventDocumentStored_document_id = md_EventDocumentStored.Fields().ByName("document_id") + fd_EventDocumentStored_creator_did = md_EventDocumentStored.Fields().ByName("creator_did") + fd_EventDocumentStored_artifact = md_EventDocumentStored.Fields().ByName("artifact") +} + +var _ protoreflect.Message = (*fastReflection_EventDocumentStored)(nil) + +type fastReflection_EventDocumentStored EventDocumentStored + +func (x *EventDocumentStored) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventDocumentStored)(x) +} + +func (x *EventDocumentStored) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_events_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_EventDocumentStored_messageType fastReflection_EventDocumentStored_messageType +var _ protoreflect.MessageType = fastReflection_EventDocumentStored_messageType{} + +type fastReflection_EventDocumentStored_messageType struct{} + +func (x fastReflection_EventDocumentStored_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventDocumentStored)(nil) +} +func (x fastReflection_EventDocumentStored_messageType) New() protoreflect.Message { + return new(fastReflection_EventDocumentStored) +} +func (x fastReflection_EventDocumentStored_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventDocumentStored +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventDocumentStored) Descriptor() protoreflect.MessageDescriptor { + return md_EventDocumentStored +} + +// 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_EventDocumentStored) Type() protoreflect.MessageType { + return _fastReflection_EventDocumentStored_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventDocumentStored) New() protoreflect.Message { + return new(fastReflection_EventDocumentStored) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventDocumentStored) Interface() protoreflect.ProtoMessage { + return (*EventDocumentStored)(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_EventDocumentStored) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_EventDocumentStored_namespace, value) { + return + } + } + if x.DocumentId != "" { + value := protoreflect.ValueOfString(x.DocumentId) + if !f(fd_EventDocumentStored_document_id, value) { + return + } + } + if x.CreatorDid != "" { + value := protoreflect.ValueOfString(x.CreatorDid) + if !f(fd_EventDocumentStored_creator_did, value) { + return + } + } + if x.Artifact != "" { + value := protoreflect.ValueOfString(x.Artifact) + if !f(fd_EventDocumentStored_artifact, 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_EventDocumentStored) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.EventDocumentStored.namespace": + return x.Namespace != "" + case "sourcehub.orbis.EventDocumentStored.document_id": + return x.DocumentId != "" + case "sourcehub.orbis.EventDocumentStored.creator_did": + return x.CreatorDid != "" + case "sourcehub.orbis.EventDocumentStored.artifact": + return x.Artifact != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventDocumentStored 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_EventDocumentStored) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.EventDocumentStored.namespace": + x.Namespace = "" + case "sourcehub.orbis.EventDocumentStored.document_id": + x.DocumentId = "" + case "sourcehub.orbis.EventDocumentStored.creator_did": + x.CreatorDid = "" + case "sourcehub.orbis.EventDocumentStored.artifact": + x.Artifact = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventDocumentStored 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_EventDocumentStored) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.EventDocumentStored.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventDocumentStored.document_id": + value := x.DocumentId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventDocumentStored.creator_did": + value := x.CreatorDid + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventDocumentStored.artifact": + value := x.Artifact + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventDocumentStored 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_EventDocumentStored) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.EventDocumentStored.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.EventDocumentStored.document_id": + x.DocumentId = value.Interface().(string) + case "sourcehub.orbis.EventDocumentStored.creator_did": + x.CreatorDid = value.Interface().(string) + case "sourcehub.orbis.EventDocumentStored.artifact": + x.Artifact = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventDocumentStored 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_EventDocumentStored) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventDocumentStored.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.EventDocumentStored is not mutable")) + case "sourcehub.orbis.EventDocumentStored.document_id": + panic(fmt.Errorf("field document_id of message sourcehub.orbis.EventDocumentStored is not mutable")) + case "sourcehub.orbis.EventDocumentStored.creator_did": + panic(fmt.Errorf("field creator_did of message sourcehub.orbis.EventDocumentStored is not mutable")) + case "sourcehub.orbis.EventDocumentStored.artifact": + panic(fmt.Errorf("field artifact of message sourcehub.orbis.EventDocumentStored is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventDocumentStored 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_EventDocumentStored) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventDocumentStored.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventDocumentStored.document_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventDocumentStored.creator_did": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventDocumentStored.artifact": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventDocumentStored 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_EventDocumentStored) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.EventDocumentStored", 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_EventDocumentStored) 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_EventDocumentStored) 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_EventDocumentStored) 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_EventDocumentStored) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventDocumentStored) + 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.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DocumentId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CreatorDid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Artifact) + 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().(*EventDocumentStored) + 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.Artifact) > 0 { + i -= len(x.Artifact) + copy(dAtA[i:], x.Artifact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) + i-- + dAtA[i] = 0x22 + } + if len(x.CreatorDid) > 0 { + i -= len(x.CreatorDid) + copy(dAtA[i:], x.CreatorDid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(x.DocumentId) > 0 { + i -= len(x.DocumentId) + copy(dAtA[i:], x.DocumentId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DocumentId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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().(*EventDocumentStored) + 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: EventDocumentStored: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventDocumentStored: 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 Namespace", 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.Namespace = 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 DocumentId", 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.DocumentId = 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 CreatorDid", 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.CreatorDid = 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 Artifact", 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.Artifact = 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_EventKeyDerivationStored protoreflect.MessageDescriptor + fd_EventKeyDerivationStored_namespace protoreflect.FieldDescriptor + fd_EventKeyDerivationStored_key_derivation_id protoreflect.FieldDescriptor + fd_EventKeyDerivationStored_creator_did protoreflect.FieldDescriptor + fd_EventKeyDerivationStored_artifact protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_events_proto_init() + md_EventKeyDerivationStored = File_sourcehub_orbis_events_proto.Messages().ByName("EventKeyDerivationStored") + fd_EventKeyDerivationStored_namespace = md_EventKeyDerivationStored.Fields().ByName("namespace") + fd_EventKeyDerivationStored_key_derivation_id = md_EventKeyDerivationStored.Fields().ByName("key_derivation_id") + fd_EventKeyDerivationStored_creator_did = md_EventKeyDerivationStored.Fields().ByName("creator_did") + fd_EventKeyDerivationStored_artifact = md_EventKeyDerivationStored.Fields().ByName("artifact") +} + +var _ protoreflect.Message = (*fastReflection_EventKeyDerivationStored)(nil) + +type fastReflection_EventKeyDerivationStored EventKeyDerivationStored + +func (x *EventKeyDerivationStored) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventKeyDerivationStored)(x) +} + +func (x *EventKeyDerivationStored) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_events_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_EventKeyDerivationStored_messageType fastReflection_EventKeyDerivationStored_messageType +var _ protoreflect.MessageType = fastReflection_EventKeyDerivationStored_messageType{} + +type fastReflection_EventKeyDerivationStored_messageType struct{} + +func (x fastReflection_EventKeyDerivationStored_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventKeyDerivationStored)(nil) +} +func (x fastReflection_EventKeyDerivationStored_messageType) New() protoreflect.Message { + return new(fastReflection_EventKeyDerivationStored) +} +func (x fastReflection_EventKeyDerivationStored_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventKeyDerivationStored +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventKeyDerivationStored) Descriptor() protoreflect.MessageDescriptor { + return md_EventKeyDerivationStored +} + +// 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_EventKeyDerivationStored) Type() protoreflect.MessageType { + return _fastReflection_EventKeyDerivationStored_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventKeyDerivationStored) New() protoreflect.Message { + return new(fastReflection_EventKeyDerivationStored) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventKeyDerivationStored) Interface() protoreflect.ProtoMessage { + return (*EventKeyDerivationStored)(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_EventKeyDerivationStored) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_EventKeyDerivationStored_namespace, value) { + return + } + } + if x.KeyDerivationId != "" { + value := protoreflect.ValueOfString(x.KeyDerivationId) + if !f(fd_EventKeyDerivationStored_key_derivation_id, value) { + return + } + } + if x.CreatorDid != "" { + value := protoreflect.ValueOfString(x.CreatorDid) + if !f(fd_EventKeyDerivationStored_creator_did, value) { + return + } + } + if x.Artifact != "" { + value := protoreflect.ValueOfString(x.Artifact) + if !f(fd_EventKeyDerivationStored_artifact, 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_EventKeyDerivationStored) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.EventKeyDerivationStored.namespace": + return x.Namespace != "" + case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": + return x.KeyDerivationId != "" + case "sourcehub.orbis.EventKeyDerivationStored.creator_did": + return x.CreatorDid != "" + case "sourcehub.orbis.EventKeyDerivationStored.artifact": + return x.Artifact != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventKeyDerivationStored 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_EventKeyDerivationStored) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.EventKeyDerivationStored.namespace": + x.Namespace = "" + case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": + x.KeyDerivationId = "" + case "sourcehub.orbis.EventKeyDerivationStored.creator_did": + x.CreatorDid = "" + case "sourcehub.orbis.EventKeyDerivationStored.artifact": + x.Artifact = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventKeyDerivationStored 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_EventKeyDerivationStored) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.EventKeyDerivationStored.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": + value := x.KeyDerivationId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventKeyDerivationStored.creator_did": + value := x.CreatorDid + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventKeyDerivationStored.artifact": + value := x.Artifact + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventKeyDerivationStored 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_EventKeyDerivationStored) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.EventKeyDerivationStored.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": + x.KeyDerivationId = value.Interface().(string) + case "sourcehub.orbis.EventKeyDerivationStored.creator_did": + x.CreatorDid = value.Interface().(string) + case "sourcehub.orbis.EventKeyDerivationStored.artifact": + x.Artifact = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventKeyDerivationStored 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_EventKeyDerivationStored) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventKeyDerivationStored.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.EventKeyDerivationStored is not mutable")) + case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": + panic(fmt.Errorf("field key_derivation_id of message sourcehub.orbis.EventKeyDerivationStored is not mutable")) + case "sourcehub.orbis.EventKeyDerivationStored.creator_did": + panic(fmt.Errorf("field creator_did of message sourcehub.orbis.EventKeyDerivationStored is not mutable")) + case "sourcehub.orbis.EventKeyDerivationStored.artifact": + panic(fmt.Errorf("field artifact of message sourcehub.orbis.EventKeyDerivationStored is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventKeyDerivationStored 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_EventKeyDerivationStored) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventKeyDerivationStored.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventKeyDerivationStored.creator_did": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventKeyDerivationStored.artifact": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventKeyDerivationStored 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_EventKeyDerivationStored) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.EventKeyDerivationStored", 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_EventKeyDerivationStored) 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_EventKeyDerivationStored) 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_EventKeyDerivationStored) 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_EventKeyDerivationStored) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventKeyDerivationStored) + 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.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.KeyDerivationId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CreatorDid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Artifact) + 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().(*EventKeyDerivationStored) + 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.Artifact) > 0 { + i -= len(x.Artifact) + copy(dAtA[i:], x.Artifact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) + i-- + dAtA[i] = 0x22 + } + if len(x.CreatorDid) > 0 { + i -= len(x.CreatorDid) + copy(dAtA[i:], x.CreatorDid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(x.KeyDerivationId) > 0 { + i -= len(x.KeyDerivationId) + copy(dAtA[i:], x.KeyDerivationId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyDerivationId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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().(*EventKeyDerivationStored) + 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: EventKeyDerivationStored: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventKeyDerivationStored: 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 Namespace", 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.Namespace = 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 KeyDerivationId", 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.KeyDerivationId = 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 CreatorDid", 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.CreatorDid = 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 Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: sourcehub/orbis/events.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) +) + +// EventRingCreated is emitted when a ring is created. +type EventRingCreated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (x *EventRingCreated) Reset() { + *x = EventRingCreated{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventRingCreated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventRingCreated) ProtoMessage() {} + +// Deprecated: Use EventRingCreated.ProtoReflect.Descriptor instead. +func (*EventRingCreated) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{0} +} + +func (x *EventRingCreated) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *EventRingCreated) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *EventRingCreated) GetCreatorDid() string { + if x != nil { + return x.CreatorDid + } + return "" +} + +func (x *EventRingCreated) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +// EventRingUpdated is emitted when a ring is updated in place. +type EventRingUpdated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + UpdaterDid string `protobuf:"bytes,3,opt,name=updater_did,json=updaterDid,proto3" json:"updater_did,omitempty"` + Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (x *EventRingUpdated) Reset() { + *x = EventRingUpdated{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventRingUpdated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventRingUpdated) ProtoMessage() {} + +// Deprecated: Use EventRingUpdated.ProtoReflect.Descriptor instead. +func (*EventRingUpdated) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{1} +} + +func (x *EventRingUpdated) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *EventRingUpdated) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *EventRingUpdated) GetUpdaterDid() string { + if x != nil { + return x.UpdaterDid + } + return "" +} + +func (x *EventRingUpdated) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +// EventDocumentStored is emitted when an encrypted document is stored. +type EventDocumentStored struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (x *EventDocumentStored) Reset() { + *x = EventDocumentStored{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventDocumentStored) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventDocumentStored) ProtoMessage() {} + +// Deprecated: Use EventDocumentStored.ProtoReflect.Descriptor instead. +func (*EventDocumentStored) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{2} +} + +func (x *EventDocumentStored) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *EventDocumentStored) GetDocumentId() string { + if x != nil { + return x.DocumentId + } + return "" +} + +func (x *EventDocumentStored) GetCreatorDid() string { + if x != nil { + return x.CreatorDid + } + return "" +} + +func (x *EventDocumentStored) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +// EventKeyDerivationStored is emitted when a key derivation is stored. +type EventKeyDerivationStored struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + KeyDerivationId string `protobuf:"bytes,2,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (x *EventKeyDerivationStored) Reset() { + *x = EventKeyDerivationStored{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_events_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventKeyDerivationStored) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventKeyDerivationStored) ProtoMessage() {} + +// Deprecated: Use EventKeyDerivationStored.ProtoReflect.Descriptor instead. +func (*EventKeyDerivationStored) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{3} +} + +func (x *EventKeyDerivationStored) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *EventKeyDerivationStored) GetKeyDerivationId() string { + if x != nil { + return x.KeyDerivationId + } + return "" +} + +func (x *EventKeyDerivationStored) GetCreatorDid() string { + if x != nil { + return x.CreatorDid + } + return "" +} + +func (x *EventKeyDerivationStored) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +var File_sourcehub_orbis_events_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_events_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x22, + 0x86, 0x01, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x69, 0x6e, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x10, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, + 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, + 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x5f, + 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x22, 0x91, 0x01, 0x0a, 0x13, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4b, + 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x2a, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, + 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0xa1, 0x01, 0x0a, 0x13, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sourcehub_orbis_events_proto_rawDescOnce sync.Once + file_sourcehub_orbis_events_proto_rawDescData = file_sourcehub_orbis_events_proto_rawDesc +) + +func file_sourcehub_orbis_events_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_events_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_events_proto_rawDescData) + }) + return file_sourcehub_orbis_events_proto_rawDescData +} + +var file_sourcehub_orbis_events_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_sourcehub_orbis_events_proto_goTypes = []interface{}{ + (*EventRingCreated)(nil), // 0: sourcehub.orbis.EventRingCreated + (*EventRingUpdated)(nil), // 1: sourcehub.orbis.EventRingUpdated + (*EventDocumentStored)(nil), // 2: sourcehub.orbis.EventDocumentStored + (*EventKeyDerivationStored)(nil), // 3: sourcehub.orbis.EventKeyDerivationStored +} +var file_sourcehub_orbis_events_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_sourcehub_orbis_events_proto_init() } +func file_sourcehub_orbis_events_proto_init() { + if File_sourcehub_orbis_events_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventRingCreated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventRingUpdated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventDocumentStored); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventKeyDerivationStored); 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_sourcehub_orbis_events_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_events_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_events_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_events_proto_msgTypes, + }.Build() + File_sourcehub_orbis_events_proto = out.File + file_sourcehub_orbis_events_proto_rawDesc = nil + file_sourcehub_orbis_events_proto_goTypes = nil + file_sourcehub_orbis_events_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/genesis.pulsar.go b/api/sourcehub/orbis/genesis.pulsar.go new file mode 100644 index 00000000..fdabc5ed --- /dev/null +++ b/api/sourcehub/orbis/genesis.pulsar.go @@ -0,0 +1,1060 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package orbis + +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 _ protoreflect.List = (*_GenesisState_2_list)(nil) + +type _GenesisState_2_list struct { + list *[]*Ring +} + +func (x *_GenesisState_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Ring) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Ring) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { + v := new(Ring) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_2_list) NewElement() protoreflect.Value { + v := new(Ring) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_3_list)(nil) + +type _GenesisState_3_list struct { + list *[]*Document +} + +func (x *_GenesisState_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Document) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Document) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { + v := new(Document) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_3_list) NewElement() protoreflect.Value { + v := new(Document) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_4_list)(nil) + +type _GenesisState_4_list struct { + list *[]*KeyDerivation +} + +func (x *_GenesisState_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*KeyDerivation) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*KeyDerivation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { + v := new(KeyDerivation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_4_list) NewElement() protoreflect.Value { + v := new(KeyDerivation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_rings protoreflect.FieldDescriptor + fd_GenesisState_documents protoreflect.FieldDescriptor + fd_GenesisState_key_derivations protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_genesis_proto_init() + md_GenesisState = File_sourcehub_orbis_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") + fd_GenesisState_rings = md_GenesisState.Fields().ByName("rings") + fd_GenesisState_documents = md_GenesisState.Fields().ByName("documents") + fd_GenesisState_key_derivations = md_GenesisState.Fields().ByName("key_derivations") +} + +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_sourcehub_orbis_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 + } + } + if len(x.Rings) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Rings}) + if !f(fd_GenesisState_rings, value) { + return + } + } + if len(x.Documents) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.Documents}) + if !f(fd_GenesisState_documents, value) { + return + } + } + if len(x.KeyDerivations) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.KeyDerivations}) + if !f(fd_GenesisState_key_derivations, 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 "sourcehub.orbis.GenesisState.params": + return x.Params != nil + case "sourcehub.orbis.GenesisState.rings": + return len(x.Rings) != 0 + case "sourcehub.orbis.GenesisState.documents": + return len(x.Documents) != 0 + case "sourcehub.orbis.GenesisState.key_derivations": + return len(x.KeyDerivations) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.GenesisState.params": + x.Params = nil + case "sourcehub.orbis.GenesisState.rings": + x.Rings = nil + case "sourcehub.orbis.GenesisState.documents": + x.Documents = nil + case "sourcehub.orbis.GenesisState.key_derivations": + x.KeyDerivations = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "sourcehub.orbis.GenesisState.rings": + if len(x.Rings) == 0 { + return protoreflect.ValueOfList(&_GenesisState_2_list{}) + } + listValue := &_GenesisState_2_list{list: &x.Rings} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.GenesisState.documents": + if len(x.Documents) == 0 { + return protoreflect.ValueOfList(&_GenesisState_3_list{}) + } + listValue := &_GenesisState_3_list{list: &x.Documents} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.GenesisState.key_derivations": + if len(x.KeyDerivations) == 0 { + return protoreflect.ValueOfList(&_GenesisState_4_list{}) + } + listValue := &_GenesisState_4_list{list: &x.KeyDerivations} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + case "sourcehub.orbis.GenesisState.rings": + lv := value.List() + clv := lv.(*_GenesisState_2_list) + x.Rings = *clv.list + case "sourcehub.orbis.GenesisState.documents": + lv := value.List() + clv := lv.(*_GenesisState_3_list) + x.Documents = *clv.list + case "sourcehub.orbis.GenesisState.key_derivations": + lv := value.List() + clv := lv.(*_GenesisState_4_list) + x.KeyDerivations = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "sourcehub.orbis.GenesisState.rings": + if x.Rings == nil { + x.Rings = []*Ring{} + } + value := &_GenesisState_2_list{list: &x.Rings} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.GenesisState.documents": + if x.Documents == nil { + x.Documents = []*Document{} + } + value := &_GenesisState_3_list{list: &x.Documents} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.GenesisState.key_derivations": + if x.KeyDerivations == nil { + x.KeyDerivations = []*KeyDerivation{} + } + value := &_GenesisState_4_list{list: &x.KeyDerivations} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "sourcehub.orbis.GenesisState.rings": + list := []*Ring{} + return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) + case "sourcehub.orbis.GenesisState.documents": + list := []*Document{} + return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) + case "sourcehub.orbis.GenesisState.key_derivations": + list := []*KeyDerivation{} + return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 sourcehub.orbis.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 len(x.Rings) > 0 { + for _, e := range x.Rings { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Documents) > 0 { + for _, e := range x.Documents { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.KeyDerivations) > 0 { + for _, e := range x.KeyDerivations { + 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().(*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 len(x.KeyDerivations) > 0 { + for iNdEx := len(x.KeyDerivations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.KeyDerivations[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 + } + } + if len(x.Documents) > 0 { + for iNdEx := len(x.Documents) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Documents[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Rings) > 0 { + for iNdEx := len(x.Rings) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Rings[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.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 + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rings", 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.Rings = append(x.Rings, &Ring{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rings[len(x.Rings)-1]); 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 Documents", 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.Documents = append(x.Documents, &Document{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Documents[len(x.Documents)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyDerivations", 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.KeyDerivations = append(x.KeyDerivations, &KeyDerivation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.KeyDerivations[len(x.KeyDerivations)-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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: sourcehub/orbis/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 orbis module's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + Rings []*Ring `protobuf:"bytes,2,rep,name=rings,proto3" json:"rings,omitempty"` + Documents []*Document `protobuf:"bytes,3,rep,name=documents,proto3" json:"documents,omitempty"` + KeyDerivations []*KeyDerivation `protobuf:"bytes,4,rep,name=key_derivations,json=keyDerivations,proto3" json:"key_derivations,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_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_sourcehub_orbis_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *GenesisState) GetRings() []*Ring { + if x != nil { + return x.Rings + } + return nil +} + +func (x *GenesisState) GetDocuments() []*Document { + if x != nil { + return x.Documents + } + return nil +} + +func (x *GenesisState) GetKeyDerivations() []*KeyDerivation { + if x != nil { + return x.KeyDerivations + } + return nil +} + +var File_sourcehub_orbis_genesis_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_genesis_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, + 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 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, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, + 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x02, 0x0a, 0x0c, 0x47, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x42, + 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, + 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x52, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4b, 0x65, + 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xa2, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0c, + 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, + 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_sourcehub_orbis_genesis_proto_rawDescOnce sync.Once + file_sourcehub_orbis_genesis_proto_rawDescData = file_sourcehub_orbis_genesis_proto_rawDesc +) + +func file_sourcehub_orbis_genesis_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_genesis_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_genesis_proto_rawDescData) + }) + return file_sourcehub_orbis_genesis_proto_rawDescData +} + +var file_sourcehub_orbis_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sourcehub_orbis_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: sourcehub.orbis.GenesisState + (*Params)(nil), // 1: sourcehub.orbis.Params + (*Ring)(nil), // 2: sourcehub.orbis.Ring + (*Document)(nil), // 3: sourcehub.orbis.Document + (*KeyDerivation)(nil), // 4: sourcehub.orbis.KeyDerivation +} +var file_sourcehub_orbis_genesis_proto_depIdxs = []int32{ + 1, // 0: sourcehub.orbis.GenesisState.params:type_name -> sourcehub.orbis.Params + 2, // 1: sourcehub.orbis.GenesisState.rings:type_name -> sourcehub.orbis.Ring + 3, // 2: sourcehub.orbis.GenesisState.documents:type_name -> sourcehub.orbis.Document + 4, // 3: sourcehub.orbis.GenesisState.key_derivations:type_name -> sourcehub.orbis.KeyDerivation + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_sourcehub_orbis_genesis_proto_init() } +func file_sourcehub_orbis_genesis_proto_init() { + if File_sourcehub_orbis_genesis_proto != nil { + return + } + file_sourcehub_orbis_document_proto_init() + file_sourcehub_orbis_key_derivation_proto_init() + file_sourcehub_orbis_params_proto_init() + file_sourcehub_orbis_ring_proto_init() + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_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_sourcehub_orbis_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_genesis_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_genesis_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_genesis_proto_msgTypes, + }.Build() + File_sourcehub_orbis_genesis_proto = out.File + file_sourcehub_orbis_genesis_proto_rawDesc = nil + file_sourcehub_orbis_genesis_proto_goTypes = nil + file_sourcehub_orbis_genesis_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/key_derivation.pulsar.go b/api/sourcehub/orbis/key_derivation.pulsar.go new file mode 100644 index 00000000..83d50f45 --- /dev/null +++ b/api/sourcehub/orbis/key_derivation.pulsar.go @@ -0,0 +1,1084 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package orbis + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_KeyDerivation protoreflect.MessageDescriptor + fd_KeyDerivation_id protoreflect.FieldDescriptor + fd_KeyDerivation_namespace protoreflect.FieldDescriptor + fd_KeyDerivation_creator_did protoreflect.FieldDescriptor + fd_KeyDerivation_ring_id protoreflect.FieldDescriptor + fd_KeyDerivation_derivation protoreflect.FieldDescriptor + fd_KeyDerivation_policy_id protoreflect.FieldDescriptor + fd_KeyDerivation_resource protoreflect.FieldDescriptor + fd_KeyDerivation_permission protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_key_derivation_proto_init() + md_KeyDerivation = File_sourcehub_orbis_key_derivation_proto.Messages().ByName("KeyDerivation") + fd_KeyDerivation_id = md_KeyDerivation.Fields().ByName("id") + fd_KeyDerivation_namespace = md_KeyDerivation.Fields().ByName("namespace") + fd_KeyDerivation_creator_did = md_KeyDerivation.Fields().ByName("creator_did") + fd_KeyDerivation_ring_id = md_KeyDerivation.Fields().ByName("ring_id") + fd_KeyDerivation_derivation = md_KeyDerivation.Fields().ByName("derivation") + fd_KeyDerivation_policy_id = md_KeyDerivation.Fields().ByName("policy_id") + fd_KeyDerivation_resource = md_KeyDerivation.Fields().ByName("resource") + fd_KeyDerivation_permission = md_KeyDerivation.Fields().ByName("permission") +} + +var _ protoreflect.Message = (*fastReflection_KeyDerivation)(nil) + +type fastReflection_KeyDerivation KeyDerivation + +func (x *KeyDerivation) ProtoReflect() protoreflect.Message { + return (*fastReflection_KeyDerivation)(x) +} + +func (x *KeyDerivation) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_key_derivation_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_KeyDerivation_messageType fastReflection_KeyDerivation_messageType +var _ protoreflect.MessageType = fastReflection_KeyDerivation_messageType{} + +type fastReflection_KeyDerivation_messageType struct{} + +func (x fastReflection_KeyDerivation_messageType) Zero() protoreflect.Message { + return (*fastReflection_KeyDerivation)(nil) +} +func (x fastReflection_KeyDerivation_messageType) New() protoreflect.Message { + return new(fastReflection_KeyDerivation) +} +func (x fastReflection_KeyDerivation_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_KeyDerivation +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_KeyDerivation) Descriptor() protoreflect.MessageDescriptor { + return md_KeyDerivation +} + +// 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_KeyDerivation) Type() protoreflect.MessageType { + return _fastReflection_KeyDerivation_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_KeyDerivation) New() protoreflect.Message { + return new(fastReflection_KeyDerivation) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_KeyDerivation) Interface() protoreflect.ProtoMessage { + return (*KeyDerivation)(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_KeyDerivation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_KeyDerivation_id, value) { + return + } + } + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_KeyDerivation_namespace, value) { + return + } + } + if x.CreatorDid != "" { + value := protoreflect.ValueOfString(x.CreatorDid) + if !f(fd_KeyDerivation_creator_did, value) { + return + } + } + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_KeyDerivation_ring_id, value) { + return + } + } + if x.Derivation != "" { + value := protoreflect.ValueOfString(x.Derivation) + if !f(fd_KeyDerivation_derivation, value) { + return + } + } + if x.PolicyId != "" { + value := protoreflect.ValueOfString(x.PolicyId) + if !f(fd_KeyDerivation_policy_id, value) { + return + } + } + if x.Resource != "" { + value := protoreflect.ValueOfString(x.Resource) + if !f(fd_KeyDerivation_resource, value) { + return + } + } + if x.Permission != "" { + value := protoreflect.ValueOfString(x.Permission) + if !f(fd_KeyDerivation_permission, 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_KeyDerivation) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.KeyDerivation.id": + return x.Id != "" + case "sourcehub.orbis.KeyDerivation.namespace": + return x.Namespace != "" + case "sourcehub.orbis.KeyDerivation.creator_did": + return x.CreatorDid != "" + case "sourcehub.orbis.KeyDerivation.ring_id": + return x.RingId != "" + case "sourcehub.orbis.KeyDerivation.derivation": + return x.Derivation != "" + case "sourcehub.orbis.KeyDerivation.policy_id": + return x.PolicyId != "" + case "sourcehub.orbis.KeyDerivation.resource": + return x.Resource != "" + case "sourcehub.orbis.KeyDerivation.permission": + return x.Permission != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.KeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.KeyDerivation 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_KeyDerivation) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.KeyDerivation.id": + x.Id = "" + case "sourcehub.orbis.KeyDerivation.namespace": + x.Namespace = "" + case "sourcehub.orbis.KeyDerivation.creator_did": + x.CreatorDid = "" + case "sourcehub.orbis.KeyDerivation.ring_id": + x.RingId = "" + case "sourcehub.orbis.KeyDerivation.derivation": + x.Derivation = "" + case "sourcehub.orbis.KeyDerivation.policy_id": + x.PolicyId = "" + case "sourcehub.orbis.KeyDerivation.resource": + x.Resource = "" + case "sourcehub.orbis.KeyDerivation.permission": + x.Permission = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.KeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.KeyDerivation 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_KeyDerivation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.KeyDerivation.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.KeyDerivation.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.KeyDerivation.creator_did": + value := x.CreatorDid + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.KeyDerivation.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.KeyDerivation.derivation": + value := x.Derivation + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.KeyDerivation.policy_id": + value := x.PolicyId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.KeyDerivation.resource": + value := x.Resource + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.KeyDerivation.permission": + value := x.Permission + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.KeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.KeyDerivation 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_KeyDerivation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.KeyDerivation.id": + x.Id = value.Interface().(string) + case "sourcehub.orbis.KeyDerivation.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.KeyDerivation.creator_did": + x.CreatorDid = value.Interface().(string) + case "sourcehub.orbis.KeyDerivation.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.KeyDerivation.derivation": + x.Derivation = value.Interface().(string) + case "sourcehub.orbis.KeyDerivation.policy_id": + x.PolicyId = value.Interface().(string) + case "sourcehub.orbis.KeyDerivation.resource": + x.Resource = value.Interface().(string) + case "sourcehub.orbis.KeyDerivation.permission": + x.Permission = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.KeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.KeyDerivation 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_KeyDerivation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.KeyDerivation.id": + panic(fmt.Errorf("field id of message sourcehub.orbis.KeyDerivation is not mutable")) + case "sourcehub.orbis.KeyDerivation.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.KeyDerivation is not mutable")) + case "sourcehub.orbis.KeyDerivation.creator_did": + panic(fmt.Errorf("field creator_did of message sourcehub.orbis.KeyDerivation is not mutable")) + case "sourcehub.orbis.KeyDerivation.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.KeyDerivation is not mutable")) + case "sourcehub.orbis.KeyDerivation.derivation": + panic(fmt.Errorf("field derivation of message sourcehub.orbis.KeyDerivation is not mutable")) + case "sourcehub.orbis.KeyDerivation.policy_id": + panic(fmt.Errorf("field policy_id of message sourcehub.orbis.KeyDerivation is not mutable")) + case "sourcehub.orbis.KeyDerivation.resource": + panic(fmt.Errorf("field resource of message sourcehub.orbis.KeyDerivation is not mutable")) + case "sourcehub.orbis.KeyDerivation.permission": + panic(fmt.Errorf("field permission of message sourcehub.orbis.KeyDerivation is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.KeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.KeyDerivation 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_KeyDerivation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.KeyDerivation.id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.KeyDerivation.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.KeyDerivation.creator_did": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.KeyDerivation.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.KeyDerivation.derivation": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.KeyDerivation.policy_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.KeyDerivation.resource": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.KeyDerivation.permission": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.KeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.KeyDerivation 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_KeyDerivation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.KeyDerivation", 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_KeyDerivation) 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_KeyDerivation) 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_KeyDerivation) 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_KeyDerivation) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*KeyDerivation) + 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.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CreatorDid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Derivation) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PolicyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Resource) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Permission) + 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().(*KeyDerivation) + 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.Permission) > 0 { + i -= len(x.Permission) + copy(dAtA[i:], x.Permission) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permission))) + i-- + dAtA[i] = 0x42 + } + if len(x.Resource) > 0 { + i -= len(x.Resource) + copy(dAtA[i:], x.Resource) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resource))) + i-- + dAtA[i] = 0x3a + } + if len(x.PolicyId) > 0 { + i -= len(x.PolicyId) + copy(dAtA[i:], x.PolicyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) + i-- + dAtA[i] = 0x32 + } + if len(x.Derivation) > 0 { + i -= len(x.Derivation) + copy(dAtA[i:], x.Derivation) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Derivation))) + i-- + dAtA[i] = 0x2a + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + i-- + dAtA[i] = 0x22 + } + if len(x.CreatorDid) > 0 { + i -= len(x.CreatorDid) + copy(dAtA[i:], x.CreatorDid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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 { + 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().(*KeyDerivation) + 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: KeyDerivation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: KeyDerivation: 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 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 Namespace", 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.Namespace = 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 CreatorDid", 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.CreatorDid = 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 RingId", 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.RingId = 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 Derivation", 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.Derivation = 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 PolicyId", 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.PolicyId = 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 Resource", 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.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permission", 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.Permission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: sourcehub/orbis/key_derivation.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) +) + +// KeyDerivation stores a signing derivation and its policy binding metadata. +type KeyDerivation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Derivation string `protobuf:"bytes,5,opt,name=derivation,proto3" json:"derivation,omitempty"` + PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` +} + +func (x *KeyDerivation) Reset() { + *x = KeyDerivation{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_key_derivation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyDerivation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyDerivation) ProtoMessage() {} + +// Deprecated: Use KeyDerivation.ProtoReflect.Descriptor instead. +func (*KeyDerivation) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_key_derivation_proto_rawDescGZIP(), []int{0} +} + +func (x *KeyDerivation) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *KeyDerivation) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *KeyDerivation) GetCreatorDid() string { + if x != nil { + return x.CreatorDid + } + return "" +} + +func (x *KeyDerivation) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *KeyDerivation) GetDerivation() string { + if x != nil { + return x.Derivation + } + return "" +} + +func (x *KeyDerivation) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *KeyDerivation) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *KeyDerivation) GetPermission() string { + if x != nil { + return x.Permission + } + return "" +} + +var File_sourcehub_orbis_key_derivation_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_key_derivation_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x22, 0xf0, 0x01, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x44, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xa8, 0x01, 0x0a, 0x13, 0x63, + 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0x42, 0x12, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, + 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, + 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, + 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, + 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sourcehub_orbis_key_derivation_proto_rawDescOnce sync.Once + file_sourcehub_orbis_key_derivation_proto_rawDescData = file_sourcehub_orbis_key_derivation_proto_rawDesc +) + +func file_sourcehub_orbis_key_derivation_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_key_derivation_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_key_derivation_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_key_derivation_proto_rawDescData) + }) + return file_sourcehub_orbis_key_derivation_proto_rawDescData +} + +var file_sourcehub_orbis_key_derivation_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sourcehub_orbis_key_derivation_proto_goTypes = []interface{}{ + (*KeyDerivation)(nil), // 0: sourcehub.orbis.KeyDerivation +} +var file_sourcehub_orbis_key_derivation_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_sourcehub_orbis_key_derivation_proto_init() } +func file_sourcehub_orbis_key_derivation_proto_init() { + if File_sourcehub_orbis_key_derivation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_key_derivation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyDerivation); 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_sourcehub_orbis_key_derivation_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_key_derivation_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_key_derivation_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_key_derivation_proto_msgTypes, + }.Build() + File_sourcehub_orbis_key_derivation_proto = out.File + file_sourcehub_orbis_key_derivation_proto_rawDesc = nil + file_sourcehub_orbis_key_derivation_proto_goTypes = nil + file_sourcehub_orbis_key_derivation_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/module/module.pulsar.go b/api/sourcehub/orbis/module/module.pulsar.go new file mode 100644 index 00000000..bafd896e --- /dev/null +++ b/api/sourcehub/orbis/module/module.pulsar.go @@ -0,0 +1,578 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package module + +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 + fd_Module_authority protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_module_module_proto_init() + md_Module = File_sourcehub_orbis_module_module_proto.Messages().ByName("Module") + fd_Module_authority = md_Module.Fields().ByName("authority") +} + +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_sourcehub_orbis_module_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) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Module_authority, 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_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.module.Module.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.module.Module")) + } + panic(fmt.Errorf("message sourcehub.orbis.module.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() { + case "sourcehub.orbis.module.Module.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.module.Module")) + } + panic(fmt.Errorf("message sourcehub.orbis.module.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() { + case "sourcehub.orbis.module.Module.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.module.Module")) + } + panic(fmt.Errorf("message sourcehub.orbis.module.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() { + case "sourcehub.orbis.module.Module.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.module.Module")) + } + panic(fmt.Errorf("message sourcehub.orbis.module.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() { + case "sourcehub.orbis.module.Module.authority": + panic(fmt.Errorf("field authority of message sourcehub.orbis.module.Module is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.module.Module")) + } + panic(fmt.Errorf("message sourcehub.orbis.module.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() { + case "sourcehub.orbis.module.Module.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.module.Module")) + } + panic(fmt.Errorf("message sourcehub.orbis.module.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 sourcehub.orbis.module.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 + l = len(x.Authority) + 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().(*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 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().(*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 { + 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 + 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: sourcehub/orbis/module/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 config object for the module. +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority defines the custom module authority. If not set, defaults to the governance module. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_module_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_sourcehub_orbis_module_module_proto_rawDescGZIP(), []int{0} +} + +func (x *Module) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +var File_sourcehub_orbis_module_module_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_module_module_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 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, + 0x5a, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x32, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x2c, 0x0a, + 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0xcc, 0x01, 0x0a, 0x1a, + 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, + 0x62, 0x69, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x4d, 0xaa, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0xca, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, + 0x62, 0x69, 0x73, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xe2, 0x02, 0x22, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, + 0x69, 0x73, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_sourcehub_orbis_module_module_proto_rawDescOnce sync.Once + file_sourcehub_orbis_module_module_proto_rawDescData = file_sourcehub_orbis_module_module_proto_rawDesc +) + +func file_sourcehub_orbis_module_module_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_module_module_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_module_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_module_module_proto_rawDescData) + }) + return file_sourcehub_orbis_module_module_proto_rawDescData +} + +var file_sourcehub_orbis_module_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sourcehub_orbis_module_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: sourcehub.orbis.module.Module +} +var file_sourcehub_orbis_module_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_sourcehub_orbis_module_module_proto_init() } +func file_sourcehub_orbis_module_module_proto_init() { + if File_sourcehub_orbis_module_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_module_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_sourcehub_orbis_module_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_module_module_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_module_module_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_module_module_proto_msgTypes, + }.Build() + File_sourcehub_orbis_module_module_proto = out.File + file_sourcehub_orbis_module_module_proto_rawDesc = nil + file_sourcehub_orbis_module_module_proto_goTypes = nil + file_sourcehub_orbis_module_module_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/params.pulsar.go b/api/sourcehub/orbis/params.pulsar.go new file mode 100644 index 00000000..8a4a4db2 --- /dev/null +++ b/api/sourcehub/orbis/params.pulsar.go @@ -0,0 +1,499 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package orbis + +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_Params protoreflect.MessageDescriptor +) + +func init() { + file_sourcehub_orbis_params_proto_init() + md_Params = File_sourcehub_orbis_params_proto.Messages().ByName("Params") +} + +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_sourcehub_orbis_params_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) { +} + +// 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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Params")) + } + panic(fmt.Errorf("message sourcehub.orbis.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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Params")) + } + panic(fmt.Errorf("message sourcehub.orbis.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() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Params")) + } + panic(fmt.Errorf("message sourcehub.orbis.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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Params")) + } + panic(fmt.Errorf("message sourcehub.orbis.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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Params")) + } + panic(fmt.Errorf("message sourcehub.orbis.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() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Params")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 sourcehub.orbis.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 + 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 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 { + 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: sourcehub/orbis/params.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) +) + +// Params defines the parameters for the module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_params_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_sourcehub_orbis_params_proto_rawDescGZIP(), []int{0} +} + +var File_sourcehub_orbis_params_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_params_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x1a, + 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x3a, 0x21, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xa1, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0b, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, + 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_sourcehub_orbis_params_proto_rawDescOnce sync.Once + file_sourcehub_orbis_params_proto_rawDescData = file_sourcehub_orbis_params_proto_rawDesc +) + +func file_sourcehub_orbis_params_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_params_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_params_proto_rawDescData) + }) + return file_sourcehub_orbis_params_proto_rawDescData +} + +var file_sourcehub_orbis_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sourcehub_orbis_params_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: sourcehub.orbis.Params +} +var file_sourcehub_orbis_params_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_sourcehub_orbis_params_proto_init() } +func file_sourcehub_orbis_params_proto_init() { + if File_sourcehub_orbis_params_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_params_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 + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sourcehub_orbis_params_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_params_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_params_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_params_proto_msgTypes, + }.Build() + File_sourcehub_orbis_params_proto = out.File + file_sourcehub_orbis_params_proto_rawDesc = nil + file_sourcehub_orbis_params_proto_goTypes = nil + file_sourcehub_orbis_params_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/query.pulsar.go b/api/sourcehub/orbis/query.pulsar.go new file mode 100644 index 00000000..ea9eb217 --- /dev/null +++ b/api/sourcehub/orbis/query.pulsar.go @@ -0,0 +1,7736 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package orbis + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryParamsRequest = File_sourcehub_orbis_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_sourcehub_orbis_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: sourcehub.orbis.QueryParamsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.QueryParamsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.QueryParamsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.QueryParamsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.QueryParamsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.QueryParamsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 sourcehub.orbis.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_sourcehub_orbis_query_proto_init() + md_QueryParamsResponse = File_sourcehub_orbis_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_sourcehub_orbis_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 "sourcehub.orbis.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.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: sourcehub.orbis.QueryParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 sourcehub.orbis.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_QueryRingRequest protoreflect.MessageDescriptor + fd_QueryRingRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryRingRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryRingRequest") + fd_QueryRingRequest_id = md_QueryRingRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryRingRequest)(nil) + +type fastReflection_QueryRingRequest QueryRingRequest + +func (x *QueryRingRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRingRequest)(x) +} + +func (x *QueryRingRequest) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryRingRequest_messageType fastReflection_QueryRingRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryRingRequest_messageType{} + +type fastReflection_QueryRingRequest_messageType struct{} + +func (x fastReflection_QueryRingRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRingRequest)(nil) +} +func (x fastReflection_QueryRingRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRingRequest) +} +func (x fastReflection_QueryRingRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRingRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRingRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRingRequest +} + +// 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_QueryRingRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryRingRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRingRequest) New() protoreflect.Message { + return new(fastReflection_QueryRingRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRingRequest) Interface() protoreflect.ProtoMessage { + return (*QueryRingRequest)(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_QueryRingRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_QueryRingRequest_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_QueryRingRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingRequest.id": + return x.Id != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingRequest 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_QueryRingRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingRequest.id": + x.Id = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingRequest 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_QueryRingRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryRingRequest.id": + value := x.Id + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingRequest 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_QueryRingRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingRequest.id": + x.Id = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingRequest 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_QueryRingRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingRequest.id": + panic(fmt.Errorf("field id of message sourcehub.orbis.QueryRingRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingRequest 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_QueryRingRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingRequest.id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingRequest 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_QueryRingRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryRingRequest", 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_QueryRingRequest) 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_QueryRingRequest) 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_QueryRingRequest) 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_QueryRingRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRingRequest) + 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.Id) + 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().(*QueryRingRequest) + 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.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 { + 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().(*QueryRingRequest) + 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: QueryRingRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRingRequest: 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 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 + 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_QueryRingResponse protoreflect.MessageDescriptor + fd_QueryRingResponse_ring protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryRingResponse = File_sourcehub_orbis_query_proto.Messages().ByName("QueryRingResponse") + fd_QueryRingResponse_ring = md_QueryRingResponse.Fields().ByName("ring") +} + +var _ protoreflect.Message = (*fastReflection_QueryRingResponse)(nil) + +type fastReflection_QueryRingResponse QueryRingResponse + +func (x *QueryRingResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRingResponse)(x) +} + +func (x *QueryRingResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryRingResponse_messageType fastReflection_QueryRingResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryRingResponse_messageType{} + +type fastReflection_QueryRingResponse_messageType struct{} + +func (x fastReflection_QueryRingResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRingResponse)(nil) +} +func (x fastReflection_QueryRingResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRingResponse) +} +func (x fastReflection_QueryRingResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRingResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRingResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRingResponse +} + +// 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_QueryRingResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryRingResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRingResponse) New() protoreflect.Message { + return new(fastReflection_QueryRingResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRingResponse) Interface() protoreflect.ProtoMessage { + return (*QueryRingResponse)(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_QueryRingResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Ring != nil { + value := protoreflect.ValueOfMessage(x.Ring.ProtoReflect()) + if !f(fd_QueryRingResponse_ring, 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_QueryRingResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingResponse.ring": + return x.Ring != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingResponse 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_QueryRingResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingResponse.ring": + x.Ring = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingResponse 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_QueryRingResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryRingResponse.ring": + value := x.Ring + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingResponse 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_QueryRingResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingResponse.ring": + x.Ring = value.Message().Interface().(*Ring) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingResponse 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_QueryRingResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingResponse.ring": + if x.Ring == nil { + x.Ring = new(Ring) + } + return protoreflect.ValueOfMessage(x.Ring.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingResponse 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_QueryRingResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingResponse.ring": + m := new(Ring) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingResponse 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_QueryRingResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryRingResponse", 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_QueryRingResponse) 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_QueryRingResponse) 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_QueryRingResponse) 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_QueryRingResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRingResponse) + 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.Ring != nil { + l = options.Size(x.Ring) + 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().(*QueryRingResponse) + 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.Ring != nil { + encoded, err := options.Marshal(x.Ring) + 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().(*QueryRingResponse) + 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: QueryRingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRingResponse: 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 Ring", 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.Ring == nil { + x.Ring = &Ring{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Ring); 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_QueryRingsRequest protoreflect.MessageDescriptor + fd_QueryRingsRequest_namespace protoreflect.FieldDescriptor + fd_QueryRingsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryRingsRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryRingsRequest") + fd_QueryRingsRequest_namespace = md_QueryRingsRequest.Fields().ByName("namespace") + fd_QueryRingsRequest_pagination = md_QueryRingsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryRingsRequest)(nil) + +type fastReflection_QueryRingsRequest QueryRingsRequest + +func (x *QueryRingsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRingsRequest)(x) +} + +func (x *QueryRingsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryRingsRequest_messageType fastReflection_QueryRingsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryRingsRequest_messageType{} + +type fastReflection_QueryRingsRequest_messageType struct{} + +func (x fastReflection_QueryRingsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRingsRequest)(nil) +} +func (x fastReflection_QueryRingsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRingsRequest) +} +func (x fastReflection_QueryRingsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRingsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRingsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRingsRequest +} + +// 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_QueryRingsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryRingsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRingsRequest) New() protoreflect.Message { + return new(fastReflection_QueryRingsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRingsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryRingsRequest)(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_QueryRingsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_QueryRingsRequest_namespace, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryRingsRequest_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_QueryRingsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsRequest.namespace": + return x.Namespace != "" + case "sourcehub.orbis.QueryRingsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsRequest 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_QueryRingsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsRequest.namespace": + x.Namespace = "" + case "sourcehub.orbis.QueryRingsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsRequest 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_QueryRingsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryRingsRequest.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.QueryRingsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsRequest 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_QueryRingsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsRequest.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.QueryRingsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsRequest 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_QueryRingsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "sourcehub.orbis.QueryRingsRequest.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryRingsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsRequest 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_QueryRingsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsRequest.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.QueryRingsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsRequest 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_QueryRingsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryRingsRequest", 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_QueryRingsRequest) 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_QueryRingsRequest) 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_QueryRingsRequest) 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_QueryRingsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRingsRequest) + 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.Namespace) + if l > 0 { + 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().(*QueryRingsRequest) + 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.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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().(*QueryRingsRequest) + 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: QueryRingsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRingsRequest: 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 Namespace", 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.Namespace = 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 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 = (*_QueryRingsResponse_1_list)(nil) + +type _QueryRingsResponse_1_list struct { + list *[]*Ring +} + +func (x *_QueryRingsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryRingsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryRingsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Ring) + (*x.list)[i] = concreteValue +} + +func (x *_QueryRingsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Ring) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryRingsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Ring) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryRingsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryRingsResponse_1_list) NewElement() protoreflect.Value { + v := new(Ring) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryRingsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryRingsResponse protoreflect.MessageDescriptor + fd_QueryRingsResponse_rings protoreflect.FieldDescriptor + fd_QueryRingsResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryRingsResponse = File_sourcehub_orbis_query_proto.Messages().ByName("QueryRingsResponse") + fd_QueryRingsResponse_rings = md_QueryRingsResponse.Fields().ByName("rings") + fd_QueryRingsResponse_pagination = md_QueryRingsResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryRingsResponse)(nil) + +type fastReflection_QueryRingsResponse QueryRingsResponse + +func (x *QueryRingsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRingsResponse)(x) +} + +func (x *QueryRingsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryRingsResponse_messageType fastReflection_QueryRingsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryRingsResponse_messageType{} + +type fastReflection_QueryRingsResponse_messageType struct{} + +func (x fastReflection_QueryRingsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRingsResponse)(nil) +} +func (x fastReflection_QueryRingsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRingsResponse) +} +func (x fastReflection_QueryRingsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRingsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRingsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRingsResponse +} + +// 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_QueryRingsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryRingsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRingsResponse) New() protoreflect.Message { + return new(fastReflection_QueryRingsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRingsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryRingsResponse)(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_QueryRingsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Rings) != 0 { + value := protoreflect.ValueOfList(&_QueryRingsResponse_1_list{list: &x.Rings}) + if !f(fd_QueryRingsResponse_rings, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryRingsResponse_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_QueryRingsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsResponse.rings": + return len(x.Rings) != 0 + case "sourcehub.orbis.QueryRingsResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsResponse 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_QueryRingsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsResponse.rings": + x.Rings = nil + case "sourcehub.orbis.QueryRingsResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsResponse 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_QueryRingsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryRingsResponse.rings": + if len(x.Rings) == 0 { + return protoreflect.ValueOfList(&_QueryRingsResponse_1_list{}) + } + listValue := &_QueryRingsResponse_1_list{list: &x.Rings} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.QueryRingsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsResponse 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_QueryRingsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsResponse.rings": + lv := value.List() + clv := lv.(*_QueryRingsResponse_1_list) + x.Rings = *clv.list + case "sourcehub.orbis.QueryRingsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsResponse 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_QueryRingsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsResponse.rings": + if x.Rings == nil { + x.Rings = []*Ring{} + } + value := &_QueryRingsResponse_1_list{list: &x.Rings} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.QueryRingsResponse.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: sourcehub.orbis.QueryRingsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsResponse 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_QueryRingsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryRingsResponse.rings": + list := []*Ring{} + return protoreflect.ValueOfList(&_QueryRingsResponse_1_list{list: &list}) + case "sourcehub.orbis.QueryRingsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryRingsResponse 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_QueryRingsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryRingsResponse", 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_QueryRingsResponse) 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_QueryRingsResponse) 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_QueryRingsResponse) 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_QueryRingsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRingsResponse) + 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.Rings) > 0 { + for _, e := range x.Rings { + 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().(*QueryRingsResponse) + 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.Rings) > 0 { + for iNdEx := len(x.Rings) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Rings[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().(*QueryRingsResponse) + 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: QueryRingsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRingsResponse: 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 Rings", 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.Rings = append(x.Rings, &Ring{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rings[len(x.Rings)-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_QueryDocumentRequest protoreflect.MessageDescriptor + fd_QueryDocumentRequest_namespace protoreflect.FieldDescriptor + fd_QueryDocumentRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryDocumentRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryDocumentRequest") + fd_QueryDocumentRequest_namespace = md_QueryDocumentRequest.Fields().ByName("namespace") + fd_QueryDocumentRequest_id = md_QueryDocumentRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryDocumentRequest)(nil) + +type fastReflection_QueryDocumentRequest QueryDocumentRequest + +func (x *QueryDocumentRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDocumentRequest)(x) +} + +func (x *QueryDocumentRequest) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryDocumentRequest_messageType fastReflection_QueryDocumentRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDocumentRequest_messageType{} + +type fastReflection_QueryDocumentRequest_messageType struct{} + +func (x fastReflection_QueryDocumentRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDocumentRequest)(nil) +} +func (x fastReflection_QueryDocumentRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDocumentRequest) +} +func (x fastReflection_QueryDocumentRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDocumentRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDocumentRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDocumentRequest +} + +// 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_QueryDocumentRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDocumentRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDocumentRequest) New() protoreflect.Message { + return new(fastReflection_QueryDocumentRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDocumentRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDocumentRequest)(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_QueryDocumentRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_QueryDocumentRequest_namespace, value) { + return + } + } + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_QueryDocumentRequest_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_QueryDocumentRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentRequest.namespace": + return x.Namespace != "" + case "sourcehub.orbis.QueryDocumentRequest.id": + return x.Id != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentRequest 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_QueryDocumentRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentRequest.namespace": + x.Namespace = "" + case "sourcehub.orbis.QueryDocumentRequest.id": + x.Id = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentRequest 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_QueryDocumentRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryDocumentRequest.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.QueryDocumentRequest.id": + value := x.Id + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentRequest 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_QueryDocumentRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentRequest.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.QueryDocumentRequest.id": + x.Id = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentRequest 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_QueryDocumentRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentRequest.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryDocumentRequest is not mutable")) + case "sourcehub.orbis.QueryDocumentRequest.id": + panic(fmt.Errorf("field id of message sourcehub.orbis.QueryDocumentRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentRequest 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_QueryDocumentRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentRequest.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.QueryDocumentRequest.id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentRequest 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_QueryDocumentRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryDocumentRequest", 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_QueryDocumentRequest) 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_QueryDocumentRequest) 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_QueryDocumentRequest) 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_QueryDocumentRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDocumentRequest) + 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.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Id) + 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().(*QueryDocumentRequest) + 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.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0x12 + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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().(*QueryDocumentRequest) + 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: QueryDocumentRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDocumentRequest: 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 Namespace", 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.Namespace = 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 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 + 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_QueryDocumentResponse protoreflect.MessageDescriptor + fd_QueryDocumentResponse_document protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryDocumentResponse = File_sourcehub_orbis_query_proto.Messages().ByName("QueryDocumentResponse") + fd_QueryDocumentResponse_document = md_QueryDocumentResponse.Fields().ByName("document") +} + +var _ protoreflect.Message = (*fastReflection_QueryDocumentResponse)(nil) + +type fastReflection_QueryDocumentResponse QueryDocumentResponse + +func (x *QueryDocumentResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDocumentResponse)(x) +} + +func (x *QueryDocumentResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryDocumentResponse_messageType fastReflection_QueryDocumentResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDocumentResponse_messageType{} + +type fastReflection_QueryDocumentResponse_messageType struct{} + +func (x fastReflection_QueryDocumentResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDocumentResponse)(nil) +} +func (x fastReflection_QueryDocumentResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDocumentResponse) +} +func (x fastReflection_QueryDocumentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDocumentResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDocumentResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDocumentResponse +} + +// 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_QueryDocumentResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDocumentResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDocumentResponse) New() protoreflect.Message { + return new(fastReflection_QueryDocumentResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDocumentResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDocumentResponse)(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_QueryDocumentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Document != nil { + value := protoreflect.ValueOfMessage(x.Document.ProtoReflect()) + if !f(fd_QueryDocumentResponse_document, 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_QueryDocumentResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentResponse.document": + return x.Document != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentResponse 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_QueryDocumentResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentResponse.document": + x.Document = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentResponse 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_QueryDocumentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryDocumentResponse.document": + value := x.Document + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentResponse 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_QueryDocumentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentResponse.document": + x.Document = value.Message().Interface().(*Document) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentResponse 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_QueryDocumentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentResponse.document": + if x.Document == nil { + x.Document = new(Document) + } + return protoreflect.ValueOfMessage(x.Document.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentResponse 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_QueryDocumentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentResponse.document": + m := new(Document) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentResponse 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_QueryDocumentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryDocumentResponse", 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_QueryDocumentResponse) 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_QueryDocumentResponse) 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_QueryDocumentResponse) 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_QueryDocumentResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDocumentResponse) + 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.Document != nil { + l = options.Size(x.Document) + 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().(*QueryDocumentResponse) + 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.Document != nil { + encoded, err := options.Marshal(x.Document) + 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().(*QueryDocumentResponse) + 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: QueryDocumentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDocumentResponse: 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 Document", 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.Document == nil { + x.Document = &Document{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Document); 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_QueryDocumentsRequest protoreflect.MessageDescriptor + fd_QueryDocumentsRequest_namespace protoreflect.FieldDescriptor + fd_QueryDocumentsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryDocumentsRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryDocumentsRequest") + fd_QueryDocumentsRequest_namespace = md_QueryDocumentsRequest.Fields().ByName("namespace") + fd_QueryDocumentsRequest_pagination = md_QueryDocumentsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryDocumentsRequest)(nil) + +type fastReflection_QueryDocumentsRequest QueryDocumentsRequest + +func (x *QueryDocumentsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDocumentsRequest)(x) +} + +func (x *QueryDocumentsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryDocumentsRequest_messageType fastReflection_QueryDocumentsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDocumentsRequest_messageType{} + +type fastReflection_QueryDocumentsRequest_messageType struct{} + +func (x fastReflection_QueryDocumentsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDocumentsRequest)(nil) +} +func (x fastReflection_QueryDocumentsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDocumentsRequest) +} +func (x fastReflection_QueryDocumentsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDocumentsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDocumentsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDocumentsRequest +} + +// 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_QueryDocumentsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDocumentsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDocumentsRequest) New() protoreflect.Message { + return new(fastReflection_QueryDocumentsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDocumentsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDocumentsRequest)(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_QueryDocumentsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_QueryDocumentsRequest_namespace, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryDocumentsRequest_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_QueryDocumentsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsRequest.namespace": + return x.Namespace != "" + case "sourcehub.orbis.QueryDocumentsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsRequest 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_QueryDocumentsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsRequest.namespace": + x.Namespace = "" + case "sourcehub.orbis.QueryDocumentsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsRequest 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_QueryDocumentsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryDocumentsRequest.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.QueryDocumentsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsRequest 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_QueryDocumentsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsRequest.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.QueryDocumentsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsRequest 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_QueryDocumentsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "sourcehub.orbis.QueryDocumentsRequest.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryDocumentsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsRequest 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_QueryDocumentsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsRequest.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.QueryDocumentsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsRequest 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_QueryDocumentsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryDocumentsRequest", 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_QueryDocumentsRequest) 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_QueryDocumentsRequest) 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_QueryDocumentsRequest) 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_QueryDocumentsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDocumentsRequest) + 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.Namespace) + if l > 0 { + 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().(*QueryDocumentsRequest) + 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.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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().(*QueryDocumentsRequest) + 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: QueryDocumentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDocumentsRequest: 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 Namespace", 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.Namespace = 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 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 = (*_QueryDocumentsResponse_1_list)(nil) + +type _QueryDocumentsResponse_1_list struct { + list *[]*Document +} + +func (x *_QueryDocumentsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryDocumentsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryDocumentsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Document) + (*x.list)[i] = concreteValue +} + +func (x *_QueryDocumentsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Document) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryDocumentsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Document) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDocumentsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryDocumentsResponse_1_list) NewElement() protoreflect.Value { + v := new(Document) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDocumentsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryDocumentsResponse protoreflect.MessageDescriptor + fd_QueryDocumentsResponse_documents protoreflect.FieldDescriptor + fd_QueryDocumentsResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryDocumentsResponse = File_sourcehub_orbis_query_proto.Messages().ByName("QueryDocumentsResponse") + fd_QueryDocumentsResponse_documents = md_QueryDocumentsResponse.Fields().ByName("documents") + fd_QueryDocumentsResponse_pagination = md_QueryDocumentsResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryDocumentsResponse)(nil) + +type fastReflection_QueryDocumentsResponse QueryDocumentsResponse + +func (x *QueryDocumentsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDocumentsResponse)(x) +} + +func (x *QueryDocumentsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryDocumentsResponse_messageType fastReflection_QueryDocumentsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDocumentsResponse_messageType{} + +type fastReflection_QueryDocumentsResponse_messageType struct{} + +func (x fastReflection_QueryDocumentsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDocumentsResponse)(nil) +} +func (x fastReflection_QueryDocumentsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDocumentsResponse) +} +func (x fastReflection_QueryDocumentsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDocumentsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDocumentsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDocumentsResponse +} + +// 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_QueryDocumentsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDocumentsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDocumentsResponse) New() protoreflect.Message { + return new(fastReflection_QueryDocumentsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDocumentsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDocumentsResponse)(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_QueryDocumentsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Documents) != 0 { + value := protoreflect.ValueOfList(&_QueryDocumentsResponse_1_list{list: &x.Documents}) + if !f(fd_QueryDocumentsResponse_documents, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryDocumentsResponse_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_QueryDocumentsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsResponse.documents": + return len(x.Documents) != 0 + case "sourcehub.orbis.QueryDocumentsResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsResponse 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_QueryDocumentsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsResponse.documents": + x.Documents = nil + case "sourcehub.orbis.QueryDocumentsResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsResponse 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_QueryDocumentsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryDocumentsResponse.documents": + if len(x.Documents) == 0 { + return protoreflect.ValueOfList(&_QueryDocumentsResponse_1_list{}) + } + listValue := &_QueryDocumentsResponse_1_list{list: &x.Documents} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.QueryDocumentsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsResponse 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_QueryDocumentsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsResponse.documents": + lv := value.List() + clv := lv.(*_QueryDocumentsResponse_1_list) + x.Documents = *clv.list + case "sourcehub.orbis.QueryDocumentsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsResponse 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_QueryDocumentsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsResponse.documents": + if x.Documents == nil { + x.Documents = []*Document{} + } + value := &_QueryDocumentsResponse_1_list{list: &x.Documents} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.QueryDocumentsResponse.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: sourcehub.orbis.QueryDocumentsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsResponse 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_QueryDocumentsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryDocumentsResponse.documents": + list := []*Document{} + return protoreflect.ValueOfList(&_QueryDocumentsResponse_1_list{list: &list}) + case "sourcehub.orbis.QueryDocumentsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryDocumentsResponse 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_QueryDocumentsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryDocumentsResponse", 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_QueryDocumentsResponse) 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_QueryDocumentsResponse) 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_QueryDocumentsResponse) 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_QueryDocumentsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDocumentsResponse) + 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.Documents) > 0 { + for _, e := range x.Documents { + 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().(*QueryDocumentsResponse) + 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.Documents) > 0 { + for iNdEx := len(x.Documents) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Documents[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().(*QueryDocumentsResponse) + 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: QueryDocumentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDocumentsResponse: 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 Documents", 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.Documents = append(x.Documents, &Document{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Documents[len(x.Documents)-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_QueryKeyDerivationRequest protoreflect.MessageDescriptor + fd_QueryKeyDerivationRequest_namespace protoreflect.FieldDescriptor + fd_QueryKeyDerivationRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryKeyDerivationRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryKeyDerivationRequest") + fd_QueryKeyDerivationRequest_namespace = md_QueryKeyDerivationRequest.Fields().ByName("namespace") + fd_QueryKeyDerivationRequest_id = md_QueryKeyDerivationRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryKeyDerivationRequest)(nil) + +type fastReflection_QueryKeyDerivationRequest QueryKeyDerivationRequest + +func (x *QueryKeyDerivationRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryKeyDerivationRequest)(x) +} + +func (x *QueryKeyDerivationRequest) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryKeyDerivationRequest_messageType fastReflection_QueryKeyDerivationRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryKeyDerivationRequest_messageType{} + +type fastReflection_QueryKeyDerivationRequest_messageType struct{} + +func (x fastReflection_QueryKeyDerivationRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryKeyDerivationRequest)(nil) +} +func (x fastReflection_QueryKeyDerivationRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryKeyDerivationRequest) +} +func (x fastReflection_QueryKeyDerivationRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyDerivationRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryKeyDerivationRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyDerivationRequest +} + +// 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_QueryKeyDerivationRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryKeyDerivationRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryKeyDerivationRequest) New() protoreflect.Message { + return new(fastReflection_QueryKeyDerivationRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryKeyDerivationRequest) Interface() protoreflect.ProtoMessage { + return (*QueryKeyDerivationRequest)(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_QueryKeyDerivationRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_QueryKeyDerivationRequest_namespace, value) { + return + } + } + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_QueryKeyDerivationRequest_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_QueryKeyDerivationRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": + return x.Namespace != "" + case "sourcehub.orbis.QueryKeyDerivationRequest.id": + return x.Id != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationRequest 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_QueryKeyDerivationRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": + x.Namespace = "" + case "sourcehub.orbis.QueryKeyDerivationRequest.id": + x.Id = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationRequest 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_QueryKeyDerivationRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.QueryKeyDerivationRequest.id": + value := x.Id + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationRequest 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_QueryKeyDerivationRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.QueryKeyDerivationRequest.id": + x.Id = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationRequest 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_QueryKeyDerivationRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryKeyDerivationRequest is not mutable")) + case "sourcehub.orbis.QueryKeyDerivationRequest.id": + panic(fmt.Errorf("field id of message sourcehub.orbis.QueryKeyDerivationRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationRequest 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_QueryKeyDerivationRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.QueryKeyDerivationRequest.id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationRequest 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_QueryKeyDerivationRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryKeyDerivationRequest", 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_QueryKeyDerivationRequest) 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_QueryKeyDerivationRequest) 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_QueryKeyDerivationRequest) 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_QueryKeyDerivationRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryKeyDerivationRequest) + 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.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Id) + 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().(*QueryKeyDerivationRequest) + 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.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0x12 + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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().(*QueryKeyDerivationRequest) + 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: QueryKeyDerivationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyDerivationRequest: 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 Namespace", 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.Namespace = 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 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 + 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_QueryKeyDerivationResponse protoreflect.MessageDescriptor + fd_QueryKeyDerivationResponse_key_derivation protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryKeyDerivationResponse = File_sourcehub_orbis_query_proto.Messages().ByName("QueryKeyDerivationResponse") + fd_QueryKeyDerivationResponse_key_derivation = md_QueryKeyDerivationResponse.Fields().ByName("key_derivation") +} + +var _ protoreflect.Message = (*fastReflection_QueryKeyDerivationResponse)(nil) + +type fastReflection_QueryKeyDerivationResponse QueryKeyDerivationResponse + +func (x *QueryKeyDerivationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryKeyDerivationResponse)(x) +} + +func (x *QueryKeyDerivationResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryKeyDerivationResponse_messageType fastReflection_QueryKeyDerivationResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryKeyDerivationResponse_messageType{} + +type fastReflection_QueryKeyDerivationResponse_messageType struct{} + +func (x fastReflection_QueryKeyDerivationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryKeyDerivationResponse)(nil) +} +func (x fastReflection_QueryKeyDerivationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryKeyDerivationResponse) +} +func (x fastReflection_QueryKeyDerivationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyDerivationResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryKeyDerivationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyDerivationResponse +} + +// 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_QueryKeyDerivationResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryKeyDerivationResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryKeyDerivationResponse) New() protoreflect.Message { + return new(fastReflection_QueryKeyDerivationResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryKeyDerivationResponse) Interface() protoreflect.ProtoMessage { + return (*QueryKeyDerivationResponse)(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_QueryKeyDerivationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.KeyDerivation != nil { + value := protoreflect.ValueOfMessage(x.KeyDerivation.ProtoReflect()) + if !f(fd_QueryKeyDerivationResponse_key_derivation, 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_QueryKeyDerivationResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationResponse.key_derivation": + return x.KeyDerivation != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationResponse 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_QueryKeyDerivationResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationResponse.key_derivation": + x.KeyDerivation = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationResponse 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_QueryKeyDerivationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryKeyDerivationResponse.key_derivation": + value := x.KeyDerivation + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationResponse 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_QueryKeyDerivationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationResponse.key_derivation": + x.KeyDerivation = value.Message().Interface().(*KeyDerivation) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationResponse 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_QueryKeyDerivationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationResponse.key_derivation": + if x.KeyDerivation == nil { + x.KeyDerivation = new(KeyDerivation) + } + return protoreflect.ValueOfMessage(x.KeyDerivation.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationResponse 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_QueryKeyDerivationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationResponse.key_derivation": + m := new(KeyDerivation) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationResponse 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_QueryKeyDerivationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryKeyDerivationResponse", 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_QueryKeyDerivationResponse) 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_QueryKeyDerivationResponse) 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_QueryKeyDerivationResponse) 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_QueryKeyDerivationResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryKeyDerivationResponse) + 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.KeyDerivation != nil { + l = options.Size(x.KeyDerivation) + 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().(*QueryKeyDerivationResponse) + 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.KeyDerivation != nil { + encoded, err := options.Marshal(x.KeyDerivation) + 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().(*QueryKeyDerivationResponse) + 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: QueryKeyDerivationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyDerivationResponse: 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 KeyDerivation", 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.KeyDerivation == nil { + x.KeyDerivation = &KeyDerivation{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.KeyDerivation); 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_QueryKeyDerivationsRequest protoreflect.MessageDescriptor + fd_QueryKeyDerivationsRequest_namespace protoreflect.FieldDescriptor + fd_QueryKeyDerivationsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryKeyDerivationsRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryKeyDerivationsRequest") + fd_QueryKeyDerivationsRequest_namespace = md_QueryKeyDerivationsRequest.Fields().ByName("namespace") + fd_QueryKeyDerivationsRequest_pagination = md_QueryKeyDerivationsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryKeyDerivationsRequest)(nil) + +type fastReflection_QueryKeyDerivationsRequest QueryKeyDerivationsRequest + +func (x *QueryKeyDerivationsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryKeyDerivationsRequest)(x) +} + +func (x *QueryKeyDerivationsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryKeyDerivationsRequest_messageType fastReflection_QueryKeyDerivationsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryKeyDerivationsRequest_messageType{} + +type fastReflection_QueryKeyDerivationsRequest_messageType struct{} + +func (x fastReflection_QueryKeyDerivationsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryKeyDerivationsRequest)(nil) +} +func (x fastReflection_QueryKeyDerivationsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryKeyDerivationsRequest) +} +func (x fastReflection_QueryKeyDerivationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyDerivationsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryKeyDerivationsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyDerivationsRequest +} + +// 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_QueryKeyDerivationsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryKeyDerivationsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryKeyDerivationsRequest) New() protoreflect.Message { + return new(fastReflection_QueryKeyDerivationsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryKeyDerivationsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryKeyDerivationsRequest)(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_QueryKeyDerivationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_QueryKeyDerivationsRequest_namespace, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryKeyDerivationsRequest_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_QueryKeyDerivationsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": + return x.Namespace != "" + case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsRequest 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_QueryKeyDerivationsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": + x.Namespace = "" + case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsRequest 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_QueryKeyDerivationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsRequest 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_QueryKeyDerivationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsRequest 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_QueryKeyDerivationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryKeyDerivationsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsRequest 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_QueryKeyDerivationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsRequest 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_QueryKeyDerivationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryKeyDerivationsRequest", 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_QueryKeyDerivationsRequest) 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_QueryKeyDerivationsRequest) 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_QueryKeyDerivationsRequest) 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_QueryKeyDerivationsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryKeyDerivationsRequest) + 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.Namespace) + if l > 0 { + 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().(*QueryKeyDerivationsRequest) + 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.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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().(*QueryKeyDerivationsRequest) + 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: QueryKeyDerivationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyDerivationsRequest: 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 Namespace", 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.Namespace = 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 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 = (*_QueryKeyDerivationsResponse_1_list)(nil) + +type _QueryKeyDerivationsResponse_1_list struct { + list *[]*KeyDerivation +} + +func (x *_QueryKeyDerivationsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryKeyDerivationsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryKeyDerivationsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*KeyDerivation) + (*x.list)[i] = concreteValue +} + +func (x *_QueryKeyDerivationsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*KeyDerivation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryKeyDerivationsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(KeyDerivation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryKeyDerivationsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryKeyDerivationsResponse_1_list) NewElement() protoreflect.Value { + v := new(KeyDerivation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryKeyDerivationsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryKeyDerivationsResponse protoreflect.MessageDescriptor + fd_QueryKeyDerivationsResponse_key_derivations protoreflect.FieldDescriptor + fd_QueryKeyDerivationsResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryKeyDerivationsResponse = File_sourcehub_orbis_query_proto.Messages().ByName("QueryKeyDerivationsResponse") + fd_QueryKeyDerivationsResponse_key_derivations = md_QueryKeyDerivationsResponse.Fields().ByName("key_derivations") + fd_QueryKeyDerivationsResponse_pagination = md_QueryKeyDerivationsResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryKeyDerivationsResponse)(nil) + +type fastReflection_QueryKeyDerivationsResponse QueryKeyDerivationsResponse + +func (x *QueryKeyDerivationsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryKeyDerivationsResponse)(x) +} + +func (x *QueryKeyDerivationsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_QueryKeyDerivationsResponse_messageType fastReflection_QueryKeyDerivationsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryKeyDerivationsResponse_messageType{} + +type fastReflection_QueryKeyDerivationsResponse_messageType struct{} + +func (x fastReflection_QueryKeyDerivationsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryKeyDerivationsResponse)(nil) +} +func (x fastReflection_QueryKeyDerivationsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryKeyDerivationsResponse) +} +func (x fastReflection_QueryKeyDerivationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyDerivationsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryKeyDerivationsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyDerivationsResponse +} + +// 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_QueryKeyDerivationsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryKeyDerivationsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryKeyDerivationsResponse) New() protoreflect.Message { + return new(fastReflection_QueryKeyDerivationsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryKeyDerivationsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryKeyDerivationsResponse)(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_QueryKeyDerivationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.KeyDerivations) != 0 { + value := protoreflect.ValueOfList(&_QueryKeyDerivationsResponse_1_list{list: &x.KeyDerivations}) + if !f(fd_QueryKeyDerivationsResponse_key_derivations, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryKeyDerivationsResponse_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_QueryKeyDerivationsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsResponse.key_derivations": + return len(x.KeyDerivations) != 0 + case "sourcehub.orbis.QueryKeyDerivationsResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsResponse 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_QueryKeyDerivationsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsResponse.key_derivations": + x.KeyDerivations = nil + case "sourcehub.orbis.QueryKeyDerivationsResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsResponse 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_QueryKeyDerivationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsResponse.key_derivations": + if len(x.KeyDerivations) == 0 { + return protoreflect.ValueOfList(&_QueryKeyDerivationsResponse_1_list{}) + } + listValue := &_QueryKeyDerivationsResponse_1_list{list: &x.KeyDerivations} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.QueryKeyDerivationsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsResponse 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_QueryKeyDerivationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsResponse.key_derivations": + lv := value.List() + clv := lv.(*_QueryKeyDerivationsResponse_1_list) + x.KeyDerivations = *clv.list + case "sourcehub.orbis.QueryKeyDerivationsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsResponse 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_QueryKeyDerivationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsResponse.key_derivations": + if x.KeyDerivations == nil { + x.KeyDerivations = []*KeyDerivation{} + } + value := &_QueryKeyDerivationsResponse_1_list{list: &x.KeyDerivations} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.QueryKeyDerivationsResponse.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: sourcehub.orbis.QueryKeyDerivationsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsResponse 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_QueryKeyDerivationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryKeyDerivationsResponse.key_derivations": + list := []*KeyDerivation{} + return protoreflect.ValueOfList(&_QueryKeyDerivationsResponse_1_list{list: &list}) + case "sourcehub.orbis.QueryKeyDerivationsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryKeyDerivationsResponse 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_QueryKeyDerivationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryKeyDerivationsResponse", 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_QueryKeyDerivationsResponse) 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_QueryKeyDerivationsResponse) 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_QueryKeyDerivationsResponse) 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_QueryKeyDerivationsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryKeyDerivationsResponse) + 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.KeyDerivations) > 0 { + for _, e := range x.KeyDerivations { + 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().(*QueryKeyDerivationsResponse) + 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.KeyDerivations) > 0 { + for iNdEx := len(x.KeyDerivations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.KeyDerivations[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().(*QueryKeyDerivationsResponse) + 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: QueryKeyDerivationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyDerivationsResponse: 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 KeyDerivations", 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.KeyDerivations = append(x.KeyDerivations, &KeyDerivation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.KeyDerivations[len(x.KeyDerivations)-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: sourcehub/orbis/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) +) + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_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_sourcehub_orbis_query_proto_rawDescGZIP(), []int{0} +} + +// QueryParamsResponse is response type for the Query/Params RPC method. +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_sourcehub_orbis_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_sourcehub_orbis_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +type QueryRingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryRingRequest) Reset() { + *x = QueryRingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRingRequest) ProtoMessage() {} + +// Deprecated: Use QueryRingRequest.ProtoReflect.Descriptor instead. +func (*QueryRingRequest) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryRingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type QueryRingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ring *Ring `protobuf:"bytes,1,opt,name=ring,proto3" json:"ring,omitempty"` +} + +func (x *QueryRingResponse) Reset() { + *x = QueryRingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRingResponse) ProtoMessage() {} + +// Deprecated: Use QueryRingResponse.ProtoReflect.Descriptor instead. +func (*QueryRingResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryRingResponse) GetRing() *Ring { + if x != nil { + return x.Ring + } + return nil +} + +type QueryRingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryRingsRequest) Reset() { + *x = QueryRingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRingsRequest) ProtoMessage() {} + +// Deprecated: Use QueryRingsRequest.ProtoReflect.Descriptor instead. +func (*QueryRingsRequest) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryRingsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *QueryRingsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryRingsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rings []*Ring `protobuf:"bytes,1,rep,name=rings,proto3" json:"rings,omitempty"` + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryRingsResponse) Reset() { + *x = QueryRingsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRingsResponse) ProtoMessage() {} + +// Deprecated: Use QueryRingsResponse.ProtoReflect.Descriptor instead. +func (*QueryRingsResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryRingsResponse) GetRings() []*Ring { + if x != nil { + return x.Rings + } + return nil +} + +func (x *QueryRingsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryDocumentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryDocumentRequest) Reset() { + *x = QueryDocumentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDocumentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDocumentRequest) ProtoMessage() {} + +// Deprecated: Use QueryDocumentRequest.ProtoReflect.Descriptor instead. +func (*QueryDocumentRequest) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryDocumentRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *QueryDocumentRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type QueryDocumentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Document *Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` +} + +func (x *QueryDocumentResponse) Reset() { + *x = QueryDocumentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDocumentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDocumentResponse) ProtoMessage() {} + +// Deprecated: Use QueryDocumentResponse.ProtoReflect.Descriptor instead. +func (*QueryDocumentResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryDocumentResponse) GetDocument() *Document { + if x != nil { + return x.Document + } + return nil +} + +type QueryDocumentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryDocumentsRequest) Reset() { + *x = QueryDocumentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDocumentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDocumentsRequest) ProtoMessage() {} + +// Deprecated: Use QueryDocumentsRequest.ProtoReflect.Descriptor instead. +func (*QueryDocumentsRequest) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryDocumentsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *QueryDocumentsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryDocumentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Documents []*Document `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"` + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryDocumentsResponse) Reset() { + *x = QueryDocumentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDocumentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDocumentsResponse) ProtoMessage() {} + +// Deprecated: Use QueryDocumentsResponse.ProtoReflect.Descriptor instead. +func (*QueryDocumentsResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryDocumentsResponse) GetDocuments() []*Document { + if x != nil { + return x.Documents + } + return nil +} + +func (x *QueryDocumentsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryKeyDerivationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryKeyDerivationRequest) Reset() { + *x = QueryKeyDerivationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryKeyDerivationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryKeyDerivationRequest) ProtoMessage() {} + +// Deprecated: Use QueryKeyDerivationRequest.ProtoReflect.Descriptor instead. +func (*QueryKeyDerivationRequest) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryKeyDerivationRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *QueryKeyDerivationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type QueryKeyDerivationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyDerivation *KeyDerivation `protobuf:"bytes,1,opt,name=key_derivation,json=keyDerivation,proto3" json:"key_derivation,omitempty"` +} + +func (x *QueryKeyDerivationResponse) Reset() { + *x = QueryKeyDerivationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryKeyDerivationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryKeyDerivationResponse) ProtoMessage() {} + +// Deprecated: Use QueryKeyDerivationResponse.ProtoReflect.Descriptor instead. +func (*QueryKeyDerivationResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryKeyDerivationResponse) GetKeyDerivation() *KeyDerivation { + if x != nil { + return x.KeyDerivation + } + return nil +} + +type QueryKeyDerivationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryKeyDerivationsRequest) Reset() { + *x = QueryKeyDerivationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryKeyDerivationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryKeyDerivationsRequest) ProtoMessage() {} + +// Deprecated: Use QueryKeyDerivationsRequest.ProtoReflect.Descriptor instead. +func (*QueryKeyDerivationsRequest) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{12} +} + +func (x *QueryKeyDerivationsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *QueryKeyDerivationsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryKeyDerivationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyDerivations []*KeyDerivation `protobuf:"bytes,1,rep,name=key_derivations,json=keyDerivations,proto3" json:"key_derivations,omitempty"` + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryKeyDerivationsResponse) Reset() { + *x = QueryKeyDerivationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryKeyDerivationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryKeyDerivationsResponse) ProtoMessage() {} + +// Deprecated: Use QueryKeyDerivationsResponse.ProtoReflect.Descriptor instead. +func (*QueryKeyDerivationsResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryKeyDerivationsResponse) GetKeyDerivations() []*KeyDerivation { + if x != nil { + return x.KeyDerivations + } + return nil +} + +func (x *QueryKeyDerivationsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +var File_sourcehub_orbis_query_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_query_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x1a, 0x11, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 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, 0x14, 0x67, + 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 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, 0x51, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x22, 0x0a, 0x10, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3e, + 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, + 0x62, 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x79, + 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 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, 0x95, 0x01, 0x0a, 0x12, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x05, 0x72, 0x69, 0x6e, 0x67, 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, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x35, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7d, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0xa5, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, + 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, + 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, 0x1a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0d, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, + 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0xba, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, + 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4b, + 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0xad, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x82, 0x01, 0x0a, 0x06, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x7f, 0x0a, 0x04, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0x7e, 0x0a, 0x05, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x9b, 0x01, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9a, + 0x01, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, + 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x12, 0xb0, 0x01, 0x0a, 0x0d, + 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, + 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, + 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xaf, + 0x01, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, + 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, + 0x42, 0xa0, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, + 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, + 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, + 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, + 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, + 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sourcehub_orbis_query_proto_rawDescOnce sync.Once + file_sourcehub_orbis_query_proto_rawDescData = file_sourcehub_orbis_query_proto_rawDesc +) + +func file_sourcehub_orbis_query_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_query_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_query_proto_rawDescData) + }) + return file_sourcehub_orbis_query_proto_rawDescData +} + +var file_sourcehub_orbis_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_sourcehub_orbis_query_proto_goTypes = []interface{}{ + (*QueryParamsRequest)(nil), // 0: sourcehub.orbis.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: sourcehub.orbis.QueryParamsResponse + (*QueryRingRequest)(nil), // 2: sourcehub.orbis.QueryRingRequest + (*QueryRingResponse)(nil), // 3: sourcehub.orbis.QueryRingResponse + (*QueryRingsRequest)(nil), // 4: sourcehub.orbis.QueryRingsRequest + (*QueryRingsResponse)(nil), // 5: sourcehub.orbis.QueryRingsResponse + (*QueryDocumentRequest)(nil), // 6: sourcehub.orbis.QueryDocumentRequest + (*QueryDocumentResponse)(nil), // 7: sourcehub.orbis.QueryDocumentResponse + (*QueryDocumentsRequest)(nil), // 8: sourcehub.orbis.QueryDocumentsRequest + (*QueryDocumentsResponse)(nil), // 9: sourcehub.orbis.QueryDocumentsResponse + (*QueryKeyDerivationRequest)(nil), // 10: sourcehub.orbis.QueryKeyDerivationRequest + (*QueryKeyDerivationResponse)(nil), // 11: sourcehub.orbis.QueryKeyDerivationResponse + (*QueryKeyDerivationsRequest)(nil), // 12: sourcehub.orbis.QueryKeyDerivationsRequest + (*QueryKeyDerivationsResponse)(nil), // 13: sourcehub.orbis.QueryKeyDerivationsResponse + (*Params)(nil), // 14: sourcehub.orbis.Params + (*Ring)(nil), // 15: sourcehub.orbis.Ring + (*v1beta1.PageRequest)(nil), // 16: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 17: cosmos.base.query.v1beta1.PageResponse + (*Document)(nil), // 18: sourcehub.orbis.Document + (*KeyDerivation)(nil), // 19: sourcehub.orbis.KeyDerivation +} +var file_sourcehub_orbis_query_proto_depIdxs = []int32{ + 14, // 0: sourcehub.orbis.QueryParamsResponse.params:type_name -> sourcehub.orbis.Params + 15, // 1: sourcehub.orbis.QueryRingResponse.ring:type_name -> sourcehub.orbis.Ring + 16, // 2: sourcehub.orbis.QueryRingsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 15, // 3: sourcehub.orbis.QueryRingsResponse.rings:type_name -> sourcehub.orbis.Ring + 17, // 4: sourcehub.orbis.QueryRingsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 18, // 5: sourcehub.orbis.QueryDocumentResponse.document:type_name -> sourcehub.orbis.Document + 16, // 6: sourcehub.orbis.QueryDocumentsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 18, // 7: sourcehub.orbis.QueryDocumentsResponse.documents:type_name -> sourcehub.orbis.Document + 17, // 8: sourcehub.orbis.QueryDocumentsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 19, // 9: sourcehub.orbis.QueryKeyDerivationResponse.key_derivation:type_name -> sourcehub.orbis.KeyDerivation + 16, // 10: sourcehub.orbis.QueryKeyDerivationsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 19, // 11: sourcehub.orbis.QueryKeyDerivationsResponse.key_derivations:type_name -> sourcehub.orbis.KeyDerivation + 17, // 12: sourcehub.orbis.QueryKeyDerivationsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 13: sourcehub.orbis.Query.Params:input_type -> sourcehub.orbis.QueryParamsRequest + 2, // 14: sourcehub.orbis.Query.Ring:input_type -> sourcehub.orbis.QueryRingRequest + 4, // 15: sourcehub.orbis.Query.Rings:input_type -> sourcehub.orbis.QueryRingsRequest + 6, // 16: sourcehub.orbis.Query.Document:input_type -> sourcehub.orbis.QueryDocumentRequest + 8, // 17: sourcehub.orbis.Query.Documents:input_type -> sourcehub.orbis.QueryDocumentsRequest + 10, // 18: sourcehub.orbis.Query.KeyDerivation:input_type -> sourcehub.orbis.QueryKeyDerivationRequest + 12, // 19: sourcehub.orbis.Query.KeyDerivations:input_type -> sourcehub.orbis.QueryKeyDerivationsRequest + 1, // 20: sourcehub.orbis.Query.Params:output_type -> sourcehub.orbis.QueryParamsResponse + 3, // 21: sourcehub.orbis.Query.Ring:output_type -> sourcehub.orbis.QueryRingResponse + 5, // 22: sourcehub.orbis.Query.Rings:output_type -> sourcehub.orbis.QueryRingsResponse + 7, // 23: sourcehub.orbis.Query.Document:output_type -> sourcehub.orbis.QueryDocumentResponse + 9, // 24: sourcehub.orbis.Query.Documents:output_type -> sourcehub.orbis.QueryDocumentsResponse + 11, // 25: sourcehub.orbis.Query.KeyDerivation:output_type -> sourcehub.orbis.QueryKeyDerivationResponse + 13, // 26: sourcehub.orbis.Query.KeyDerivations:output_type -> sourcehub.orbis.QueryKeyDerivationsResponse + 20, // [20:27] is the sub-list for method output_type + 13, // [13:20] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_sourcehub_orbis_query_proto_init() } +func file_sourcehub_orbis_query_proto_init() { + if File_sourcehub_orbis_query_proto != nil { + return + } + file_sourcehub_orbis_document_proto_init() + file_sourcehub_orbis_key_derivation_proto_init() + file_sourcehub_orbis_params_proto_init() + file_sourcehub_orbis_ring_proto_init() + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_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_sourcehub_orbis_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_sourcehub_orbis_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDocumentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDocumentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDocumentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDocumentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryKeyDerivationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryKeyDerivationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryKeyDerivationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryKeyDerivationsResponse); 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_sourcehub_orbis_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_sourcehub_orbis_query_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_query_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_query_proto_msgTypes, + }.Build() + File_sourcehub_orbis_query_proto = out.File + file_sourcehub_orbis_query_proto_rawDesc = nil + file_sourcehub_orbis_query_proto_goTypes = nil + file_sourcehub_orbis_query_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/query_grpc.pb.go b/api/sourcehub/orbis/query_grpc.pb.go new file mode 100644 index 00000000..9a256e1e --- /dev/null +++ b/api/sourcehub/orbis/query_grpc.pb.go @@ -0,0 +1,367 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: sourcehub/orbis/query.proto + +package orbis + +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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Query_Params_FullMethodName = "/sourcehub.orbis.Query/Params" + Query_Ring_FullMethodName = "/sourcehub.orbis.Query/Ring" + Query_Rings_FullMethodName = "/sourcehub.orbis.Query/Rings" + Query_Document_FullMethodName = "/sourcehub.orbis.Query/Document" + Query_Documents_FullMethodName = "/sourcehub.orbis.Query/Documents" + Query_KeyDerivation_FullMethodName = "/sourcehub.orbis.Query/KeyDerivation" + Query_KeyDerivations_FullMethodName = "/sourcehub.orbis.Query/KeyDerivations" +) + +// 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Ring queries a ring by id. + Ring(ctx context.Context, in *QueryRingRequest, opts ...grpc.CallOption) (*QueryRingResponse, error) + // Rings queries rings, optionally filtered by namespace. + Rings(ctx context.Context, in *QueryRingsRequest, opts ...grpc.CallOption) (*QueryRingsResponse, error) + // Document queries an encrypted document by namespace and id. + Document(ctx context.Context, in *QueryDocumentRequest, opts ...grpc.CallOption) (*QueryDocumentResponse, error) + // Documents queries encrypted documents within a namespace. + Documents(ctx context.Context, in *QueryDocumentsRequest, opts ...grpc.CallOption) (*QueryDocumentsResponse, error) + // KeyDerivation queries a key derivation by namespace and id. + KeyDerivation(ctx context.Context, in *QueryKeyDerivationRequest, opts ...grpc.CallOption) (*QueryKeyDerivationResponse, error) + // KeyDerivations queries key derivations within a namespace. + KeyDerivations(ctx context.Context, in *QueryKeyDerivationsRequest, opts ...grpc.CallOption) (*QueryKeyDerivationsResponse, 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) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Ring(ctx context.Context, in *QueryRingRequest, opts ...grpc.CallOption) (*QueryRingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryRingResponse) + err := c.cc.Invoke(ctx, Query_Ring_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Rings(ctx context.Context, in *QueryRingsRequest, opts ...grpc.CallOption) (*QueryRingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryRingsResponse) + err := c.cc.Invoke(ctx, Query_Rings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Document(ctx context.Context, in *QueryDocumentRequest, opts ...grpc.CallOption) (*QueryDocumentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryDocumentResponse) + err := c.cc.Invoke(ctx, Query_Document_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Documents(ctx context.Context, in *QueryDocumentsRequest, opts ...grpc.CallOption) (*QueryDocumentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryDocumentsResponse) + err := c.cc.Invoke(ctx, Query_Documents_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) KeyDerivation(ctx context.Context, in *QueryKeyDerivationRequest, opts ...grpc.CallOption) (*QueryKeyDerivationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryKeyDerivationResponse) + err := c.cc.Invoke(ctx, Query_KeyDerivation_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) KeyDerivations(ctx context.Context, in *QueryKeyDerivationsRequest, opts ...grpc.CallOption) (*QueryKeyDerivationsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryKeyDerivationsResponse) + err := c.cc.Invoke(ctx, Query_KeyDerivations_FullMethodName, in, out, cOpts...) + 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. +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Ring queries a ring by id. + Ring(context.Context, *QueryRingRequest) (*QueryRingResponse, error) + // Rings queries rings, optionally filtered by namespace. + Rings(context.Context, *QueryRingsRequest) (*QueryRingsResponse, error) + // Document queries an encrypted document by namespace and id. + Document(context.Context, *QueryDocumentRequest) (*QueryDocumentResponse, error) + // Documents queries encrypted documents within a namespace. + Documents(context.Context, *QueryDocumentsRequest) (*QueryDocumentsResponse, error) + // KeyDerivation queries a key derivation by namespace and id. + KeyDerivation(context.Context, *QueryKeyDerivationRequest) (*QueryKeyDerivationResponse, error) + // KeyDerivations queries key derivations within a namespace. + KeyDerivations(context.Context, *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedQueryServer struct{} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) Ring(context.Context, *QueryRingRequest) (*QueryRingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ring not implemented") +} +func (UnimplementedQueryServer) Rings(context.Context, *QueryRingsRequest) (*QueryRingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Rings not implemented") +} +func (UnimplementedQueryServer) Document(context.Context, *QueryDocumentRequest) (*QueryDocumentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Document not implemented") +} +func (UnimplementedQueryServer) Documents(context.Context, *QueryDocumentsRequest) (*QueryDocumentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Documents not implemented") +} +func (UnimplementedQueryServer) KeyDerivation(context.Context, *QueryKeyDerivationRequest) (*QueryKeyDerivationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method KeyDerivation not implemented") +} +func (UnimplementedQueryServer) KeyDerivations(context.Context, *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method KeyDerivations not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} +func (UnimplementedQueryServer) testEmbeddedByValue() {} + +// 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) { + // If the following call pancis, it indicates UnimplementedQueryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + 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_Ring_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Ring(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Ring_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Ring(ctx, req.(*QueryRingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Rings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Rings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Rings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Rings(ctx, req.(*QueryRingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Document_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDocumentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Document(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Document_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Document(ctx, req.(*QueryDocumentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Documents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDocumentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Documents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Documents_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Documents(ctx, req.(*QueryDocumentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_KeyDerivation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryKeyDerivationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).KeyDerivation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_KeyDerivation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).KeyDerivation(ctx, req.(*QueryKeyDerivationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_KeyDerivations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryKeyDerivationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).KeyDerivations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_KeyDerivations_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).KeyDerivations(ctx, req.(*QueryKeyDerivationsRequest)) + } + 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: "sourcehub.orbis.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Ring", + Handler: _Query_Ring_Handler, + }, + { + MethodName: "Rings", + Handler: _Query_Rings_Handler, + }, + { + MethodName: "Document", + Handler: _Query_Document_Handler, + }, + { + MethodName: "Documents", + Handler: _Query_Documents_Handler, + }, + { + MethodName: "KeyDerivation", + Handler: _Query_KeyDerivation_Handler, + }, + { + MethodName: "KeyDerivations", + Handler: _Query_KeyDerivations_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sourcehub/orbis/query.proto", +} diff --git a/api/sourcehub/orbis/ring.pulsar.go b/api/sourcehub/orbis/ring.pulsar.go new file mode 100644 index 00000000..b87b26f8 --- /dev/null +++ b/api/sourcehub/orbis/ring.pulsar.go @@ -0,0 +1,1491 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package orbis + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_Ring_5_list)(nil) + +type _Ring_5_list struct { + list *[]string +} + +func (x *_Ring_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Ring_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Ring_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Ring_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Ring_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Ring at list field PeerIds as it is not of Message kind")) +} + +func (x *_Ring_5_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Ring_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Ring_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Ring_7_list)(nil) + +type _Ring_7_list struct { + list *[]string +} + +func (x *_Ring_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Ring_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Ring_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Ring_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Ring_7_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Ring at list field NewPeerIds as it is not of Message kind")) +} + +func (x *_Ring_7_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Ring_7_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Ring_7_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Ring protoreflect.MessageDescriptor + fd_Ring_id protoreflect.FieldDescriptor + fd_Ring_namespace protoreflect.FieldDescriptor + fd_Ring_creator_did protoreflect.FieldDescriptor + fd_Ring_ring_pk protoreflect.FieldDescriptor + fd_Ring_peer_ids protoreflect.FieldDescriptor + fd_Ring_threshold protoreflect.FieldDescriptor + fd_Ring_new_peer_ids protoreflect.FieldDescriptor + fd_Ring_new_threshold protoreflect.FieldDescriptor + fd_Ring_has_new_threshold protoreflect.FieldDescriptor + fd_Ring_pss_interval protoreflect.FieldDescriptor + fd_Ring_has_pss_interval protoreflect.FieldDescriptor + fd_Ring_block_number_nonce protoreflect.FieldDescriptor + fd_Ring_policy_id protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_ring_proto_init() + md_Ring = File_sourcehub_orbis_ring_proto.Messages().ByName("Ring") + fd_Ring_id = md_Ring.Fields().ByName("id") + fd_Ring_namespace = md_Ring.Fields().ByName("namespace") + fd_Ring_creator_did = md_Ring.Fields().ByName("creator_did") + fd_Ring_ring_pk = md_Ring.Fields().ByName("ring_pk") + fd_Ring_peer_ids = md_Ring.Fields().ByName("peer_ids") + fd_Ring_threshold = md_Ring.Fields().ByName("threshold") + fd_Ring_new_peer_ids = md_Ring.Fields().ByName("new_peer_ids") + fd_Ring_new_threshold = md_Ring.Fields().ByName("new_threshold") + fd_Ring_has_new_threshold = md_Ring.Fields().ByName("has_new_threshold") + fd_Ring_pss_interval = md_Ring.Fields().ByName("pss_interval") + fd_Ring_has_pss_interval = md_Ring.Fields().ByName("has_pss_interval") + fd_Ring_block_number_nonce = md_Ring.Fields().ByName("block_number_nonce") + fd_Ring_policy_id = md_Ring.Fields().ByName("policy_id") +} + +var _ protoreflect.Message = (*fastReflection_Ring)(nil) + +type fastReflection_Ring Ring + +func (x *Ring) ProtoReflect() protoreflect.Message { + return (*fastReflection_Ring)(x) +} + +func (x *Ring) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_ring_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_Ring_messageType fastReflection_Ring_messageType +var _ protoreflect.MessageType = fastReflection_Ring_messageType{} + +type fastReflection_Ring_messageType struct{} + +func (x fastReflection_Ring_messageType) Zero() protoreflect.Message { + return (*fastReflection_Ring)(nil) +} +func (x fastReflection_Ring_messageType) New() protoreflect.Message { + return new(fastReflection_Ring) +} +func (x fastReflection_Ring_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Ring +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Ring) Descriptor() protoreflect.MessageDescriptor { + return md_Ring +} + +// 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_Ring) Type() protoreflect.MessageType { + return _fastReflection_Ring_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Ring) New() protoreflect.Message { + return new(fastReflection_Ring) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Ring) Interface() protoreflect.ProtoMessage { + return (*Ring)(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_Ring) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_Ring_id, value) { + return + } + } + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_Ring_namespace, value) { + return + } + } + if x.CreatorDid != "" { + value := protoreflect.ValueOfString(x.CreatorDid) + if !f(fd_Ring_creator_did, value) { + return + } + } + if x.RingPk != "" { + value := protoreflect.ValueOfString(x.RingPk) + if !f(fd_Ring_ring_pk, value) { + return + } + } + if len(x.PeerIds) != 0 { + value := protoreflect.ValueOfList(&_Ring_5_list{list: &x.PeerIds}) + if !f(fd_Ring_peer_ids, value) { + return + } + } + if x.Threshold != uint32(0) { + value := protoreflect.ValueOfUint32(x.Threshold) + if !f(fd_Ring_threshold, value) { + return + } + } + if len(x.NewPeerIds) != 0 { + value := protoreflect.ValueOfList(&_Ring_7_list{list: &x.NewPeerIds}) + if !f(fd_Ring_new_peer_ids, value) { + return + } + } + if x.NewThreshold != uint32(0) { + value := protoreflect.ValueOfUint32(x.NewThreshold) + if !f(fd_Ring_new_threshold, value) { + return + } + } + if x.HasNewThreshold != false { + value := protoreflect.ValueOfBool(x.HasNewThreshold) + if !f(fd_Ring_has_new_threshold, value) { + return + } + } + if x.PssInterval != uint64(0) { + value := protoreflect.ValueOfUint64(x.PssInterval) + if !f(fd_Ring_pss_interval, value) { + return + } + } + if x.HasPssInterval != false { + value := protoreflect.ValueOfBool(x.HasPssInterval) + if !f(fd_Ring_has_pss_interval, value) { + return + } + } + if x.BlockNumberNonce != uint64(0) { + value := protoreflect.ValueOfUint64(x.BlockNumberNonce) + if !f(fd_Ring_block_number_nonce, value) { + return + } + } + if x.PolicyId != "" { + value := protoreflect.ValueOfString(x.PolicyId) + if !f(fd_Ring_policy_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_Ring) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.Ring.id": + return x.Id != "" + case "sourcehub.orbis.Ring.namespace": + return x.Namespace != "" + case "sourcehub.orbis.Ring.creator_did": + return x.CreatorDid != "" + case "sourcehub.orbis.Ring.ring_pk": + return x.RingPk != "" + case "sourcehub.orbis.Ring.peer_ids": + return len(x.PeerIds) != 0 + case "sourcehub.orbis.Ring.threshold": + return x.Threshold != uint32(0) + case "sourcehub.orbis.Ring.new_peer_ids": + return len(x.NewPeerIds) != 0 + case "sourcehub.orbis.Ring.new_threshold": + return x.NewThreshold != uint32(0) + case "sourcehub.orbis.Ring.has_new_threshold": + return x.HasNewThreshold != false + case "sourcehub.orbis.Ring.pss_interval": + return x.PssInterval != uint64(0) + case "sourcehub.orbis.Ring.has_pss_interval": + return x.HasPssInterval != false + case "sourcehub.orbis.Ring.block_number_nonce": + return x.BlockNumberNonce != uint64(0) + case "sourcehub.orbis.Ring.policy_id": + return x.PolicyId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) + } + panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.Ring.id": + x.Id = "" + case "sourcehub.orbis.Ring.namespace": + x.Namespace = "" + case "sourcehub.orbis.Ring.creator_did": + x.CreatorDid = "" + case "sourcehub.orbis.Ring.ring_pk": + x.RingPk = "" + case "sourcehub.orbis.Ring.peer_ids": + x.PeerIds = nil + case "sourcehub.orbis.Ring.threshold": + x.Threshold = uint32(0) + case "sourcehub.orbis.Ring.new_peer_ids": + x.NewPeerIds = nil + case "sourcehub.orbis.Ring.new_threshold": + x.NewThreshold = uint32(0) + case "sourcehub.orbis.Ring.has_new_threshold": + x.HasNewThreshold = false + case "sourcehub.orbis.Ring.pss_interval": + x.PssInterval = uint64(0) + case "sourcehub.orbis.Ring.has_pss_interval": + x.HasPssInterval = false + case "sourcehub.orbis.Ring.block_number_nonce": + x.BlockNumberNonce = uint64(0) + case "sourcehub.orbis.Ring.policy_id": + x.PolicyId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) + } + panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.Ring.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Ring.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Ring.creator_did": + value := x.CreatorDid + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Ring.ring_pk": + value := x.RingPk + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.Ring.peer_ids": + if len(x.PeerIds) == 0 { + return protoreflect.ValueOfList(&_Ring_5_list{}) + } + listValue := &_Ring_5_list{list: &x.PeerIds} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.Ring.threshold": + value := x.Threshold + return protoreflect.ValueOfUint32(value) + case "sourcehub.orbis.Ring.new_peer_ids": + if len(x.NewPeerIds) == 0 { + return protoreflect.ValueOfList(&_Ring_7_list{}) + } + listValue := &_Ring_7_list{list: &x.NewPeerIds} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.Ring.new_threshold": + value := x.NewThreshold + return protoreflect.ValueOfUint32(value) + case "sourcehub.orbis.Ring.has_new_threshold": + value := x.HasNewThreshold + return protoreflect.ValueOfBool(value) + case "sourcehub.orbis.Ring.pss_interval": + value := x.PssInterval + return protoreflect.ValueOfUint64(value) + case "sourcehub.orbis.Ring.has_pss_interval": + value := x.HasPssInterval + return protoreflect.ValueOfBool(value) + case "sourcehub.orbis.Ring.block_number_nonce": + value := x.BlockNumberNonce + return protoreflect.ValueOfUint64(value) + case "sourcehub.orbis.Ring.policy_id": + value := x.PolicyId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) + } + panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.Ring.id": + x.Id = value.Interface().(string) + case "sourcehub.orbis.Ring.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.Ring.creator_did": + x.CreatorDid = value.Interface().(string) + case "sourcehub.orbis.Ring.ring_pk": + x.RingPk = value.Interface().(string) + case "sourcehub.orbis.Ring.peer_ids": + lv := value.List() + clv := lv.(*_Ring_5_list) + x.PeerIds = *clv.list + case "sourcehub.orbis.Ring.threshold": + x.Threshold = uint32(value.Uint()) + case "sourcehub.orbis.Ring.new_peer_ids": + lv := value.List() + clv := lv.(*_Ring_7_list) + x.NewPeerIds = *clv.list + case "sourcehub.orbis.Ring.new_threshold": + x.NewThreshold = uint32(value.Uint()) + case "sourcehub.orbis.Ring.has_new_threshold": + x.HasNewThreshold = value.Bool() + case "sourcehub.orbis.Ring.pss_interval": + x.PssInterval = value.Uint() + case "sourcehub.orbis.Ring.has_pss_interval": + x.HasPssInterval = value.Bool() + case "sourcehub.orbis.Ring.block_number_nonce": + x.BlockNumberNonce = value.Uint() + case "sourcehub.orbis.Ring.policy_id": + x.PolicyId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) + } + panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.Ring.peer_ids": + if x.PeerIds == nil { + x.PeerIds = []string{} + } + value := &_Ring_5_list{list: &x.PeerIds} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.Ring.new_peer_ids": + if x.NewPeerIds == nil { + x.NewPeerIds = []string{} + } + value := &_Ring_7_list{list: &x.NewPeerIds} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.Ring.id": + panic(fmt.Errorf("field id of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.creator_did": + panic(fmt.Errorf("field creator_did of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.ring_pk": + panic(fmt.Errorf("field ring_pk of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.threshold": + panic(fmt.Errorf("field threshold of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.new_threshold": + panic(fmt.Errorf("field new_threshold of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.has_new_threshold": + panic(fmt.Errorf("field has_new_threshold of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.pss_interval": + panic(fmt.Errorf("field pss_interval of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.has_pss_interval": + panic(fmt.Errorf("field has_pss_interval of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.block_number_nonce": + panic(fmt.Errorf("field block_number_nonce of message sourcehub.orbis.Ring is not mutable")) + case "sourcehub.orbis.Ring.policy_id": + panic(fmt.Errorf("field policy_id of message sourcehub.orbis.Ring is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) + } + panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.Ring.id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Ring.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Ring.creator_did": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Ring.ring_pk": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.Ring.peer_ids": + list := []string{} + return protoreflect.ValueOfList(&_Ring_5_list{list: &list}) + case "sourcehub.orbis.Ring.threshold": + return protoreflect.ValueOfUint32(uint32(0)) + case "sourcehub.orbis.Ring.new_peer_ids": + list := []string{} + return protoreflect.ValueOfList(&_Ring_7_list{list: &list}) + case "sourcehub.orbis.Ring.new_threshold": + return protoreflect.ValueOfUint32(uint32(0)) + case "sourcehub.orbis.Ring.has_new_threshold": + return protoreflect.ValueOfBool(false) + case "sourcehub.orbis.Ring.pss_interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "sourcehub.orbis.Ring.has_pss_interval": + return protoreflect.ValueOfBool(false) + case "sourcehub.orbis.Ring.block_number_nonce": + return protoreflect.ValueOfUint64(uint64(0)) + case "sourcehub.orbis.Ring.policy_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) + } + panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.Ring", 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_Ring) 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_Ring) 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_Ring) 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_Ring) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Ring) + 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.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CreatorDid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingPk) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.PeerIds) > 0 { + for _, s := range x.PeerIds { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Threshold != 0 { + n += 1 + runtime.Sov(uint64(x.Threshold)) + } + if len(x.NewPeerIds) > 0 { + for _, s := range x.NewPeerIds { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.NewThreshold != 0 { + n += 1 + runtime.Sov(uint64(x.NewThreshold)) + } + if x.HasNewThreshold { + n += 2 + } + if x.PssInterval != 0 { + n += 1 + runtime.Sov(uint64(x.PssInterval)) + } + if x.HasPssInterval { + n += 2 + } + if x.BlockNumberNonce != 0 { + n += 1 + runtime.Sov(uint64(x.BlockNumberNonce)) + } + l = len(x.PolicyId) + 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().(*Ring) + 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.PolicyId) > 0 { + i -= len(x.PolicyId) + copy(dAtA[i:], x.PolicyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) + i-- + dAtA[i] = 0x6a + } + if x.BlockNumberNonce != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockNumberNonce)) + i-- + dAtA[i] = 0x60 + } + if x.HasPssInterval { + i-- + if x.HasPssInterval { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if x.PssInterval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.PssInterval)) + i-- + dAtA[i] = 0x50 + } + if x.HasNewThreshold { + i-- + if x.HasNewThreshold { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if x.NewThreshold != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NewThreshold)) + i-- + dAtA[i] = 0x40 + } + if len(x.NewPeerIds) > 0 { + for iNdEx := len(x.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.NewPeerIds[iNdEx]) + copy(dAtA[i:], x.NewPeerIds[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewPeerIds[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if x.Threshold != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Threshold)) + i-- + dAtA[i] = 0x30 + } + if len(x.PeerIds) > 0 { + for iNdEx := len(x.PeerIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.PeerIds[iNdEx]) + copy(dAtA[i:], x.PeerIds[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PeerIds[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(x.RingPk) > 0 { + i -= len(x.RingPk) + copy(dAtA[i:], x.RingPk) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingPk))) + i-- + dAtA[i] = 0x22 + } + if len(x.CreatorDid) > 0 { + i -= len(x.CreatorDid) + copy(dAtA[i:], x.CreatorDid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + 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 { + 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().(*Ring) + 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: Ring: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Ring: 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 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 Namespace", 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.Namespace = 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 CreatorDid", 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.CreatorDid = 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 RingPk", 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.RingPk = 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 PeerIds", 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.PeerIds = append(x.PeerIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + x.Threshold = 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.Threshold |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", 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.NewPeerIds = append(x.NewPeerIds, 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 NewThreshold", wireType) + } + x.NewThreshold = 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.NewThreshold |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasNewThreshold", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HasNewThreshold = bool(v != 0) + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) + } + x.PssInterval = 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.PssInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HasPssInterval = bool(v != 0) + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) + } + x.BlockNumberNonce = 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.BlockNumberNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: sourcehub/orbis/ring.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) +) + +// Ring stores the active and pending committee metadata for an Orbis ring. +type Ring struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` + NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + NewThreshold uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` + HasNewThreshold bool `protobuf:"varint,9,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` + PssInterval uint64 `protobuf:"varint,10,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` + HasPssInterval bool `protobuf:"varint,11,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,12,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + PolicyId string `protobuf:"bytes,13,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` +} + +func (x *Ring) Reset() { + *x = Ring{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_ring_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ring) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ring) ProtoMessage() {} + +// Deprecated: Use Ring.ProtoReflect.Descriptor instead. +func (*Ring) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_ring_proto_rawDescGZIP(), []int{0} +} + +func (x *Ring) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Ring) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Ring) GetCreatorDid() string { + if x != nil { + return x.CreatorDid + } + return "" +} + +func (x *Ring) GetRingPk() string { + if x != nil { + return x.RingPk + } + return "" +} + +func (x *Ring) GetPeerIds() []string { + if x != nil { + return x.PeerIds + } + return nil +} + +func (x *Ring) GetThreshold() uint32 { + if x != nil { + return x.Threshold + } + return 0 +} + +func (x *Ring) GetNewPeerIds() []string { + if x != nil { + return x.NewPeerIds + } + return nil +} + +func (x *Ring) GetNewThreshold() uint32 { + if x != nil { + return x.NewThreshold + } + return 0 +} + +func (x *Ring) GetHasNewThreshold() bool { + if x != nil { + return x.HasNewThreshold + } + return false +} + +func (x *Ring) GetPssInterval() uint64 { + if x != nil { + return x.PssInterval + } + return 0 +} + +func (x *Ring) GetHasPssInterval() bool { + if x != nil { + return x.HasPssInterval + } + return false +} + +func (x *Ring) GetBlockNumberNonce() uint64 { + if x != nil { + return x.BlockNumberNonce + } + return 0 +} + +func (x *Ring) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +var File_sourcehub_orbis_ring_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_ring_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x22, 0xb2, 0x03, + 0x0a, 0x04, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6b, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x6b, 0x12, 0x19, + 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, + 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, + 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x77, + 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2a, + 0x0a, 0x11, 0x68, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x4e, 0x65, + 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x73, + 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x28, 0x0a, + 0x10, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x50, 0x73, 0x73, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x49, 0x64, 0x42, 0x9f, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x09, 0x52, 0x69, 0x6e, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, + 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, + 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, + 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, + 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, + 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sourcehub_orbis_ring_proto_rawDescOnce sync.Once + file_sourcehub_orbis_ring_proto_rawDescData = file_sourcehub_orbis_ring_proto_rawDesc +) + +func file_sourcehub_orbis_ring_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_ring_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_ring_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_ring_proto_rawDescData) + }) + return file_sourcehub_orbis_ring_proto_rawDescData +} + +var file_sourcehub_orbis_ring_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sourcehub_orbis_ring_proto_goTypes = []interface{}{ + (*Ring)(nil), // 0: sourcehub.orbis.Ring +} +var file_sourcehub_orbis_ring_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_sourcehub_orbis_ring_proto_init() } +func file_sourcehub_orbis_ring_proto_init() { + if File_sourcehub_orbis_ring_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_ring_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ring); 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_sourcehub_orbis_ring_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_ring_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_ring_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_ring_proto_msgTypes, + }.Build() + File_sourcehub_orbis_ring_proto = out.File + file_sourcehub_orbis_ring_proto_rawDesc = nil + file_sourcehub_orbis_ring_proto_goTypes = nil + file_sourcehub_orbis_ring_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/tx.pulsar.go b/api/sourcehub/orbis/tx.pulsar.go new file mode 100644 index 00000000..bca76f1b --- /dev/null +++ b/api/sourcehub/orbis/tx.pulsar.go @@ -0,0 +1,9480 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package orbis + +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_sourcehub_orbis_tx_proto_init() + md_MsgUpdateParams = File_sourcehub_orbis_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_sourcehub_orbis_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 "sourcehub.orbis.MsgUpdateParams.authority": + return x.Authority != "" + case "sourcehub.orbis.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.authority": + x.Authority = "" + case "sourcehub.orbis.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "sourcehub.orbis.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "sourcehub.orbis.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message sourcehub.orbis.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 sourcehub.orbis.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_sourcehub_orbis_tx_proto_init() + md_MsgUpdateParamsResponse = File_sourcehub_orbis_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_sourcehub_orbis_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: sourcehub.orbis.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.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 sourcehub.orbis.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 _ protoreflect.List = (*_MsgCreateRing_4_list)(nil) + +type _MsgCreateRing_4_list struct { + list *[]string +} + +func (x *_MsgCreateRing_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCreateRing_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgCreateRing_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgCreateRing_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCreateRing_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgCreateRing at list field PeerIds as it is not of Message kind")) +} + +func (x *_MsgCreateRing_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgCreateRing_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgCreateRing_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgCreateRing protoreflect.MessageDescriptor + fd_MsgCreateRing_creator protoreflect.FieldDescriptor + fd_MsgCreateRing_namespace protoreflect.FieldDescriptor + fd_MsgCreateRing_ring_pk protoreflect.FieldDescriptor + fd_MsgCreateRing_peer_ids protoreflect.FieldDescriptor + fd_MsgCreateRing_threshold protoreflect.FieldDescriptor + fd_MsgCreateRing_pss_interval protoreflect.FieldDescriptor + fd_MsgCreateRing_has_pss_interval protoreflect.FieldDescriptor + fd_MsgCreateRing_policy_id protoreflect.FieldDescriptor + fd_MsgCreateRing_artifact protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgCreateRing = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgCreateRing") + fd_MsgCreateRing_creator = md_MsgCreateRing.Fields().ByName("creator") + fd_MsgCreateRing_namespace = md_MsgCreateRing.Fields().ByName("namespace") + fd_MsgCreateRing_ring_pk = md_MsgCreateRing.Fields().ByName("ring_pk") + fd_MsgCreateRing_peer_ids = md_MsgCreateRing.Fields().ByName("peer_ids") + fd_MsgCreateRing_threshold = md_MsgCreateRing.Fields().ByName("threshold") + fd_MsgCreateRing_pss_interval = md_MsgCreateRing.Fields().ByName("pss_interval") + fd_MsgCreateRing_has_pss_interval = md_MsgCreateRing.Fields().ByName("has_pss_interval") + fd_MsgCreateRing_policy_id = md_MsgCreateRing.Fields().ByName("policy_id") + fd_MsgCreateRing_artifact = md_MsgCreateRing.Fields().ByName("artifact") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateRing)(nil) + +type fastReflection_MsgCreateRing MsgCreateRing + +func (x *MsgCreateRing) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateRing)(x) +} + +func (x *MsgCreateRing) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_MsgCreateRing_messageType fastReflection_MsgCreateRing_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateRing_messageType{} + +type fastReflection_MsgCreateRing_messageType struct{} + +func (x fastReflection_MsgCreateRing_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateRing)(nil) +} +func (x fastReflection_MsgCreateRing_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateRing) +} +func (x fastReflection_MsgCreateRing_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateRing +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateRing) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateRing +} + +// 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_MsgCreateRing) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateRing_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateRing) New() protoreflect.Message { + return new(fastReflection_MsgCreateRing) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateRing) Interface() protoreflect.ProtoMessage { + return (*MsgCreateRing)(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_MsgCreateRing) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgCreateRing_creator, value) { + return + } + } + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_MsgCreateRing_namespace, value) { + return + } + } + if x.RingPk != "" { + value := protoreflect.ValueOfString(x.RingPk) + if !f(fd_MsgCreateRing_ring_pk, value) { + return + } + } + if len(x.PeerIds) != 0 { + value := protoreflect.ValueOfList(&_MsgCreateRing_4_list{list: &x.PeerIds}) + if !f(fd_MsgCreateRing_peer_ids, value) { + return + } + } + if x.Threshold != uint32(0) { + value := protoreflect.ValueOfUint32(x.Threshold) + if !f(fd_MsgCreateRing_threshold, value) { + return + } + } + if x.PssInterval != uint64(0) { + value := protoreflect.ValueOfUint64(x.PssInterval) + if !f(fd_MsgCreateRing_pss_interval, value) { + return + } + } + if x.HasPssInterval != false { + value := protoreflect.ValueOfBool(x.HasPssInterval) + if !f(fd_MsgCreateRing_has_pss_interval, value) { + return + } + } + if x.PolicyId != "" { + value := protoreflect.ValueOfString(x.PolicyId) + if !f(fd_MsgCreateRing_policy_id, value) { + return + } + } + if x.Artifact != "" { + value := protoreflect.ValueOfString(x.Artifact) + if !f(fd_MsgCreateRing_artifact, 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_MsgCreateRing) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRing.creator": + return x.Creator != "" + case "sourcehub.orbis.MsgCreateRing.namespace": + return x.Namespace != "" + case "sourcehub.orbis.MsgCreateRing.ring_pk": + return x.RingPk != "" + case "sourcehub.orbis.MsgCreateRing.peer_ids": + return len(x.PeerIds) != 0 + case "sourcehub.orbis.MsgCreateRing.threshold": + return x.Threshold != uint32(0) + case "sourcehub.orbis.MsgCreateRing.pss_interval": + return x.PssInterval != uint64(0) + case "sourcehub.orbis.MsgCreateRing.has_pss_interval": + return x.HasPssInterval != false + case "sourcehub.orbis.MsgCreateRing.policy_id": + return x.PolicyId != "" + case "sourcehub.orbis.MsgCreateRing.artifact": + return x.Artifact != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRing.creator": + x.Creator = "" + case "sourcehub.orbis.MsgCreateRing.namespace": + x.Namespace = "" + case "sourcehub.orbis.MsgCreateRing.ring_pk": + x.RingPk = "" + case "sourcehub.orbis.MsgCreateRing.peer_ids": + x.PeerIds = nil + case "sourcehub.orbis.MsgCreateRing.threshold": + x.Threshold = uint32(0) + case "sourcehub.orbis.MsgCreateRing.pss_interval": + x.PssInterval = uint64(0) + case "sourcehub.orbis.MsgCreateRing.has_pss_interval": + x.HasPssInterval = false + case "sourcehub.orbis.MsgCreateRing.policy_id": + x.PolicyId = "" + case "sourcehub.orbis.MsgCreateRing.artifact": + x.Artifact = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.MsgCreateRing.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgCreateRing.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgCreateRing.ring_pk": + value := x.RingPk + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgCreateRing.peer_ids": + if len(x.PeerIds) == 0 { + return protoreflect.ValueOfList(&_MsgCreateRing_4_list{}) + } + listValue := &_MsgCreateRing_4_list{list: &x.PeerIds} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.MsgCreateRing.threshold": + value := x.Threshold + return protoreflect.ValueOfUint32(value) + case "sourcehub.orbis.MsgCreateRing.pss_interval": + value := x.PssInterval + return protoreflect.ValueOfUint64(value) + case "sourcehub.orbis.MsgCreateRing.has_pss_interval": + value := x.HasPssInterval + return protoreflect.ValueOfBool(value) + case "sourcehub.orbis.MsgCreateRing.policy_id": + value := x.PolicyId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgCreateRing.artifact": + value := x.Artifact + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRing.creator": + x.Creator = value.Interface().(string) + case "sourcehub.orbis.MsgCreateRing.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.MsgCreateRing.ring_pk": + x.RingPk = value.Interface().(string) + case "sourcehub.orbis.MsgCreateRing.peer_ids": + lv := value.List() + clv := lv.(*_MsgCreateRing_4_list) + x.PeerIds = *clv.list + case "sourcehub.orbis.MsgCreateRing.threshold": + x.Threshold = uint32(value.Uint()) + case "sourcehub.orbis.MsgCreateRing.pss_interval": + x.PssInterval = value.Uint() + case "sourcehub.orbis.MsgCreateRing.has_pss_interval": + x.HasPssInterval = value.Bool() + case "sourcehub.orbis.MsgCreateRing.policy_id": + x.PolicyId = value.Interface().(string) + case "sourcehub.orbis.MsgCreateRing.artifact": + x.Artifact = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRing.peer_ids": + if x.PeerIds == nil { + x.PeerIds = []string{} + } + value := &_MsgCreateRing_4_list{list: &x.PeerIds} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.MsgCreateRing.creator": + panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgCreateRing is not mutable")) + case "sourcehub.orbis.MsgCreateRing.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.MsgCreateRing is not mutable")) + case "sourcehub.orbis.MsgCreateRing.ring_pk": + panic(fmt.Errorf("field ring_pk of message sourcehub.orbis.MsgCreateRing is not mutable")) + case "sourcehub.orbis.MsgCreateRing.threshold": + panic(fmt.Errorf("field threshold of message sourcehub.orbis.MsgCreateRing is not mutable")) + case "sourcehub.orbis.MsgCreateRing.pss_interval": + panic(fmt.Errorf("field pss_interval of message sourcehub.orbis.MsgCreateRing is not mutable")) + case "sourcehub.orbis.MsgCreateRing.has_pss_interval": + panic(fmt.Errorf("field has_pss_interval of message sourcehub.orbis.MsgCreateRing is not mutable")) + case "sourcehub.orbis.MsgCreateRing.policy_id": + panic(fmt.Errorf("field policy_id of message sourcehub.orbis.MsgCreateRing is not mutable")) + case "sourcehub.orbis.MsgCreateRing.artifact": + panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgCreateRing is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRing.creator": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgCreateRing.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgCreateRing.ring_pk": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgCreateRing.peer_ids": + list := []string{} + return protoreflect.ValueOfList(&_MsgCreateRing_4_list{list: &list}) + case "sourcehub.orbis.MsgCreateRing.threshold": + return protoreflect.ValueOfUint32(uint32(0)) + case "sourcehub.orbis.MsgCreateRing.pss_interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "sourcehub.orbis.MsgCreateRing.has_pss_interval": + return protoreflect.ValueOfBool(false) + case "sourcehub.orbis.MsgCreateRing.policy_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgCreateRing.artifact": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgCreateRing", 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_MsgCreateRing) 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_MsgCreateRing) 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_MsgCreateRing) 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_MsgCreateRing) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateRing) + 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.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingPk) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.PeerIds) > 0 { + for _, s := range x.PeerIds { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Threshold != 0 { + n += 1 + runtime.Sov(uint64(x.Threshold)) + } + if x.PssInterval != 0 { + n += 1 + runtime.Sov(uint64(x.PssInterval)) + } + if x.HasPssInterval { + n += 2 + } + l = len(x.PolicyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Artifact) + 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().(*MsgCreateRing) + 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.Artifact) > 0 { + i -= len(x.Artifact) + copy(dAtA[i:], x.Artifact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) + i-- + dAtA[i] = 0x4a + } + if len(x.PolicyId) > 0 { + i -= len(x.PolicyId) + copy(dAtA[i:], x.PolicyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) + i-- + dAtA[i] = 0x42 + } + if x.HasPssInterval { + i-- + if x.HasPssInterval { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if x.PssInterval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.PssInterval)) + i-- + dAtA[i] = 0x30 + } + if x.Threshold != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Threshold)) + i-- + dAtA[i] = 0x28 + } + if len(x.PeerIds) > 0 { + for iNdEx := len(x.PeerIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.PeerIds[iNdEx]) + copy(dAtA[i:], x.PeerIds[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PeerIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.RingPk) > 0 { + i -= len(x.RingPk) + copy(dAtA[i:], x.RingPk) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingPk))) + i-- + dAtA[i] = 0x1a + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + i-- + dAtA[i] = 0x12 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + 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().(*MsgCreateRing) + 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: MsgCreateRing: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateRing: 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 Creator", 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.Creator = 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 Namespace", 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.Namespace = 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 RingPk", 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.RingPk = 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 PeerIds", 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.PeerIds = append(x.PeerIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + x.Threshold = 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.Threshold |= uint32(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 PssInterval", wireType) + } + x.PssInterval = 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.PssInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HasPssInterval = bool(v != 0) + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = 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_MsgCreateRingResponse protoreflect.MessageDescriptor + fd_MsgCreateRingResponse_ring_id protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgCreateRingResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgCreateRingResponse") + fd_MsgCreateRingResponse_ring_id = md_MsgCreateRingResponse.Fields().ByName("ring_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateRingResponse)(nil) + +type fastReflection_MsgCreateRingResponse MsgCreateRingResponse + +func (x *MsgCreateRingResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateRingResponse)(x) +} + +func (x *MsgCreateRingResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_MsgCreateRingResponse_messageType fastReflection_MsgCreateRingResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateRingResponse_messageType{} + +type fastReflection_MsgCreateRingResponse_messageType struct{} + +func (x fastReflection_MsgCreateRingResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateRingResponse)(nil) +} +func (x fastReflection_MsgCreateRingResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateRingResponse) +} +func (x fastReflection_MsgCreateRingResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateRingResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateRingResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateRingResponse +} + +// 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_MsgCreateRingResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateRingResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateRingResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateRingResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateRingResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateRingResponse)(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_MsgCreateRingResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_MsgCreateRingResponse_ring_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_MsgCreateRingResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRingResponse.ring_id": + return x.RingId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRingResponse.ring_id": + x.RingId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.MsgCreateRingResponse.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRingResponse.ring_id": + x.RingId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRingResponse.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgCreateRingResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgCreateRingResponse.ring_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgCreateRingResponse", 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_MsgCreateRingResponse) 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_MsgCreateRingResponse) 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_MsgCreateRingResponse) 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_MsgCreateRingResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateRingResponse) + 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.RingId) + 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().(*MsgCreateRingResponse) + 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.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + 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().(*MsgCreateRingResponse) + 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: MsgCreateRingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateRingResponse: 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 RingId", 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.RingId = 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 = (*_MsgUpdateRingByAcp_4_list)(nil) + +type _MsgUpdateRingByAcp_4_list struct { + list *[]string +} + +func (x *_MsgUpdateRingByAcp_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgUpdateRingByAcp_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgUpdateRingByAcp_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgUpdateRingByAcp_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgUpdateRingByAcp_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgUpdateRingByAcp at list field NewPeerIds as it is not of Message kind")) +} + +func (x *_MsgUpdateRingByAcp_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgUpdateRingByAcp_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgUpdateRingByAcp_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgUpdateRingByAcp protoreflect.MessageDescriptor + fd_MsgUpdateRingByAcp_creator protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_ring_id protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_artifact protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_new_peer_ids protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_new_threshold protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_has_new_threshold protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_pss_interval protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_has_pss_interval protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgUpdateRingByAcp = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgUpdateRingByAcp") + fd_MsgUpdateRingByAcp_creator = md_MsgUpdateRingByAcp.Fields().ByName("creator") + fd_MsgUpdateRingByAcp_ring_id = md_MsgUpdateRingByAcp.Fields().ByName("ring_id") + fd_MsgUpdateRingByAcp_artifact = md_MsgUpdateRingByAcp.Fields().ByName("artifact") + fd_MsgUpdateRingByAcp_new_peer_ids = md_MsgUpdateRingByAcp.Fields().ByName("new_peer_ids") + fd_MsgUpdateRingByAcp_new_threshold = md_MsgUpdateRingByAcp.Fields().ByName("new_threshold") + fd_MsgUpdateRingByAcp_has_new_threshold = md_MsgUpdateRingByAcp.Fields().ByName("has_new_threshold") + fd_MsgUpdateRingByAcp_pss_interval = md_MsgUpdateRingByAcp.Fields().ByName("pss_interval") + fd_MsgUpdateRingByAcp_has_pss_interval = md_MsgUpdateRingByAcp.Fields().ByName("has_pss_interval") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateRingByAcp)(nil) + +type fastReflection_MsgUpdateRingByAcp MsgUpdateRingByAcp + +func (x *MsgUpdateRingByAcp) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateRingByAcp)(x) +} + +func (x *MsgUpdateRingByAcp) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_MsgUpdateRingByAcp_messageType fastReflection_MsgUpdateRingByAcp_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateRingByAcp_messageType{} + +type fastReflection_MsgUpdateRingByAcp_messageType struct{} + +func (x fastReflection_MsgUpdateRingByAcp_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateRingByAcp)(nil) +} +func (x fastReflection_MsgUpdateRingByAcp_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateRingByAcp) +} +func (x fastReflection_MsgUpdateRingByAcp_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateRingByAcp +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateRingByAcp) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateRingByAcp +} + +// 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_MsgUpdateRingByAcp) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateRingByAcp_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateRingByAcp) New() protoreflect.Message { + return new(fastReflection_MsgUpdateRingByAcp) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateRingByAcp) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateRingByAcp)(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_MsgUpdateRingByAcp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgUpdateRingByAcp_creator, value) { + return + } + } + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_MsgUpdateRingByAcp_ring_id, value) { + return + } + } + if x.Artifact != "" { + value := protoreflect.ValueOfString(x.Artifact) + if !f(fd_MsgUpdateRingByAcp_artifact, value) { + return + } + } + if len(x.NewPeerIds) != 0 { + value := protoreflect.ValueOfList(&_MsgUpdateRingByAcp_4_list{list: &x.NewPeerIds}) + if !f(fd_MsgUpdateRingByAcp_new_peer_ids, value) { + return + } + } + if x.NewThreshold != uint32(0) { + value := protoreflect.ValueOfUint32(x.NewThreshold) + if !f(fd_MsgUpdateRingByAcp_new_threshold, value) { + return + } + } + if x.HasNewThreshold != false { + value := protoreflect.ValueOfBool(x.HasNewThreshold) + if !f(fd_MsgUpdateRingByAcp_has_new_threshold, value) { + return + } + } + if x.PssInterval != uint64(0) { + value := protoreflect.ValueOfUint64(x.PssInterval) + if !f(fd_MsgUpdateRingByAcp_pss_interval, value) { + return + } + } + if x.HasPssInterval != false { + value := protoreflect.ValueOfBool(x.HasPssInterval) + if !f(fd_MsgUpdateRingByAcp_has_pss_interval, 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_MsgUpdateRingByAcp) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.MsgUpdateRingByAcp.creator": + return x.Creator != "" + case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": + return x.RingId != "" + case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": + return x.Artifact != "" + case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": + return len(x.NewPeerIds) != 0 + case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": + return x.NewThreshold != uint32(0) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": + return x.HasNewThreshold != false + case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": + return x.PssInterval != uint64(0) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": + return x.HasPssInterval != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.MsgUpdateRingByAcp.creator": + x.Creator = "" + case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": + x.RingId = "" + case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": + x.Artifact = "" + case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": + x.NewPeerIds = nil + case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": + x.NewThreshold = uint32(0) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": + x.HasNewThreshold = false + case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": + x.PssInterval = uint64(0) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": + x.HasPssInterval = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.MsgUpdateRingByAcp.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": + value := x.Artifact + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": + if len(x.NewPeerIds) == 0 { + return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_4_list{}) + } + listValue := &_MsgUpdateRingByAcp_4_list{list: &x.NewPeerIds} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": + value := x.NewThreshold + return protoreflect.ValueOfUint32(value) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": + value := x.HasNewThreshold + return protoreflect.ValueOfBool(value) + case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": + value := x.PssInterval + return protoreflect.ValueOfUint64(value) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": + value := x.HasPssInterval + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.MsgUpdateRingByAcp.creator": + x.Creator = value.Interface().(string) + case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": + x.Artifact = value.Interface().(string) + case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": + lv := value.List() + clv := lv.(*_MsgUpdateRingByAcp_4_list) + x.NewPeerIds = *clv.list + case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": + x.NewThreshold = uint32(value.Uint()) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": + x.HasNewThreshold = value.Bool() + case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": + x.PssInterval = value.Uint() + case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": + x.HasPssInterval = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": + if x.NewPeerIds == nil { + x.NewPeerIds = []string{} + } + value := &_MsgUpdateRingByAcp_4_list{list: &x.NewPeerIds} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.MsgUpdateRingByAcp.creator": + panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) + case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) + case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": + panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) + case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": + panic(fmt.Errorf("field new_threshold of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": + panic(fmt.Errorf("field has_new_threshold of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) + case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": + panic(fmt.Errorf("field pss_interval of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": + panic(fmt.Errorf("field has_pss_interval of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgUpdateRingByAcp.creator": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": + list := []string{} + return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_4_list{list: &list}) + case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": + return protoreflect.ValueOfUint32(uint32(0)) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": + return protoreflect.ValueOfBool(false) + case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgUpdateRingByAcp", 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_MsgUpdateRingByAcp) 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_MsgUpdateRingByAcp) 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_MsgUpdateRingByAcp) 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_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateRingByAcp) + 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.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Artifact) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.NewPeerIds) > 0 { + for _, s := range x.NewPeerIds { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.NewThreshold != 0 { + n += 1 + runtime.Sov(uint64(x.NewThreshold)) + } + if x.HasNewThreshold { + n += 2 + } + if x.PssInterval != 0 { + n += 1 + runtime.Sov(uint64(x.PssInterval)) + } + if x.HasPssInterval { + n += 2 + } + 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().(*MsgUpdateRingByAcp) + 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.HasPssInterval { + i-- + if x.HasPssInterval { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if x.PssInterval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.PssInterval)) + i-- + dAtA[i] = 0x38 + } + if x.HasNewThreshold { + i-- + if x.HasNewThreshold { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if x.NewThreshold != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NewThreshold)) + i-- + dAtA[i] = 0x28 + } + if len(x.NewPeerIds) > 0 { + for iNdEx := len(x.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.NewPeerIds[iNdEx]) + copy(dAtA[i:], x.NewPeerIds[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewPeerIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.Artifact) > 0 { + i -= len(x.Artifact) + copy(dAtA[i:], x.Artifact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) + i-- + dAtA[i] = 0x1a + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + 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().(*MsgUpdateRingByAcp) + 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: MsgUpdateRingByAcp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRingByAcp: 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 Creator", 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.Creator = 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 RingId", 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.RingId = 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 Artifact", 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.Artifact = 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 NewPeerIds", 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.NewPeerIds = append(x.NewPeerIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) + } + x.NewThreshold = 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.NewThreshold |= uint32(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 HasNewThreshold", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HasNewThreshold = bool(v != 0) + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) + } + x.PssInterval = 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.PssInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HasPssInterval = bool(v != 0) + 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_MsgUpdateRingByAcpResponse protoreflect.MessageDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgUpdateRingByAcpResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgUpdateRingByAcpResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateRingByAcpResponse)(nil) + +type fastReflection_MsgUpdateRingByAcpResponse MsgUpdateRingByAcpResponse + +func (x *MsgUpdateRingByAcpResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateRingByAcpResponse)(x) +} + +func (x *MsgUpdateRingByAcpResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_MsgUpdateRingByAcpResponse_messageType fastReflection_MsgUpdateRingByAcpResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateRingByAcpResponse_messageType{} + +type fastReflection_MsgUpdateRingByAcpResponse_messageType struct{} + +func (x fastReflection_MsgUpdateRingByAcpResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateRingByAcpResponse)(nil) +} +func (x fastReflection_MsgUpdateRingByAcpResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateRingByAcpResponse) +} +func (x fastReflection_MsgUpdateRingByAcpResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateRingByAcpResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateRingByAcpResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateRingByAcpResponse +} + +// 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_MsgUpdateRingByAcpResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateRingByAcpResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateRingByAcpResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateRingByAcpResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateRingByAcpResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateRingByAcpResponse)(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_MsgUpdateRingByAcpResponse) 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_MsgUpdateRingByAcpResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgUpdateRingByAcpResponse", 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_MsgUpdateRingByAcpResponse) 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_MsgUpdateRingByAcpResponse) 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_MsgUpdateRingByAcpResponse) 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_MsgUpdateRingByAcpResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateRingByAcpResponse) + 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().(*MsgUpdateRingByAcpResponse) + 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().(*MsgUpdateRingByAcpResponse) + 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: MsgUpdateRingByAcpResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRingByAcpResponse: 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_MsgFinalizeRingReshareByThresholdSignature protoreflect.MessageDescriptor + fd_MsgFinalizeRingReshareByThresholdSignature_creator protoreflect.FieldDescriptor + fd_MsgFinalizeRingReshareByThresholdSignature_ring_id protoreflect.FieldDescriptor + fd_MsgFinalizeRingReshareByThresholdSignature_artifact protoreflect.FieldDescriptor + fd_MsgFinalizeRingReshareByThresholdSignature_signature_scheme protoreflect.FieldDescriptor + fd_MsgFinalizeRingReshareByThresholdSignature_signature protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgFinalizeRingReshareByThresholdSignature = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgFinalizeRingReshareByThresholdSignature") + fd_MsgFinalizeRingReshareByThresholdSignature_creator = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("creator") + fd_MsgFinalizeRingReshareByThresholdSignature_ring_id = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("ring_id") + fd_MsgFinalizeRingReshareByThresholdSignature_artifact = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("artifact") + fd_MsgFinalizeRingReshareByThresholdSignature_signature_scheme = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("signature_scheme") + fd_MsgFinalizeRingReshareByThresholdSignature_signature = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("signature") +} + +var _ protoreflect.Message = (*fastReflection_MsgFinalizeRingReshareByThresholdSignature)(nil) + +type fastReflection_MsgFinalizeRingReshareByThresholdSignature MsgFinalizeRingReshareByThresholdSignature + +func (x *MsgFinalizeRingReshareByThresholdSignature) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgFinalizeRingReshareByThresholdSignature)(x) +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_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_MsgFinalizeRingReshareByThresholdSignature_messageType fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType +var _ protoreflect.MessageType = fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType{} + +type fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType struct{} + +func (x fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgFinalizeRingReshareByThresholdSignature)(nil) +} +func (x fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType) New() protoreflect.Message { + return new(fastReflection_MsgFinalizeRingReshareByThresholdSignature) +} +func (x fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFinalizeRingReshareByThresholdSignature +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFinalizeRingReshareByThresholdSignature +} + +// 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_MsgFinalizeRingReshareByThresholdSignature) Type() protoreflect.MessageType { + return _fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) New() protoreflect.Message { + return new(fastReflection_MsgFinalizeRingReshareByThresholdSignature) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Interface() protoreflect.ProtoMessage { + return (*MsgFinalizeRingReshareByThresholdSignature)(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_MsgFinalizeRingReshareByThresholdSignature) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgFinalizeRingReshareByThresholdSignature_creator, value) { + return + } + } + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_MsgFinalizeRingReshareByThresholdSignature_ring_id, value) { + return + } + } + if x.Artifact != "" { + value := protoreflect.ValueOfString(x.Artifact) + if !f(fd_MsgFinalizeRingReshareByThresholdSignature_artifact, value) { + return + } + } + if x.SignatureScheme != "" { + value := protoreflect.ValueOfString(x.SignatureScheme) + if !f(fd_MsgFinalizeRingReshareByThresholdSignature_signature_scheme, value) { + return + } + } + if len(x.Signature) != 0 { + value := protoreflect.ValueOfBytes(x.Signature) + if !f(fd_MsgFinalizeRingReshareByThresholdSignature_signature, 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_MsgFinalizeRingReshareByThresholdSignature) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": + return x.Creator != "" + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": + return x.RingId != "" + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": + return x.Artifact != "" + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": + return x.SignatureScheme != "" + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": + return len(x.Signature) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": + x.Creator = "" + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": + x.RingId = "" + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": + x.Artifact = "" + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": + x.SignatureScheme = "" + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": + x.Signature = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": + value := x.Artifact + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": + value := x.SignatureScheme + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": + value := x.Signature + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": + x.Creator = value.Interface().(string) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": + x.Artifact = value.Interface().(string) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": + x.SignatureScheme = value.Interface().(string) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": + x.Signature = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": + panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": + panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": + panic(fmt.Errorf("field signature_scheme of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": + panic(fmt.Errorf("field signature of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature", 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_MsgFinalizeRingReshareByThresholdSignature) 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_MsgFinalizeRingReshareByThresholdSignature) 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_MsgFinalizeRingReshareByThresholdSignature) 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_MsgFinalizeRingReshareByThresholdSignature) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgFinalizeRingReshareByThresholdSignature) + 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.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Artifact) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SignatureScheme) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signature) + 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().(*MsgFinalizeRingReshareByThresholdSignature) + 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.Signature) > 0 { + i -= len(x.Signature) + copy(dAtA[i:], x.Signature) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) + i-- + dAtA[i] = 0x2a + } + if len(x.SignatureScheme) > 0 { + i -= len(x.SignatureScheme) + copy(dAtA[i:], x.SignatureScheme) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignatureScheme))) + i-- + dAtA[i] = 0x22 + } + if len(x.Artifact) > 0 { + i -= len(x.Artifact) + copy(dAtA[i:], x.Artifact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) + i-- + dAtA[i] = 0x1a + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + 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().(*MsgFinalizeRingReshareByThresholdSignature) + 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: MsgFinalizeRingReshareByThresholdSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignature: 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 Creator", 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.Creator = 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 RingId", 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.RingId = 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 Artifact", 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.Artifact = 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 SignatureScheme", 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.SignatureScheme = 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 Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) + if x.Signature == nil { + x.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgFinalizeRingReshareByThresholdSignatureResponse protoreflect.MessageDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgFinalizeRingReshareByThresholdSignatureResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgFinalizeRingReshareByThresholdSignatureResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse)(nil) + +type fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse MsgFinalizeRingReshareByThresholdSignatureResponse + +func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse)(x) +} + +func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_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_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType{} + +type fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType struct{} + +func (x fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse)(nil) +} +func (x fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) +} +func (x fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFinalizeRingReshareByThresholdSignatureResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFinalizeRingReshareByThresholdSignatureResponse +} + +// 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) New() protoreflect.Message { + return new(fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) Interface() protoreflect.ProtoMessage { + return (*MsgFinalizeRingReshareByThresholdSignatureResponse)(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_MsgFinalizeRingReshareByThresholdSignatureResponse) 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse", 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_MsgFinalizeRingReshareByThresholdSignatureResponse) 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_MsgFinalizeRingReshareByThresholdSignatureResponse) 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_MsgFinalizeRingReshareByThresholdSignatureResponse) 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_MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgFinalizeRingReshareByThresholdSignatureResponse) + 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().(*MsgFinalizeRingReshareByThresholdSignatureResponse) + 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().(*MsgFinalizeRingReshareByThresholdSignatureResponse) + 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: MsgFinalizeRingReshareByThresholdSignatureResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignatureResponse: 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_RingReshareFinalizeSignDoc protoreflect.MessageDescriptor + fd_RingReshareFinalizeSignDoc_domain protoreflect.FieldDescriptor + fd_RingReshareFinalizeSignDoc_chain_id protoreflect.FieldDescriptor + fd_RingReshareFinalizeSignDoc_namespace protoreflect.FieldDescriptor + fd_RingReshareFinalizeSignDoc_ring_id protoreflect.FieldDescriptor + fd_RingReshareFinalizeSignDoc_ring_pk protoreflect.FieldDescriptor + fd_RingReshareFinalizeSignDoc_current_ring_sha256 protoreflect.FieldDescriptor + fd_RingReshareFinalizeSignDoc_finalized_ring_sha256 protoreflect.FieldDescriptor + fd_RingReshareFinalizeSignDoc_block_number_nonce protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_RingReshareFinalizeSignDoc = File_sourcehub_orbis_tx_proto.Messages().ByName("RingReshareFinalizeSignDoc") + fd_RingReshareFinalizeSignDoc_domain = md_RingReshareFinalizeSignDoc.Fields().ByName("domain") + fd_RingReshareFinalizeSignDoc_chain_id = md_RingReshareFinalizeSignDoc.Fields().ByName("chain_id") + fd_RingReshareFinalizeSignDoc_namespace = md_RingReshareFinalizeSignDoc.Fields().ByName("namespace") + fd_RingReshareFinalizeSignDoc_ring_id = md_RingReshareFinalizeSignDoc.Fields().ByName("ring_id") + fd_RingReshareFinalizeSignDoc_ring_pk = md_RingReshareFinalizeSignDoc.Fields().ByName("ring_pk") + fd_RingReshareFinalizeSignDoc_current_ring_sha256 = md_RingReshareFinalizeSignDoc.Fields().ByName("current_ring_sha256") + fd_RingReshareFinalizeSignDoc_finalized_ring_sha256 = md_RingReshareFinalizeSignDoc.Fields().ByName("finalized_ring_sha256") + fd_RingReshareFinalizeSignDoc_block_number_nonce = md_RingReshareFinalizeSignDoc.Fields().ByName("block_number_nonce") +} + +var _ protoreflect.Message = (*fastReflection_RingReshareFinalizeSignDoc)(nil) + +type fastReflection_RingReshareFinalizeSignDoc RingReshareFinalizeSignDoc + +func (x *RingReshareFinalizeSignDoc) ProtoReflect() protoreflect.Message { + return (*fastReflection_RingReshareFinalizeSignDoc)(x) +} + +func (x *RingReshareFinalizeSignDoc) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_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_RingReshareFinalizeSignDoc_messageType fastReflection_RingReshareFinalizeSignDoc_messageType +var _ protoreflect.MessageType = fastReflection_RingReshareFinalizeSignDoc_messageType{} + +type fastReflection_RingReshareFinalizeSignDoc_messageType struct{} + +func (x fastReflection_RingReshareFinalizeSignDoc_messageType) Zero() protoreflect.Message { + return (*fastReflection_RingReshareFinalizeSignDoc)(nil) +} +func (x fastReflection_RingReshareFinalizeSignDoc_messageType) New() protoreflect.Message { + return new(fastReflection_RingReshareFinalizeSignDoc) +} +func (x fastReflection_RingReshareFinalizeSignDoc_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_RingReshareFinalizeSignDoc +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_RingReshareFinalizeSignDoc) Descriptor() protoreflect.MessageDescriptor { + return md_RingReshareFinalizeSignDoc +} + +// 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_RingReshareFinalizeSignDoc) Type() protoreflect.MessageType { + return _fastReflection_RingReshareFinalizeSignDoc_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_RingReshareFinalizeSignDoc) New() protoreflect.Message { + return new(fastReflection_RingReshareFinalizeSignDoc) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_RingReshareFinalizeSignDoc) Interface() protoreflect.ProtoMessage { + return (*RingReshareFinalizeSignDoc)(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_RingReshareFinalizeSignDoc) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Domain != "" { + value := protoreflect.ValueOfString(x.Domain) + if !f(fd_RingReshareFinalizeSignDoc_domain, value) { + return + } + } + if x.ChainId != "" { + value := protoreflect.ValueOfString(x.ChainId) + if !f(fd_RingReshareFinalizeSignDoc_chain_id, value) { + return + } + } + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_RingReshareFinalizeSignDoc_namespace, value) { + return + } + } + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_RingReshareFinalizeSignDoc_ring_id, value) { + return + } + } + if x.RingPk != "" { + value := protoreflect.ValueOfString(x.RingPk) + if !f(fd_RingReshareFinalizeSignDoc_ring_pk, value) { + return + } + } + if len(x.CurrentRingSha256) != 0 { + value := protoreflect.ValueOfBytes(x.CurrentRingSha256) + if !f(fd_RingReshareFinalizeSignDoc_current_ring_sha256, value) { + return + } + } + if len(x.FinalizedRingSha256) != 0 { + value := protoreflect.ValueOfBytes(x.FinalizedRingSha256) + if !f(fd_RingReshareFinalizeSignDoc_finalized_ring_sha256, value) { + return + } + } + if x.BlockNumberNonce != uint64(0) { + value := protoreflect.ValueOfUint64(x.BlockNumberNonce) + if !f(fd_RingReshareFinalizeSignDoc_block_number_nonce, 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_RingReshareFinalizeSignDoc) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": + return x.Domain != "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": + return x.ChainId != "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": + return x.Namespace != "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": + return x.RingId != "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": + return x.RingPk != "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": + return len(x.CurrentRingSha256) != 0 + case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": + return len(x.FinalizedRingSha256) != 0 + case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": + return x.BlockNumberNonce != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) + } + panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": + x.Domain = "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": + x.ChainId = "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": + x.Namespace = "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": + x.RingId = "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": + x.RingPk = "" + case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": + x.CurrentRingSha256 = nil + case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": + x.FinalizedRingSha256 = nil + case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": + x.BlockNumberNonce = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) + } + panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": + value := x.Domain + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": + value := x.ChainId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": + value := x.RingPk + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": + value := x.CurrentRingSha256 + return protoreflect.ValueOfBytes(value) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": + value := x.FinalizedRingSha256 + return protoreflect.ValueOfBytes(value) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": + value := x.BlockNumberNonce + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) + } + panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": + x.Domain = value.Interface().(string) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": + x.ChainId = value.Interface().(string) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": + x.RingPk = value.Interface().(string) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": + x.CurrentRingSha256 = value.Bytes() + case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": + x.FinalizedRingSha256 = value.Bytes() + case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": + x.BlockNumberNonce = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) + } + panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": + panic(fmt.Errorf("field domain of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": + panic(fmt.Errorf("field chain_id of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": + panic(fmt.Errorf("field ring_pk of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": + panic(fmt.Errorf("field current_ring_sha256 of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": + panic(fmt.Errorf("field finalized_ring_sha256 of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": + panic(fmt.Errorf("field block_number_nonce of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) + } + panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": + return protoreflect.ValueOfBytes(nil) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": + return protoreflect.ValueOfBytes(nil) + case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) + } + panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.RingReshareFinalizeSignDoc", 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_RingReshareFinalizeSignDoc) 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_RingReshareFinalizeSignDoc) 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_RingReshareFinalizeSignDoc) 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_RingReshareFinalizeSignDoc) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*RingReshareFinalizeSignDoc) + 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.Domain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingPk) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CurrentRingSha256) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.FinalizedRingSha256) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.BlockNumberNonce != 0 { + n += 1 + runtime.Sov(uint64(x.BlockNumberNonce)) + } + 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().(*RingReshareFinalizeSignDoc) + 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.BlockNumberNonce != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockNumberNonce)) + i-- + dAtA[i] = 0x40 + } + if len(x.FinalizedRingSha256) > 0 { + i -= len(x.FinalizedRingSha256) + copy(dAtA[i:], x.FinalizedRingSha256) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FinalizedRingSha256))) + i-- + dAtA[i] = 0x3a + } + if len(x.CurrentRingSha256) > 0 { + i -= len(x.CurrentRingSha256) + copy(dAtA[i:], x.CurrentRingSha256) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CurrentRingSha256))) + i-- + dAtA[i] = 0x32 + } + if len(x.RingPk) > 0 { + i -= len(x.RingPk) + copy(dAtA[i:], x.RingPk) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingPk))) + i-- + dAtA[i] = 0x2a + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + i-- + dAtA[i] = 0x22 + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + i-- + dAtA[i] = 0x1a + } + if len(x.ChainId) > 0 { + i -= len(x.ChainId) + copy(dAtA[i:], x.ChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Domain) > 0 { + i -= len(x.Domain) + copy(dAtA[i:], x.Domain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Domain))) + 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().(*RingReshareFinalizeSignDoc) + 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: RingReshareFinalizeSignDoc: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RingReshareFinalizeSignDoc: 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 Domain", 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.Domain = 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 ChainId", 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.ChainId = 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 Namespace", 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.Namespace = 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 RingId", 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.RingId = 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 RingPk", 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.RingPk = 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 CurrentRingSha256", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CurrentRingSha256 = append(x.CurrentRingSha256[:0], dAtA[iNdEx:postIndex]...) + if x.CurrentRingSha256 == nil { + x.CurrentRingSha256 = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FinalizedRingSha256", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FinalizedRingSha256 = append(x.FinalizedRingSha256[:0], dAtA[iNdEx:postIndex]...) + if x.FinalizedRingSha256 == nil { + x.FinalizedRingSha256 = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) + } + x.BlockNumberNonce = 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.BlockNumberNonce |= 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_MsgStoreDocument protoreflect.MessageDescriptor + fd_MsgStoreDocument_creator protoreflect.FieldDescriptor + fd_MsgStoreDocument_namespace protoreflect.FieldDescriptor + fd_MsgStoreDocument_ring_id protoreflect.FieldDescriptor + fd_MsgStoreDocument_document protoreflect.FieldDescriptor + fd_MsgStoreDocument_proof protoreflect.FieldDescriptor + fd_MsgStoreDocument_policy_id protoreflect.FieldDescriptor + fd_MsgStoreDocument_resource protoreflect.FieldDescriptor + fd_MsgStoreDocument_permission protoreflect.FieldDescriptor + fd_MsgStoreDocument_tier protoreflect.FieldDescriptor + fd_MsgStoreDocument_has_tier protoreflect.FieldDescriptor + fd_MsgStoreDocument_timestamp protoreflect.FieldDescriptor + fd_MsgStoreDocument_has_timestamp protoreflect.FieldDescriptor + fd_MsgStoreDocument_artifact protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgStoreDocument = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgStoreDocument") + fd_MsgStoreDocument_creator = md_MsgStoreDocument.Fields().ByName("creator") + fd_MsgStoreDocument_namespace = md_MsgStoreDocument.Fields().ByName("namespace") + fd_MsgStoreDocument_ring_id = md_MsgStoreDocument.Fields().ByName("ring_id") + fd_MsgStoreDocument_document = md_MsgStoreDocument.Fields().ByName("document") + fd_MsgStoreDocument_proof = md_MsgStoreDocument.Fields().ByName("proof") + fd_MsgStoreDocument_policy_id = md_MsgStoreDocument.Fields().ByName("policy_id") + fd_MsgStoreDocument_resource = md_MsgStoreDocument.Fields().ByName("resource") + fd_MsgStoreDocument_permission = md_MsgStoreDocument.Fields().ByName("permission") + fd_MsgStoreDocument_tier = md_MsgStoreDocument.Fields().ByName("tier") + fd_MsgStoreDocument_has_tier = md_MsgStoreDocument.Fields().ByName("has_tier") + fd_MsgStoreDocument_timestamp = md_MsgStoreDocument.Fields().ByName("timestamp") + fd_MsgStoreDocument_has_timestamp = md_MsgStoreDocument.Fields().ByName("has_timestamp") + fd_MsgStoreDocument_artifact = md_MsgStoreDocument.Fields().ByName("artifact") +} + +var _ protoreflect.Message = (*fastReflection_MsgStoreDocument)(nil) + +type fastReflection_MsgStoreDocument MsgStoreDocument + +func (x *MsgStoreDocument) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgStoreDocument)(x) +} + +func (x *MsgStoreDocument) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_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_MsgStoreDocument_messageType fastReflection_MsgStoreDocument_messageType +var _ protoreflect.MessageType = fastReflection_MsgStoreDocument_messageType{} + +type fastReflection_MsgStoreDocument_messageType struct{} + +func (x fastReflection_MsgStoreDocument_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgStoreDocument)(nil) +} +func (x fastReflection_MsgStoreDocument_messageType) New() protoreflect.Message { + return new(fastReflection_MsgStoreDocument) +} +func (x fastReflection_MsgStoreDocument_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgStoreDocument +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgStoreDocument) Descriptor() protoreflect.MessageDescriptor { + return md_MsgStoreDocument +} + +// 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_MsgStoreDocument) Type() protoreflect.MessageType { + return _fastReflection_MsgStoreDocument_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgStoreDocument) New() protoreflect.Message { + return new(fastReflection_MsgStoreDocument) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgStoreDocument) Interface() protoreflect.ProtoMessage { + return (*MsgStoreDocument)(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_MsgStoreDocument) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgStoreDocument_creator, value) { + return + } + } + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_MsgStoreDocument_namespace, value) { + return + } + } + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_MsgStoreDocument_ring_id, value) { + return + } + } + if x.Document != "" { + value := protoreflect.ValueOfString(x.Document) + if !f(fd_MsgStoreDocument_document, value) { + return + } + } + if x.Proof != "" { + value := protoreflect.ValueOfString(x.Proof) + if !f(fd_MsgStoreDocument_proof, value) { + return + } + } + if x.PolicyId != "" { + value := protoreflect.ValueOfString(x.PolicyId) + if !f(fd_MsgStoreDocument_policy_id, value) { + return + } + } + if x.Resource != "" { + value := protoreflect.ValueOfString(x.Resource) + if !f(fd_MsgStoreDocument_resource, value) { + return + } + } + if x.Permission != "" { + value := protoreflect.ValueOfString(x.Permission) + if !f(fd_MsgStoreDocument_permission, value) { + return + } + } + if x.Tier != "" { + value := protoreflect.ValueOfString(x.Tier) + if !f(fd_MsgStoreDocument_tier, value) { + return + } + } + if x.HasTier != false { + value := protoreflect.ValueOfBool(x.HasTier) + if !f(fd_MsgStoreDocument_has_tier, value) { + return + } + } + if x.Timestamp != uint64(0) { + value := protoreflect.ValueOfUint64(x.Timestamp) + if !f(fd_MsgStoreDocument_timestamp, value) { + return + } + } + if x.HasTimestamp != false { + value := protoreflect.ValueOfBool(x.HasTimestamp) + if !f(fd_MsgStoreDocument_has_timestamp, value) { + return + } + } + if x.Artifact != "" { + value := protoreflect.ValueOfString(x.Artifact) + if !f(fd_MsgStoreDocument_artifact, 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_MsgStoreDocument) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocument.creator": + return x.Creator != "" + case "sourcehub.orbis.MsgStoreDocument.namespace": + return x.Namespace != "" + case "sourcehub.orbis.MsgStoreDocument.ring_id": + return x.RingId != "" + case "sourcehub.orbis.MsgStoreDocument.document": + return x.Document != "" + case "sourcehub.orbis.MsgStoreDocument.proof": + return x.Proof != "" + case "sourcehub.orbis.MsgStoreDocument.policy_id": + return x.PolicyId != "" + case "sourcehub.orbis.MsgStoreDocument.resource": + return x.Resource != "" + case "sourcehub.orbis.MsgStoreDocument.permission": + return x.Permission != "" + case "sourcehub.orbis.MsgStoreDocument.tier": + return x.Tier != "" + case "sourcehub.orbis.MsgStoreDocument.has_tier": + return x.HasTier != false + case "sourcehub.orbis.MsgStoreDocument.timestamp": + return x.Timestamp != uint64(0) + case "sourcehub.orbis.MsgStoreDocument.has_timestamp": + return x.HasTimestamp != false + case "sourcehub.orbis.MsgStoreDocument.artifact": + return x.Artifact != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocument.creator": + x.Creator = "" + case "sourcehub.orbis.MsgStoreDocument.namespace": + x.Namespace = "" + case "sourcehub.orbis.MsgStoreDocument.ring_id": + x.RingId = "" + case "sourcehub.orbis.MsgStoreDocument.document": + x.Document = "" + case "sourcehub.orbis.MsgStoreDocument.proof": + x.Proof = "" + case "sourcehub.orbis.MsgStoreDocument.policy_id": + x.PolicyId = "" + case "sourcehub.orbis.MsgStoreDocument.resource": + x.Resource = "" + case "sourcehub.orbis.MsgStoreDocument.permission": + x.Permission = "" + case "sourcehub.orbis.MsgStoreDocument.tier": + x.Tier = "" + case "sourcehub.orbis.MsgStoreDocument.has_tier": + x.HasTier = false + case "sourcehub.orbis.MsgStoreDocument.timestamp": + x.Timestamp = uint64(0) + case "sourcehub.orbis.MsgStoreDocument.has_timestamp": + x.HasTimestamp = false + case "sourcehub.orbis.MsgStoreDocument.artifact": + x.Artifact = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.MsgStoreDocument.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreDocument.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreDocument.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreDocument.document": + value := x.Document + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreDocument.proof": + value := x.Proof + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreDocument.policy_id": + value := x.PolicyId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreDocument.resource": + value := x.Resource + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreDocument.permission": + value := x.Permission + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreDocument.tier": + value := x.Tier + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreDocument.has_tier": + value := x.HasTier + return protoreflect.ValueOfBool(value) + case "sourcehub.orbis.MsgStoreDocument.timestamp": + value := x.Timestamp + return protoreflect.ValueOfUint64(value) + case "sourcehub.orbis.MsgStoreDocument.has_timestamp": + value := x.HasTimestamp + return protoreflect.ValueOfBool(value) + case "sourcehub.orbis.MsgStoreDocument.artifact": + value := x.Artifact + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocument.creator": + x.Creator = value.Interface().(string) + case "sourcehub.orbis.MsgStoreDocument.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.MsgStoreDocument.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.MsgStoreDocument.document": + x.Document = value.Interface().(string) + case "sourcehub.orbis.MsgStoreDocument.proof": + x.Proof = value.Interface().(string) + case "sourcehub.orbis.MsgStoreDocument.policy_id": + x.PolicyId = value.Interface().(string) + case "sourcehub.orbis.MsgStoreDocument.resource": + x.Resource = value.Interface().(string) + case "sourcehub.orbis.MsgStoreDocument.permission": + x.Permission = value.Interface().(string) + case "sourcehub.orbis.MsgStoreDocument.tier": + x.Tier = value.Interface().(string) + case "sourcehub.orbis.MsgStoreDocument.has_tier": + x.HasTier = value.Bool() + case "sourcehub.orbis.MsgStoreDocument.timestamp": + x.Timestamp = value.Uint() + case "sourcehub.orbis.MsgStoreDocument.has_timestamp": + x.HasTimestamp = value.Bool() + case "sourcehub.orbis.MsgStoreDocument.artifact": + x.Artifact = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocument.creator": + panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.document": + panic(fmt.Errorf("field document of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.proof": + panic(fmt.Errorf("field proof of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.policy_id": + panic(fmt.Errorf("field policy_id of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.resource": + panic(fmt.Errorf("field resource of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.permission": + panic(fmt.Errorf("field permission of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.tier": + panic(fmt.Errorf("field tier of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.has_tier": + panic(fmt.Errorf("field has_tier of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.timestamp": + panic(fmt.Errorf("field timestamp of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.has_timestamp": + panic(fmt.Errorf("field has_timestamp of message sourcehub.orbis.MsgStoreDocument is not mutable")) + case "sourcehub.orbis.MsgStoreDocument.artifact": + panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgStoreDocument is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocument.creator": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreDocument.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreDocument.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreDocument.document": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreDocument.proof": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreDocument.policy_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreDocument.resource": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreDocument.permission": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreDocument.tier": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreDocument.has_tier": + return protoreflect.ValueOfBool(false) + case "sourcehub.orbis.MsgStoreDocument.timestamp": + return protoreflect.ValueOfUint64(uint64(0)) + case "sourcehub.orbis.MsgStoreDocument.has_timestamp": + return protoreflect.ValueOfBool(false) + case "sourcehub.orbis.MsgStoreDocument.artifact": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgStoreDocument", 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_MsgStoreDocument) 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_MsgStoreDocument) 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_MsgStoreDocument) 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_MsgStoreDocument) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgStoreDocument) + 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.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Document) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Proof) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PolicyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Resource) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Permission) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Tier) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.HasTier { + n += 2 + } + if x.Timestamp != 0 { + n += 1 + runtime.Sov(uint64(x.Timestamp)) + } + if x.HasTimestamp { + n += 2 + } + l = len(x.Artifact) + 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().(*MsgStoreDocument) + 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.Artifact) > 0 { + i -= len(x.Artifact) + copy(dAtA[i:], x.Artifact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) + i-- + dAtA[i] = 0x6a + } + if x.HasTimestamp { + i-- + if x.HasTimestamp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if x.Timestamp != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Timestamp)) + i-- + dAtA[i] = 0x58 + } + if x.HasTier { + i-- + if x.HasTier { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if len(x.Tier) > 0 { + i -= len(x.Tier) + copy(dAtA[i:], x.Tier) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tier))) + i-- + dAtA[i] = 0x4a + } + if len(x.Permission) > 0 { + i -= len(x.Permission) + copy(dAtA[i:], x.Permission) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permission))) + i-- + dAtA[i] = 0x42 + } + if len(x.Resource) > 0 { + i -= len(x.Resource) + copy(dAtA[i:], x.Resource) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resource))) + i-- + dAtA[i] = 0x3a + } + if len(x.PolicyId) > 0 { + i -= len(x.PolicyId) + copy(dAtA[i:], x.PolicyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) + i-- + dAtA[i] = 0x32 + } + if len(x.Proof) > 0 { + i -= len(x.Proof) + copy(dAtA[i:], x.Proof) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) + i-- + dAtA[i] = 0x2a + } + if len(x.Document) > 0 { + i -= len(x.Document) + copy(dAtA[i:], x.Document) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Document))) + i-- + dAtA[i] = 0x22 + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + i-- + dAtA[i] = 0x1a + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + i-- + dAtA[i] = 0x12 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + 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().(*MsgStoreDocument) + 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: MsgStoreDocument: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgStoreDocument: 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 Creator", 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.Creator = 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 Namespace", 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.Namespace = 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 RingId", 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.RingId = 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 Document", 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.Document = 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 Proof", 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.Proof = 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 PolicyId", 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.PolicyId = 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 Resource", 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.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permission", 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.Permission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tier", 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.Tier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasTier", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HasTier = bool(v != 0) + case 11: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + x.Timestamp = 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.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasTimestamp", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HasTimestamp = bool(v != 0) + case 13: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = 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_MsgStoreDocumentResponse protoreflect.MessageDescriptor + fd_MsgStoreDocumentResponse_document_id protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgStoreDocumentResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgStoreDocumentResponse") + fd_MsgStoreDocumentResponse_document_id = md_MsgStoreDocumentResponse.Fields().ByName("document_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgStoreDocumentResponse)(nil) + +type fastReflection_MsgStoreDocumentResponse MsgStoreDocumentResponse + +func (x *MsgStoreDocumentResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgStoreDocumentResponse)(x) +} + +func (x *MsgStoreDocumentResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_MsgStoreDocumentResponse_messageType fastReflection_MsgStoreDocumentResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgStoreDocumentResponse_messageType{} + +type fastReflection_MsgStoreDocumentResponse_messageType struct{} + +func (x fastReflection_MsgStoreDocumentResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgStoreDocumentResponse)(nil) +} +func (x fastReflection_MsgStoreDocumentResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgStoreDocumentResponse) +} +func (x fastReflection_MsgStoreDocumentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgStoreDocumentResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgStoreDocumentResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgStoreDocumentResponse +} + +// 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_MsgStoreDocumentResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgStoreDocumentResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgStoreDocumentResponse) New() protoreflect.Message { + return new(fastReflection_MsgStoreDocumentResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgStoreDocumentResponse) Interface() protoreflect.ProtoMessage { + return (*MsgStoreDocumentResponse)(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_MsgStoreDocumentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DocumentId != "" { + value := protoreflect.ValueOfString(x.DocumentId) + if !f(fd_MsgStoreDocumentResponse_document_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_MsgStoreDocumentResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": + return x.DocumentId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": + x.DocumentId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": + value := x.DocumentId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": + x.DocumentId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": + panic(fmt.Errorf("field document_id of message sourcehub.orbis.MsgStoreDocumentResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgStoreDocumentResponse", 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_MsgStoreDocumentResponse) 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_MsgStoreDocumentResponse) 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_MsgStoreDocumentResponse) 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_MsgStoreDocumentResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgStoreDocumentResponse) + 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.DocumentId) + 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().(*MsgStoreDocumentResponse) + 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.DocumentId) > 0 { + i -= len(x.DocumentId) + copy(dAtA[i:], x.DocumentId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DocumentId))) + 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().(*MsgStoreDocumentResponse) + 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: MsgStoreDocumentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgStoreDocumentResponse: 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 DocumentId", 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.DocumentId = 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_MsgStoreKeyDerivation protoreflect.MessageDescriptor + fd_MsgStoreKeyDerivation_creator protoreflect.FieldDescriptor + fd_MsgStoreKeyDerivation_namespace protoreflect.FieldDescriptor + fd_MsgStoreKeyDerivation_ring_id protoreflect.FieldDescriptor + fd_MsgStoreKeyDerivation_derivation protoreflect.FieldDescriptor + fd_MsgStoreKeyDerivation_policy_id protoreflect.FieldDescriptor + fd_MsgStoreKeyDerivation_resource protoreflect.FieldDescriptor + fd_MsgStoreKeyDerivation_permission protoreflect.FieldDescriptor + fd_MsgStoreKeyDerivation_artifact protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgStoreKeyDerivation = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgStoreKeyDerivation") + fd_MsgStoreKeyDerivation_creator = md_MsgStoreKeyDerivation.Fields().ByName("creator") + fd_MsgStoreKeyDerivation_namespace = md_MsgStoreKeyDerivation.Fields().ByName("namespace") + fd_MsgStoreKeyDerivation_ring_id = md_MsgStoreKeyDerivation.Fields().ByName("ring_id") + fd_MsgStoreKeyDerivation_derivation = md_MsgStoreKeyDerivation.Fields().ByName("derivation") + fd_MsgStoreKeyDerivation_policy_id = md_MsgStoreKeyDerivation.Fields().ByName("policy_id") + fd_MsgStoreKeyDerivation_resource = md_MsgStoreKeyDerivation.Fields().ByName("resource") + fd_MsgStoreKeyDerivation_permission = md_MsgStoreKeyDerivation.Fields().ByName("permission") + fd_MsgStoreKeyDerivation_artifact = md_MsgStoreKeyDerivation.Fields().ByName("artifact") +} + +var _ protoreflect.Message = (*fastReflection_MsgStoreKeyDerivation)(nil) + +type fastReflection_MsgStoreKeyDerivation MsgStoreKeyDerivation + +func (x *MsgStoreKeyDerivation) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgStoreKeyDerivation)(x) +} + +func (x *MsgStoreKeyDerivation) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_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_MsgStoreKeyDerivation_messageType fastReflection_MsgStoreKeyDerivation_messageType +var _ protoreflect.MessageType = fastReflection_MsgStoreKeyDerivation_messageType{} + +type fastReflection_MsgStoreKeyDerivation_messageType struct{} + +func (x fastReflection_MsgStoreKeyDerivation_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgStoreKeyDerivation)(nil) +} +func (x fastReflection_MsgStoreKeyDerivation_messageType) New() protoreflect.Message { + return new(fastReflection_MsgStoreKeyDerivation) +} +func (x fastReflection_MsgStoreKeyDerivation_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgStoreKeyDerivation +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgStoreKeyDerivation) Descriptor() protoreflect.MessageDescriptor { + return md_MsgStoreKeyDerivation +} + +// 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_MsgStoreKeyDerivation) Type() protoreflect.MessageType { + return _fastReflection_MsgStoreKeyDerivation_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgStoreKeyDerivation) New() protoreflect.Message { + return new(fastReflection_MsgStoreKeyDerivation) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgStoreKeyDerivation) Interface() protoreflect.ProtoMessage { + return (*MsgStoreKeyDerivation)(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_MsgStoreKeyDerivation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgStoreKeyDerivation_creator, value) { + return + } + } + if x.Namespace != "" { + value := protoreflect.ValueOfString(x.Namespace) + if !f(fd_MsgStoreKeyDerivation_namespace, value) { + return + } + } + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_MsgStoreKeyDerivation_ring_id, value) { + return + } + } + if x.Derivation != "" { + value := protoreflect.ValueOfString(x.Derivation) + if !f(fd_MsgStoreKeyDerivation_derivation, value) { + return + } + } + if x.PolicyId != "" { + value := protoreflect.ValueOfString(x.PolicyId) + if !f(fd_MsgStoreKeyDerivation_policy_id, value) { + return + } + } + if x.Resource != "" { + value := protoreflect.ValueOfString(x.Resource) + if !f(fd_MsgStoreKeyDerivation_resource, value) { + return + } + } + if x.Permission != "" { + value := protoreflect.ValueOfString(x.Permission) + if !f(fd_MsgStoreKeyDerivation_permission, value) { + return + } + } + if x.Artifact != "" { + value := protoreflect.ValueOfString(x.Artifact) + if !f(fd_MsgStoreKeyDerivation_artifact, 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_MsgStoreKeyDerivation) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivation.creator": + return x.Creator != "" + case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": + return x.Namespace != "" + case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": + return x.RingId != "" + case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": + return x.Derivation != "" + case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": + return x.PolicyId != "" + case "sourcehub.orbis.MsgStoreKeyDerivation.resource": + return x.Resource != "" + case "sourcehub.orbis.MsgStoreKeyDerivation.permission": + return x.Permission != "" + case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": + return x.Artifact != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivation.creator": + x.Creator = "" + case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": + x.Namespace = "" + case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": + x.RingId = "" + case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": + x.Derivation = "" + case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": + x.PolicyId = "" + case "sourcehub.orbis.MsgStoreKeyDerivation.resource": + x.Resource = "" + case "sourcehub.orbis.MsgStoreKeyDerivation.permission": + x.Permission = "" + case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": + x.Artifact = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivation.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": + value := x.Namespace + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": + value := x.Derivation + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": + value := x.PolicyId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreKeyDerivation.resource": + value := x.Resource + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreKeyDerivation.permission": + value := x.Permission + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": + value := x.Artifact + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivation.creator": + x.Creator = value.Interface().(string) + case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": + x.Namespace = value.Interface().(string) + case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": + x.Derivation = value.Interface().(string) + case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": + x.PolicyId = value.Interface().(string) + case "sourcehub.orbis.MsgStoreKeyDerivation.resource": + x.Resource = value.Interface().(string) + case "sourcehub.orbis.MsgStoreKeyDerivation.permission": + x.Permission = value.Interface().(string) + case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": + x.Artifact = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivation.creator": + panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) + case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": + panic(fmt.Errorf("field namespace of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) + case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) + case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": + panic(fmt.Errorf("field derivation of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) + case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": + panic(fmt.Errorf("field policy_id of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) + case "sourcehub.orbis.MsgStoreKeyDerivation.resource": + panic(fmt.Errorf("field resource of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) + case "sourcehub.orbis.MsgStoreKeyDerivation.permission": + panic(fmt.Errorf("field permission of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) + case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": + panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivation.creator": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreKeyDerivation.resource": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreKeyDerivation.permission": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgStoreKeyDerivation", 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_MsgStoreKeyDerivation) 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_MsgStoreKeyDerivation) 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_MsgStoreKeyDerivation) 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_MsgStoreKeyDerivation) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgStoreKeyDerivation) + 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.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Namespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Derivation) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PolicyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Resource) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Permission) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Artifact) + 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().(*MsgStoreKeyDerivation) + 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.Artifact) > 0 { + i -= len(x.Artifact) + copy(dAtA[i:], x.Artifact) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) + i-- + dAtA[i] = 0x42 + } + if len(x.Permission) > 0 { + i -= len(x.Permission) + copy(dAtA[i:], x.Permission) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permission))) + i-- + dAtA[i] = 0x3a + } + if len(x.Resource) > 0 { + i -= len(x.Resource) + copy(dAtA[i:], x.Resource) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resource))) + i-- + dAtA[i] = 0x32 + } + if len(x.PolicyId) > 0 { + i -= len(x.PolicyId) + copy(dAtA[i:], x.PolicyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) + i-- + dAtA[i] = 0x2a + } + if len(x.Derivation) > 0 { + i -= len(x.Derivation) + copy(dAtA[i:], x.Derivation) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Derivation))) + i-- + dAtA[i] = 0x22 + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + i-- + dAtA[i] = 0x1a + } + if len(x.Namespace) > 0 { + i -= len(x.Namespace) + copy(dAtA[i:], x.Namespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) + i-- + dAtA[i] = 0x12 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + 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().(*MsgStoreKeyDerivation) + 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: MsgStoreKeyDerivation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgStoreKeyDerivation: 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 Creator", 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.Creator = 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 Namespace", 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.Namespace = 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 RingId", 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.RingId = 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 Derivation", 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.Derivation = 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 PolicyId", 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.PolicyId = 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 Resource", 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.Resource = 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 Permission", 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.Permission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = 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_MsgStoreKeyDerivationResponse protoreflect.MessageDescriptor + fd_MsgStoreKeyDerivationResponse_key_derivation_id protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_tx_proto_init() + md_MsgStoreKeyDerivationResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgStoreKeyDerivationResponse") + fd_MsgStoreKeyDerivationResponse_key_derivation_id = md_MsgStoreKeyDerivationResponse.Fields().ByName("key_derivation_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgStoreKeyDerivationResponse)(nil) + +type fastReflection_MsgStoreKeyDerivationResponse MsgStoreKeyDerivationResponse + +func (x *MsgStoreKeyDerivationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgStoreKeyDerivationResponse)(x) +} + +func (x *MsgStoreKeyDerivationResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_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_MsgStoreKeyDerivationResponse_messageType fastReflection_MsgStoreKeyDerivationResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgStoreKeyDerivationResponse_messageType{} + +type fastReflection_MsgStoreKeyDerivationResponse_messageType struct{} + +func (x fastReflection_MsgStoreKeyDerivationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgStoreKeyDerivationResponse)(nil) +} +func (x fastReflection_MsgStoreKeyDerivationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgStoreKeyDerivationResponse) +} +func (x fastReflection_MsgStoreKeyDerivationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgStoreKeyDerivationResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgStoreKeyDerivationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgStoreKeyDerivationResponse +} + +// 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_MsgStoreKeyDerivationResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgStoreKeyDerivationResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgStoreKeyDerivationResponse) New() protoreflect.Message { + return new(fastReflection_MsgStoreKeyDerivationResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgStoreKeyDerivationResponse) Interface() protoreflect.ProtoMessage { + return (*MsgStoreKeyDerivationResponse)(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_MsgStoreKeyDerivationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.KeyDerivationId != "" { + value := protoreflect.ValueOfString(x.KeyDerivationId) + if !f(fd_MsgStoreKeyDerivationResponse_key_derivation_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_MsgStoreKeyDerivationResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": + return x.KeyDerivationId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": + x.KeyDerivationId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": + value := x.KeyDerivationId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": + x.KeyDerivationId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": + panic(fmt.Errorf("field key_derivation_id of message sourcehub.orbis.MsgStoreKeyDerivationResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgStoreKeyDerivationResponse", 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_MsgStoreKeyDerivationResponse) 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_MsgStoreKeyDerivationResponse) 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_MsgStoreKeyDerivationResponse) 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_MsgStoreKeyDerivationResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgStoreKeyDerivationResponse) + 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.KeyDerivationId) + 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().(*MsgStoreKeyDerivationResponse) + 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.KeyDerivationId) > 0 { + i -= len(x.KeyDerivationId) + copy(dAtA[i:], x.KeyDerivationId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyDerivationId))) + 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().(*MsgStoreKeyDerivationResponse) + 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: MsgStoreKeyDerivationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgStoreKeyDerivationResponse: 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 KeyDerivationId", 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.KeyDerivationId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: sourcehub/orbis/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. +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_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_sourcehub_orbis_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 MsgUpdateParams. +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_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_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{1} +} + +type MsgCreateRing struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` + HasPssInterval bool `protobuf:"varint,7,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` + PolicyId string `protobuf:"bytes,8,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Artifact string `protobuf:"bytes,9,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (x *MsgCreateRing) Reset() { + *x = MsgCreateRing{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateRing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateRing) ProtoMessage() {} + +// Deprecated: Use MsgCreateRing.ProtoReflect.Descriptor instead. +func (*MsgCreateRing) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgCreateRing) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgCreateRing) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *MsgCreateRing) GetRingPk() string { + if x != nil { + return x.RingPk + } + return "" +} + +func (x *MsgCreateRing) GetPeerIds() []string { + if x != nil { + return x.PeerIds + } + return nil +} + +func (x *MsgCreateRing) GetThreshold() uint32 { + if x != nil { + return x.Threshold + } + return 0 +} + +func (x *MsgCreateRing) GetPssInterval() uint64 { + if x != nil { + return x.PssInterval + } + return 0 +} + +func (x *MsgCreateRing) GetHasPssInterval() bool { + if x != nil { + return x.HasPssInterval + } + return false +} + +func (x *MsgCreateRing) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *MsgCreateRing) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +type MsgCreateRingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` +} + +func (x *MsgCreateRingResponse) Reset() { + *x = MsgCreateRingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateRingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateRingResponse) ProtoMessage() {} + +// Deprecated: Use MsgCreateRingResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateRingResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgCreateRingResponse) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +type MsgUpdateRingByAcp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Artifact string `protobuf:"bytes,3,opt,name=artifact,proto3" json:"artifact,omitempty"` + NewPeerIds []string `protobuf:"bytes,4,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + NewThreshold uint32 `protobuf:"varint,5,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` + HasNewThreshold bool `protobuf:"varint,6,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` + PssInterval uint64 `protobuf:"varint,7,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` + HasPssInterval bool `protobuf:"varint,8,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` +} + +func (x *MsgUpdateRingByAcp) Reset() { + *x = MsgUpdateRingByAcp{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateRingByAcp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateRingByAcp) ProtoMessage() {} + +// Deprecated: Use MsgUpdateRingByAcp.ProtoReflect.Descriptor instead. +func (*MsgUpdateRingByAcp) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgUpdateRingByAcp) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgUpdateRingByAcp) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *MsgUpdateRingByAcp) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +func (x *MsgUpdateRingByAcp) GetNewPeerIds() []string { + if x != nil { + return x.NewPeerIds + } + return nil +} + +func (x *MsgUpdateRingByAcp) GetNewThreshold() uint32 { + if x != nil { + return x.NewThreshold + } + return 0 +} + +func (x *MsgUpdateRingByAcp) GetHasNewThreshold() bool { + if x != nil { + return x.HasNewThreshold + } + return false +} + +func (x *MsgUpdateRingByAcp) GetPssInterval() uint64 { + if x != nil { + return x.PssInterval + } + return 0 +} + +func (x *MsgUpdateRingByAcp) GetHasPssInterval() bool { + if x != nil { + return x.HasPssInterval + } + return false +} + +type MsgUpdateRingByAcpResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateRingByAcpResponse) Reset() { + *x = MsgUpdateRingByAcpResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateRingByAcpResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateRingByAcpResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateRingByAcpResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateRingByAcpResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{5} +} + +type MsgFinalizeRingReshareByThresholdSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Artifact string `protobuf:"bytes,3,opt,name=artifact,proto3" json:"artifact,omitempty"` + SignatureScheme string `protobuf:"bytes,4,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` + Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) Reset() { + *x = MsgFinalizeRingReshareByThresholdSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFinalizeRingReshareByThresholdSignature) ProtoMessage() {} + +// Deprecated: Use MsgFinalizeRingReshareByThresholdSignature.ProtoReflect.Descriptor instead. +func (*MsgFinalizeRingReshareByThresholdSignature) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) GetSignatureScheme() string { + if x != nil { + return x.SignatureScheme + } + return "" +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type MsgFinalizeRingReshareByThresholdSignatureResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) Reset() { + *x = MsgFinalizeRingReshareByThresholdSignatureResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoMessage() {} + +// Deprecated: Use MsgFinalizeRingReshareByThresholdSignatureResponse.ProtoReflect.Descriptor instead. +func (*MsgFinalizeRingReshareByThresholdSignatureResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{7} +} + +type RingReshareFinalizeSignDoc struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + RingPk string `protobuf:"bytes,5,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + CurrentRingSha256 []byte `protobuf:"bytes,6,opt,name=current_ring_sha256,json=currentRingSha256,proto3" json:"current_ring_sha256,omitempty"` + FinalizedRingSha256 []byte `protobuf:"bytes,7,opt,name=finalized_ring_sha256,json=finalizedRingSha256,proto3" json:"finalized_ring_sha256,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,8,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` +} + +func (x *RingReshareFinalizeSignDoc) Reset() { + *x = RingReshareFinalizeSignDoc{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RingReshareFinalizeSignDoc) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RingReshareFinalizeSignDoc) ProtoMessage() {} + +// Deprecated: Use RingReshareFinalizeSignDoc.ProtoReflect.Descriptor instead. +func (*RingReshareFinalizeSignDoc) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *RingReshareFinalizeSignDoc) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetRingPk() string { + if x != nil { + return x.RingPk + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetCurrentRingSha256() []byte { + if x != nil { + return x.CurrentRingSha256 + } + return nil +} + +func (x *RingReshareFinalizeSignDoc) GetFinalizedRingSha256() []byte { + if x != nil { + return x.FinalizedRingSha256 + } + return nil +} + +func (x *RingReshareFinalizeSignDoc) GetBlockNumberNonce() uint64 { + if x != nil { + return x.BlockNumberNonce + } + return 0 +} + +type MsgStoreDocument struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` + Tier string `protobuf:"bytes,9,opt,name=tier,proto3" json:"tier,omitempty"` + HasTier bool `protobuf:"varint,10,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` + Timestamp uint64 `protobuf:"varint,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + HasTimestamp bool `protobuf:"varint,12,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` + Artifact string `protobuf:"bytes,13,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (x *MsgStoreDocument) Reset() { + *x = MsgStoreDocument{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgStoreDocument) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgStoreDocument) ProtoMessage() {} + +// Deprecated: Use MsgStoreDocument.ProtoReflect.Descriptor instead. +func (*MsgStoreDocument) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{9} +} + +func (x *MsgStoreDocument) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgStoreDocument) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *MsgStoreDocument) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *MsgStoreDocument) GetDocument() string { + if x != nil { + return x.Document + } + return "" +} + +func (x *MsgStoreDocument) GetProof() string { + if x != nil { + return x.Proof + } + return "" +} + +func (x *MsgStoreDocument) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *MsgStoreDocument) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *MsgStoreDocument) GetPermission() string { + if x != nil { + return x.Permission + } + return "" +} + +func (x *MsgStoreDocument) GetTier() string { + if x != nil { + return x.Tier + } + return "" +} + +func (x *MsgStoreDocument) GetHasTier() bool { + if x != nil { + return x.HasTier + } + return false +} + +func (x *MsgStoreDocument) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *MsgStoreDocument) GetHasTimestamp() bool { + if x != nil { + return x.HasTimestamp + } + return false +} + +func (x *MsgStoreDocument) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +type MsgStoreDocumentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` +} + +func (x *MsgStoreDocumentResponse) Reset() { + *x = MsgStoreDocumentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgStoreDocumentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgStoreDocumentResponse) ProtoMessage() {} + +// Deprecated: Use MsgStoreDocumentResponse.ProtoReflect.Descriptor instead. +func (*MsgStoreDocumentResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgStoreDocumentResponse) GetDocumentId() string { + if x != nil { + return x.DocumentId + } + return "" +} + +type MsgStoreKeyDerivation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Derivation string `protobuf:"bytes,4,opt,name=derivation,proto3" json:"derivation,omitempty"` + PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` + Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (x *MsgStoreKeyDerivation) Reset() { + *x = MsgStoreKeyDerivation{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgStoreKeyDerivation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgStoreKeyDerivation) ProtoMessage() {} + +// Deprecated: Use MsgStoreKeyDerivation.ProtoReflect.Descriptor instead. +func (*MsgStoreKeyDerivation) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *MsgStoreKeyDerivation) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetDerivation() string { + if x != nil { + return x.Derivation + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetPermission() string { + if x != nil { + return x.Permission + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +type MsgStoreKeyDerivationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyDerivationId string `protobuf:"bytes,1,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` +} + +func (x *MsgStoreKeyDerivationResponse) Reset() { + *x = MsgStoreKeyDerivationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgStoreKeyDerivationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgStoreKeyDerivationResponse) ProtoMessage() {} + +// Deprecated: Use MsgStoreKeyDerivationResponse.ProtoReflect.Descriptor instead. +func (*MsgStoreKeyDerivationResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{12} +} + +func (x *MsgStoreKeyDerivationResponse) GetKeyDerivationId() string { + if x != nil { + return x.KeyDerivationId + } + return "" +} + +var File_sourcehub_orbis_tx_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_tx_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x1a, 0x11, 0x61, 0x6d, 0x69, + 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 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, 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 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, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x34, + 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, + 0xb0, 0x2a, 0x21, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 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, + 0xad, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, + 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, + 0x50, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x28, + 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x50, 0x73, 0x73, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, + 0x30, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, + 0x64, 0x22, 0xb1, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, + 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, + 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x77, + 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2a, + 0x0a, 0x11, 0x68, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x4e, 0x65, + 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x73, + 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x28, 0x0a, + 0x10, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x50, 0x73, 0x73, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x2a, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, + 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, + 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x34, 0x0a, 0x32, 0x4d, 0x73, 0x67, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, + 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, + 0x02, 0x0a, 0x1a, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x46, 0x69, + 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x16, 0x0a, + 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, + 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x70, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x6b, + 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, + 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, + 0x61, 0x32, 0x35, 0x36, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x6f, 0x6e, + 0x63, 0x65, 0x22, 0x8a, 0x03, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x69, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x74, + 0x69, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x54, 0x69, + 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, + 0x3b, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x8b, 0x02, 0x0a, + 0x15, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, + 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x3a, 0x0c, 0x82, 0xe7, + 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4b, 0x0a, 0x1d, 0x4d, 0x73, + 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6b, + 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0x9e, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x5a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, + 0x62, 0x69, 0x73, 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, 0x54, 0x0a, 0x0a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x63, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, + 0x79, 0x41, 0x63, 0x70, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xab, 0x01, 0x0a, 0x27, 0x46, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, + 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x3b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, + 0x43, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, + 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9d, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, + 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, + 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, + 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, + 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sourcehub_orbis_tx_proto_rawDescOnce sync.Once + file_sourcehub_orbis_tx_proto_rawDescData = file_sourcehub_orbis_tx_proto_rawDesc +) + +func file_sourcehub_orbis_tx_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_tx_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_tx_proto_rawDescData) + }) + return file_sourcehub_orbis_tx_proto_rawDescData +} + +var file_sourcehub_orbis_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_sourcehub_orbis_tx_proto_goTypes = []interface{}{ + (*MsgUpdateParams)(nil), // 0: sourcehub.orbis.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.orbis.MsgUpdateParamsResponse + (*MsgCreateRing)(nil), // 2: sourcehub.orbis.MsgCreateRing + (*MsgCreateRingResponse)(nil), // 3: sourcehub.orbis.MsgCreateRingResponse + (*MsgUpdateRingByAcp)(nil), // 4: sourcehub.orbis.MsgUpdateRingByAcp + (*MsgUpdateRingByAcpResponse)(nil), // 5: sourcehub.orbis.MsgUpdateRingByAcpResponse + (*MsgFinalizeRingReshareByThresholdSignature)(nil), // 6: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature + (*MsgFinalizeRingReshareByThresholdSignatureResponse)(nil), // 7: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse + (*RingReshareFinalizeSignDoc)(nil), // 8: sourcehub.orbis.RingReshareFinalizeSignDoc + (*MsgStoreDocument)(nil), // 9: sourcehub.orbis.MsgStoreDocument + (*MsgStoreDocumentResponse)(nil), // 10: sourcehub.orbis.MsgStoreDocumentResponse + (*MsgStoreKeyDerivation)(nil), // 11: sourcehub.orbis.MsgStoreKeyDerivation + (*MsgStoreKeyDerivationResponse)(nil), // 12: sourcehub.orbis.MsgStoreKeyDerivationResponse + (*Params)(nil), // 13: sourcehub.orbis.Params +} +var file_sourcehub_orbis_tx_proto_depIdxs = []int32{ + 13, // 0: sourcehub.orbis.MsgUpdateParams.params:type_name -> sourcehub.orbis.Params + 0, // 1: sourcehub.orbis.Msg.UpdateParams:input_type -> sourcehub.orbis.MsgUpdateParams + 2, // 2: sourcehub.orbis.Msg.CreateRing:input_type -> sourcehub.orbis.MsgCreateRing + 4, // 3: sourcehub.orbis.Msg.UpdateRingByAcp:input_type -> sourcehub.orbis.MsgUpdateRingByAcp + 6, // 4: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:input_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature + 9, // 5: sourcehub.orbis.Msg.StoreDocument:input_type -> sourcehub.orbis.MsgStoreDocument + 11, // 6: sourcehub.orbis.Msg.StoreKeyDerivation:input_type -> sourcehub.orbis.MsgStoreKeyDerivation + 1, // 7: sourcehub.orbis.Msg.UpdateParams:output_type -> sourcehub.orbis.MsgUpdateParamsResponse + 3, // 8: sourcehub.orbis.Msg.CreateRing:output_type -> sourcehub.orbis.MsgCreateRingResponse + 5, // 9: sourcehub.orbis.Msg.UpdateRingByAcp:output_type -> sourcehub.orbis.MsgUpdateRingByAcpResponse + 7, // 10: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:output_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse + 10, // 11: sourcehub.orbis.Msg.StoreDocument:output_type -> sourcehub.orbis.MsgStoreDocumentResponse + 12, // 12: sourcehub.orbis.Msg.StoreKeyDerivation:output_type -> sourcehub.orbis.MsgStoreKeyDerivationResponse + 7, // [7:13] is the sub-list for method output_type + 1, // [1:7] 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_sourcehub_orbis_tx_proto_init() } +func file_sourcehub_orbis_tx_proto_init() { + if File_sourcehub_orbis_tx_proto != nil { + return + } + file_sourcehub_orbis_params_proto_init() + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_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_sourcehub_orbis_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_sourcehub_orbis_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateRing); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateRingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateRingByAcp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateRingByAcpResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgFinalizeRingReshareByThresholdSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgFinalizeRingReshareByThresholdSignatureResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RingReshareFinalizeSignDoc); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgStoreDocument); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgStoreDocumentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgStoreKeyDerivation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgStoreKeyDerivationResponse); 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_sourcehub_orbis_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_sourcehub_orbis_tx_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_tx_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_tx_proto_msgTypes, + }.Build() + File_sourcehub_orbis_tx_proto = out.File + file_sourcehub_orbis_tx_proto_rawDesc = nil + file_sourcehub_orbis_tx_proto_goTypes = nil + file_sourcehub_orbis_tx_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/tx_grpc.pb.go b/api/sourcehub/orbis/tx_grpc.pb.go new file mode 100644 index 00000000..3b65762a --- /dev/null +++ b/api/sourcehub/orbis/tx_grpc.pb.go @@ -0,0 +1,317 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: sourcehub/orbis/tx.proto + +package orbis + +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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Msg_UpdateParams_FullMethodName = "/sourcehub.orbis.Msg/UpdateParams" + Msg_CreateRing_FullMethodName = "/sourcehub.orbis.Msg/CreateRing" + Msg_UpdateRingByAcp_FullMethodName = "/sourcehub.orbis.Msg/UpdateRingByAcp" + Msg_FinalizeRingReshareByThresholdSignature_FullMethodName = "/sourcehub.orbis.Msg/FinalizeRingReshareByThresholdSignature" + Msg_StoreDocument_FullMethodName = "/sourcehub.orbis.Msg/StoreDocument" + Msg_StoreKeyDerivation_FullMethodName = "/sourcehub.orbis.Msg/StoreKeyDerivation" +) + +// 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a governance operation for updating module parameters. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + CreateRing(ctx context.Context, in *MsgCreateRing, opts ...grpc.CallOption) (*MsgCreateRingResponse, error) + UpdateRingByAcp(ctx context.Context, in *MsgUpdateRingByAcp, opts ...grpc.CallOption) (*MsgUpdateRingByAcpResponse, error) + FinalizeRingReshareByThresholdSignature(ctx context.Context, in *MsgFinalizeRingReshareByThresholdSignature, opts ...grpc.CallOption) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) + StoreDocument(ctx context.Context, in *MsgStoreDocument, opts ...grpc.CallOption) (*MsgStoreDocumentResponse, error) + StoreKeyDerivation(ctx context.Context, in *MsgStoreKeyDerivation, opts ...grpc.CallOption) (*MsgStoreKeyDerivationResponse, 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) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateRing(ctx context.Context, in *MsgCreateRing, opts ...grpc.CallOption) (*MsgCreateRingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCreateRingResponse) + err := c.cc.Invoke(ctx, Msg_CreateRing_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateRingByAcp(ctx context.Context, in *MsgUpdateRingByAcp, opts ...grpc.CallOption) (*MsgUpdateRingByAcpResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateRingByAcpResponse) + err := c.cc.Invoke(ctx, Msg_UpdateRingByAcp_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) FinalizeRingReshareByThresholdSignature(ctx context.Context, in *MsgFinalizeRingReshareByThresholdSignature, opts ...grpc.CallOption) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgFinalizeRingReshareByThresholdSignatureResponse) + err := c.cc.Invoke(ctx, Msg_FinalizeRingReshareByThresholdSignature_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StoreDocument(ctx context.Context, in *MsgStoreDocument, opts ...grpc.CallOption) (*MsgStoreDocumentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgStoreDocumentResponse) + err := c.cc.Invoke(ctx, Msg_StoreDocument_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StoreKeyDerivation(ctx context.Context, in *MsgStoreKeyDerivation, opts ...grpc.CallOption) (*MsgStoreKeyDerivationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgStoreKeyDerivationResponse) + err := c.cc.Invoke(ctx, Msg_StoreKeyDerivation_FullMethodName, in, out, cOpts...) + 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. +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a governance operation for updating module parameters. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + CreateRing(context.Context, *MsgCreateRing) (*MsgCreateRingResponse, error) + UpdateRingByAcp(context.Context, *MsgUpdateRingByAcp) (*MsgUpdateRingByAcpResponse, error) + FinalizeRingReshareByThresholdSignature(context.Context, *MsgFinalizeRingReshareByThresholdSignature) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) + StoreDocument(context.Context, *MsgStoreDocument) (*MsgStoreDocumentResponse, error) + StoreKeyDerivation(context.Context, *MsgStoreKeyDerivation) (*MsgStoreKeyDerivationResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMsgServer struct{} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) CreateRing(context.Context, *MsgCreateRing) (*MsgCreateRingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRing not implemented") +} +func (UnimplementedMsgServer) UpdateRingByAcp(context.Context, *MsgUpdateRingByAcp) (*MsgUpdateRingByAcpResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRingByAcp not implemented") +} +func (UnimplementedMsgServer) FinalizeRingReshareByThresholdSignature(context.Context, *MsgFinalizeRingReshareByThresholdSignature) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FinalizeRingReshareByThresholdSignature not implemented") +} +func (UnimplementedMsgServer) StoreDocument(context.Context, *MsgStoreDocument) (*MsgStoreDocumentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StoreDocument not implemented") +} +func (UnimplementedMsgServer) StoreKeyDerivation(context.Context, *MsgStoreKeyDerivation) (*MsgStoreKeyDerivationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StoreKeyDerivation not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} + +// 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) { + // If the following call pancis, it indicates UnimplementedMsgServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + 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_CreateRing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateRing) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateRing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateRing_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateRing(ctx, req.(*MsgCreateRing)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateRingByAcp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateRingByAcp) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateRingByAcp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateRingByAcp_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateRingByAcp(ctx, req.(*MsgUpdateRingByAcp)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_FinalizeRingReshareByThresholdSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFinalizeRingReshareByThresholdSignature) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FinalizeRingReshareByThresholdSignature(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_FinalizeRingReshareByThresholdSignature_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FinalizeRingReshareByThresholdSignature(ctx, req.(*MsgFinalizeRingReshareByThresholdSignature)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StoreDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStoreDocument) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StoreDocument(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_StoreDocument_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StoreDocument(ctx, req.(*MsgStoreDocument)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StoreKeyDerivation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStoreKeyDerivation) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StoreKeyDerivation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_StoreKeyDerivation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StoreKeyDerivation(ctx, req.(*MsgStoreKeyDerivation)) + } + 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: "sourcehub.orbis.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "CreateRing", + Handler: _Msg_CreateRing_Handler, + }, + { + MethodName: "UpdateRingByAcp", + Handler: _Msg_UpdateRingByAcp_Handler, + }, + { + MethodName: "FinalizeRingReshareByThresholdSignature", + Handler: _Msg_FinalizeRingReshareByThresholdSignature_Handler, + }, + { + MethodName: "StoreDocument", + Handler: _Msg_StoreDocument_Handler, + }, + { + MethodName: "StoreKeyDerivation", + Handler: _Msg_StoreKeyDerivation_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sourcehub/orbis/tx.proto", +} diff --git a/app/app.go b/app/app.go index 91b787dd..dba23c24 100644 --- a/app/app.go +++ b/app/app.go @@ -73,6 +73,7 @@ import ( epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" feegrantkeeper "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" hubkeeper "github.com/sourcenetwork/sourcehub/x/hub/keeper" + orbiskeeper "github.com/sourcenetwork/sourcehub/x/orbis/keeper" tierkeeper "github.com/sourcenetwork/sourcehub/x/tier/keeper" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" @@ -133,6 +134,7 @@ type App struct { HubKeeper *hubkeeper.Keeper AcpKeeper *acpkeeper.Keeper + OrbisKeeper *orbiskeeper.Keeper BulletinKeeper *bulletinkeeper.Keeper EpochsKeeper *epochskeeper.Keeper TierKeeper *tierkeeper.Keeper @@ -262,6 +264,7 @@ func New( &app.CircuitBreakerKeeper, &app.HubKeeper, &app.AcpKeeper, + &app.OrbisKeeper, &app.BulletinKeeper, &app.EpochsKeeper, &app.TierKeeper, diff --git a/app/app_config.go b/app/app_config.go index 32a16653..72c1b1ff 100644 --- a/app/app_config.go +++ b/app/app_config.go @@ -72,6 +72,7 @@ import ( acpmodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/acp/module" bulletinmodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/bulletin/module" hubmodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/hub/module" + orbismodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/orbis/module" tiermodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/tier/module/v1beta1" _ "github.com/sourcenetwork/sourcehub/x/acp/module" // import for side-effects acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" @@ -81,6 +82,8 @@ import ( epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" _ "github.com/sourcenetwork/sourcehub/x/hub/module" hubmoduletypes "github.com/sourcenetwork/sourcehub/x/hub/types" + _ "github.com/sourcenetwork/sourcehub/x/orbis/module" // import for side-effects + orbistypes "github.com/sourcenetwork/sourcehub/x/orbis/types" _ "github.com/sourcenetwork/sourcehub/x/tier/module" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) @@ -120,6 +123,7 @@ var ( // chain modules hubmoduletypes.ModuleName, acptypes.ModuleName, + orbistypes.ModuleName, bulletintypes.ModuleName, epochstypes.ModuleName, tiertypes.ModuleName, @@ -325,6 +329,10 @@ var ( Name: acptypes.ModuleName, Config: appconfig.WrapAny(&acpmodulev1.Module{}), }, + { + Name: orbistypes.ModuleName, + Config: appconfig.WrapAny(&orbismodulev1.Module{}), + }, { Name: bulletintypes.ModuleName, Config: appconfig.WrapAny(&bulletinmodulev1.Module{}), diff --git a/app/lanes/priority_lane.go b/app/lanes/priority_lane.go index a0a677a6..15432dc9 100644 --- a/app/lanes/priority_lane.go +++ b/app/lanes/priority_lane.go @@ -82,6 +82,11 @@ func getPriorityGroup(tx sdk.Tx) string { if minPriority > "2" { minPriority = "2" } + case strings.HasPrefix(msgType, "/sourcehub.orbis."): + // Reduce minPriority to 1 if orbis module message found + if minPriority > "1" { + minPriority = "1" + } case strings.HasPrefix(msgType, "/sourcehub.bulletin."): // Reduce minPriority to 1 if bulletin module message found if minPriority > "1" { diff --git a/proto/sourcehub/bulletin/tx.proto b/proto/sourcehub/bulletin/tx.proto index de012266..a53dee30 100644 --- a/proto/sourcehub/bulletin/tx.proto +++ b/proto/sourcehub/bulletin/tx.proto @@ -6,8 +6,8 @@ import "amino/amino.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -import "sourcehub/bulletin/params.proto"; import "sourcehub/bulletin/namespace.proto"; +import "sourcehub/bulletin/params.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/bulletin/types"; @@ -19,8 +19,6 @@ service Msg { // parameters. The authority defaults to the x/gov module account. rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); rpc CreatePost(MsgCreatePost) returns (MsgCreatePostResponse); - rpc UpdateRingPostByAcp(MsgUpdateRingPostByAcp) returns (MsgUpdateRingPostByAcpResponse); - rpc UpdateRingPostByThresholdSignature(MsgUpdateRingPostByThresholdSignature) returns (MsgUpdateRingPostByThresholdSignatureResponse); rpc RegisterNamespace(MsgRegisterNamespace) returns (MsgRegisterNamespaceResponse); rpc AddCollaborator(MsgAddCollaborator) returns (MsgAddCollaboratorResponse); rpc RemoveCollaborator(MsgRemoveCollaborator) returns (MsgRemoveCollaboratorResponse); @@ -57,42 +55,6 @@ message MsgCreatePost { message MsgCreatePostResponse {} -message MsgUpdateRingPostByAcp { - option (cosmos.msg.v1.signer) = "creator"; - string creator = 1; - string namespace = 2; - string post_id = 3; - string artifact = 4; - repeated string new_peer_ids = 5; - optional uint32 new_threshold = 6; - optional uint64 pss_interval = 7; -} - -message MsgUpdateRingPostByAcpResponse {} - -message MsgUpdateRingPostByThresholdSignature { - option (cosmos.msg.v1.signer) = "creator"; - string creator = 1; - string namespace = 2; - string post_id = 3; - string artifact = 4; - string signature_scheme = 5; - bytes signature = 6; -} - -message MsgUpdateRingPostByThresholdSignatureResponse {} - -message RingReshareFinalizeSignDoc { - string domain = 1; - string chain_id = 2; - string namespace = 3; - string post_id = 4; - string ring_pk = 5; - bytes current_payload_sha256 = 6; - bytes finalized_payload_sha256 = 7; - uint64 block_number_nonce = 8; -} - message MsgRegisterNamespace { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; diff --git a/proto/sourcehub/orbis/document.proto b/proto/sourcehub/orbis/document.proto new file mode 100644 index 00000000..bea3ef87 --- /dev/null +++ b/proto/sourcehub/orbis/document.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package sourcehub.orbis; + +option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; + +// Document stores an encrypted Orbis document and its policy binding metadata. +message Document { + string id = 1; + string namespace = 2; + string creator_did = 3; + string ring_id = 4; + string document = 5; + string proof = 6; + string policy_id = 7; + string resource = 8; + string permission = 9; + string tier = 10; + bool has_tier = 11; + uint64 timestamp = 12; + bool has_timestamp = 13; +} diff --git a/proto/sourcehub/orbis/events.proto b/proto/sourcehub/orbis/events.proto new file mode 100644 index 00000000..7cc8b327 --- /dev/null +++ b/proto/sourcehub/orbis/events.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package sourcehub.orbis; + +option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; + +// EventRingCreated is emitted when a ring is created. +message EventRingCreated { + string namespace = 1; + string ring_id = 2; + string creator_did = 3; + string artifact = 4; +} + +// EventRingUpdated is emitted when a ring is updated in place. +message EventRingUpdated { + string namespace = 1; + string ring_id = 2; + string updater_did = 3; + string artifact = 4; +} + +// EventDocumentStored is emitted when an encrypted document is stored. +message EventDocumentStored { + string namespace = 1; + string document_id = 2; + string creator_did = 3; + string artifact = 4; +} + +// EventKeyDerivationStored is emitted when a key derivation is stored. +message EventKeyDerivationStored { + string namespace = 1; + string key_derivation_id = 2; + string creator_did = 3; + string artifact = 4; +} diff --git a/proto/sourcehub/orbis/genesis.proto b/proto/sourcehub/orbis/genesis.proto new file mode 100644 index 00000000..b8fa4e71 --- /dev/null +++ b/proto/sourcehub/orbis/genesis.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package sourcehub.orbis; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; +import "sourcehub/orbis/document.proto"; +import "sourcehub/orbis/key_derivation.proto"; +import "sourcehub/orbis/params.proto"; +import "sourcehub/orbis/ring.proto"; + +option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; + +// GenesisState defines the orbis module's genesis state. +message GenesisState { + Params params = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + repeated Ring rings = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + repeated Document documents = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + repeated KeyDerivation key_derivations = 4 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} diff --git a/proto/sourcehub/orbis/key_derivation.proto b/proto/sourcehub/orbis/key_derivation.proto new file mode 100644 index 00000000..a81f88f0 --- /dev/null +++ b/proto/sourcehub/orbis/key_derivation.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package sourcehub.orbis; + +option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; + +// KeyDerivation stores a signing derivation and its policy binding metadata. +message KeyDerivation { + string id = 1; + string namespace = 2; + string creator_did = 3; + string ring_id = 4; + string derivation = 5; + string policy_id = 6; + string resource = 7; + string permission = 8; +} diff --git a/proto/sourcehub/orbis/module/module.proto b/proto/sourcehub/orbis/module/module.proto new file mode 100644 index 00000000..14312226 --- /dev/null +++ b/proto/sourcehub/orbis/module/module.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package sourcehub.orbis.module; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the config object for the module. +message Module { + option (cosmos.app.v1alpha1.module) = {go_import: "github.com/sourcenetwork/sourcehub/x/orbis"}; + + // authority defines the custom module authority. If not set, defaults to the governance module. + string authority = 1; +} diff --git a/proto/sourcehub/orbis/params.proto b/proto/sourcehub/orbis/params.proto new file mode 100644 index 00000000..21efbffc --- /dev/null +++ b/proto/sourcehub/orbis/params.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package sourcehub.orbis; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; + +// Params defines the parameters for the module. +message Params { + option (amino.name) = "sourcehub/x/orbis/Params"; + option (gogoproto.equal) = true; +} diff --git a/proto/sourcehub/orbis/query.proto b/proto/sourcehub/orbis/query.proto new file mode 100644 index 00000000..e864e572 --- /dev/null +++ b/proto/sourcehub/orbis/query.proto @@ -0,0 +1,128 @@ +syntax = "proto3"; + +package sourcehub.orbis; + +import "amino/amino.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "sourcehub/orbis/document.proto"; +import "sourcehub/orbis/key_derivation.proto"; +import "sourcehub/orbis/params.proto"; +import "sourcehub/orbis/ring.proto"; + +option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/params"; + } + + // Ring queries a ring by id. + rpc Ring(QueryRingRequest) returns (QueryRingResponse) { + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/ring/{id}"; + } + + // Rings queries rings, optionally filtered by namespace. + rpc Rings(QueryRingsRequest) returns (QueryRingsResponse) { + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/rings"; + } + + // Document queries an encrypted document by namespace and id. + rpc Document(QueryDocumentRequest) returns (QueryDocumentResponse) { + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/document/{namespace}/{id}"; + } + + // Documents queries encrypted documents within a namespace. + rpc Documents(QueryDocumentsRequest) returns (QueryDocumentsResponse) { + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/documents/{namespace}"; + } + + // KeyDerivation queries a key derivation by namespace and id. + rpc KeyDerivation(QueryKeyDerivationRequest) returns (QueryKeyDerivationResponse) { + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/key_derivation/{namespace}/{id}"; + } + + // KeyDerivations queries key derivations within a namespace. + rpc KeyDerivations(QueryKeyDerivationsRequest) returns (QueryKeyDerivationsResponse) { + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/key_derivations/{namespace}"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + Params params = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +message QueryRingRequest { + string id = 1; +} + +message QueryRingResponse { + Ring ring = 1; +} + +message QueryRingsRequest { + string namespace = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +message QueryRingsResponse { + repeated Ring rings = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryDocumentRequest { + string namespace = 1; + string id = 2; +} + +message QueryDocumentResponse { + Document document = 1; +} + +message QueryDocumentsRequest { + string namespace = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +message QueryDocumentsResponse { + repeated Document documents = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryKeyDerivationRequest { + string namespace = 1; + string id = 2; +} + +message QueryKeyDerivationResponse { + KeyDerivation key_derivation = 1; +} + +message QueryKeyDerivationsRequest { + string namespace = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +message QueryKeyDerivationsResponse { + repeated KeyDerivation key_derivations = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/sourcehub/orbis/ring.proto b/proto/sourcehub/orbis/ring.proto new file mode 100644 index 00000000..06b66d1c --- /dev/null +++ b/proto/sourcehub/orbis/ring.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package sourcehub.orbis; + +option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; + +// Ring stores the active and pending committee metadata for an Orbis ring. +message Ring { + string id = 1; + string namespace = 2; + string creator_did = 3; + string ring_pk = 4; + repeated string peer_ids = 5; + uint32 threshold = 6; + repeated string new_peer_ids = 7; + uint32 new_threshold = 8; + bool has_new_threshold = 9; + uint64 pss_interval = 10; + bool has_pss_interval = 11; + uint64 block_number_nonce = 12; + string policy_id = 13; +} diff --git a/proto/sourcehub/orbis/tx.proto b/proto/sourcehub/orbis/tx.proto new file mode 100644 index 00000000..6c943906 --- /dev/null +++ b/proto/sourcehub/orbis/tx.proto @@ -0,0 +1,130 @@ +syntax = "proto3"; + +package sourcehub.orbis; + +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "sourcehub/orbis/params.proto"; + +option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // UpdateParams defines a governance operation for updating module parameters. + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + rpc CreateRing(MsgCreateRing) returns (MsgCreateRingResponse); + rpc UpdateRingByAcp(MsgUpdateRingByAcp) returns (MsgUpdateRingByAcpResponse); + rpc FinalizeRingReshareByThresholdSignature(MsgFinalizeRingReshareByThresholdSignature) returns (MsgFinalizeRingReshareByThresholdSignatureResponse); + rpc StoreDocument(MsgStoreDocument) returns (MsgStoreDocumentResponse); + rpc StoreKeyDerivation(MsgStoreKeyDerivation) returns (MsgStoreKeyDerivationResponse); +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "sourcehub/x/orbis/MsgUpdateParams"; + + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + Params params = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// MsgUpdateParamsResponse defines the response structure for MsgUpdateParams. +message MsgUpdateParamsResponse {} + +message MsgCreateRing { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string namespace = 2; + string ring_pk = 3; + repeated string peer_ids = 4; + uint32 threshold = 5; + uint64 pss_interval = 6; + bool has_pss_interval = 7; + string policy_id = 8; + string artifact = 9; +} + +message MsgCreateRingResponse { + string ring_id = 1; +} + +message MsgUpdateRingByAcp { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string ring_id = 2; + string artifact = 3; + repeated string new_peer_ids = 4; + uint32 new_threshold = 5; + bool has_new_threshold = 6; + uint64 pss_interval = 7; + bool has_pss_interval = 8; +} + +message MsgUpdateRingByAcpResponse {} + +message MsgFinalizeRingReshareByThresholdSignature { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string ring_id = 2; + string artifact = 3; + string signature_scheme = 4; + bytes signature = 5; +} + +message MsgFinalizeRingReshareByThresholdSignatureResponse {} + +message RingReshareFinalizeSignDoc { + string domain = 1; + string chain_id = 2; + string namespace = 3; + string ring_id = 4; + string ring_pk = 5; + bytes current_ring_sha256 = 6; + bytes finalized_ring_sha256 = 7; + uint64 block_number_nonce = 8; +} + +message MsgStoreDocument { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string namespace = 2; + string ring_id = 3; + string document = 4; + string proof = 5; + string policy_id = 6; + string resource = 7; + string permission = 8; + string tier = 9; + bool has_tier = 10; + uint64 timestamp = 11; + bool has_timestamp = 12; + string artifact = 13; +} + +message MsgStoreDocumentResponse { + string document_id = 1; +} + +message MsgStoreKeyDerivation { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string namespace = 2; + string ring_id = 3; + string derivation = 4; + string policy_id = 5; + string resource = 6; + string permission = 7; + string artifact = 8; +} + +message MsgStoreKeyDerivationResponse { + string key_derivation_id = 1; +} diff --git a/sdk/listener.go b/sdk/listener.go index 1bd3f332..56ef74b6 100644 --- a/sdk/listener.go +++ b/sdk/listener.go @@ -14,6 +14,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" bulletintypes "github.com/sourcenetwork/sourcehub/x/bulletin/types" + orbistypes "github.com/sourcenetwork/sourcehub/x/orbis/types" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) @@ -60,6 +61,7 @@ func (l *TxListener) ListenTxs(ctx context.Context) (<-chan Event, <-chan error, registry := cdctypes.NewInterfaceRegistry() acptypes.RegisterInterfaces(registry) bulletintypes.RegisterInterfaces(registry) + orbistypes.RegisterInterfaces(registry) tiertypes.RegisterInterfaces(registry) mapper := func(in rpctypes.ResultEvent) (Event, error) { diff --git a/sdk/msgset.go b/sdk/msgset.go index 5a5ff793..70ddcf68 100644 --- a/sdk/msgset.go +++ b/sdk/msgset.go @@ -3,6 +3,7 @@ package sdk import ( acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" bulletintypes "github.com/sourcenetwork/sourcehub/x/bulletin/types" + orbistypes "github.com/sourcenetwork/sourcehub/x/orbis/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -54,6 +55,24 @@ func (b *MsgSet) WithCreatePost(msg *bulletintypes.MsgCreatePost) Mapper[*bullet return newMapper(idx, &bulletintypes.MsgCreatePostResponse{}) } +// WithCreateRing includes a MsgCreateRing to the Tx. +func (b *MsgSet) WithCreateRing(msg *orbistypes.MsgCreateRing) Mapper[*orbistypes.MsgCreateRingResponse] { + idx := b.addMsg(msg) + return newMapper(idx, &orbistypes.MsgCreateRingResponse{}) +} + +// WithStoreDocument includes a MsgStoreDocument to the Tx. +func (b *MsgSet) WithStoreDocument(msg *orbistypes.MsgStoreDocument) Mapper[*orbistypes.MsgStoreDocumentResponse] { + idx := b.addMsg(msg) + return newMapper(idx, &orbistypes.MsgStoreDocumentResponse{}) +} + +// WithStoreKeyDerivation includes a MsgStoreKeyDerivation to the Tx. +func (b *MsgSet) WithStoreKeyDerivation(msg *orbistypes.MsgStoreKeyDerivation) Mapper[*orbistypes.MsgStoreKeyDerivationResponse] { + idx := b.addMsg(msg) + return newMapper(idx, &orbistypes.MsgStoreKeyDerivationResponse{}) +} + func (b *MsgSet) WithBearerPolicyCmd(msg *acptypes.MsgBearerPolicyCmd) Mapper[*acptypes.MsgBearerPolicyCmdResponse] { idx := b.addMsg(msg) return newMapper(idx, &acptypes.MsgBearerPolicyCmdResponse{}) diff --git a/sdk/sdk.go b/sdk/sdk.go index 21c1e47c..94a31445 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -23,6 +23,7 @@ import ( acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" bulletintypes "github.com/sourcenetwork/sourcehub/x/bulletin/types" + orbistypes "github.com/sourcenetwork/sourcehub/x/orbis/types" ) // Opt configures the construction of a Client @@ -156,6 +157,11 @@ func (c *Client) BulletinQueryClient() bulletintypes.QueryClient { return bulletintypes.NewQueryClient(c.conn) } +// OrbisQueryClient returns a Query Client for the Orbis module. +func (c *Client) OrbisQueryClient() orbistypes.QueryClient { + return orbistypes.NewQueryClient(c.conn) +} + // BankQueryClient returns a Query Client for the Bank module func (c *Client) BankQueryClient() banktypes.QueryClient { return banktypes.NewQueryClient(c.conn) diff --git a/testutil/keeper/orbis.go b/testutil/keeper/orbis.go new file mode 100644 index 00000000..20b4ecaf --- /dev/null +++ b/testutil/keeper/orbis.go @@ -0,0 +1,96 @@ +package keeper + +import ( + "testing" + + "cosmossdk.io/log" + "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + storetypes "cosmossdk.io/store/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + "github.com/stretchr/testify/require" + + acpkeeper "github.com/sourcenetwork/sourcehub/x/acp/keeper" + acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" + hubtestutil "github.com/sourcenetwork/sourcehub/x/hub/testutil" + "github.com/sourcenetwork/sourcehub/x/orbis/keeper" + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +func OrbisKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { + orbisStoreKey := storetypes.NewKVStoreKey(types.StoreKey) + acpStoreKey := storetypes.NewKVStoreKey(acptypes.StoreKey) + authStoreKey := storetypes.NewKVStoreKey(authtypes.StoreKey) + capabilityStoreKey := storetypes.NewKVStoreKey("capkeeper") + capabilityMemStoreKey := storetypes.NewKVStoreKey("capkeepermem") + + db := dbm.NewMemDB() + stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) + stateStore.MountStoreWithDB(orbisStoreKey, storetypes.StoreTypeDB, db) + stateStore.MountStoreWithDB(acpStoreKey, storetypes.StoreTypeDB, db) + stateStore.MountStoreWithDB(authStoreKey, storetypes.StoreTypeDB, db) + stateStore.MountStoreWithDB(capabilityStoreKey, storetypes.StoreTypeDB, db) + stateStore.MountStoreWithDB(capabilityMemStoreKey, storetypes.StoreTypeDB, db) + require.NoError(t, stateStore.LoadLatestVersion()) + + registry := codectypes.NewInterfaceRegistry() + authtypes.RegisterInterfaces(registry) + cryptocodec.RegisterInterfaces(registry) + + cdc := codec.NewProtoCodec(registry) + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + bech32Prefix := "source" + addressCodec := authcodec.NewBech32Codec(bech32Prefix) + + maccPerms := map[string][]string{ + authtypes.FeeCollectorName: nil, + } + + accountKeeper := authkeeper.NewAccountKeeper( + cdc, + runtime.NewKVStoreService(authStoreKey), + authtypes.ProtoBaseAccount, + maccPerms, + addressCodec, + bech32Prefix, + authority.String(), + ) + + capKeeper := capabilitykeeper.NewKeeper(cdc, capabilityStoreKey, capabilityMemStoreKey) + acpCapKeeper := capKeeper.ScopeToModule(acptypes.ModuleName) + + acpKeeper := acpkeeper.NewKeeper( + cdc, + runtime.NewKVStoreService(acpStoreKey), + log.NewNopLogger(), + authority.String(), + accountKeeper, + &acpCapKeeper, + hubtestutil.NewHubKeeperStub(), + ) + + k := keeper.NewKeeper( + cdc, + runtime.NewKVStoreService(orbisStoreKey), + log.NewNopLogger(), + authority.String(), + accountKeeper, + &acpKeeper, + ) + + ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) + k.SetParams(ctx, types.DefaultParams()) + + return k, ctx +} diff --git a/x/bulletin/keeper/msg_server.go b/x/bulletin/keeper/msg_server.go index bd41c931..bf5fc522 100644 --- a/x/bulletin/keeper/msg_server.go +++ b/x/bulletin/keeper/msg_server.go @@ -3,7 +3,6 @@ package keeper import ( "context" "encoding/base64" - "encoding/json" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -116,158 +115,6 @@ func (k *Keeper) CreatePost(goCtx context.Context, msg *types.MsgCreatePost) (*t return &types.MsgCreatePostResponse{}, nil } -// UpdateRingPostByAcp updates the new_peer_ids, new_threshold, and/or -// pss_interval fields of a ring post. The existing post must be a valid ring -// payload containing a policy_id. The caller must hold update_post permission -// in that policy. -func (k *Keeper) UpdateRingPostByAcp(goCtx context.Context, msg *types.MsgUpdateRingPostByAcp) (*types.MsgUpdateRingPostByAcpResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - namespaceId := getNamespaceId(msg.Namespace) - if !k.hasNamespace(goCtx, namespaceId) { - return nil, types.ErrNamespaceNotFound - } - - existing := k.getPost(goCtx, namespaceId, msg.PostId) - if existing == nil { - return nil, types.ErrPostNotFound - } - - ringPayload, err := parseRingPayloadJSON(existing.Payload) - if err != nil { - return nil, err - } - - if ringPayload.PolicyID == nil { - return nil, types.ErrRingPayloadMissingPolicyId - } - policyId := *ringPayload.PolicyID - - updaterDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) - if err != nil { - return nil, err - } - - allowed, err := hasPermission(goCtx, k, policyId, namespaceId, types.UpdatePostPermission, updaterDID, msg.Creator) - if err != nil { - return nil, err - } - if !allowed { - return nil, types.ErrInvalidPostUpdater - } - - var newThreshold *uint32 - if msg.XNewThreshold != nil { - v := msg.GetNewThreshold() - newThreshold = &v - } - if err := validateRingPostUpdate(msg.NewPeerIds, newThreshold, ringPayload); err != nil { - return nil, err - } - - if len(msg.NewPeerIds) > 0 { - ringPayload.NewPeerIDs = &msg.NewPeerIds - } - if newThreshold != nil { - ringPayload.NewThreshold = newThreshold - } - if msg.XPssInterval != nil { - v := msg.GetPssInterval() - ringPayload.PSSInterval = &v - } - - updatedPayload, err := json.Marshal(ringPayload) - if err != nil { - return nil, errorsmod.Wrapf(types.ErrInvalidPostPayload, "could not marshal updated ring payload: %s", err) - } - - existing.Payload = updatedPayload - k.SetPost(goCtx, *existing) - - b64Payload := base64.StdEncoding.EncodeToString(existing.Payload) - if err := ctx.EventManager().EmitTypedEvent(&types.EventPostUpdated{ - NamespaceId: namespaceId, - PostId: existing.Id, - UpdaterDid: updaterDID, - Payload: b64Payload, - Artifact: msg.Artifact, - }); err != nil { - return nil, err - } - - return &types.MsgUpdateRingPostByAcpResponse{}, nil -} - -// UpdateRingPostByThresholdSignature finalizes a reshare using only the current -// bulletin payload as state. It moves new_peer_ids/new_threshold into -// peer_ids/threshold, clears the new_* fields, and verifies a threshold -// signature over the canonical transition sign doc against the current -// payload's ring_pk. Once accepted, the stored payload's block_number_nonce is -// set to the current block height. -// This path does not perform the ACP collaborator permission check used by -// UpdatePost. -func (k *Keeper) UpdateRingPostByThresholdSignature( - goCtx context.Context, - msg *types.MsgUpdateRingPostByThresholdSignature, -) (*types.MsgUpdateRingPostByThresholdSignatureResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - namespaceId := getNamespaceId(msg.Namespace) - if !k.hasNamespace(goCtx, namespaceId) { - return nil, types.ErrNamespaceNotFound - } - - existing := k.getPost(goCtx, namespaceId, msg.PostId) - if existing == nil { - return nil, types.ErrPostNotFound - } - - updaterDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) - if err != nil { - return nil, err - } - - currentRingPayload, err := parseRingPayloadJSON(existing.Payload) - if err != nil { - return nil, err - } - - signDocFinalizedPayload, err := deriveFinalizedRingPayloadReshare(currentRingPayload) - if err != nil { - return nil, err - } - - signBytes, err := ringReshareFinalizeSignBytes(ctx.ChainID(), msg.Namespace, msg.PostId, existing.Payload, signDocFinalizedPayload, currentRingPayload) - if err != nil { - return nil, err - } - - if err := verifyThresholdSignatureForRingPayloadUpdate(currentRingPayload, signBytes, msg.SignatureScheme, msg.Signature); err != nil { - return nil, err - } - - finalizedPayload, err := finalizeRingPayloadReshare(currentRingPayload, uint64(ctx.BlockHeight())) - if err != nil { - return nil, err - } - - existing.Payload = finalizedPayload - k.SetPost(goCtx, *existing) - - b64Payload := base64.StdEncoding.EncodeToString(existing.Payload) - if err := ctx.EventManager().EmitTypedEvent(&types.EventPostUpdated{ - NamespaceId: namespaceId, - PostId: existing.Id, - UpdaterDid: updaterDID, - Payload: b64Payload, - Artifact: msg.Artifact, - }); err != nil { - return nil, err - } - - return &types.MsgUpdateRingPostByThresholdSignatureResponse{}, nil -} - // AddCollaborator adds a new collaborator to the specified namespace. // The signer must have permission to manage collaborators of that namespace object. func (k *Keeper) AddCollaborator(goCtx context.Context, msg *types.MsgAddCollaborator) (*types.MsgAddCollaboratorResponse, error) { diff --git a/x/bulletin/keeper/msg_server_test.go b/x/bulletin/keeper/msg_server_test.go index 3b09d5d7..1dd02403 100644 --- a/x/bulletin/keeper/msg_server_test.go +++ b/x/bulletin/keeper/msg_server_test.go @@ -1,279 +1,17 @@ package keeper import ( - "encoding/hex" - "encoding/json" - "fmt" "testing" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" - blst "github.com/supranational/blst/bindings/go" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) -func TestMsgUpdateRingPostByAcp_ValidateBasic(t *testing.T) { - k, ctx := setupKeeper(t) - require.NoError(t, k.SetParams(ctx, types.DefaultParams())) - - ownerKey := secp256k1.GenPrivKey().PubKey() - owner := authtypes.NewBaseAccount(sdk.AccAddress(ownerKey.Address()), ownerKey, 1, 1) - k.accountKeeper.SetAccount(ctx, owner) - - cases := []struct { - msg *types.MsgUpdateRingPostByAcp - errMsg string - }{ - {&types.MsgUpdateRingPostByAcp{}, "invalid creator address"}, - {&types.MsgUpdateRingPostByAcp{Creator: owner.Address}, "invalid namespace id"}, - {&types.MsgUpdateRingPostByAcp{Creator: owner.Address, Namespace: "ns1"}, "invalid post id"}, - } - for _, c := range cases { - err := c.msg.ValidateBasic() - require.Error(t, err) - require.Contains(t, err.Error(), c.errMsg) - } -} - -func TestMsgUpdateRingPostByAcp(t *testing.T) { - k, ctx := setupKeeper(t) - require.NoError(t, k.SetParams(ctx, types.DefaultParams())) - - ownerKey := secp256k1.GenPrivKey().PubKey() - owner := authtypes.NewBaseAccount(sdk.AccAddress(ownerKey.Address()), ownerKey, 1, 1) - k.accountKeeper.SetAccount(ctx, owner) - - outsiderKey := secp256k1.GenPrivKey().PubKey() - outsider := authtypes.NewBaseAccount(sdk.AccAddress(outsiderKey.Address()), outsiderKey, 2, 1) - k.accountKeeper.SetAccount(ctx, outsider) - - collabKey := secp256k1.GenPrivKey().PubKey() - collab := authtypes.NewBaseAccount(sdk.AccAddress(collabKey.Address()), collabKey, 3, 1) - k.accountKeeper.SetAccount(ctx, collab) - - setupTestPolicy(t, ctx, k) - - namespace := "ns1" - namespaceId := getNamespaceId(namespace) - - _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ - Creator: owner.Address, - Namespace: namespace, - }) - require.NoError(t, err) - - policyId := k.GetPolicyId(ctx) - require.NotEmpty(t, policyId) - - ringPayloadBytes := makeRingPayloadWithPolicy(t, policyId) - _, err = k.CreatePost(ctx, &types.MsgCreatePost{ - Creator: owner.Address, - Namespace: namespace, - Payload: ringPayloadBytes, - }) - require.NoError(t, err) - - postId := types.GeneratePostId(namespaceId, ringPayloadBytes) - - t.Run("namespace not found", func(t *testing.T) { - _, err := k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: owner.Address, - Namespace: "does-not-exist", - PostId: postId, - NewPeerIds: []string{"peer2"}, - }) - require.ErrorIs(t, err, types.ErrNamespaceNotFound) - }) - - t.Run("post not found", func(t *testing.T) { - _, err := k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: owner.Address, - Namespace: namespace, - PostId: "nonexistent-post-id", - NewPeerIds: []string{"peer2"}, - }) - require.ErrorIs(t, err, types.ErrPostNotFound) - }) - - t.Run("non-ring payload is rejected", func(t *testing.T) { - invalidPostID := "invalid-ring-payload-post" - k.SetPost(ctx, types.Post{ - Id: invalidPostID, - Namespace: namespaceId, - Payload: []byte("not-ring-json"), - }) - _, err := k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: owner.Address, - Namespace: namespace, - PostId: invalidPostID, - NewPeerIds: []string{"peer2"}, - }) - require.ErrorIs(t, err, types.ErrInvalidPostPayload) - }) - - t.Run("ring payload without policy_id is rejected", func(t *testing.T) { - noPolicyPostID := "no-policy-id-post" - noPolicyPayload := ringPayloadWithSeed(t, "sourcehub-bulletin-bls-test-seed-0003", []string{"peer1"}, 1, nil, nil) - k.SetPost(ctx, types.Post{ - Id: noPolicyPostID, - Namespace: namespaceId, - Payload: noPolicyPayload, - }) - _, err := k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: owner.Address, - Namespace: namespace, - PostId: noPolicyPostID, - NewPeerIds: []string{"peer2"}, - }) - require.ErrorIs(t, err, types.ErrRingPayloadMissingPolicyId) - }) - - t.Run("outsider without permission is rejected", func(t *testing.T) { - _, err := k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: outsider.Address, - Namespace: namespace, - PostId: postId, - NewPeerIds: []string{"peer2"}, - }) - require.ErrorIs(t, err, types.ErrInvalidPostUpdater) - - stored := k.getPost(ctx, namespaceId, postId) - require.NotNil(t, stored) - require.Equal(t, ringPayloadBytes, stored.Payload) - }) - - t.Run("collaborator can update new_peer_ids and post_id is preserved", func(t *testing.T) { - _, err := k.AddCollaborator(ctx, &types.MsgAddCollaborator{ - Creator: owner.Address, - Namespace: namespace, - Collaborator: collab.Address, - }) - require.NoError(t, err) - - t.Run("duplicate new_peer_ids are rejected", func(t *testing.T) { - _, err := k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: collab.Address, - Namespace: namespace, - PostId: postId, - NewPeerIds: []string{"peer2", "peer2"}, - }) - require.ErrorIs(t, err, types.ErrInvalidPostPayload) - }) - - t.Run("new_threshold of zero is rejected", func(t *testing.T) { - _, err := k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: collab.Address, - Namespace: namespace, - PostId: postId, - XNewThreshold: &types.MsgUpdateRingPostByAcp_NewThreshold{NewThreshold: 0}, - }) - require.ErrorIs(t, err, types.ErrInvalidPostPayload) - }) - - _, err = k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: collab.Address, - Namespace: namespace, - PostId: postId, - NewPeerIds: []string{"peer2", "peer3"}, - }) - require.NoError(t, err) - - stored := k.getPost(ctx, namespaceId, postId) - require.NotNil(t, stored) - require.Equal(t, postId, stored.Id) - - parsed, err := parseRingPayloadJSON(stored.Payload) - require.NoError(t, err) - require.Equal(t, []string{"peer2", "peer3"}, *parsed.NewPeerIDs) - }) - - t.Run("reshare in progress: changing new_threshold alone is rejected", func(t *testing.T) { - // post currently has new_peer_ids set from the previous test — reshare in progress - _, err = k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: collab.Address, - Namespace: namespace, - PostId: postId, - XNewThreshold: &types.MsgUpdateRingPostByAcp_NewThreshold{NewThreshold: 2}, - }) - require.ErrorIs(t, err, types.ErrReshareInProgress) - }) - - t.Run("new_threshold is updated when set alongside new_peer_ids", func(t *testing.T) { - // reset post to original so no reshare is in progress - original := k.getPost(ctx, namespaceId, postId) - original.Payload = ringPayloadBytes - k.SetPost(ctx, *original) - - threshold := uint32(2) - _, err = k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: collab.Address, - Namespace: namespace, - PostId: postId, - NewPeerIds: []string{"peer2", "peer3"}, - XNewThreshold: &types.MsgUpdateRingPostByAcp_NewThreshold{NewThreshold: threshold}, - }) - require.NoError(t, err) - - parsed, err := parseRingPayloadJSON(k.getPost(ctx, namespaceId, postId).Payload) - require.NoError(t, err) - require.Equal(t, threshold, *parsed.NewThreshold) - require.Equal(t, []string{"peer2", "peer3"}, *parsed.NewPeerIDs) - }) - - t.Run("pss_interval is updated when provided", func(t *testing.T) { - interval := uint64(100) - _, err = k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: collab.Address, - Namespace: namespace, - PostId: postId, - XPssInterval: &types.MsgUpdateRingPostByAcp_PssInterval{PssInterval: interval}, - }) - require.NoError(t, err) - - parsed, err := parseRingPayloadJSON(k.getPost(ctx, namespaceId, postId).Payload) - require.NoError(t, err) - require.Equal(t, interval, *parsed.PSSInterval) - }) - - t.Run("unspecified fields are not changed", func(t *testing.T) { - before, err := parseRingPayloadJSON(k.getPost(ctx, namespaceId, postId).Payload) - require.NoError(t, err) - originalPeerIDs := *before.PeerIDs - originalNewThreshold := *before.NewThreshold - - // pss_interval-only update is allowed even while a reshare is in progress - _, err = k.UpdateRingPostByAcp(ctx, &types.MsgUpdateRingPostByAcp{ - Creator: collab.Address, - Namespace: namespace, - PostId: postId, - XPssInterval: &types.MsgUpdateRingPostByAcp_PssInterval{PssInterval: 200}, - }) - require.NoError(t, err) - - after, err := parseRingPayloadJSON(k.getPost(ctx, namespaceId, postId).Payload) - require.NoError(t, err) - require.Equal(t, originalPeerIDs, *after.PeerIDs) - require.Equal(t, originalNewThreshold, *after.NewThreshold) - }) -} - -func makeRingPayloadWithPolicy(t *testing.T, policyId string) []byte { - t.Helper() - payload := ringPayloadWithSeed(t, "sourcehub-bulletin-bls-test-seed-0001", []string{"peer1"}, 1, nil, nil) - - var raw map[string]interface{} - require.NoError(t, json.Unmarshal(payload, &raw)) - raw["policy_id"] = policyId - out, err := json.Marshal(raw) - require.NoError(t, err) - return out -} - -func TestMsgCreatePost_DoesNotValidateRingPayload(t *testing.T) { +func TestMsgCreatePost_DoesNotValidatePayloadShape(t *testing.T) { k, ctx := setupKeeper(t) require.NoError(t, k.SetParams(ctx, types.DefaultParams())) @@ -292,454 +30,16 @@ func TestMsgCreatePost_DoesNotValidateRingPayload(t *testing.T) { _, err = k.CreatePost(ctx, &types.MsgCreatePost{ Creator: owner.Address, Namespace: namespace, - Payload: []byte(`{"ring_pk":"pk","peer_ids":["peer1"]}`), - }) - require.NoError(t, err) -} - - -func TestMsgUpdateRingPostByThresholdSignature_ValidateBasic(t *testing.T) { - k, ctx := setupKeeper(t) - require.NoError(t, k.SetParams(ctx, types.DefaultParams())) - - ownerKey := secp256k1.GenPrivKey().PubKey() - owner := authtypes.NewBaseAccount(sdk.AccAddress(ownerKey.Address()), ownerKey, 1, 1) - k.accountKeeper.SetAccount(ctx, owner) - - validMsg := &types.MsgUpdateRingPostByThresholdSignature{ - Creator: owner.Address, - Namespace: "ns1", - PostId: "post1", - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - Signature: []byte("signature"), - } - require.NoError(t, validMsg.ValidateBasic()) - - cases := []struct { - msg *types.MsgUpdateRingPostByThresholdSignature - wantErr error - }{ - {&types.MsgUpdateRingPostByThresholdSignature{}, sdkerrors.ErrInvalidAddress}, - {&types.MsgUpdateRingPostByThresholdSignature{Creator: owner.Address}, types.ErrInvalidNamespaceId}, - {&types.MsgUpdateRingPostByThresholdSignature{Creator: owner.Address, Namespace: "ns1"}, types.ErrInvalidPostId}, - {&types.MsgUpdateRingPostByThresholdSignature{Creator: owner.Address, Namespace: "ns1", PostId: "post1"}, types.ErrInvalidSignatureScheme}, - {&types.MsgUpdateRingPostByThresholdSignature{Creator: owner.Address, Namespace: "ns1", PostId: "post1", SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL}, types.ErrInvalidSignaturePayload}, - } - for _, c := range cases { - err := c.msg.ValidateBasic() - require.ErrorIs(t, err, c.wantErr) - } -} - -func TestUpdateRingPostByThresholdSignature_ValidatesRingPayload(t *testing.T) { - k, ctx := setupKeeper(t) - ctx = ctx.WithChainID("sourcehub-test").WithBlockHeight(101) - require.NoError(t, k.SetParams(ctx, types.DefaultParams())) - - ownerKey := secp256k1.GenPrivKey().PubKey() - owner := authtypes.NewBaseAccount(sdk.AccAddress(ownerKey.Address()), ownerKey, 1, 1) - k.accountKeeper.SetAccount(ctx, owner) - - namespace := "ns1" - namespaceId := getNamespaceId(namespace) - originalPayload := ringPayloadWithSeed( - t, - "sourcehub-bulletin-bls-test-seed-0001", - []string{"peer1"}, - 1, - []string{"peer2"}, - uint32Ptr(2), - ) - - _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ - Creator: owner.Address, - Namespace: namespace, - }) - require.NoError(t, err) - - _, err = k.CreatePost(ctx, &types.MsgCreatePost{ - Creator: owner.Address, - Namespace: namespace, - Payload: originalPayload, - }) - require.NoError(t, err) - - postId := types.GeneratePostId(namespaceId, originalPayload) - - invalidCurrentPayloads := [][]byte{ - []byte(`not-json`), - []byte(`{"ring_pk":"pk","peer_ids":["peer1"]}`), - []byte(`{"ring_pk":"pk","peer_ids":["peer1"],"threshold":-1}`), - []byte(`{"ring_pk":"pk","peer_ids":["peer1"],"threshold":1}`), - } - - for i, payload := range invalidCurrentPayloads { - invalidPostID := fmt.Sprintf("invalid-post-%d", i) - k.SetPost(ctx, types.Post{ - Id: invalidPostID, - Namespace: namespaceId, - CreatorDid: owner.Address, - Payload: payload, - }) - - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: owner.Address, - Namespace: namespace, - PostId: invalidPostID, - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - }) - require.ErrorIs(t, err, types.ErrInvalidPostPayload) - - stored := k.getPost(ctx, namespaceId, invalidPostID) - require.NotNil(t, stored) - require.Equal(t, payload, stored.Payload) - } - - currentRingPayload, err := parseRingPayloadJSON(originalPayload) - require.NoError(t, err) - signDocFinalizedPayload, err := deriveFinalizedRingPayloadReshare(currentRingPayload) - require.NoError(t, err) - finalizedPayload, err := finalizeRingPayloadReshare(currentRingPayload, uint64(ctx.BlockHeight())) - require.NoError(t, err) - signature := signReshareFinalizePayload( - t, - ctx.ChainID(), - namespace, - postId, - originalPayload, - signDocFinalizedPayload, - "sourcehub-bulletin-bls-test-seed-0001", - ) - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: owner.Address, - Namespace: namespace, - PostId: postId, - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - Signature: signature, + Payload: []byte(`{"anything":"goes"}`), }) require.NoError(t, err) - stored := k.getPost(ctx, namespaceId, postId) - require.NotNil(t, stored) - require.Equal(t, finalizedPayload, stored.Payload) + postID := types.GeneratePostId(getNamespaceId(namespace), []byte(`{"anything":"goes"}`)) + post := k.getPost(ctx, getNamespaceId(namespace), postID) + require.NotNil(t, post) + require.Equal(t, []byte(`{"anything":"goes"}`), post.Payload) } -func TestUpdateRingPostByThresholdSignature_VerifiesThresholdSignature(t *testing.T) { - k, ctx := setupKeeper(t) - ctx = ctx.WithChainID("sourcehub-test").WithBlockHeight(202) - require.NoError(t, k.SetParams(ctx, types.DefaultParams())) - - ownerKey := secp256k1.GenPrivKey().PubKey() - owner := authtypes.NewBaseAccount(sdk.AccAddress(ownerKey.Address()), ownerKey, 1, 1) - k.accountKeeper.SetAccount(ctx, owner) - - updaterKey := secp256k1.GenPrivKey().PubKey() - updater := authtypes.NewBaseAccount(sdk.AccAddress(updaterKey.Address()), updaterKey, 2, 1) - k.accountKeeper.SetAccount(ctx, updater) - - namespace := "manual-ns" - namespaceId := getNamespaceId(namespace) - ownerDID, err := k.GetAcpKeeper().GetActorDID(ctx, owner.Address) - require.NoError(t, err) - k.SetNamespace(ctx, types.Namespace{ - Id: namespaceId, - OwnerDid: ownerDID, - Creator: owner.Address, - }) - - originalPayload := ringPayloadWithSeed( - t, - "sourcehub-bulletin-bls-test-seed-0001", - []string{"peer1"}, - 1, - []string{"peer2"}, - uint32Ptr(2), - ) - postId := "post1" - k.SetPost(ctx, types.Post{ - Id: postId, - Namespace: namespaceId, - CreatorDid: ownerDID, - Payload: originalPayload, - }) - require.Empty(t, k.GetPolicyId(ctx)) - - currentRingPayload, err := parseRingPayloadJSON(originalPayload) - require.NoError(t, err) - signDocFinalizedPayload, err := deriveFinalizedRingPayloadReshare(currentRingPayload) - require.NoError(t, err) - finalizedPayload, err := finalizeRingPayloadReshare(currentRingPayload, uint64(ctx.BlockHeight())) - require.NoError(t, err) - signature := signReshareFinalizePayload( - t, - ctx.ChainID(), - namespace, - postId, - originalPayload, - signDocFinalizedPayload, - "sourcehub-bulletin-bls-test-seed-0001", - ) - tamperedSignature := append([]byte(nil), signature...) - tamperedSignature[len(tamperedSignature)-1] ^= 0x01 - attackerSignature := signReshareFinalizePayload( - t, - ctx.ChainID(), - namespace, - postId, - originalPayload, - signDocFinalizedPayload, - "sourcehub-bulletin-bls-test-seed-0002", - ) - - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: updater.Address, - Namespace: namespace, - PostId: postId, - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - Signature: tamperedSignature, - }) - require.ErrorIs(t, err, types.ErrInvalidThresholdSignature) - - stored := k.getPost(ctx, namespaceId, postId) - require.NotNil(t, stored) - require.Equal(t, originalPayload, stored.Payload) - - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: updater.Address, - Namespace: namespace, - PostId: postId, - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - Signature: attackerSignature, - }) - require.ErrorIs(t, err, types.ErrInvalidThresholdSignature) - - stored = k.getPost(ctx, namespaceId, postId) - require.NotNil(t, stored) - require.Equal(t, originalPayload, stored.Payload) - - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: updater.Address, - Namespace: namespace, - PostId: postId, - SignatureScheme: "bls12_381", - Signature: signature, - }) - require.ErrorIs(t, err, types.ErrInvalidThresholdSignature) - - stored = k.getPost(ctx, namespaceId, postId) - require.NotNil(t, stored) - require.Equal(t, originalPayload, stored.Payload) - - post2ID := "post2" - k.SetPost(ctx, types.Post{ - Id: post2ID, - Namespace: namespaceId, - CreatorDid: ownerDID, - Payload: originalPayload, - }) - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: updater.Address, - Namespace: namespace, - PostId: post2ID, - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - Signature: signature, - }) - require.ErrorIs(t, err, types.ErrInvalidThresholdSignature) - - stored = k.getPost(ctx, namespaceId, post2ID) - require.NotNil(t, stored) - require.Equal(t, originalPayload, stored.Payload) - - staleCurrentPayload := ringPayloadWithSeed( - t, - "sourcehub-bulletin-bls-test-seed-0001", - []string{"peer1"}, - 1, - []string{"peer2", "peer4"}, - uint32Ptr(2), - ) - k.SetPost(ctx, types.Post{ - Id: postId, - Namespace: namespaceId, - CreatorDid: ownerDID, - Payload: staleCurrentPayload, - }) - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: updater.Address, - Namespace: namespace, - PostId: postId, - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - Signature: signature, - }) - require.ErrorIs(t, err, types.ErrInvalidThresholdSignature) - - stored = k.getPost(ctx, namespaceId, postId) - require.NotNil(t, stored) - require.Equal(t, staleCurrentPayload, stored.Payload) - - staleNoncePayload := ringPayloadWithSeedAndNonce( - t, - "sourcehub-bulletin-bls-test-seed-0001", - []string{"peer1"}, - 1, - []string{"peer2"}, - uint32Ptr(2), - 9, - ) - k.SetPost(ctx, types.Post{ - Id: postId, - Namespace: namespaceId, - CreatorDid: ownerDID, - Payload: staleNoncePayload, - }) - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: updater.Address, - Namespace: namespace, - PostId: postId, - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - Signature: signature, - }) - require.ErrorIs(t, err, types.ErrInvalidThresholdSignature) - - stored = k.getPost(ctx, namespaceId, postId) - require.NotNil(t, stored) - require.Equal(t, staleNoncePayload, stored.Payload) - - k.SetPost(ctx, types.Post{ - Id: postId, - Namespace: namespaceId, - CreatorDid: ownerDID, - Payload: originalPayload, - }) - - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: updater.Address, - Namespace: namespace, - PostId: postId, - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - Signature: signature, - }) - require.NoError(t, err) - - stored = k.getPost(ctx, namespaceId, postId) - require.NotNil(t, stored) - require.Equal(t, finalizedPayload, stored.Payload) - - _, err = k.UpdateRingPostByThresholdSignature(ctx, &types.MsgUpdateRingPostByThresholdSignature{ - Creator: updater.Address, - Namespace: namespace, - PostId: postId, - SignatureScheme: ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, - Signature: signature, - }) - require.ErrorIs(t, err, types.ErrInvalidPostPayload) -} - -func signedRingPayload(t *testing.T, peerIDs []string, threshold uint32) ([]byte, []byte) { - t.Helper() - - return signedRingPayloadWithSeed(t, "sourcehub-bulletin-bls-test-seed-0001", peerIDs, threshold) -} - -func signedRingPayloadWithSeed(t *testing.T, seed string, peerIDs []string, threshold uint32) ([]byte, []byte) { - t.Helper() - - payload := ringPayloadWithSeed(t, seed, peerIDs, threshold, nil, nil) - signature := signPayloadWithSeed(t, seed, payload) - - return payload, signature -} - -type testRingPayload struct { - RingPK string `json:"ring_pk"` - NewPeerIDs []string `json:"new_peer_ids,omitempty"` - NewThreshold *uint32 `json:"new_threshold,omitempty"` - PeerIDs []string `json:"peer_ids"` - Threshold uint32 `json:"threshold"` - PSSInterval *uint64 `json:"pss_interval,omitempty"` - BlockNumberNonce uint64 `json:"block_number_nonce"` -} - -func ringPayloadWithSeed( - t *testing.T, - seed string, - peerIDs []string, - threshold uint32, - newPeerIDs []string, - newThreshold *uint32, -) []byte { - t.Helper() - - return ringPayloadWithSeedAndNonce(t, seed, peerIDs, threshold, newPeerIDs, newThreshold, 0) -} - -func ringPayloadWithSeedAndNonce( - t *testing.T, - seed string, - peerIDs []string, - threshold uint32, - newPeerIDs []string, - newThreshold *uint32, - blockNumberNonce uint64, -) []byte { - t.Helper() - require.NotEmpty(t, peerIDs) - - secretKey := blst.KeyGen([]byte(seed)) - require.NotNil(t, secretKey) - publicKey := new(blst.P1Affine).From(secretKey) - - payload, err := json.Marshal(testRingPayload{ - RingPK: hex.EncodeToString(publicKey.Compress()), - NewPeerIDs: newPeerIDs, - NewThreshold: newThreshold, - PeerIDs: peerIDs, - Threshold: threshold, - BlockNumberNonce: blockNumberNonce, - }) - require.NoError(t, err) - - return payload -} - -func signPayloadWithSeed(t *testing.T, seed string, payload []byte) []byte { - t.Helper() - - secretKey := blst.KeyGen([]byte(seed)) - require.NotNil(t, secretKey) - signature := new(blst.P2Affine).Sign(secretKey, payload, []byte(bls12381G2SignatureDST)) - - return signature.Compress() -} - -func signReshareFinalizePayload( - t *testing.T, - chainID string, - namespace string, - postID string, - currentPayload []byte, - finalizedPayload []byte, - seed string, -) []byte { - t.Helper() - - currentRingPayload, err := parseRingPayloadJSON(currentPayload) - require.NoError(t, err) - signBytes, err := ringReshareFinalizeSignBytes(chainID, namespace, postID, currentPayload, finalizedPayload, currentRingPayload) - require.NoError(t, err) - - return signPayloadWithSeed(t, seed, signBytes) -} - -func uint32Ptr(v uint32) *uint32 { - return &v -} - -// TestPolicy_CreatePostPermissionSurvives locks in that the `create_post` -// permission remains queryable via ACP with the `collaborator` relation. -// The keeper no longer gates CreatePost with this permission, but external -// consumers may still query it — this guards against accidental removal -// from the policy YAML. func TestPolicy_CreatePostPermissionSurvives(t *testing.T) { k, ctx := setupKeeper(t) require.NoError(t, k.SetParams(ctx, types.DefaultParams())) @@ -775,669 +75,5 @@ func TestPolicy_CreatePostPermissionSurvives(t *testing.T) { allowed, err := hasPermission(ctx, &k, k.GetPolicyId(ctx), namespaceId, types.CreatePostPermission, collabDID, collab.Address) require.NoError(t, err) - require.True(t, allowed, "create_post permission should resolve for a collaborator") - - outsiderKey := secp256k1.GenPrivKey().PubKey() - outsider := authtypes.NewBaseAccount(sdk.AccAddress(outsiderKey.Address()), outsiderKey, 3, 1) - k.accountKeeper.SetAccount(ctx, outsider) - - outsiderDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, outsider.Address) - require.NoError(t, err) - - allowed, err = hasPermission(ctx, &k, k.GetPolicyId(ctx), namespaceId, types.CreatePostPermission, outsiderDID, outsider.Address) - require.NoError(t, err) - require.False(t, allowed, "create_post permission should deny a non-collaborator") -} - -func TestMsgServer(t *testing.T) { - k, ctx := setupKeeper(t) - require.NotNil(t, ctx) - require.NotEmpty(t, k) -} - -func TestMsgUpdateParams(t *testing.T) { - k, ctx := setupKeeper(t) - params := types.DefaultParams() - require.NoError(t, k.SetParams(ctx, params)) - wctx := sdk.UnwrapSDKContext(ctx) - - // default params - testCases := []struct { - name string - input *types.MsgUpdateParams - expErr bool - expErrMsg string - }{ - { - name: "invalid authority", - input: &types.MsgUpdateParams{ - Authority: "invalid", - Params: params, - }, - expErr: true, - expErrMsg: "invalid authority", - }, - { - name: "send enabled param", - input: &types.MsgUpdateParams{ - Authority: k.GetAuthority(), - Params: types.Params{}, - }, - expErr: false, - }, - { - name: "all good", - input: &types.MsgUpdateParams{ - Authority: k.GetAuthority(), - Params: params, - }, - expErr: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - _, err := k.UpdateParams(wctx, tc.input) - - if tc.expErr { - require.Error(t, err) - require.Contains(t, err.Error(), tc.expErrMsg) - } else { - require.NoError(t, err) - } - }) - } -} - -func TestMsgRegisterNamespace(t *testing.T) { - k, ctx := setupKeeper(t) - - p := types.DefaultParams() - require.NoError(t, k.SetParams(ctx, p)) - - pubKey := secp256k1.GenPrivKey().PubKey() - addr := sdk.AccAddress(pubKey.Address()) - baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) - k.accountKeeper.SetAccount(ctx, baseAcc) - - namespace := "ns1" - - testCases := []struct { - name string - input *types.MsgRegisterNamespace - setup func() - expErr bool - expErrMsg string - }{ - { - name: "register namespace (error: invalid creator address)", - input: &types.MsgRegisterNamespace{}, - setup: func() {}, - expErr: true, - expErrMsg: "invalid creator address", - }, - { - name: "register namespace (error: invalid namespace id)", - input: &types.MsgRegisterNamespace{ - Creator: baseAcc.Address, - }, - setup: func() {}, - expErr: true, - expErrMsg: "invalid namespace id", - }, - { - name: "register namespace (error: fetching capability for policy)", - input: &types.MsgRegisterNamespace{ - Creator: baseAcc.Address, - Namespace: namespace, - }, - setup: func() { - k.SetPolicyId(ctx, "policy1") - }, - expErr: true, - expErrMsg: "fetching capability for policy", - }, - { - name: "register namespace (error: fetching capability for invalid policy)", - input: &types.MsgRegisterNamespace{ - Creator: baseAcc.Address, - Namespace: namespace, - }, - setup: func() { - k.SetPolicyId(ctx, "invalidPolicy1") - }, - expErr: true, - expErrMsg: "fetching capability for policy invalidPolicy1", - }, - { - name: "register namespace (no error)", - input: &types.MsgRegisterNamespace{ - Creator: baseAcc.Address, - Namespace: namespace, - }, - setup: func() { - setupTestPolicy(t, ctx, k) - }, - expErr: false, - }, - { - name: "register namespace (error: namespace exists)", - input: &types.MsgRegisterNamespace{ - Creator: baseAcc.Address, - Namespace: namespace, - }, - setup: func() {}, - expErr: true, - expErrMsg: "namespace already exists", - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := tc.input.ValidateBasic() - if err != nil { - if tc.expErr { - require.Contains(t, err.Error(), tc.expErrMsg) - return - } - t.Fatalf("unexpected error in ValidateBasic: %v", err) - } - - tc.setup() - - _, err = k.RegisterNamespace(ctx, tc.input) - - if tc.expErr { - require.Error(t, err) - require.Contains(t, err.Error(), tc.expErrMsg) - } else { - require.NoError(t, err) - } - }) - } -} - -func TestMsgCreatePost(t *testing.T) { - k, ctx := setupKeeper(t) - - p := types.DefaultParams() - require.NoError(t, k.SetParams(ctx, p)) - - pubKey := secp256k1.GenPrivKey().PubKey() - addr := sdk.AccAddress(pubKey.Address()) - baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) - k.accountKeeper.SetAccount(ctx, baseAcc) - - pubKey2 := secp256k1.GenPrivKey().PubKey() - addr2 := sdk.AccAddress(pubKey2.Address()) - baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) - k.accountKeeper.SetAccount(ctx, baseAcc2) - - namespace := "ns1" - - testCases := []struct { - name string - input *types.MsgCreatePost - setup func() - expErr bool - expErrMsg string - }{ - { - name: "create post (error: invalid creator address)", - input: &types.MsgCreatePost{}, - setup: func() {}, - expErr: true, - expErrMsg: "nvalid creator address", - }, - { - name: "create post (error: invalid namespace id)", - input: &types.MsgCreatePost{ - Creator: baseAcc.Address, - Payload: []byte("post123"), - }, - setup: func() {}, - expErr: true, - expErrMsg: "invalid namespace id", - }, - { - name: "create post (error: no payload)", - input: &types.MsgCreatePost{ - Creator: baseAcc.Address, - Namespace: namespace, - }, - setup: func() {}, - expErr: true, - expErrMsg: "invalid post payload", - }, - { - name: "create post (error: namespace not found)", - input: &types.MsgCreatePost{ - Creator: baseAcc.Address, - Namespace: namespace, - Payload: []byte("post123"), - }, - setup: func() {}, - expErr: true, - expErrMsg: "namespace not found", - }, - { - name: "create post (no error)", - input: &types.MsgCreatePost{ - Creator: baseAcc.Address, - Namespace: namespace, - Payload: []byte("post123"), - }, - setup: func() { - setupTestPolicy(t, ctx, k) - - _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ - Creator: baseAcc.Address, - Namespace: namespace, - }) - require.NoError(t, err) - }, - expErr: false, - }, - { - name: "create post (error: post already exists)", - input: &types.MsgCreatePost{ - Creator: baseAcc.Address, - Namespace: namespace, - Payload: []byte("post123"), - }, - setup: func() {}, - expErr: true, - expErrMsg: "post already exists", - }, - { - name: "create post from unrelated signer (no error: posting is open)", - input: &types.MsgCreatePost{ - Creator: baseAcc2.Address, - Namespace: namespace, - Payload: []byte("post-from-other"), - }, - setup: func() {}, - expErr: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := tc.input.ValidateBasic() - if err != nil { - if tc.expErr { - require.Contains(t, err.Error(), tc.expErrMsg) - return - } - t.Fatalf("unexpected error in ValidateBasic: %v", err) - } - - tc.setup() - - _, err = k.CreatePost(ctx, tc.input) - - if tc.expErr { - require.Error(t, err) - require.Contains(t, err.Error(), tc.expErrMsg) - } else { - require.NoError(t, err) - } - }) - } -} - -func TestMsgCreatePost_EmitsArtifactInEvent(t *testing.T) { - k, ctx := setupKeeper(t) - // given test policy and namespace - pubKey := secp256k1.GenPrivKey().PubKey() - addr := sdk.AccAddress(pubKey.Address()) - baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) - k.accountKeeper.SetAccount(ctx, baseAcc) - setupTestPolicy(t, ctx, k) - _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ - Creator: baseAcc.Address, - Namespace: "ns1", - }) - require.NoError(t, err) - - // reset event manager - ctx = ctx.WithEventManager(sdk.NewEventManager()) - - // when i create post - post := types.MsgCreatePost{ - Creator: baseAcc.Address, - Namespace: "ns1", - Payload: []byte("some payload"), - Artifact: "session-id", - } - _, err = k.CreatePost(ctx, &post) - - // then post emit event with artifact - require.NoError(t, err) - - evs := ctx.EventManager().Events() - require.Len(t, evs, 1) - - creatorDid, err := k.acpKeeper.GetActorDID(ctx, baseAcc.Address) - require.NoError(t, err) - eventDid := "\"" + creatorDid + "\"" - ev := evs[0] - require.Equal(t, `"session-id"`, ev.Attributes[0].Value) - require.Equal(t, eventDid, ev.Attributes[1].Value) - require.Equal(t, `"bulletin/ns1"`, ev.Attributes[2].Value) -} - -func TestMsgAddCollaborator(t *testing.T) { - k, ctx := setupKeeper(t) - - p := types.DefaultParams() - require.NoError(t, k.SetParams(ctx, p)) - - pubKey := secp256k1.GenPrivKey().PubKey() - addr := sdk.AccAddress(pubKey.Address()) - baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) - k.accountKeeper.SetAccount(ctx, baseAcc) - - pubKey2 := secp256k1.GenPrivKey().PubKey() - addr2 := sdk.AccAddress(pubKey2.Address()) - baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) - k.accountKeeper.SetAccount(ctx, baseAcc2) - - pubKey3 := secp256k1.GenPrivKey().PubKey() - addr3 := sdk.AccAddress(pubKey3.Address()) - baseAcc3 := authtypes.NewBaseAccount(addr3, pubKey3, 3, 1) - k.accountKeeper.SetAccount(ctx, baseAcc3) - - namespace := "ns1" - - testCases := []struct { - name string - input *types.MsgAddCollaborator - setup func() - expErr bool - expErrMsg string - }{ - { - name: "add collaborator (error: invalid creator address)", - input: &types.MsgAddCollaborator{}, - setup: func() {}, - expErr: true, - expErrMsg: "invalid creator address", - }, - { - name: "add collaborator (error: invalid namespace id)", - input: &types.MsgAddCollaborator{ - Creator: baseAcc.Address, - }, - setup: func() {}, - expErr: true, - expErrMsg: "invalid namespace id", - }, - { - name: "add collaborator (error: invalid collaborator address)", - input: &types.MsgAddCollaborator{ - Creator: baseAcc.Address, - Namespace: namespace, - }, - setup: func() {}, - expErr: true, - expErrMsg: "invalid collaborator address", - }, - { - name: "add collaborator (error: invalid policy id)", - input: &types.MsgAddCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }, - setup: func() {}, - expErr: true, - expErrMsg: "invalid policy id", - }, - { - name: "add collaborator (error: namespace not found)", - input: &types.MsgAddCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }, - setup: func() { - k.SetPolicyId(ctx, "policy1") - }, - expErr: true, - expErrMsg: "namespace not found", - }, - { - name: "add collaborator (no error)", - input: &types.MsgAddCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }, - setup: func() { - setupTestPolicy(t, ctx, k) - - _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ - Creator: baseAcc.Address, - Namespace: namespace, - }) - require.NoError(t, err) - }, - expErr: false, - }, - { - name: "add collaborator (error: collaborator already exists)", - input: &types.MsgAddCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }, - setup: func() {}, - expErr: true, - expErrMsg: "collaborator already exists", - }, - { - name: "add collaborator (error: unauthorized)", - input: &types.MsgAddCollaborator{ - Creator: baseAcc2.Address, - Collaborator: baseAcc3.Address, - Namespace: namespace, - }, - setup: func() {}, - expErr: true, - expErrMsg: "actor is not a manager of relation", - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := tc.input.ValidateBasic() - if err != nil { - if tc.expErr { - require.Contains(t, err.Error(), tc.expErrMsg) - return - } - t.Fatalf("unexpected error in ValidateBasic: %v", err) - } - - tc.setup() - - _, err = k.AddCollaborator(ctx, tc.input) - - if tc.expErr { - require.Error(t, err) - require.Contains(t, err.Error(), tc.expErrMsg) - } else { - require.NoError(t, err) - } - }) - } -} - -func TestMsgRemoveCollaborator(t *testing.T) { - k, ctx := setupKeeper(t) - - p := types.DefaultParams() - require.NoError(t, k.SetParams(ctx, p)) - - pubKey := secp256k1.GenPrivKey().PubKey() - addr := sdk.AccAddress(pubKey.Address()) - baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) - k.accountKeeper.SetAccount(ctx, baseAcc) - - pubKey2 := secp256k1.GenPrivKey().PubKey() - addr2 := sdk.AccAddress(pubKey2.Address()) - baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) - k.accountKeeper.SetAccount(ctx, baseAcc2) - - pubKey3 := secp256k1.GenPrivKey().PubKey() - addr3 := sdk.AccAddress(pubKey3.Address()) - baseAcc3 := authtypes.NewBaseAccount(addr3, pubKey3, 3, 1) - k.accountKeeper.SetAccount(ctx, baseAcc3) - - namespace := "ns1" - - testCases := []struct { - name string - input *types.MsgRemoveCollaborator - setup func() - expErr bool - expErrMsg string - }{ - { - name: "remove collaborator (error: invalid creator address)", - input: &types.MsgRemoveCollaborator{}, - setup: func() {}, - expErr: true, - expErrMsg: "invalid creator address", - }, - { - name: "remove collaborator (error: invalid namespace id)", - input: &types.MsgRemoveCollaborator{ - Creator: baseAcc.Address, - }, - setup: func() {}, - expErr: true, - expErrMsg: "invalid namespace id", - }, - { - name: "remove collaborator (error: invalid collaborator address)", - input: &types.MsgRemoveCollaborator{ - Creator: baseAcc.Address, - Namespace: namespace, - }, - setup: func() {}, - expErr: true, - expErrMsg: "invalid collaborator address", - }, - { - name: "remove collaborator (error: invalid policy id)", - input: &types.MsgRemoveCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }, - setup: func() {}, - expErr: true, - expErrMsg: "invalid policy id", - }, - { - name: "remove collaborator (error: namespace not found)", - input: &types.MsgRemoveCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }, - setup: func() { - k.SetPolicyId(ctx, "policy1") - }, - expErr: true, - expErrMsg: "namespace not found", - }, - { - name: "remove collaborator (no error)", - input: &types.MsgRemoveCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }, - setup: func() { - setupTestPolicy(t, ctx, k) - - _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ - Creator: baseAcc.Address, - Namespace: namespace, - }) - require.NoError(t, err) - - _, err = k.AddCollaborator(ctx, &types.MsgAddCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }) - require.NoError(t, err) - }, - expErr: false, - }, - { - name: "remove collaborator (error: collaborator not found)", - input: &types.MsgRemoveCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }, - setup: func() {}, - expErr: true, - expErrMsg: "collaborator not found", - }, - { - name: "remove collaborator (error: unauthorized)", - input: &types.MsgRemoveCollaborator{ - Creator: baseAcc2.Address, - Collaborator: baseAcc3.Address, - Namespace: namespace, - }, - setup: func() { - _, err := k.AddCollaborator(ctx, &types.MsgAddCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc2.Address, - Namespace: namespace, - }) - require.NoError(t, err) - - _, err = k.AddCollaborator(ctx, &types.MsgAddCollaborator{ - Creator: baseAcc.Address, - Collaborator: baseAcc3.Address, - Namespace: namespace, - }) - require.NoError(t, err) - }, - expErr: true, - expErrMsg: "actor is not a manager of relation", - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := tc.input.ValidateBasic() - if err != nil { - if tc.expErr { - require.Contains(t, err.Error(), tc.expErrMsg) - return - } - t.Fatalf("unexpected error in ValidateBasic: %v", err) - } - - tc.setup() - - _, err = k.RemoveCollaborator(ctx, tc.input) - - if tc.expErr { - require.Error(t, err) - require.Contains(t, err.Error(), tc.expErrMsg) - } else { - require.NoError(t, err) - } - }) - } + require.True(t, allowed) } diff --git a/x/bulletin/keeper/payload_validation.go b/x/bulletin/keeper/payload_validation.go deleted file mode 100644 index 583a7fd8..00000000 --- a/x/bulletin/keeper/payload_validation.go +++ /dev/null @@ -1,141 +0,0 @@ -package keeper - -import ( - "encoding/json" - - errorsmod "cosmossdk.io/errors" - - "github.com/sourcenetwork/sourcehub/x/bulletin/types" -) - -type ringPayloadJSON struct { - RingPK *string `json:"ring_pk"` - NewPeerIDs *[]string `json:"new_peer_ids,omitempty"` - NewThreshold *uint32 `json:"new_threshold,omitempty"` - PeerIDs *[]string `json:"peer_ids"` - Threshold *uint32 `json:"threshold"` - PSSInterval *uint64 `json:"pss_interval,omitempty"` - BlockNumberNonce *uint64 `json:"block_number_nonce"` - PolicyID *string `json:"policy_id,omitempty"` -} - -func validateRingPayloadJSON(payload []byte) error { - _, err := parseRingPayloadJSON(payload) - return err -} - -func parseRingPayloadJSON(payload []byte) (*ringPayloadJSON, error) { - var ringPayload ringPayloadJSON - if err := json.Unmarshal(payload, &ringPayload); err != nil { - return nil, errorsmod.Wrapf(types.ErrInvalidPostPayload, "invalid ring payload JSON: %s", err) - } - - switch { - case ringPayload.RingPK == nil: - return nil, errorsmod.Wrap(types.ErrInvalidPostPayload, "invalid ring payload: missing ring_pk") - case ringPayload.PeerIDs == nil: - return nil, errorsmod.Wrap(types.ErrInvalidPostPayload, "invalid ring payload: missing peer_ids") - case ringPayload.Threshold == nil: - return nil, errorsmod.Wrap(types.ErrInvalidPostPayload, "invalid ring payload: missing threshold") - case ringPayload.BlockNumberNonce == nil: - return nil, errorsmod.Wrap(types.ErrInvalidPostPayload, "invalid ring payload: missing block_number_nonce") - } - - return &ringPayload, nil -} - -// validateRingPostUpdate checks that the fields being set via UpdateRingPostByAcp -// are internally consistent against the existing ring payload: -// - a reshare must not already be in progress when new_peer_ids or new_threshold are being changed -// - new_peer_ids must have no duplicates -// - new_threshold (if provided) must be at least 1 -// - the effective new_peer_ids count must be >= the effective new_threshold -// (drawing from the existing payload for whichever side is not being updated) -func validateRingPostUpdate(newPeerIDs []string, newThreshold *uint32, existing *ringPayloadJSON) error { - reshareInProgress := existing.NewPeerIDs != nil || existing.NewThreshold != nil - touchingReshareFields := len(newPeerIDs) > 0 || newThreshold != nil - if reshareInProgress && touchingReshareFields { - return types.ErrReshareInProgress - } - - if len(newPeerIDs) > 0 { - seen := make(map[string]struct{}, len(newPeerIDs)) - for _, id := range newPeerIDs { - if _, dup := seen[id]; dup { - return errorsmod.Wrapf(types.ErrInvalidPostPayload, "duplicate peer id in new_peer_ids: %q", id) - } - seen[id] = struct{}{} - } - } - if newThreshold != nil && *newThreshold < 1 { - return errorsmod.Wrap(types.ErrInvalidPostPayload, "new_threshold must be at least 1") - } - - effectivePeerIDs := newPeerIDs - if len(effectivePeerIDs) == 0 && existing.NewPeerIDs != nil { - effectivePeerIDs = *existing.NewPeerIDs - } - - effectiveThreshold := newThreshold - if effectiveThreshold == nil { - effectiveThreshold = existing.NewThreshold - } - - if len(effectivePeerIDs) > 0 && effectiveThreshold != nil && uint32(len(effectivePeerIDs)) < *effectiveThreshold { - return errorsmod.Wrapf( - types.ErrInvalidPostPayload, - "new_peer_ids count (%d) is less than new_threshold (%d)", - len(effectivePeerIDs), *effectiveThreshold, - ) - } - - return nil -} - -func ringPayloadForReshareFinalization(currentRingPayload *ringPayloadJSON) (*ringPayloadJSON, error) { - finalizedRingPayload := *currentRingPayload - if finalizedRingPayload.NewPeerIDs == nil && finalizedRingPayload.NewThreshold == nil { - return nil, errorsmod.Wrap(types.ErrInvalidPostPayload, "invalid ring payload: missing new_peer_ids or new_threshold for reshare finalization") - } - - if finalizedRingPayload.NewPeerIDs != nil { - finalizedRingPayload.PeerIDs = finalizedRingPayload.NewPeerIDs - } - if finalizedRingPayload.NewThreshold != nil { - finalizedRingPayload.Threshold = finalizedRingPayload.NewThreshold - } - finalizedRingPayload.NewPeerIDs = nil - finalizedRingPayload.NewThreshold = nil - - return &finalizedRingPayload, nil -} - -func deriveFinalizedRingPayloadReshare(currentRingPayload *ringPayloadJSON) ([]byte, error) { - finalizedRingPayload, err := ringPayloadForReshareFinalization(currentRingPayload) - if err != nil { - return nil, err - } - - finalizedPayload, err := json.Marshal(finalizedRingPayload) - if err != nil { - return nil, errorsmod.Wrapf(types.ErrInvalidPostPayload, "could not finalize ring payload: %s", err) - } - - return finalizedPayload, nil -} - -func finalizeRingPayloadReshare(currentRingPayload *ringPayloadJSON, blockNumberNonce uint64) ([]byte, error) { - finalizedRingPayload, err := ringPayloadForReshareFinalization(currentRingPayload) - if err != nil { - return nil, err - } - - finalizedRingPayload.BlockNumberNonce = &blockNumberNonce - - finalizedPayload, err := json.Marshal(finalizedRingPayload) - if err != nil { - return nil, errorsmod.Wrapf(types.ErrInvalidPostPayload, "could not finalize ring payload: %s", err) - } - - return finalizedPayload, nil -} diff --git a/x/bulletin/keeper/payload_validation_test.go b/x/bulletin/keeper/payload_validation_test.go deleted file mode 100644 index 655d5b01..00000000 --- a/x/bulletin/keeper/payload_validation_test.go +++ /dev/null @@ -1,208 +0,0 @@ -package keeper - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/sourcenetwork/sourcehub/x/bulletin/types" -) - -func TestValidateRingPayloadJSON(t *testing.T) { - testCases := []struct { - name string - payload []byte - expErr bool - }{ - { - name: "minimal valid payload", - payload: []byte(`{"ring_pk":"pk","peer_ids":["peer1","peer2"],"threshold":1,"block_number_nonce":0}`), - }, - { - name: "valid payload with optional fields", - payload: []byte(`{"ring_pk":"pk","new_peer_ids":["peer3","peer4"],"new_threshold":2,"peer_ids":["peer1","peer2"],"threshold":1,"pss_interval":60,"block_number_nonce":9}`), - }, - { - name: "valid payload with optional null fields", - payload: []byte(`{"ring_pk":"pk","new_peer_ids":null,"new_threshold":null,"peer_ids":["peer1"],"threshold":1,"pss_interval":null,"block_number_nonce":0}`), - }, - { - name: "unknown fields are accepted", - payload: []byte(`{"ring_pk":"pk","peer_ids":["peer1"],"threshold":1,"block_number_nonce":0,"extra":"ok"}`), - }, - { - name: "invalid json", - payload: []byte(`not-json`), - expErr: true, - }, - { - name: "missing ring_pk", - payload: []byte(`{"peer_ids":["peer1"],"threshold":1}`), - expErr: true, - }, - { - name: "missing peer_ids", - payload: []byte(`{"ring_pk":"pk","threshold":1}`), - expErr: true, - }, - { - name: "missing threshold", - payload: []byte(`{"ring_pk":"pk","peer_ids":["peer1"],"block_number_nonce":0}`), - expErr: true, - }, - { - name: "missing block number nonce", - payload: []byte(`{"ring_pk":"pk","peer_ids":["peer1"],"threshold":1}`), - expErr: true, - }, - { - name: "required null field is rejected", - payload: []byte(`{"ring_pk":"pk","peer_ids":null,"threshold":1}`), - expErr: true, - }, - { - name: "negative threshold is rejected", - payload: []byte(`{"ring_pk":"pk","peer_ids":["peer1"],"threshold":-1}`), - expErr: true, - }, - { - name: "non-string peer id is rejected", - payload: []byte(`{"ring_pk":"pk","peer_ids":["peer1",2],"threshold":1}`), - expErr: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := validateRingPayloadJSON(tc.payload) - if tc.expErr { - require.ErrorIs(t, err, types.ErrInvalidPostPayload) - return - } - require.NoError(t, err) - }) - } -} - -func TestFinalizeRingPayloadReshare(t *testing.T) { - currentPayload := []byte(`{"ring_pk":"pk","new_peer_ids":["peer2","peer3"],"new_threshold":2,"peer_ids":["peer1"],"threshold":1,"block_number_nonce":7}`) - currentRingPayload := requireParsedRingPayload(t, currentPayload) - - signDocFinalizedPayload, err := deriveFinalizedRingPayloadReshare(currentRingPayload) - require.NoError(t, err) - require.JSONEq(t, `{"ring_pk":"pk","peer_ids":["peer2","peer3"],"threshold":2,"block_number_nonce":7}`, string(signDocFinalizedPayload)) - - finalizedPayload, err := finalizeRingPayloadReshare(currentRingPayload, 42) - require.NoError(t, err) - require.JSONEq(t, `{"ring_pk":"pk","peer_ids":["peer2","peer3"],"threshold":2,"block_number_nonce":42}`, string(finalizedPayload)) - - currentPayloadWithPSSInterval := []byte(`{"ring_pk":"pk","new_peer_ids":["peer2","peer3"],"new_threshold":2,"peer_ids":["peer1"],"threshold":1,"pss_interval":60,"block_number_nonce":7}`) - finalizedPayload, err = finalizeRingPayloadReshare(requireParsedRingPayload(t, currentPayloadWithPSSInterval), 43) - require.NoError(t, err) - require.JSONEq(t, `{"ring_pk":"pk","peer_ids":["peer2","peer3"],"threshold":2,"pss_interval":60,"block_number_nonce":43}`, string(finalizedPayload)) - - currentPayloadWithNewPeerIDsOnly := []byte(`{"ring_pk":"pk","new_peer_ids":["peer2","peer3"],"peer_ids":["peer1"],"threshold":1,"block_number_nonce":7}`) - finalizedPayload, err = finalizeRingPayloadReshare(requireParsedRingPayload(t, currentPayloadWithNewPeerIDsOnly), 44) - require.NoError(t, err) - require.JSONEq(t, `{"ring_pk":"pk","peer_ids":["peer2","peer3"],"threshold":1,"block_number_nonce":44}`, string(finalizedPayload)) - - currentPayloadWithNewThresholdOnly := []byte(`{"ring_pk":"pk","new_threshold":2,"peer_ids":["peer1"],"threshold":1,"block_number_nonce":7}`) - finalizedPayload, err = finalizeRingPayloadReshare(requireParsedRingPayload(t, currentPayloadWithNewThresholdOnly), 45) - require.NoError(t, err) - require.JSONEq(t, `{"ring_pk":"pk","peer_ids":["peer1"],"threshold":2,"block_number_nonce":45}`, string(finalizedPayload)) - - _, err = finalizeRingPayloadReshare( - requireParsedRingPayload(t, []byte(`{"ring_pk":"pk","peer_ids":["peer1"],"threshold":1,"block_number_nonce":7}`)), - 46, - ) - require.ErrorIs(t, err, types.ErrInvalidPostPayload) - require.Contains(t, err.Error(), "missing new_peer_ids or new_threshold") -} - -func TestValidateRingPostUpdate(t *testing.T) { - ptr := func(v uint32) *uint32 { return &v } - empty := &ringPayloadJSON{} - - withExistingNewPeers := func(peers []string) *ringPayloadJSON { - return &ringPayloadJSON{NewPeerIDs: &peers} - } - withExistingNewThreshold := func(t uint32) *ringPayloadJSON { - return &ringPayloadJSON{NewThreshold: ptr(t)} - } - withExistingBoth := func(peers []string, thresh uint32) *ringPayloadJSON { - return &ringPayloadJSON{NewPeerIDs: &peers, NewThreshold: ptr(thresh)} - } - - t.Run("empty inputs are valid", func(t *testing.T) { - require.NoError(t, validateRingPostUpdate(nil, nil, empty)) - require.NoError(t, validateRingPostUpdate([]string{}, nil, empty)) - }) - - t.Run("unique peer ids are valid", func(t *testing.T) { - require.NoError(t, validateRingPostUpdate([]string{"peer1", "peer2", "peer3"}, nil, empty)) - }) - - t.Run("duplicate peer ids are rejected", func(t *testing.T) { - err := validateRingPostUpdate([]string{"peer1", "peer2", "peer1"}, nil, empty) - require.ErrorIs(t, err, types.ErrInvalidPostPayload) - require.Contains(t, err.Error(), "duplicate peer id") - }) - - t.Run("threshold of 1 is valid", func(t *testing.T) { - require.NoError(t, validateRingPostUpdate(nil, ptr(1), empty)) - }) - - t.Run("threshold above 1 is valid", func(t *testing.T) { - require.NoError(t, validateRingPostUpdate(nil, ptr(5), empty)) - }) - - t.Run("threshold of 0 is rejected", func(t *testing.T) { - err := validateRingPostUpdate(nil, ptr(0), empty) - require.ErrorIs(t, err, types.ErrInvalidPostPayload) - require.Contains(t, err.Error(), "new_threshold must be at least 1") - }) - - t.Run("new_peer_ids count >= new_threshold in same message is valid", func(t *testing.T) { - require.NoError(t, validateRingPostUpdate([]string{"p1", "p2", "p3"}, ptr(3), empty)) - }) - - t.Run("new_peer_ids count < new_threshold in same message is rejected", func(t *testing.T) { - err := validateRingPostUpdate([]string{"p1", "p2"}, ptr(3), empty) - require.ErrorIs(t, err, types.ErrInvalidPostPayload) - require.Contains(t, err.Error(), "new_peer_ids count") - }) - - t.Run("reshare in progress: new_peer_ids blocked when payload has new_threshold", func(t *testing.T) { - err := validateRingPostUpdate([]string{"p1"}, nil, withExistingNewThreshold(3)) - require.ErrorIs(t, err, types.ErrReshareInProgress) - }) - - t.Run("reshare in progress: new_threshold blocked when payload has new_peer_ids", func(t *testing.T) { - err := validateRingPostUpdate(nil, ptr(5), withExistingNewPeers([]string{"p1", "p2"})) - require.ErrorIs(t, err, types.ErrReshareInProgress) - }) - - t.Run("reshare in progress: new_peer_ids blocked even if count satisfies threshold", func(t *testing.T) { - err := validateRingPostUpdate([]string{"p1", "p2", "p3"}, nil, withExistingNewThreshold(2)) - require.ErrorIs(t, err, types.ErrReshareInProgress) - }) - - t.Run("no check when neither side has threshold set", func(t *testing.T) { - require.NoError(t, validateRingPostUpdate([]string{"p1"}, nil, empty)) - }) - - t.Run("no check when neither side has peer ids set", func(t *testing.T) { - require.NoError(t, validateRingPostUpdate(nil, ptr(3), empty)) - }) - - t.Run("existing both fields consistent passes through unchanged", func(t *testing.T) { - require.NoError(t, validateRingPostUpdate(nil, nil, withExistingBoth([]string{"p1", "p2"}, 2))) - }) -} - -func requireParsedRingPayload(t *testing.T, payload []byte) *ringPayloadJSON { - t.Helper() - ringPayload, err := parseRingPayloadJSON(payload) - require.NoError(t, err) - return ringPayload -} diff --git a/x/bulletin/keeper/reshare_sign_bytes.go b/x/bulletin/keeper/reshare_sign_bytes.go deleted file mode 100644 index 7128f1d3..00000000 --- a/x/bulletin/keeper/reshare_sign_bytes.go +++ /dev/null @@ -1,34 +0,0 @@ -package keeper - -import ( - "crypto/sha256" - - "github.com/sourcenetwork/sourcehub/x/bulletin/types" -) - -const RingReshareFinalizeSignDocDomain = "orbis-ring-reshare-finalize" - -func ringReshareFinalizeSignBytes( - chainID string, - namespace string, - postID string, - currentPayload []byte, - finalizedPayload []byte, - currentRingPayload *ringPayloadJSON, -) ([]byte, error) { - currentPayloadHash := sha256.Sum256(currentPayload) - finalizedPayloadHash := sha256.Sum256(finalizedPayload) - - signDoc := types.RingReshareFinalizeSignDoc{ - Domain: RingReshareFinalizeSignDocDomain, - ChainId: chainID, - Namespace: namespace, - PostId: postID, - RingPk: *currentRingPayload.RingPK, - CurrentPayloadSha256: currentPayloadHash[:], - FinalizedPayloadSha256: finalizedPayloadHash[:], - BlockNumberNonce: *currentRingPayload.BlockNumberNonce, - } - - return signDoc.Marshal() -} diff --git a/x/bulletin/keeper/reshare_sign_bytes_test.go b/x/bulletin/keeper/reshare_sign_bytes_test.go deleted file mode 100644 index 2ecc5c9b..00000000 --- a/x/bulletin/keeper/reshare_sign_bytes_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package keeper - -import ( - "crypto/sha256" - "encoding/hex" - "encoding/json" - "os" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/sourcenetwork/sourcehub/x/bulletin/types" -) - -type ringReshareFinalizeVector struct { - Domain string `json:"domain"` - ChainID string `json:"chain_id"` - Namespace string `json:"namespace"` - PostID string `json:"post_id"` - SignatureScheme string `json:"signature_scheme"` - BLSDST string `json:"bls_dst"` - SignerKeygenSeed string `json:"signer_keygen_seed"` - CurrentPayload string `json:"current_payload"` - FinalizedPayload string `json:"finalized_payload"` - CurrentPayloadSHA256Hex string `json:"current_payload_sha256_hex"` - FinalizedPayloadSHA256Hex string `json:"finalized_payload_sha256_hex"` - CanonicalSignBytesHex string `json:"canonical_sign_bytes_hex"` - RingPublicKeyHex string `json:"ring_public_key_hex"` - BlockNumberNonce uint64 `json:"block_number_nonce"` - SignatureHex string `json:"signature_hex"` -} - -func TestRingReshareFinalizeSignBytesVector(t *testing.T) { - vectorBytes, err := os.ReadFile("testdata/ring_reshare_finalize_vector.json") - require.NoError(t, err) - - var vector ringReshareFinalizeVector - require.NoError(t, json.Unmarshal(vectorBytes, &vector)) - require.Equal(t, RingReshareFinalizeSignDocDomain, vector.Domain) - require.Equal(t, ThresholdSignatureSchemeBLS12381G1PKG2SigNUL, vector.SignatureScheme) - require.Equal(t, bls12381G2SignatureDST, vector.BLSDST) - - currentPayload := []byte(vector.CurrentPayload) - currentRingPayload, err := parseRingPayloadJSON(currentPayload) - require.NoError(t, err) - finalizedPayload, err := deriveFinalizedRingPayloadReshare(currentRingPayload) - require.NoError(t, err) - require.Equal(t, vector.FinalizedPayload, string(finalizedPayload)) - - currentPayloadHash := sha256.Sum256(currentPayload) - finalizedPayloadHash := sha256.Sum256(finalizedPayload) - require.Equal(t, vector.CurrentPayloadSHA256Hex, hex.EncodeToString(currentPayloadHash[:])) - require.Equal(t, vector.FinalizedPayloadSHA256Hex, hex.EncodeToString(finalizedPayloadHash[:])) - - signBytes, err := ringReshareFinalizeSignBytes( - vector.ChainID, - vector.Namespace, - vector.PostID, - currentPayload, - finalizedPayload, - currentRingPayload, - ) - require.NoError(t, err) - require.Equal(t, vector.CanonicalSignBytesHex, hex.EncodeToString(signBytes)) - - var signDoc types.RingReshareFinalizeSignDoc - require.NoError(t, signDoc.Unmarshal(signBytes)) - require.Equal(t, vector.Domain, signDoc.Domain) - require.Equal(t, vector.ChainID, signDoc.ChainId) - require.Equal(t, vector.Namespace, signDoc.Namespace) - require.Equal(t, vector.PostID, signDoc.PostId) - require.Equal(t, vector.RingPublicKeyHex, signDoc.RingPk) - require.Equal(t, currentPayloadHash[:], signDoc.CurrentPayloadSha256) - require.Equal(t, finalizedPayloadHash[:], signDoc.FinalizedPayloadSha256) - require.Equal(t, vector.BlockNumberNonce, signDoc.BlockNumberNonce) - - ringPayload, err := parseRingPayloadJSON(currentPayload) - require.NoError(t, err) - require.Equal(t, vector.RingPublicKeyHex, *ringPayload.RingPK) - require.Equal(t, vector.BlockNumberNonce, *ringPayload.BlockNumberNonce) - - signature, err := hex.DecodeString(vector.SignatureHex) - require.NoError(t, err) - require.Equal(t, vector.SignatureHex, hex.EncodeToString(signPayloadWithSeed(t, vector.SignerKeygenSeed, signBytes))) - require.NoError(t, verifyThresholdSignature(vector.SignatureScheme, vector.RingPublicKeyHex, signBytes, signature)) -} diff --git a/x/bulletin/keeper/testdata/ring_reshare_finalize_vector.json b/x/bulletin/keeper/testdata/ring_reshare_finalize_vector.json deleted file mode 100644 index 4cac4f56..00000000 --- a/x/bulletin/keeper/testdata/ring_reshare_finalize_vector.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "domain": "orbis-ring-reshare-finalize", - "chain_id": "sourcehub-test", - "namespace": "orbis/rings/ring1", - "post_id": "ring1-post", - "signature_scheme": "bls12_381_g1_pk_g2_sig_nul", - "bls_dst": "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_", - "signer_keygen_seed": "sourcehub-bulletin-bls-test-seed-0001", - "current_payload": "{\"ring_pk\":\"b2c05c1059dadae32a7092a4323977796c521fa5e241ee7fe34283b3595935b2b80fad135e3f91bf7307382017869c51\",\"new_peer_ids\":[\"peer2\",\"peer3\"],\"new_threshold\":2,\"peer_ids\":[\"peer1\"],\"threshold\":1,\"block_number_nonce\":7}", - "finalized_payload": "{\"ring_pk\":\"b2c05c1059dadae32a7092a4323977796c521fa5e241ee7fe34283b3595935b2b80fad135e3f91bf7307382017869c51\",\"peer_ids\":[\"peer2\",\"peer3\"],\"threshold\":2,\"block_number_nonce\":7}", - "current_payload_sha256_hex": "8cde10c79267249a42ef9fa915b6ab9b49aac6a2c53c907b3910602313d53a95", - "finalized_payload_sha256_hex": "38ef318a46fa1746c778d16b46ad66a37e2a2bd0c694f8ace8aeb95dff0c6f2a", - "canonical_sign_bytes_hex": "0a1b6f726269732d72696e672d726573686172652d66696e616c697a65120e736f757263656875622d746573741a116f726269732f72696e67732f72696e6731220a72696e67312d706f73742a6062326330356331303539646164616533326137303932613433323339373737393663353231666135653234316565376665333432383362333539353933356232623830666164313335653366393162663733303733383230313738363963353132208cde10c79267249a42ef9fa915b6ab9b49aac6a2c53c907b3910602313d53a953a2038ef318a46fa1746c778d16b46ad66a37e2a2bd0c694f8ace8aeb95dff0c6f2a4007", - "ring_public_key_hex": "b2c05c1059dadae32a7092a4323977796c521fa5e241ee7fe34283b3595935b2b80fad135e3f91bf7307382017869c51", - "block_number_nonce": 7, - "signature_hex": "ad60c9e8753ab6c485ce5ae1e73ededf38e475a334e2ecb53765a87a0b5a27b139f66f1e4398865607e3142bd11f88760f76215998c07fe862da51905c29cce0517097e2e66df45edcb5d3001c42bd63ed7592f2dc4d832368a576b7756dd121" -} diff --git a/x/bulletin/keeper/threshold_signature_test.go b/x/bulletin/keeper/threshold_signature_test.go deleted file mode 100644 index 4c53c221..00000000 --- a/x/bulletin/keeper/threshold_signature_test.go +++ /dev/null @@ -1,78 +0,0 @@ -package keeper - -import ( - "encoding/hex" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/sourcenetwork/sourcehub/x/bulletin/types" -) - -func TestDecodeHexBytes(t *testing.T) { - decoded, err := decodeHexBytes("0aFF") - require.NoError(t, err) - require.Equal(t, []byte{0x0a, 0xff}, decoded) - - decoded, err = decodeHexBytes(" 0aff ") - require.NoError(t, err) - require.Equal(t, []byte{0x0a, 0xff}, decoded) - - _, err = decodeHexBytes("0x0aff") - require.Error(t, err) - - _, err = decodeHexBytes("AQIDBA==") - require.Error(t, err) - - _, err = decodeHexBytes("") - require.Error(t, err) -} - -func TestRingPayloadPublicKeyEncodingMatchesOrbisHex(t *testing.T) { - payload := ringPayloadWithSeed( - t, - "sourcehub-bulletin-bls-test-seed-0001", - []string{"peer1"}, - 1, - nil, - nil, - ) - ringPayload, err := parseRingPayloadJSON(payload) - require.NoError(t, err) - - publicKey, err := decodeHexBytes(*ringPayload.RingPK) - require.NoError(t, err) - require.Len(t, publicKey, bls12381PublicKeySize) - require.Equal(t, *ringPayload.RingPK, hex.EncodeToString(publicKey)) -} - -func TestVerifyDecaf377FROSTThresholdSignature(t *testing.T) { - publicKeyHex := "48b01e513dd37d94c3b48940dc133b92ccba7f546e99d3fc2e602d284f609f00" - message, err := hex.DecodeString("6f7262697320646563616633373720696e7465726f70206d657373616765") - require.NoError(t, err) - signature, err := hex.DecodeString("588125a8f4e2bab8d16affc4ca60c5f64b50d38d2bb053148021631f72e99b0626e73e709ee9e725af65a80d824a8207f11e3fe8a293f40828ad365a6d9e2200") - require.NoError(t, err) - - require.NoError(t, verifyThresholdSignature(ThresholdSignatureSchemeDecaf377FROST, publicKeyHex, message, signature)) - - tamperedSignature := append([]byte(nil), signature...) - tamperedSignature[4] ^= 0x01 - require.ErrorIs( - t, - verifyThresholdSignature(ThresholdSignatureSchemeDecaf377FROST, publicKeyHex, message, tamperedSignature), - types.ErrInvalidThresholdSignature, - ) - - wrongMessage := []byte("wrong message") - require.ErrorIs( - t, - verifyThresholdSignature(ThresholdSignatureSchemeDecaf377FROST, publicKeyHex, wrongMessage, signature), - types.ErrInvalidThresholdSignature, - ) - - require.ErrorIs( - t, - verifyThresholdSignature(ThresholdSignatureSchemeDecaf377FROST, publicKeyHex, message, signature[:len(signature)-1]), - types.ErrInvalidThresholdSignature, - ) -} diff --git a/x/bulletin/module/autocli.go b/x/bulletin/module/autocli.go index 74702124..80ee95c4 100644 --- a/x/bulletin/module/autocli.go +++ b/x/bulletin/module/autocli.go @@ -75,22 +75,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Add a new post to the specified namespace", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "payload"}}, }, - { - RpcMethod: "UpdateRingPostByAcp", - Use: "update-ring-post-by-acp [namespace] [post_id]", - Short: "Update new_peer_ids, new_threshold, and/or pss_interval of a ring post via ACP policy", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - {ProtoField: "namespace"}, - {ProtoField: "post_id"}, - }, - }, - { - RpcMethod: "UpdateRingPostByThresholdSignature", - Use: "update-post-by-threshold-signature [namespace] [post_id] [signature_scheme] [signature]", - Short: "Finalize a reshare using a threshold signature", - Long: "Finalize a reshare using a threshold signature. The signature argument is a bytes field and must be base64-encoded.", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "post_id"}, {ProtoField: "signature_scheme"}, {ProtoField: "signature"}}, - }, { RpcMethod: "RegisterNamespace", Use: "register-namespace [namespace]", diff --git a/x/bulletin/types/codec.go b/x/bulletin/types/codec.go index fc28004d..6a8fa72c 100644 --- a/x/bulletin/types/codec.go +++ b/x/bulletin/types/codec.go @@ -9,8 +9,6 @@ import ( func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCreatePost{}, - &MsgUpdateRingPostByAcp{}, - &MsgUpdateRingPostByThresholdSignature{}, &MsgRegisterNamespace{}, &MsgAddCollaborator{}, &MsgRemoveCollaborator{}, diff --git a/x/bulletin/types/errors.go b/x/bulletin/types/errors.go index ae640b91..159ec7d1 100644 --- a/x/bulletin/types/errors.go +++ b/x/bulletin/types/errors.go @@ -20,10 +20,4 @@ var ( ErrCollaboratorAlreadyExists = sdkerrors.Register(ModuleName, 1111, "collaborator already exists") ErrCollaboratorNotFound = sdkerrors.Register(ModuleName, 1112, "collaborator not found") ErrCouldNotEnsurePolicy = sdkerrors.Register(ModuleName, 1113, "could not ensure policy") - ErrInvalidThresholdSignature = sdkerrors.Register(ModuleName, 1114, "invalid threshold signature") - ErrInvalidPostId = sdkerrors.Register(ModuleName, 1115, "invalid post id") - ErrInvalidSignatureScheme = sdkerrors.Register(ModuleName, 1116, "invalid signature scheme") - ErrInvalidSignaturePayload = sdkerrors.Register(ModuleName, 1117, "invalid signature payload") - ErrRingPayloadMissingPolicyId = sdkerrors.Register(ModuleName, 1118, "ring payload missing policy_id") - ErrReshareInProgress = sdkerrors.Register(ModuleName, 1119, "reshare already in progress: finalize before changing reshare parameters") ) diff --git a/x/bulletin/types/message_update_ring_post_by_acp.go b/x/bulletin/types/message_update_ring_post_by_acp.go deleted file mode 100644 index b3569c67..00000000 --- a/x/bulletin/types/message_update_ring_post_by_acp.go +++ /dev/null @@ -1,30 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -var _ sdk.Msg = &MsgUpdateRingPostByAcp{} - -func NewMsgUpdateRingPostByAcp(creator, namespace, postId string) *MsgUpdateRingPostByAcp { - return &MsgUpdateRingPostByAcp{ - Creator: creator, - Namespace: namespace, - PostId: postId, - } -} - -func (msg *MsgUpdateRingPostByAcp) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - if msg.Namespace == "" { - return ErrInvalidNamespaceId - } - if msg.PostId == "" { - return ErrInvalidPostId - } - return nil -} diff --git a/x/bulletin/types/tx.pb.go b/x/bulletin/types/tx.pb.go index 19ee65cc..877c0468 100644 --- a/x/bulletin/types/tx.pb.go +++ b/x/bulletin/types/tx.pb.go @@ -228,404 +228,6 @@ func (m *MsgCreatePostResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreatePostResponse proto.InternalMessageInfo -type MsgUpdateRingPostByAcp struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - PostId string `protobuf:"bytes,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` - NewPeerIds []string `protobuf:"bytes,5,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - // Types that are valid to be assigned to XNewThreshold: - // *MsgUpdateRingPostByAcp_NewThreshold - XNewThreshold isMsgUpdateRingPostByAcp_XNewThreshold `protobuf_oneof:"_new_threshold"` - // Types that are valid to be assigned to XPssInterval: - // *MsgUpdateRingPostByAcp_PssInterval - XPssInterval isMsgUpdateRingPostByAcp_XPssInterval `protobuf_oneof:"_pss_interval"` -} - -func (m *MsgUpdateRingPostByAcp) Reset() { *m = MsgUpdateRingPostByAcp{} } -func (m *MsgUpdateRingPostByAcp) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateRingPostByAcp) ProtoMessage() {} -func (*MsgUpdateRingPostByAcp) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{4} -} -func (m *MsgUpdateRingPostByAcp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateRingPostByAcp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateRingPostByAcp.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 *MsgUpdateRingPostByAcp) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateRingPostByAcp.Merge(m, src) -} -func (m *MsgUpdateRingPostByAcp) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateRingPostByAcp) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateRingPostByAcp.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateRingPostByAcp proto.InternalMessageInfo - -type isMsgUpdateRingPostByAcp_XNewThreshold interface { - isMsgUpdateRingPostByAcp_XNewThreshold() - MarshalTo([]byte) (int, error) - Size() int -} -type isMsgUpdateRingPostByAcp_XPssInterval interface { - isMsgUpdateRingPostByAcp_XPssInterval() - MarshalTo([]byte) (int, error) - Size() int -} - -type MsgUpdateRingPostByAcp_NewThreshold struct { - NewThreshold uint32 `protobuf:"varint,6,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` -} -type MsgUpdateRingPostByAcp_PssInterval struct { - PssInterval uint64 `protobuf:"varint,7,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` -} - -func (*MsgUpdateRingPostByAcp_NewThreshold) isMsgUpdateRingPostByAcp_XNewThreshold() {} -func (*MsgUpdateRingPostByAcp_PssInterval) isMsgUpdateRingPostByAcp_XPssInterval() {} - -func (m *MsgUpdateRingPostByAcp) GetXNewThreshold() isMsgUpdateRingPostByAcp_XNewThreshold { - if m != nil { - return m.XNewThreshold - } - return nil -} -func (m *MsgUpdateRingPostByAcp) GetXPssInterval() isMsgUpdateRingPostByAcp_XPssInterval { - if m != nil { - return m.XPssInterval - } - return nil -} - -func (m *MsgUpdateRingPostByAcp) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgUpdateRingPostByAcp) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -func (m *MsgUpdateRingPostByAcp) GetPostId() string { - if m != nil { - return m.PostId - } - return "" -} - -func (m *MsgUpdateRingPostByAcp) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - -func (m *MsgUpdateRingPostByAcp) GetNewPeerIds() []string { - if m != nil { - return m.NewPeerIds - } - return nil -} - -func (m *MsgUpdateRingPostByAcp) GetNewThreshold() uint32 { - if x, ok := m.GetXNewThreshold().(*MsgUpdateRingPostByAcp_NewThreshold); ok { - return x.NewThreshold - } - return 0 -} - -func (m *MsgUpdateRingPostByAcp) GetPssInterval() uint64 { - if x, ok := m.GetXPssInterval().(*MsgUpdateRingPostByAcp_PssInterval); ok { - return x.PssInterval - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*MsgUpdateRingPostByAcp) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*MsgUpdateRingPostByAcp_NewThreshold)(nil), - (*MsgUpdateRingPostByAcp_PssInterval)(nil), - } -} - -type MsgUpdateRingPostByAcpResponse struct { -} - -func (m *MsgUpdateRingPostByAcpResponse) Reset() { *m = MsgUpdateRingPostByAcpResponse{} } -func (m *MsgUpdateRingPostByAcpResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateRingPostByAcpResponse) ProtoMessage() {} -func (*MsgUpdateRingPostByAcpResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{5} -} -func (m *MsgUpdateRingPostByAcpResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateRingPostByAcpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateRingPostByAcpResponse.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 *MsgUpdateRingPostByAcpResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateRingPostByAcpResponse.Merge(m, src) -} -func (m *MsgUpdateRingPostByAcpResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateRingPostByAcpResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateRingPostByAcpResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateRingPostByAcpResponse proto.InternalMessageInfo - -type MsgUpdateRingPostByThresholdSignature struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - PostId string `protobuf:"bytes,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` - SignatureScheme string `protobuf:"bytes,5,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` - Signature []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *MsgUpdateRingPostByThresholdSignature) Reset() { *m = MsgUpdateRingPostByThresholdSignature{} } -func (m *MsgUpdateRingPostByThresholdSignature) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateRingPostByThresholdSignature) ProtoMessage() {} -func (*MsgUpdateRingPostByThresholdSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{6} -} -func (m *MsgUpdateRingPostByThresholdSignature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateRingPostByThresholdSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateRingPostByThresholdSignature.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 *MsgUpdateRingPostByThresholdSignature) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateRingPostByThresholdSignature.Merge(m, src) -} -func (m *MsgUpdateRingPostByThresholdSignature) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateRingPostByThresholdSignature) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateRingPostByThresholdSignature.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateRingPostByThresholdSignature proto.InternalMessageInfo - -func (m *MsgUpdateRingPostByThresholdSignature) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgUpdateRingPostByThresholdSignature) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -func (m *MsgUpdateRingPostByThresholdSignature) GetPostId() string { - if m != nil { - return m.PostId - } - return "" -} - -func (m *MsgUpdateRingPostByThresholdSignature) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - -func (m *MsgUpdateRingPostByThresholdSignature) GetSignatureScheme() string { - if m != nil { - return m.SignatureScheme - } - return "" -} - -func (m *MsgUpdateRingPostByThresholdSignature) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -type MsgUpdateRingPostByThresholdSignatureResponse struct { -} - -func (m *MsgUpdateRingPostByThresholdSignatureResponse) Reset() { - *m = MsgUpdateRingPostByThresholdSignatureResponse{} -} -func (m *MsgUpdateRingPostByThresholdSignatureResponse) String() string { - return proto.CompactTextString(m) -} -func (*MsgUpdateRingPostByThresholdSignatureResponse) ProtoMessage() {} -func (*MsgUpdateRingPostByThresholdSignatureResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{7} -} -func (m *MsgUpdateRingPostByThresholdSignatureResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateRingPostByThresholdSignatureResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateRingPostByThresholdSignatureResponse.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 *MsgUpdateRingPostByThresholdSignatureResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateRingPostByThresholdSignatureResponse.Merge(m, src) -} -func (m *MsgUpdateRingPostByThresholdSignatureResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateRingPostByThresholdSignatureResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateRingPostByThresholdSignatureResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateRingPostByThresholdSignatureResponse proto.InternalMessageInfo - -type RingReshareFinalizeSignDoc struct { - Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` - PostId string `protobuf:"bytes,4,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` - RingPk string `protobuf:"bytes,5,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - CurrentPayloadSha256 []byte `protobuf:"bytes,6,opt,name=current_payload_sha256,json=currentPayloadSha256,proto3" json:"current_payload_sha256,omitempty"` - FinalizedPayloadSha256 []byte `protobuf:"bytes,7,opt,name=finalized_payload_sha256,json=finalizedPayloadSha256,proto3" json:"finalized_payload_sha256,omitempty"` - BlockNumberNonce uint64 `protobuf:"varint,8,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` -} - -func (m *RingReshareFinalizeSignDoc) Reset() { *m = RingReshareFinalizeSignDoc{} } -func (m *RingReshareFinalizeSignDoc) String() string { return proto.CompactTextString(m) } -func (*RingReshareFinalizeSignDoc) ProtoMessage() {} -func (*RingReshareFinalizeSignDoc) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{8} -} -func (m *RingReshareFinalizeSignDoc) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RingReshareFinalizeSignDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RingReshareFinalizeSignDoc.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 *RingReshareFinalizeSignDoc) XXX_Merge(src proto.Message) { - xxx_messageInfo_RingReshareFinalizeSignDoc.Merge(m, src) -} -func (m *RingReshareFinalizeSignDoc) XXX_Size() int { - return m.Size() -} -func (m *RingReshareFinalizeSignDoc) XXX_DiscardUnknown() { - xxx_messageInfo_RingReshareFinalizeSignDoc.DiscardUnknown(m) -} - -var xxx_messageInfo_RingReshareFinalizeSignDoc proto.InternalMessageInfo - -func (m *RingReshareFinalizeSignDoc) GetDomain() string { - if m != nil { - return m.Domain - } - return "" -} - -func (m *RingReshareFinalizeSignDoc) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *RingReshareFinalizeSignDoc) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -func (m *RingReshareFinalizeSignDoc) GetPostId() string { - if m != nil { - return m.PostId - } - return "" -} - -func (m *RingReshareFinalizeSignDoc) GetRingPk() string { - if m != nil { - return m.RingPk - } - return "" -} - -func (m *RingReshareFinalizeSignDoc) GetCurrentPayloadSha256() []byte { - if m != nil { - return m.CurrentPayloadSha256 - } - return nil -} - -func (m *RingReshareFinalizeSignDoc) GetFinalizedPayloadSha256() []byte { - if m != nil { - return m.FinalizedPayloadSha256 - } - return nil -} - -func (m *RingReshareFinalizeSignDoc) GetBlockNumberNonce() uint64 { - if m != nil { - return m.BlockNumberNonce - } - return 0 -} - type MsgRegisterNamespace struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` @@ -635,7 +237,7 @@ func (m *MsgRegisterNamespace) Reset() { *m = MsgRegisterNamespace{} } func (m *MsgRegisterNamespace) String() string { return proto.CompactTextString(m) } func (*MsgRegisterNamespace) ProtoMessage() {} func (*MsgRegisterNamespace) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{9} + return fileDescriptor_0497d0f203b2b5e8, []int{4} } func (m *MsgRegisterNamespace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -686,7 +288,7 @@ func (m *MsgRegisterNamespaceResponse) Reset() { *m = MsgRegisterNamespa func (m *MsgRegisterNamespaceResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterNamespaceResponse) ProtoMessage() {} func (*MsgRegisterNamespaceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{10} + return fileDescriptor_0497d0f203b2b5e8, []int{5} } func (m *MsgRegisterNamespaceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -732,7 +334,7 @@ func (m *MsgAddCollaborator) Reset() { *m = MsgAddCollaborator{} } func (m *MsgAddCollaborator) String() string { return proto.CompactTextString(m) } func (*MsgAddCollaborator) ProtoMessage() {} func (*MsgAddCollaborator) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{11} + return fileDescriptor_0497d0f203b2b5e8, []int{6} } func (m *MsgAddCollaborator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -790,7 +392,7 @@ func (m *MsgAddCollaboratorResponse) Reset() { *m = MsgAddCollaboratorRe func (m *MsgAddCollaboratorResponse) String() string { return proto.CompactTextString(m) } func (*MsgAddCollaboratorResponse) ProtoMessage() {} func (*MsgAddCollaboratorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{12} + return fileDescriptor_0497d0f203b2b5e8, []int{7} } func (m *MsgAddCollaboratorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -836,7 +438,7 @@ func (m *MsgRemoveCollaborator) Reset() { *m = MsgRemoveCollaborator{} } func (m *MsgRemoveCollaborator) String() string { return proto.CompactTextString(m) } func (*MsgRemoveCollaborator) ProtoMessage() {} func (*MsgRemoveCollaborator) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{13} + return fileDescriptor_0497d0f203b2b5e8, []int{8} } func (m *MsgRemoveCollaborator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -894,7 +496,7 @@ func (m *MsgRemoveCollaboratorResponse) Reset() { *m = MsgRemoveCollabor func (m *MsgRemoveCollaboratorResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveCollaboratorResponse) ProtoMessage() {} func (*MsgRemoveCollaboratorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0497d0f203b2b5e8, []int{14} + return fileDescriptor_0497d0f203b2b5e8, []int{9} } func (m *MsgRemoveCollaboratorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -935,11 +537,6 @@ func init() { proto.RegisterType((*MsgUpdateParamsResponse)(nil), "sourcehub.bulletin.MsgUpdateParamsResponse") proto.RegisterType((*MsgCreatePost)(nil), "sourcehub.bulletin.MsgCreatePost") proto.RegisterType((*MsgCreatePostResponse)(nil), "sourcehub.bulletin.MsgCreatePostResponse") - proto.RegisterType((*MsgUpdateRingPostByAcp)(nil), "sourcehub.bulletin.MsgUpdateRingPostByAcp") - proto.RegisterType((*MsgUpdateRingPostByAcpResponse)(nil), "sourcehub.bulletin.MsgUpdateRingPostByAcpResponse") - proto.RegisterType((*MsgUpdateRingPostByThresholdSignature)(nil), "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignature") - proto.RegisterType((*MsgUpdateRingPostByThresholdSignatureResponse)(nil), "sourcehub.bulletin.MsgUpdateRingPostByThresholdSignatureResponse") - proto.RegisterType((*RingReshareFinalizeSignDoc)(nil), "sourcehub.bulletin.RingReshareFinalizeSignDoc") proto.RegisterType((*MsgRegisterNamespace)(nil), "sourcehub.bulletin.MsgRegisterNamespace") proto.RegisterType((*MsgRegisterNamespaceResponse)(nil), "sourcehub.bulletin.MsgRegisterNamespaceResponse") proto.RegisterType((*MsgAddCollaborator)(nil), "sourcehub.bulletin.MsgAddCollaborator") @@ -951,72 +548,47 @@ func init() { func init() { proto.RegisterFile("sourcehub/bulletin/tx.proto", fileDescriptor_0497d0f203b2b5e8) } var fileDescriptor_0497d0f203b2b5e8 = []byte{ - // 1025 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x73, 0xdb, 0x44, - 0x14, 0xce, 0xe6, 0x87, 0x13, 0xbf, 0x3a, 0x38, 0x15, 0x21, 0x56, 0x44, 0xeb, 0x1a, 0x01, 0x1d, - 0x27, 0x50, 0x9b, 0xa6, 0x50, 0xa0, 0x0c, 0x87, 0xb8, 0x1d, 0x68, 0x98, 0x71, 0x26, 0xa3, 0xc0, - 0xa5, 0x30, 0x23, 0x64, 0x69, 0x2b, 0xef, 0xc4, 0xd2, 0x6a, 0x76, 0xd7, 0x49, 0xc3, 0x81, 0x01, - 0x4e, 0x1d, 0xb8, 0xf0, 0x37, 0x70, 0x62, 0x38, 0xe5, 0xc0, 0x70, 0xe3, 0xc0, 0xad, 0xc7, 0x0e, - 0x27, 0x4e, 0x0c, 0x93, 0x1c, 0x72, 0xe0, 0x9f, 0x60, 0x56, 0x92, 0x65, 0x4b, 0x56, 0x8a, 0xc7, - 0x07, 0xb8, 0x24, 0x7e, 0xef, 0x7d, 0xef, 0xbd, 0xef, 0x7d, 0xfb, 0x4b, 0xf0, 0x22, 0xa7, 0x7d, - 0x66, 0xe3, 0x6e, 0xbf, 0xd3, 0xec, 0xf4, 0x7b, 0x3d, 0x2c, 0x88, 0xdf, 0x14, 0x8f, 0x1a, 0x01, - 0xa3, 0x82, 0x2a, 0x4a, 0x12, 0x6c, 0x0c, 0x82, 0xda, 0x65, 0xcb, 0x23, 0x3e, 0x6d, 0x86, 0x7f, - 0x23, 0x98, 0x56, 0xb1, 0x29, 0xf7, 0x28, 0x6f, 0x7a, 0xdc, 0x6d, 0x1e, 0xde, 0x94, 0xff, 0xe2, - 0xc0, 0x7a, 0x14, 0x30, 0x43, 0xab, 0x19, 0x19, 0x71, 0x68, 0xd5, 0xa5, 0x2e, 0x8d, 0xfc, 0xf2, - 0x57, 0xec, 0xbd, 0x96, 0xc3, 0x26, 0xb0, 0x98, 0xe5, 0x0d, 0xd2, 0xf4, 0x1c, 0x80, 0x6f, 0x79, - 0x98, 0x07, 0x96, 0x8d, 0x23, 0x8c, 0xfe, 0x1b, 0x82, 0x72, 0x9b, 0xbb, 0x9f, 0x04, 0x8e, 0x25, - 0xf0, 0x5e, 0x98, 0xad, 0xdc, 0x86, 0xa2, 0xd5, 0x17, 0x5d, 0xca, 0x88, 0x38, 0x56, 0x51, 0x0d, - 0xd5, 0x8b, 0x2d, 0xf5, 0xf7, 0x9f, 0x6f, 0xac, 0xc6, 0x9c, 0xb6, 0x1d, 0x87, 0x61, 0xce, 0xf7, - 0x05, 0x23, 0xbe, 0x6b, 0x0c, 0xa1, 0xca, 0xfb, 0x50, 0x88, 0xfa, 0xab, 0xb3, 0x35, 0x54, 0xbf, - 0xb4, 0xa5, 0x35, 0xc6, 0x25, 0x69, 0x44, 0x3d, 0x5a, 0xc5, 0x27, 0x7f, 0x5e, 0x9b, 0xf9, 0xf1, - 0xfc, 0x64, 0x13, 0x19, 0x71, 0xd2, 0x9d, 0xb7, 0xbf, 0x39, 0x3f, 0xd9, 0x1c, 0x96, 0xfb, 0xf6, - 0xfc, 0x64, 0xf3, 0x95, 0xe1, 0x04, 0x8f, 0x86, 0x33, 0x64, 0xf8, 0xea, 0xeb, 0x50, 0xc9, 0xb8, - 0x0c, 0xcc, 0x03, 0xea, 0x73, 0xac, 0x7f, 0x87, 0x60, 0xb9, 0xcd, 0xdd, 0xbb, 0x0c, 0xcb, 0x18, - 0xe5, 0x42, 0x51, 0x61, 0xd1, 0x96, 0x16, 0x65, 0xd1, 0x68, 0xc6, 0xc0, 0x54, 0xae, 0x40, 0x31, - 0x51, 0x27, 0x9c, 0xa0, 0x68, 0x0c, 0x1d, 0x32, 0x2f, 0xb0, 0x8e, 0x7b, 0xd4, 0x72, 0xd4, 0xb9, - 0x1a, 0xaa, 0x97, 0x8c, 0x81, 0xa9, 0x68, 0xb0, 0x64, 0x31, 0x41, 0x1e, 0x5a, 0xb6, 0x50, 0x17, - 0xc2, 0xb4, 0xc4, 0xbe, 0x53, 0x92, 0x33, 0x0d, 0x3a, 0xe8, 0x15, 0x78, 0x21, 0x45, 0x26, 0xa1, - 0xf9, 0xd3, 0x2c, 0xac, 0x25, 0x23, 0x18, 0xc4, 0x77, 0x65, 0xb4, 0x75, 0xbc, 0x6d, 0x07, 0x53, - 0xf3, 0xad, 0xc0, 0x62, 0x40, 0xb9, 0x30, 0x49, 0xc4, 0xb7, 0x68, 0x14, 0xa4, 0xb9, 0x93, 0xa6, - 0x3b, 0x9f, 0xa6, 0xab, 0xd4, 0xa0, 0xe4, 0xe3, 0x23, 0x33, 0xc0, 0x98, 0x99, 0xc4, 0xe1, 0xea, - 0x42, 0x6d, 0xae, 0x5e, 0x34, 0xc0, 0xc7, 0x47, 0x7b, 0x18, 0xb3, 0x1d, 0x87, 0x2b, 0x75, 0x58, - 0x96, 0x08, 0xd1, 0x65, 0x98, 0x77, 0x69, 0xcf, 0x51, 0x0b, 0x35, 0x54, 0x5f, 0xbe, 0x3f, 0x63, - 0xc8, 0xc4, 0x8f, 0x07, 0xde, 0xc7, 0x08, 0x29, 0xd7, 0xa1, 0x14, 0x70, 0x6e, 0x12, 0x5f, 0x60, - 0x76, 0x68, 0xf5, 0xd4, 0xc5, 0x1a, 0xaa, 0xcf, 0xdf, 0x47, 0xc6, 0xa5, 0x80, 0xf3, 0x9d, 0xd8, - 0xf9, 0x18, 0xa1, 0xb4, 0x44, 0xad, 0x15, 0x78, 0xce, 0x4c, 0x35, 0x68, 0x95, 0x61, 0xd9, 0x1c, - 0x2d, 0xa4, 0xd7, 0xa0, 0x9a, 0xaf, 0x55, 0x22, 0xe7, 0xdf, 0x08, 0x5e, 0xcd, 0x81, 0x24, 0xf4, - 0xf6, 0x89, 0xeb, 0x5b, 0xa2, 0xcf, 0xf0, 0x7f, 0xab, 0xee, 0x06, 0xac, 0xf0, 0x41, 0x67, 0x93, - 0xdb, 0x5d, 0xec, 0xe1, 0x78, 0xc3, 0x94, 0x13, 0xff, 0x7e, 0xe8, 0x96, 0xdd, 0x13, 0x57, 0x28, - 0x71, 0xc9, 0x18, 0x3a, 0x32, 0xbb, 0xaa, 0x09, 0x37, 0x26, 0x1a, 0x36, 0x91, 0xe7, 0xd7, 0x59, - 0xd0, 0x24, 0xd0, 0xc0, 0xbc, 0x6b, 0x31, 0xfc, 0x01, 0xf1, 0xad, 0x1e, 0xf9, 0x02, 0x4b, 0xe0, - 0x3d, 0x6a, 0x2b, 0x6b, 0x50, 0x70, 0xa8, 0x67, 0x11, 0x3f, 0x96, 0x24, 0xb6, 0x94, 0x75, 0x58, - 0xb2, 0xbb, 0x16, 0xf1, 0xe5, 0xd0, 0xb3, 0xb1, 0x58, 0xd2, 0xde, 0x71, 0xd2, 0x62, 0xcd, 0x3d, - 0x43, 0xac, 0xf9, 0x94, 0x58, 0x15, 0x58, 0x94, 0x77, 0x88, 0x19, 0x1c, 0xc4, 0x3a, 0x14, 0xa4, - 0xb9, 0x77, 0xa0, 0xbc, 0x09, 0x6b, 0x76, 0x9f, 0x31, 0xec, 0x0b, 0x33, 0x3e, 0x65, 0x26, 0xef, - 0x5a, 0x5b, 0x6f, 0xdd, 0x8e, 0xb5, 0x58, 0x8d, 0xa3, 0x7b, 0x51, 0x70, 0x3f, 0x8c, 0x29, 0xef, - 0x80, 0xfa, 0x30, 0x9e, 0xc5, 0xc9, 0xe6, 0x2d, 0x86, 0x79, 0x6b, 0x49, 0x3c, 0x9d, 0xf9, 0x3a, - 0x28, 0x9d, 0x1e, 0xb5, 0x0f, 0x4c, 0xbf, 0xef, 0x75, 0x30, 0x33, 0x7d, 0xea, 0xdb, 0x58, 0x5d, - 0x92, 0x3b, 0xd6, 0x58, 0x09, 0x23, 0xbb, 0x61, 0x60, 0x57, 0xfa, 0xf5, 0xcf, 0x60, 0xb5, 0xcd, - 0x5d, 0x03, 0xbb, 0x84, 0x0b, 0xcc, 0x76, 0x47, 0xaf, 0x88, 0x69, 0x36, 0x53, 0x66, 0x39, 0x3f, - 0x85, 0x2b, 0x79, 0xd5, 0x07, 0xab, 0xa7, 0xbc, 0x37, 0x5a, 0x0b, 0x85, 0x17, 0xed, 0xd5, 0xbc, - 0x8b, 0x76, 0x98, 0x39, 0xc4, 0xeb, 0x5f, 0x82, 0xd2, 0xe6, 0xee, 0xb6, 0xe3, 0xdc, 0xa5, 0xbd, - 0x9e, 0xd5, 0xa1, 0x2c, 0xa4, 0x37, 0xed, 0x29, 0xd0, 0xa1, 0x64, 0x8f, 0xd4, 0x89, 0x57, 0x3e, - 0xe5, 0xcb, 0x0c, 0xf7, 0x21, 0x68, 0xe3, 0xfd, 0x93, 0xd1, 0x36, 0x60, 0x65, 0x34, 0xd7, 0x74, - 0x88, 0x13, 0x13, 0x2a, 0x8f, 0xfa, 0xef, 0x11, 0x47, 0xff, 0x1a, 0x85, 0x77, 0xa9, 0x81, 0x3d, - 0x7a, 0x88, 0xff, 0xa7, 0x61, 0x3e, 0x82, 0xab, 0xb9, 0x14, 0xa6, 0x98, 0x67, 0xeb, 0x97, 0x02, - 0xcc, 0xb5, 0xb9, 0xab, 0x7c, 0x0e, 0xa5, 0xd4, 0x5b, 0xfc, 0x72, 0xde, 0xd2, 0x66, 0x5e, 0x3b, - 0xed, 0xb5, 0x09, 0x40, 0x09, 0xa9, 0x07, 0x00, 0x23, 0xcf, 0xe1, 0x4b, 0x17, 0xa4, 0x0e, 0x21, - 0xda, 0xc6, 0xbf, 0x42, 0x92, 0xda, 0x7d, 0x78, 0x3e, 0xef, 0x0d, 0xdb, 0x7c, 0x26, 0xbf, 0x14, - 0x56, 0xdb, 0x9a, 0x1c, 0x9b, 0xb4, 0xfd, 0x01, 0x81, 0x3e, 0xc1, 0x65, 0xff, 0xee, 0x84, 0xa5, - 0xc7, 0x53, 0xb5, 0xed, 0xa9, 0x53, 0x13, 0x92, 0x14, 0x2e, 0x8f, 0x5f, 0x19, 0xf5, 0x0b, 0xea, - 0x8e, 0x21, 0xb5, 0x37, 0x26, 0x45, 0x26, 0x0d, 0x09, 0x94, 0xb3, 0x07, 0xfd, 0xfa, 0x05, 0x45, - 0x32, 0x38, 0xad, 0x31, 0x19, 0x2e, 0x69, 0xc5, 0x40, 0xc9, 0x39, 0x89, 0x1b, 0x17, 0x52, 0xce, - 0x42, 0xb5, 0x9b, 0x13, 0x43, 0x07, 0x3d, 0xb5, 0x85, 0xaf, 0xe4, 0xd7, 0x63, 0xab, 0xfd, 0xe4, - 0xb4, 0x8a, 0x9e, 0x9e, 0x56, 0xd1, 0x5f, 0xa7, 0x55, 0xf4, 0xfd, 0x59, 0x75, 0xe6, 0xe9, 0x59, - 0x75, 0xe6, 0x8f, 0xb3, 0xea, 0xcc, 0x83, 0x5b, 0x2e, 0x11, 0xb2, 0x9e, 0x4d, 0xbd, 0x66, 0x54, - 0xdd, 0xc7, 0xe2, 0x88, 0xb2, 0x83, 0x66, 0xee, 0x57, 0xa5, 0x38, 0x0e, 0x30, 0xef, 0x14, 0xc2, - 0xcf, 0xe2, 0x5b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x01, 0xb3, 0x41, 0xeb, 0x0b, 0x00, - 0x00, + // 638 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x4f, 0x4f, 0xd4, 0x5e, + 0x14, 0x9d, 0xf7, 0xe3, 0x07, 0xda, 0xeb, 0x18, 0xa4, 0xc1, 0x50, 0x2a, 0x14, 0xac, 0xc6, 0x0c, + 0x18, 0xa7, 0x02, 0x89, 0x26, 0x18, 0x17, 0x80, 0x89, 0x89, 0x49, 0x8d, 0xa9, 0x71, 0x83, 0x26, + 0xf8, 0xa6, 0x7d, 0x96, 0xc6, 0x69, 0x5f, 0xf3, 0xde, 0x1b, 0x84, 0x8d, 0x51, 0x97, 0xba, 0x71, + 0xed, 0x27, 0x70, 0xc9, 0xc2, 0x2f, 0xe0, 0x8e, 0x25, 0x71, 0xe5, 0xca, 0x18, 0x58, 0xf0, 0x35, + 0x4c, 0xff, 0x97, 0x4e, 0x27, 0x4e, 0xd8, 0xb8, 0x99, 0x99, 0x7b, 0xef, 0xb9, 0xe7, 0x9c, 0xfb, + 0x5e, 0x6f, 0x07, 0xae, 0x70, 0xda, 0x63, 0x36, 0xd9, 0xee, 0x75, 0x8c, 0x4e, 0xaf, 0xdb, 0x25, + 0xc2, 0x0b, 0x0c, 0xb1, 0xdb, 0x0e, 0x19, 0x15, 0x54, 0x96, 0xf3, 0x62, 0x3b, 0x2b, 0xaa, 0x13, + 0xd8, 0xf7, 0x02, 0x6a, 0xc4, 0x9f, 0x09, 0x4c, 0x9d, 0xb2, 0x29, 0xf7, 0x29, 0x37, 0x7c, 0xee, + 0x1a, 0x3b, 0x4b, 0xd1, 0x57, 0x5a, 0x98, 0x4e, 0x0a, 0x5b, 0x71, 0x64, 0x24, 0x41, 0x5a, 0x9a, + 0x74, 0xa9, 0x4b, 0x93, 0x7c, 0xf4, 0x2b, 0xcd, 0xea, 0x35, 0x6e, 0x02, 0xec, 0x13, 0x1e, 0x62, + 0x9b, 0xa4, 0x98, 0xb9, 0x1a, 0x4c, 0x88, 0x19, 0xf6, 0x53, 0x6a, 0xfd, 0x3b, 0x82, 0x71, 0x93, + 0xbb, 0xcf, 0x42, 0x07, 0x0b, 0xf2, 0x24, 0xae, 0xc8, 0x77, 0x40, 0xc2, 0x3d, 0xb1, 0x4d, 0x99, + 0x27, 0xf6, 0x14, 0x34, 0x8f, 0x5a, 0xd2, 0xba, 0xf2, 0xe3, 0xdb, 0xad, 0xc9, 0xd4, 0xd3, 0x9a, + 0xe3, 0x30, 0xc2, 0xf9, 0x53, 0xc1, 0xbc, 0xc0, 0xb5, 0x0a, 0xa8, 0x7c, 0x1f, 0xc6, 0x12, 0x6e, + 0xe5, 0xbf, 0x79, 0xd4, 0xba, 0xb0, 0xac, 0xb6, 0xfb, 0x8f, 0xa4, 0x9d, 0x68, 0xac, 0x4b, 0x07, + 0xbf, 0xe6, 0x1a, 0x5f, 0x4f, 0xf6, 0x17, 0x91, 0x95, 0x36, 0xad, 0xde, 0xfd, 0x70, 0xb2, 0xbf, + 0x58, 0xd0, 0x7d, 0x3c, 0xd9, 0x5f, 0xbc, 0x5e, 0xd8, 0xdf, 0x2d, 0x06, 0xa8, 0xf8, 0xd5, 0xa7, + 0x61, 0xaa, 0x92, 0xb2, 0x08, 0x0f, 0x69, 0xc0, 0x89, 0xfe, 0x09, 0xc1, 0x45, 0x93, 0xbb, 0x1b, + 0x8c, 0x44, 0x35, 0xca, 0x85, 0xac, 0xc0, 0x39, 0x3b, 0x8a, 0x28, 0x4b, 0x46, 0xb3, 0xb2, 0x50, + 0x9e, 0x01, 0x29, 0x3f, 0xbe, 0x78, 0x02, 0xc9, 0x2a, 0x12, 0x51, 0x5f, 0x88, 0xf7, 0xba, 0x14, + 0x3b, 0xca, 0xc8, 0x3c, 0x6a, 0x35, 0xad, 0x2c, 0x94, 0x55, 0x38, 0x8f, 0x99, 0xf0, 0x5e, 0x61, + 0x5b, 0x28, 0xa3, 0x71, 0x5b, 0x1e, 0xaf, 0x36, 0xa3, 0x99, 0x32, 0x05, 0x7d, 0x0a, 0x2e, 0x9f, + 0x32, 0x93, 0xdb, 0x7c, 0x01, 0x93, 0x26, 0x77, 0x2d, 0xe2, 0x7a, 0x5c, 0x10, 0xf6, 0xb8, 0x2c, + 0x7a, 0x16, 0xb3, 0x15, 0xd9, 0xe7, 0x30, 0x53, 0xc7, 0x9e, 0xa9, 0xcb, 0xf7, 0xca, 0x5c, 0x28, + 0xbe, 0xba, 0xd9, 0xba, 0xab, 0x2b, 0x3a, 0x0b, 0xbc, 0xfe, 0x16, 0x64, 0x93, 0xbb, 0x6b, 0x8e, + 0xb3, 0x41, 0xbb, 0x5d, 0xdc, 0xa1, 0x2c, 0xb6, 0x77, 0xd6, 0x53, 0xd6, 0xa1, 0x69, 0x97, 0x78, + 0xe2, 0xa3, 0x96, 0xac, 0x53, 0xb9, 0xca, 0x70, 0x0f, 0x41, 0xed, 0xd7, 0xcf, 0x47, 0x5b, 0x80, + 0x4b, 0xe5, 0xde, 0x2d, 0xc7, 0x73, 0x52, 0x43, 0xe3, 0xe5, 0xfc, 0x03, 0xcf, 0xd1, 0xdf, 0xa3, + 0xf8, 0x76, 0x2c, 0xe2, 0xd3, 0x1d, 0xf2, 0x8f, 0x86, 0x79, 0x04, 0xb3, 0xb5, 0x16, 0xce, 0x30, + 0xcf, 0xf2, 0x97, 0xff, 0x61, 0xc4, 0xe4, 0xae, 0xfc, 0x12, 0x9a, 0xa7, 0xb6, 0xfb, 0x5a, 0xdd, + 0xd5, 0x56, 0xf6, 0x47, 0xbd, 0x39, 0x04, 0x28, 0x37, 0xb5, 0x09, 0x50, 0x5a, 0xb0, 0xab, 0x03, + 0x5a, 0x0b, 0x88, 0xba, 0xf0, 0x57, 0x48, 0xce, 0x4d, 0x61, 0xa2, 0x7f, 0x2d, 0x5a, 0x03, 0xfa, + 0xfb, 0x90, 0xea, 0xed, 0x61, 0x91, 0xb9, 0xa0, 0x07, 0xe3, 0xd5, 0x87, 0xf9, 0xc6, 0x00, 0x92, + 0x0a, 0x4e, 0x6d, 0x0f, 0x87, 0xcb, 0xa5, 0x18, 0xc8, 0x35, 0x4f, 0xdb, 0xc2, 0x40, 0xcb, 0x55, + 0xa8, 0xba, 0x34, 0x34, 0x34, 0xd3, 0x54, 0x47, 0xdf, 0x45, 0xef, 0xdc, 0x75, 0xf3, 0xe0, 0x48, + 0x43, 0x87, 0x47, 0x1a, 0xfa, 0x7d, 0xa4, 0xa1, 0xcf, 0xc7, 0x5a, 0xe3, 0xf0, 0x58, 0x6b, 0xfc, + 0x3c, 0xd6, 0x1a, 0x9b, 0x2b, 0xae, 0x27, 0x22, 0x3e, 0x9b, 0xfa, 0x46, 0xc2, 0x1e, 0x10, 0xf1, + 0x86, 0xb2, 0xd7, 0x46, 0xed, 0xbb, 0x58, 0xec, 0x85, 0x84, 0x77, 0xc6, 0xe2, 0x3f, 0x93, 0x95, + 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xec, 0xc8, 0xbb, 0x21, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1035,8 +607,6 @@ type MsgClient interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) CreatePost(ctx context.Context, in *MsgCreatePost, opts ...grpc.CallOption) (*MsgCreatePostResponse, error) - UpdateRingPostByAcp(ctx context.Context, in *MsgUpdateRingPostByAcp, opts ...grpc.CallOption) (*MsgUpdateRingPostByAcpResponse, error) - UpdateRingPostByThresholdSignature(ctx context.Context, in *MsgUpdateRingPostByThresholdSignature, opts ...grpc.CallOption) (*MsgUpdateRingPostByThresholdSignatureResponse, error) RegisterNamespace(ctx context.Context, in *MsgRegisterNamespace, opts ...grpc.CallOption) (*MsgRegisterNamespaceResponse, error) AddCollaborator(ctx context.Context, in *MsgAddCollaborator, opts ...grpc.CallOption) (*MsgAddCollaboratorResponse, error) RemoveCollaborator(ctx context.Context, in *MsgRemoveCollaborator, opts ...grpc.CallOption) (*MsgRemoveCollaboratorResponse, error) @@ -1068,36 +638,18 @@ func (c *msgClient) CreatePost(ctx context.Context, in *MsgCreatePost, opts ...g return out, nil } -func (c *msgClient) UpdateRingPostByAcp(ctx context.Context, in *MsgUpdateRingPostByAcp, opts ...grpc.CallOption) (*MsgUpdateRingPostByAcpResponse, error) { - out := new(MsgUpdateRingPostByAcpResponse) - err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/UpdateRingPostByAcp", in, out, opts...) +func (c *msgClient) RegisterNamespace(ctx context.Context, in *MsgRegisterNamespace, opts ...grpc.CallOption) (*MsgRegisterNamespaceResponse, error) { + out := new(MsgRegisterNamespaceResponse) + err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/RegisterNamespace", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) UpdateRingPostByThresholdSignature(ctx context.Context, in *MsgUpdateRingPostByThresholdSignature, opts ...grpc.CallOption) (*MsgUpdateRingPostByThresholdSignatureResponse, error) { - out := new(MsgUpdateRingPostByThresholdSignatureResponse) - err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/UpdateRingPostByThresholdSignature", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RegisterNamespace(ctx context.Context, in *MsgRegisterNamespace, opts ...grpc.CallOption) (*MsgRegisterNamespaceResponse, error) { - out := new(MsgRegisterNamespaceResponse) - err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/RegisterNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) AddCollaborator(ctx context.Context, in *MsgAddCollaborator, opts ...grpc.CallOption) (*MsgAddCollaboratorResponse, error) { - out := new(MsgAddCollaboratorResponse) - err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/AddCollaborator", in, out, opts...) +func (c *msgClient) AddCollaborator(ctx context.Context, in *MsgAddCollaborator, opts ...grpc.CallOption) (*MsgAddCollaboratorResponse, error) { + out := new(MsgAddCollaboratorResponse) + err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/AddCollaborator", in, out, opts...) if err != nil { return nil, err } @@ -1119,8 +671,6 @@ type MsgServer interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) CreatePost(context.Context, *MsgCreatePost) (*MsgCreatePostResponse, error) - UpdateRingPostByAcp(context.Context, *MsgUpdateRingPostByAcp) (*MsgUpdateRingPostByAcpResponse, error) - UpdateRingPostByThresholdSignature(context.Context, *MsgUpdateRingPostByThresholdSignature) (*MsgUpdateRingPostByThresholdSignatureResponse, error) RegisterNamespace(context.Context, *MsgRegisterNamespace) (*MsgRegisterNamespaceResponse, error) AddCollaborator(context.Context, *MsgAddCollaborator) (*MsgAddCollaboratorResponse, error) RemoveCollaborator(context.Context, *MsgRemoveCollaborator) (*MsgRemoveCollaboratorResponse, error) @@ -1136,12 +686,6 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) CreatePost(ctx context.Context, req *MsgCreatePost) (*MsgCreatePostResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePost not implemented") } -func (*UnimplementedMsgServer) UpdateRingPostByAcp(ctx context.Context, req *MsgUpdateRingPostByAcp) (*MsgUpdateRingPostByAcpResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateRingPostByAcp not implemented") -} -func (*UnimplementedMsgServer) UpdateRingPostByThresholdSignature(ctx context.Context, req *MsgUpdateRingPostByThresholdSignature) (*MsgUpdateRingPostByThresholdSignatureResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateRingPostByThresholdSignature not implemented") -} func (*UnimplementedMsgServer) RegisterNamespace(ctx context.Context, req *MsgRegisterNamespace) (*MsgRegisterNamespaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterNamespace not implemented") } @@ -1192,42 +736,6 @@ func _Msg_CreatePost_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Msg_UpdateRingPostByAcp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateRingPostByAcp) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateRingPostByAcp(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/sourcehub.bulletin.Msg/UpdateRingPostByAcp", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateRingPostByAcp(ctx, req.(*MsgUpdateRingPostByAcp)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateRingPostByThresholdSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateRingPostByThresholdSignature) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateRingPostByThresholdSignature(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/sourcehub.bulletin.Msg/UpdateRingPostByThresholdSignature", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateRingPostByThresholdSignature(ctx, req.(*MsgUpdateRingPostByThresholdSignature)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_RegisterNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRegisterNamespace) if err := dec(in); err != nil { @@ -1295,14 +803,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreatePost", Handler: _Msg_CreatePost_Handler, }, - { - MethodName: "UpdateRingPostByAcp", - Handler: _Msg_UpdateRingPostByAcp_Handler, - }, - { - MethodName: "UpdateRingPostByThresholdSignature", - Handler: _Msg_UpdateRingPostByThresholdSignature_Handler, - }, { MethodName: "RegisterNamespace", Handler: _Msg_RegisterNamespace_Handler, @@ -1457,296 +957,6 @@ func (m *MsgCreatePostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUpdateRingPostByAcp) 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 *MsgUpdateRingPostByAcp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateRingPostByAcp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XPssInterval != nil { - { - size := m.XPssInterval.Size() - i -= size - if _, err := m.XPssInterval.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.XNewThreshold != nil { - { - size := m.XNewThreshold.Size() - i -= size - if _, err := m.XNewThreshold.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.NewPeerIds) > 0 { - for iNdEx := len(m.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NewPeerIds[iNdEx]) - copy(dAtA[i:], m.NewPeerIds[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.NewPeerIds[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x22 - } - if len(m.PostId) > 0 { - i -= len(m.PostId) - copy(dAtA[i:], m.PostId) - i = encodeVarintTx(dAtA, i, uint64(len(m.PostId))) - i-- - dAtA[i] = 0x1a - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateRingPostByAcp_NewThreshold) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateRingPostByAcp_NewThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintTx(dAtA, i, uint64(m.NewThreshold)) - i-- - dAtA[i] = 0x30 - return len(dAtA) - i, nil -} -func (m *MsgUpdateRingPostByAcp_PssInterval) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateRingPostByAcp_PssInterval) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) - i-- - dAtA[i] = 0x38 - return len(dAtA) - i, nil -} -func (m *MsgUpdateRingPostByAcpResponse) 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 *MsgUpdateRingPostByAcpResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateRingPostByAcpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateRingPostByThresholdSignature) 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 *MsgUpdateRingPostByThresholdSignature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateRingPostByThresholdSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x32 - } - if len(m.SignatureScheme) > 0 { - i -= len(m.SignatureScheme) - copy(dAtA[i:], m.SignatureScheme) - i = encodeVarintTx(dAtA, i, uint64(len(m.SignatureScheme))) - i-- - dAtA[i] = 0x2a - } - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x22 - } - if len(m.PostId) > 0 { - i -= len(m.PostId) - copy(dAtA[i:], m.PostId) - i = encodeVarintTx(dAtA, i, uint64(len(m.PostId))) - i-- - dAtA[i] = 0x1a - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateRingPostByThresholdSignatureResponse) 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 *MsgUpdateRingPostByThresholdSignatureResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateRingPostByThresholdSignatureResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *RingReshareFinalizeSignDoc) 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 *RingReshareFinalizeSignDoc) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RingReshareFinalizeSignDoc) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BlockNumberNonce != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.BlockNumberNonce)) - i-- - dAtA[i] = 0x40 - } - if len(m.FinalizedPayloadSha256) > 0 { - i -= len(m.FinalizedPayloadSha256) - copy(dAtA[i:], m.FinalizedPayloadSha256) - i = encodeVarintTx(dAtA, i, uint64(len(m.FinalizedPayloadSha256))) - i-- - dAtA[i] = 0x3a - } - if len(m.CurrentPayloadSha256) > 0 { - i -= len(m.CurrentPayloadSha256) - copy(dAtA[i:], m.CurrentPayloadSha256) - i = encodeVarintTx(dAtA, i, uint64(len(m.CurrentPayloadSha256))) - i-- - dAtA[i] = 0x32 - } - if len(m.RingPk) > 0 { - i -= len(m.RingPk) - copy(dAtA[i:], m.RingPk) - i = encodeVarintTx(dAtA, i, uint64(len(m.RingPk))) - i-- - dAtA[i] = 0x2a - } - if len(m.PostId) > 0 { - i -= len(m.PostId) - copy(dAtA[i:], m.PostId) - i = encodeVarintTx(dAtA, i, uint64(len(m.PostId))) - i-- - dAtA[i] = 0x22 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Domain) > 0 { - i -= len(m.Domain) - copy(dAtA[i:], m.Domain) - i = encodeVarintTx(dAtA, i, uint64(len(m.Domain))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *MsgRegisterNamespace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2036,153 +1246,7 @@ func (m *MsgCreatePostResponse) Size() (n int) { return n } -func (m *MsgUpdateRingPostByAcp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.PostId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.NewPeerIds) > 0 { - for _, s := range m.NewPeerIds { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if m.XNewThreshold != nil { - n += m.XNewThreshold.Size() - } - if m.XPssInterval != nil { - n += m.XPssInterval.Size() - } - return n -} - -func (m *MsgUpdateRingPostByAcp_NewThreshold) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovTx(uint64(m.NewThreshold)) - return n -} -func (m *MsgUpdateRingPostByAcp_PssInterval) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovTx(uint64(m.PssInterval)) - return n -} -func (m *MsgUpdateRingPostByAcpResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateRingPostByThresholdSignature) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.PostId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.SignatureScheme) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateRingPostByThresholdSignatureResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *RingReshareFinalizeSignDoc) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Domain) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.PostId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RingPk) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.CurrentPayloadSha256) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.FinalizedPayloadSha256) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.BlockNumberNonce != 0 { - n += 1 + sovTx(uint64(m.BlockNumberNonce)) - } - return n -} - -func (m *MsgRegisterNamespace) Size() (n int) { +func (m *MsgRegisterNamespace) Size() (n int) { if m == nil { return 0 } @@ -2681,897 +1745,6 @@ func (m *MsgCreatePostResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateRingPostByAcp) 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: MsgUpdateRingPostByAcp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateRingPostByAcp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PostId", 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.PostId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", 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.NewPeerIds = append(m.NewPeerIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.XNewThreshold = &MsgUpdateRingPostByAcp_NewThreshold{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.XPssInterval = &MsgUpdateRingPostByAcp_PssInterval{v} - 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 *MsgUpdateRingPostByAcpResponse) 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: MsgUpdateRingPostByAcpResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateRingPostByAcpResponse: 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 *MsgUpdateRingPostByThresholdSignature) 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: MsgUpdateRingPostByThresholdSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateRingPostByThresholdSignature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PostId", 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.PostId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignatureScheme", 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.SignatureScheme = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - 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 *MsgUpdateRingPostByThresholdSignatureResponse) 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: MsgUpdateRingPostByThresholdSignatureResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateRingPostByThresholdSignatureResponse: 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 *RingReshareFinalizeSignDoc) 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: RingReshareFinalizeSignDoc: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RingReshareFinalizeSignDoc: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Domain", 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.Domain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PostId", 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.PostId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RingPk", 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.RingPk = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentPayloadSha256", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CurrentPayloadSha256 = append(m.CurrentPayloadSha256[:0], dAtA[iNdEx:postIndex]...) - if m.CurrentPayloadSha256 == nil { - m.CurrentPayloadSha256 = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FinalizedPayloadSha256", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FinalizedPayloadSha256 = append(m.FinalizedPayloadSha256[:0], dAtA[iNdEx:postIndex]...) - if m.FinalizedPayloadSha256 == nil { - m.FinalizedPayloadSha256 = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) - } - m.BlockNumberNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockNumberNonce |= uint64(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 *MsgRegisterNamespace) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/orbis/keeper/acp.go b/x/orbis/keeper/acp.go new file mode 100644 index 00000000..c28096dd --- /dev/null +++ b/x/orbis/keeper/acp.go @@ -0,0 +1,32 @@ +package keeper + +import ( + "context" + + coretypes "github.com/sourcenetwork/acp_core/pkg/types" + acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +func hasRingUpdatePermission(ctx context.Context, k *Keeper, ring *types.Ring, actorDID string) (bool, error) { + req := &acptypes.QueryVerifyAccessRequestRequest{ + PolicyId: ring.PolicyId, + AccessRequest: &coretypes.AccessRequest{ + Operations: []*coretypes.Operation{ + { + Object: coretypes.NewObject(types.NamespaceResource, ring.Namespace), + Permission: types.UpdateRingPermission, + }, + }, + Actor: &coretypes.Actor{ + Id: actorDID, + }, + }, + } + result, err := k.GetAcpKeeper().VerifyAccessRequest(ctx, req) + if err != nil { + return false, err + } + + return result.Valid, nil +} diff --git a/x/orbis/keeper/grpc_query.go b/x/orbis/keeper/grpc_query.go new file mode 100644 index 00000000..bfc99e7f --- /dev/null +++ b/x/orbis/keeper/grpc_query.go @@ -0,0 +1,156 @@ +package keeper + +import ( + "context" + + "cosmossdk.io/store/prefix" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/sourcenetwork/sourcehub/x/orbis/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +var _ types.QueryServer = &Keeper{} + +// Params query returns orbis module params. +func (k *Keeper) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil +} + +func (k *Keeper) Ring(ctx context.Context, req *types.QueryRingRequest) (*types.QueryRingResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.Id == "" { + return nil, status.Error(codes.InvalidArgument, types.ErrInvalidRingId.Error()) + } + + ring := k.GetRing(ctx, req.Id) + if ring == nil { + return nil, status.Error(codes.NotFound, types.ErrRingNotFound.Error()) + } + + return &types.QueryRingResponse{Ring: ring}, nil +} + +func (k *Keeper) Rings(ctx context.Context, req *types.QueryRingsRequest) (*types.QueryRingsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + namespaceFilter := "" + if req.Namespace != "" { + namespaceFilter = namespaceID(req.Namespace) + } + + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.RingKeyPrefix)) + var rings []types.Ring + + pageRes, err := query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { + var ring types.Ring + k.cdc.MustUnmarshal(value, &ring) + if namespaceFilter == "" || ring.Namespace == namespaceFilter { + rings = append(rings, ring) + } + return nil + }) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryRingsResponse{Rings: rings, Pagination: pageRes}, nil +} + +func (k *Keeper) Document(ctx context.Context, req *types.QueryDocumentRequest) (*types.QueryDocumentResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.Namespace == "" { + return nil, status.Error(codes.InvalidArgument, types.ErrInvalidNamespaceId.Error()) + } + if req.Id == "" { + return nil, status.Error(codes.InvalidArgument, types.ErrInvalidDocumentId.Error()) + } + + document := k.GetDocument(ctx, namespaceID(req.Namespace), req.Id) + if document == nil { + return nil, status.Error(codes.NotFound, types.ErrDocumentNotFound.Error()) + } + + return &types.QueryDocumentResponse{Document: document}, nil +} + +func (k *Keeper) Documents(ctx context.Context, req *types.QueryDocumentsRequest) (*types.QueryDocumentsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.Namespace == "" { + return nil, status.Error(codes.InvalidArgument, types.ErrInvalidNamespaceId.Error()) + } + + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, append(types.KeyPrefix(types.DocumentKeyPrefix), types.NamespacePrefix(namespaceID(req.Namespace))...)) + var documents []types.Document + + pageRes, err := query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { + var document types.Document + k.cdc.MustUnmarshal(value, &document) + documents = append(documents, document) + return nil + }) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryDocumentsResponse{Documents: documents, Pagination: pageRes}, nil +} + +func (k *Keeper) KeyDerivation(ctx context.Context, req *types.QueryKeyDerivationRequest) (*types.QueryKeyDerivationResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.Namespace == "" { + return nil, status.Error(codes.InvalidArgument, types.ErrInvalidNamespaceId.Error()) + } + if req.Id == "" { + return nil, status.Error(codes.InvalidArgument, types.ErrInvalidKeyDerivationId.Error()) + } + + keyDerivation := k.GetKeyDerivation(ctx, namespaceID(req.Namespace), req.Id) + if keyDerivation == nil { + return nil, status.Error(codes.NotFound, types.ErrKeyDerivationNotFound.Error()) + } + + return &types.QueryKeyDerivationResponse{KeyDerivation: keyDerivation}, nil +} + +func (k *Keeper) KeyDerivations(ctx context.Context, req *types.QueryKeyDerivationsRequest) (*types.QueryKeyDerivationsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.Namespace == "" { + return nil, status.Error(codes.InvalidArgument, types.ErrInvalidNamespaceId.Error()) + } + + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, append(types.KeyPrefix(types.KeyDerivationKeyPrefix), types.NamespacePrefix(namespaceID(req.Namespace))...)) + var keyDerivations []types.KeyDerivation + + pageRes, err := query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { + var keyDerivation types.KeyDerivation + k.cdc.MustUnmarshal(value, &keyDerivation) + keyDerivations = append(keyDerivations, keyDerivation) + return nil + }) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryKeyDerivationsResponse{KeyDerivations: keyDerivations, Pagination: pageRes}, nil +} diff --git a/x/orbis/keeper/keeper.go b/x/orbis/keeper/keeper.go new file mode 100644 index 00000000..6accab08 --- /dev/null +++ b/x/orbis/keeper/keeper.go @@ -0,0 +1,66 @@ +package keeper + +import ( + "fmt" + + "cosmossdk.io/core/store" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + + acpkeeper "github.com/sourcenetwork/sourcehub/x/acp/keeper" + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +type Keeper struct { + cdc codec.BinaryCodec + storeService store.KVStoreService + logger log.Logger + + authority string + + accountKeeper types.AccountKeeper + acpKeeper *acpkeeper.Keeper +} + +func NewKeeper( + cdc codec.BinaryCodec, + storeService store.KVStoreService, + logger log.Logger, + authority string, + accountKeeper types.AccountKeeper, + acpKeeper *acpkeeper.Keeper, +) Keeper { + if _, err := sdk.AccAddressFromBech32(authority); err != nil { + panic(fmt.Sprintf("invalid authority address: %s", authority)) + } + + return Keeper{ + cdc: cdc, + storeService: storeService, + logger: logger, + authority: authority, + accountKeeper: accountKeeper, + acpKeeper: acpKeeper, + } +} + +func (k *Keeper) GetAuthority() string { + return k.authority +} + +func (k *Keeper) GetAcpKeeper() *acpkeeper.Keeper { + return k.acpKeeper +} + +func (k *Keeper) Logger() log.Logger { + return k.logger.With("module", fmt.Sprintf("x/%s", types.ModuleName)) +} + +func namespaceID(namespace string) string { + return types.GetNamespaceID(namespace) +} + +func (k *Keeper) RingBytes(ring types.Ring) ([]byte, error) { + return k.cdc.Marshal(&ring) +} diff --git a/x/orbis/keeper/msg_server.go b/x/orbis/keeper/msg_server.go new file mode 100644 index 00000000..25703359 --- /dev/null +++ b/x/orbis/keeper/msg_server.go @@ -0,0 +1,305 @@ +package keeper + +import ( + "context" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +var _ types.MsgServer = &Keeper{} + +// UpdateParams updates orbis module params. +func (k *Keeper) UpdateParams(ctx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if k.GetAuthority() != req.Authority { + return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.GetAuthority(), req.Authority) + } + + if err := k.SetParams(ctx, req.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} + +func (k *Keeper) CreateRing(goCtx context.Context, msg *types.MsgCreateRing) (*types.MsgCreateRingResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + namespaceID := namespaceID(msg.Namespace) + creatorDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) + if err != nil { + return nil, err + } + + var pssInterval *uint64 + if msg.HasPssInterval { + v := msg.GetPssInterval() + pssInterval = &v + } + + ringID := types.GenerateRingID(namespaceID, msg.RingPk, msg.PeerIds, msg.Threshold, pssInterval, msg.PolicyId) + if existing := k.GetRing(goCtx, ringID); existing != nil { + return nil, types.ErrRingAlreadyExists + } + + ring := types.Ring{ + Id: ringID, + Namespace: namespaceID, + CreatorDid: creatorDID, + RingPk: msg.RingPk, + PeerIds: append([]string(nil), msg.PeerIds...), + Threshold: msg.Threshold, + PolicyId: msg.PolicyId, + BlockNumberNonce: 0, + } + if pssInterval != nil { + ring.PssInterval = *pssInterval + ring.HasPssInterval = true + } + if err := validateRing(&ring); err != nil { + return nil, err + } + + k.SetRing(goCtx, ring) + + if err := ctx.EventManager().EmitTypedEvent(&types.EventRingCreated{ + Namespace: namespaceID, + RingId: ringID, + CreatorDid: creatorDID, + Artifact: msg.Artifact, + }); err != nil { + return nil, err + } + + return &types.MsgCreateRingResponse{RingId: ringID}, nil +} + +func (k *Keeper) UpdateRingByAcp(goCtx context.Context, msg *types.MsgUpdateRingByAcp) (*types.MsgUpdateRingByAcpResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + ring := k.GetRing(goCtx, msg.RingId) + if ring == nil { + return nil, types.ErrRingNotFound + } + if ring.PolicyId == "" { + return nil, types.ErrRingMissingPolicyId + } + + updaterDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) + if err != nil { + return nil, err + } + + allowed, err := hasRingUpdatePermission(goCtx, k, ring, updaterDID) + if err != nil { + return nil, err + } + if !allowed { + return nil, types.ErrInvalidRingUpdater + } + + var newThreshold *uint32 + if msg.HasNewThreshold { + v := msg.GetNewThreshold() + newThreshold = &v + } + if err := validateRingUpdate(msg.NewPeerIds, newThreshold, ring); err != nil { + return nil, err + } + + if len(msg.NewPeerIds) > 0 { + ring.NewPeerIds = append([]string(nil), msg.NewPeerIds...) + } + if newThreshold != nil { + ring.NewThreshold = *newThreshold + ring.HasNewThreshold = true + } + if msg.HasPssInterval { + ring.PssInterval = msg.GetPssInterval() + ring.HasPssInterval = true + } + if err := validateRing(ring); err != nil { + return nil, err + } + + k.SetRing(goCtx, *ring) + + if err := ctx.EventManager().EmitTypedEvent(&types.EventRingUpdated{ + Namespace: ring.Namespace, + RingId: ring.Id, + UpdaterDid: updaterDID, + Artifact: msg.Artifact, + }); err != nil { + return nil, err + } + + return &types.MsgUpdateRingByAcpResponse{}, nil +} + +func (k *Keeper) FinalizeRingReshareByThresholdSignature( + goCtx context.Context, + msg *types.MsgFinalizeRingReshareByThresholdSignature, +) (*types.MsgFinalizeRingReshareByThresholdSignatureResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + ring := k.GetRing(goCtx, msg.RingId) + if ring == nil { + return nil, types.ErrRingNotFound + } + + updaterDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) + if err != nil { + return nil, err + } + + currentRingBytes, err := k.RingBytes(*ring) + if err != nil { + return nil, errorsmod.Wrapf(types.ErrInvalidRing, "could not marshal current ring: %s", err) + } + + signDocFinalizedRing, err := ringForReshareFinalization(ring) + if err != nil { + return nil, err + } + signDocFinalizedRingBytes, err := k.RingBytes(*signDocFinalizedRing) + if err != nil { + return nil, errorsmod.Wrapf(types.ErrInvalidRing, "could not marshal finalized ring: %s", err) + } + + signBytes, err := ringReshareFinalizeSignBytes(ctx.ChainID(), ring, currentRingBytes, signDocFinalizedRingBytes) + if err != nil { + return nil, err + } + if err := verifyThresholdSignatureForRingUpdate(ring, signBytes, msg.SignatureScheme, msg.Signature); err != nil { + return nil, err + } + + finalizedRing := *signDocFinalizedRing + finalizedRing.BlockNumberNonce = uint64(ctx.BlockHeight()) + k.SetRing(goCtx, finalizedRing) + + if err := ctx.EventManager().EmitTypedEvent(&types.EventRingUpdated{ + Namespace: finalizedRing.Namespace, + RingId: finalizedRing.Id, + UpdaterDid: updaterDID, + Artifact: msg.Artifact, + }); err != nil { + return nil, err + } + + return &types.MsgFinalizeRingReshareByThresholdSignatureResponse{}, nil +} + +func (k *Keeper) StoreDocument(goCtx context.Context, msg *types.MsgStoreDocument) (*types.MsgStoreDocumentResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + namespaceID := namespaceID(msg.Namespace) + if k.GetRing(goCtx, msg.RingId) == nil { + return nil, types.ErrRingNotFound + } + + creatorDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) + if err != nil { + return nil, err + } + + var tier *string + if msg.HasTier { + v := msg.GetTier() + tier = &v + } + var timestamp *uint64 + if msg.HasTimestamp { + v := msg.GetTimestamp() + timestamp = &v + } + + documentID := types.GenerateDocumentID(namespaceID, msg.RingId, msg.Document, msg.Proof, msg.PolicyId, msg.Resource, msg.Permission, tier, timestamp) + if existing := k.GetDocument(goCtx, namespaceID, documentID); existing != nil { + return nil, types.ErrDocumentAlreadyExists + } + + document := types.Document{ + Id: documentID, + Namespace: namespaceID, + CreatorDid: creatorDID, + RingId: msg.RingId, + Document: msg.Document, + Proof: msg.Proof, + PolicyId: msg.PolicyId, + Resource: msg.Resource, + Permission: msg.Permission, + } + if tier != nil { + document.Tier = *tier + document.HasTier = true + } + if timestamp != nil { + document.Timestamp = *timestamp + document.HasTimestamp = true + } + if err := validateDocument(&document); err != nil { + return nil, err + } + + k.SetDocument(goCtx, document) + + if err := ctx.EventManager().EmitTypedEvent(&types.EventDocumentStored{ + Namespace: namespaceID, + DocumentId: documentID, + CreatorDid: creatorDID, + Artifact: msg.Artifact, + }); err != nil { + return nil, err + } + + return &types.MsgStoreDocumentResponse{DocumentId: documentID}, nil +} + +func (k *Keeper) StoreKeyDerivation(goCtx context.Context, msg *types.MsgStoreKeyDerivation) (*types.MsgStoreKeyDerivationResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + namespaceID := namespaceID(msg.Namespace) + if k.GetRing(goCtx, msg.RingId) == nil { + return nil, types.ErrRingNotFound + } + + creatorDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) + if err != nil { + return nil, err + } + + keyDerivationID := types.GenerateKeyDerivationID(namespaceID, msg.RingId, msg.Derivation, msg.PolicyId, msg.Resource, msg.Permission) + if existing := k.GetKeyDerivation(goCtx, namespaceID, keyDerivationID); existing != nil { + return nil, types.ErrKeyDerivationAlreadyExists + } + + keyDerivation := types.KeyDerivation{ + Id: keyDerivationID, + Namespace: namespaceID, + CreatorDid: creatorDID, + RingId: msg.RingId, + Derivation: msg.Derivation, + PolicyId: msg.PolicyId, + Resource: msg.Resource, + Permission: msg.Permission, + } + if err := validateKeyDerivation(&keyDerivation); err != nil { + return nil, err + } + + k.SetKeyDerivation(goCtx, keyDerivation) + + if err := ctx.EventManager().EmitTypedEvent(&types.EventKeyDerivationStored{ + Namespace: namespaceID, + KeyDerivationId: keyDerivationID, + CreatorDid: creatorDID, + Artifact: msg.Artifact, + }); err != nil { + return nil, err + } + + return &types.MsgStoreKeyDerivationResponse{KeyDerivationId: keyDerivationID}, nil +} diff --git a/x/orbis/keeper/msg_server_test.go b/x/orbis/keeper/msg_server_test.go new file mode 100644 index 00000000..948d478c --- /dev/null +++ b/x/orbis/keeper/msg_server_test.go @@ -0,0 +1,170 @@ +package keeper_test + +import ( + "testing" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + appparams "github.com/sourcenetwork/sourcehub/app/params" + keepertestutil "github.com/sourcenetwork/sourcehub/testutil/keeper" + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +const testDID = "did:example:orbis-creator" + +func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { + k, ctx := keepertestutil.OrbisKeeper(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creator := testAddress() + namespace := "vault" + namespaceID := types.GetNamespaceID(namespace) + pssInterval := uint64(600) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creator, + Namespace: namespace, + RingPk: "ring-pk", + PeerIds: []string{"peer-1", "peer-2", "peer-3"}, + Threshold: 2, + PssInterval: pssInterval, + HasPssInterval: true, + PolicyId: "policy-ring", + Artifact: "ring-artifact", + }) + require.NoError(t, err) + + ring := k.GetRing(ctx, createRingResp.RingId) + require.NotNil(t, ring) + require.Equal(t, namespaceID, ring.Namespace) + require.Equal(t, testDID, ring.CreatorDid) + require.Equal(t, "ring-pk", ring.RingPk) + require.Equal(t, []string{"peer-1", "peer-2", "peer-3"}, ring.PeerIds) + require.Equal(t, uint32(2), ring.Threshold) + require.True(t, ring.HasPssInterval) + require.Equal(t, pssInterval, ring.PssInterval) + + _, err = k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creator, + Namespace: namespace, + RingPk: "ring-pk", + PeerIds: []string{"peer-1", "peer-2", "peer-3"}, + Threshold: 2, + PssInterval: pssInterval, + HasPssInterval: true, + PolicyId: "policy-ring", + }) + require.ErrorIs(t, err, types.ErrRingAlreadyExists) + + tier := "gold" + timestamp := uint64(42) + storeDocumentMsg := &types.MsgStoreDocument{ + Creator: creator, + Namespace: namespace, + RingId: createRingResp.RingId, + Document: "ciphertext", + Proof: "proof", + PolicyId: "policy-doc", + Resource: "secret", + Permission: "decrypt", + Tier: tier, + HasTier: true, + Timestamp: timestamp, + HasTimestamp: true, + } + storeDocumentResp, err := k.StoreDocument(ctx, storeDocumentMsg) + require.NoError(t, err) + require.Equal( + t, + types.GenerateDocumentID(namespaceID, createRingResp.RingId, "ciphertext", "proof", "policy-doc", "secret", "decrypt", &tier, ×tamp), + storeDocumentResp.DocumentId, + ) + + document := k.GetDocument(ctx, namespaceID, storeDocumentResp.DocumentId) + require.NotNil(t, document) + require.Equal(t, testDID, document.CreatorDid) + require.True(t, document.HasTier) + require.Equal(t, tier, document.Tier) + require.True(t, document.HasTimestamp) + require.Equal(t, timestamp, document.Timestamp) + + _, err = k.StoreDocument(ctx, storeDocumentMsg) + require.ErrorIs(t, err, types.ErrDocumentAlreadyExists) + + storeKeyDerivationMsg := &types.MsgStoreKeyDerivation{ + Creator: creator, + Namespace: namespace, + RingId: createRingResp.RingId, + Derivation: "m/0/1", + PolicyId: "policy-derivation", + Resource: "derived-key", + Permission: "derive", + } + storeKeyDerivationResp, err := k.StoreKeyDerivation(ctx, storeKeyDerivationMsg) + require.NoError(t, err) + require.Equal( + t, + types.GenerateKeyDerivationID(namespaceID, createRingResp.RingId, "m/0/1", "policy-derivation", "derived-key", "derive"), + storeKeyDerivationResp.KeyDerivationId, + ) + + keyDerivation := k.GetKeyDerivation(ctx, namespaceID, storeKeyDerivationResp.KeyDerivationId) + require.NotNil(t, keyDerivation) + require.Equal(t, testDID, keyDerivation.CreatorDid) + require.Equal(t, "m/0/1", keyDerivation.Derivation) + + _, err = k.StoreKeyDerivation(ctx, storeKeyDerivationMsg) + require.ErrorIs(t, err, types.ErrKeyDerivationAlreadyExists) +} + +func TestMsgServer_UpdateRingByAcpRequiresPolicy(t *testing.T) { + k, ctx := keepertestutil.OrbisKeeper(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: testAddress(), + Namespace: "vault", + RingPk: "ring-pk", + PeerIds: []string{"peer-1", "peer-2"}, + Threshold: 1, + }) + require.NoError(t, err) + + _, err = k.UpdateRingByAcp(ctx, &types.MsgUpdateRingByAcp{ + Creator: testAddress(), + RingId: createRingResp.RingId, + NewPeerIds: []string{"peer-3", "peer-4"}, + NewThreshold: 1, + HasNewThreshold: true, + }) + require.ErrorIs(t, err, types.ErrRingMissingPolicyId) +} + +func TestMsgServer_FinalizeRingReshareRequiresPendingUpdate(t *testing.T) { + k, ctx := keepertestutil.OrbisKeeper(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: testAddress(), + Namespace: "vault", + RingPk: "ring-pk", + PeerIds: []string{"peer-1", "peer-2"}, + Threshold: 1, + }) + require.NoError(t, err) + + _, err = k.FinalizeRingReshareByThresholdSignature(ctx, &types.MsgFinalizeRingReshareByThresholdSignature{ + Creator: testAddress(), + RingId: createRingResp.RingId, + SignatureScheme: "bls12_381", + Signature: []byte("signature"), + }) + require.ErrorIs(t, err, types.ErrInvalidRing) + require.ErrorContains(t, err, "missing new_peer_ids or new_threshold") +} + +func testAddress() string { + return sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() +} diff --git a/x/orbis/keeper/params.go b/x/orbis/keeper/params.go new file mode 100644 index 00000000..39fb1833 --- /dev/null +++ b/x/orbis/keeper/params.go @@ -0,0 +1,33 @@ +package keeper + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/runtime" + + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +// GetParams gets all parameters as types.Params. +func (k *Keeper) GetParams(ctx context.Context) (params types.Params) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + bz := store.Get(types.ParamsKey) + if bz == nil { + return params + } + + k.cdc.MustUnmarshal(bz, ¶ms) + return params +} + +// SetParams sets the params. +func (k *Keeper) SetParams(ctx context.Context, params types.Params) error { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + bz, err := k.cdc.Marshal(¶ms) + if err != nil { + return err + } + store.Set(types.ParamsKey, bz) + + return nil +} diff --git a/x/orbis/keeper/reshare_sign_bytes.go b/x/orbis/keeper/reshare_sign_bytes.go new file mode 100644 index 00000000..f2fc8d0c --- /dev/null +++ b/x/orbis/keeper/reshare_sign_bytes.go @@ -0,0 +1,32 @@ +package keeper + +import ( + "crypto/sha256" + + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +const RingReshareFinalizeSignDocDomain = "orbis-ring-reshare-finalize" + +func ringReshareFinalizeSignBytes( + chainID string, + currentRing *types.Ring, + currentRingBytes []byte, + finalizedRingBytes []byte, +) ([]byte, error) { + currentRingHash := sha256.Sum256(currentRingBytes) + finalizedRingHash := sha256.Sum256(finalizedRingBytes) + + signDoc := types.RingReshareFinalizeSignDoc{ + Domain: RingReshareFinalizeSignDocDomain, + ChainId: chainID, + Namespace: currentRing.Namespace, + RingId: currentRing.Id, + RingPk: currentRing.RingPk, + CurrentRingSha256: currentRingHash[:], + FinalizedRingSha256: finalizedRingHash[:], + BlockNumberNonce: currentRing.BlockNumberNonce, + } + + return signDoc.Marshal() +} diff --git a/x/orbis/keeper/store.go b/x/orbis/keeper/store.go new file mode 100644 index 00000000..299e22c8 --- /dev/null +++ b/x/orbis/keeper/store.go @@ -0,0 +1,135 @@ +package keeper + +import ( + "context" + + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +func (k *Keeper) SetRing(ctx context.Context, ring types.Ring) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.RingKeyPrefix)) + bz := k.cdc.MustMarshal(&ring) + store.Set([]byte(ring.Id), bz) +} + +func (k *Keeper) GetRing(ctx context.Context, ringID string) *types.Ring { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.RingKeyPrefix)) + bz := store.Get([]byte(ringID)) + if bz == nil { + return nil + } + + var ring types.Ring + k.cdc.MustUnmarshal(bz, &ring) + return &ring +} + +func (k *Keeper) GetAllRings(ctx sdk.Context) []types.Ring { + var rings []types.Ring + k.mustIterateRings(ctx, func(ring types.Ring) { + rings = append(rings, ring) + }) + return rings +} + +func (k *Keeper) SetDocument(ctx context.Context, document types.Document) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.DocumentKeyPrefix)) + bz := k.cdc.MustMarshal(&document) + store.Set(types.DocumentKey(document.Namespace, document.Id), bz) +} + +func (k *Keeper) GetDocument(ctx context.Context, namespaceID, documentID string) *types.Document { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.DocumentKeyPrefix)) + bz := store.Get(types.DocumentKey(namespaceID, documentID)) + if bz == nil { + return nil + } + + var document types.Document + k.cdc.MustUnmarshal(bz, &document) + return &document +} + +func (k *Keeper) GetAllDocuments(ctx context.Context) []types.Document { + var documents []types.Document + k.mustIterateDocuments(ctx, func(document types.Document) { + documents = append(documents, document) + }) + return documents +} + +func (k *Keeper) SetKeyDerivation(ctx context.Context, keyDerivation types.KeyDerivation) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.KeyDerivationKeyPrefix)) + bz := k.cdc.MustMarshal(&keyDerivation) + store.Set(types.KeyDerivationKey(keyDerivation.Namespace, keyDerivation.Id), bz) +} + +func (k *Keeper) GetKeyDerivation(ctx context.Context, namespaceID, keyDerivationID string) *types.KeyDerivation { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.KeyDerivationKeyPrefix)) + bz := store.Get(types.KeyDerivationKey(namespaceID, keyDerivationID)) + if bz == nil { + return nil + } + + var keyDerivation types.KeyDerivation + k.cdc.MustUnmarshal(bz, &keyDerivation) + return &keyDerivation +} + +func (k *Keeper) GetAllKeyDerivations(ctx context.Context) []types.KeyDerivation { + var keyDerivations []types.KeyDerivation + k.mustIterateKeyDerivations(ctx, func(keyDerivation types.KeyDerivation) { + keyDerivations = append(keyDerivations, keyDerivation) + }) + return keyDerivations +} + +func (k *Keeper) mustIterateRings(ctx context.Context, cb func(ring types.Ring)) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.RingKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var ring types.Ring + k.cdc.MustUnmarshal(iterator.Value(), &ring) + cb(ring) + } +} + +func (k *Keeper) mustIterateDocuments(ctx context.Context, cb func(document types.Document)) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.DocumentKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var document types.Document + k.cdc.MustUnmarshal(iterator.Value(), &document) + cb(document) + } +} + +func (k *Keeper) mustIterateKeyDerivations(ctx context.Context, cb func(keyDerivation types.KeyDerivation)) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.KeyDerivationKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var keyDerivation types.KeyDerivation + k.cdc.MustUnmarshal(iterator.Value(), &keyDerivation) + cb(keyDerivation) + } +} diff --git a/x/bulletin/keeper/threshold_signature.go b/x/orbis/keeper/threshold_signature.go similarity index 91% rename from x/bulletin/keeper/threshold_signature.go rename to x/orbis/keeper/threshold_signature.go index b318727a..07d170cf 100644 --- a/x/bulletin/keeper/threshold_signature.go +++ b/x/orbis/keeper/threshold_signature.go @@ -10,7 +10,7 @@ import ( "github.com/mizufinance/decaf377-go/orbisfrost" blst "github.com/supranational/blst/bindings/go" - "github.com/sourcenetwork/sourcehub/x/bulletin/types" + "github.com/sourcenetwork/sourcehub/x/orbis/types" ) const ( @@ -24,13 +24,8 @@ const ( decaf377SignatureSize = decaf377.ElementSize + decaf377.ScalarSize ) -func verifyThresholdSignatureForRingPayloadUpdate( - currentRingPayload *ringPayloadJSON, - message []byte, - scheme string, - signature []byte, -) error { - return verifyThresholdSignature(scheme, *currentRingPayload.RingPK, message, signature) +func verifyThresholdSignatureForRingUpdate(ring *types.Ring, message []byte, scheme string, signature []byte) error { + return verifyThresholdSignature(scheme, ring.RingPk, message, signature) } func verifyThresholdSignature(scheme string, ringPK string, message []byte, signature []byte) error { diff --git a/x/orbis/keeper/validation.go b/x/orbis/keeper/validation.go new file mode 100644 index 00000000..6f9f0ac9 --- /dev/null +++ b/x/orbis/keeper/validation.go @@ -0,0 +1,142 @@ +package keeper + +import ( + errorsmod "cosmossdk.io/errors" + + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +func validateRing(ring *types.Ring) error { + switch { + case ring.Id == "": + return types.ErrInvalidRingId + case ring.Namespace == "": + return types.ErrInvalidNamespaceId + case ring.RingPk == "": + return errorsmod.Wrap(types.ErrInvalidRing, "missing ring_pk") + case len(ring.PeerIds) == 0: + return errorsmod.Wrap(types.ErrInvalidRing, "missing peer_ids") + case ring.Threshold == 0 || int(ring.Threshold) > len(ring.PeerIds): + return errorsmod.Wrapf(types.ErrInvalidRing, "threshold %d is invalid for committee size %d", ring.Threshold, len(ring.PeerIds)) + } + + if err := validateUniquePeerIDs(ring.PeerIds, "peer_ids"); err != nil { + return err + } + if len(ring.NewPeerIds) > 0 { + if err := validateUniquePeerIDs(ring.NewPeerIds, "new_peer_ids"); err != nil { + return err + } + } + if ring.HasNewThreshold && ring.NewThreshold == 0 { + return errorsmod.Wrap(types.ErrInvalidRing, "new_threshold must be at least 1") + } + if len(ring.NewPeerIds) > 0 && ring.HasNewThreshold && uint32(len(ring.NewPeerIds)) < ring.NewThreshold { + return errorsmod.Wrapf( + types.ErrInvalidRing, + "new_peer_ids count (%d) is less than new_threshold (%d)", + len(ring.NewPeerIds), + ring.NewThreshold, + ) + } + + return nil +} + +func validateRingUpdate(newPeerIDs []string, newThreshold *uint32, existing *types.Ring) error { + reshareInProgress := len(existing.NewPeerIds) > 0 || existing.HasNewThreshold + touchingReshareFields := len(newPeerIDs) > 0 || newThreshold != nil + if reshareInProgress && touchingReshareFields { + return types.ErrReshareInProgress + } + + if len(newPeerIDs) > 0 { + if err := validateUniquePeerIDs(newPeerIDs, "new_peer_ids"); err != nil { + return err + } + } + if newThreshold != nil && *newThreshold < 1 { + return errorsmod.Wrap(types.ErrInvalidRing, "new_threshold must be at least 1") + } + if len(newPeerIDs) > 0 && newThreshold != nil && uint32(len(newPeerIDs)) < *newThreshold { + return errorsmod.Wrapf( + types.ErrInvalidRing, + "new_peer_ids count (%d) is less than new_threshold (%d)", + len(newPeerIDs), + *newThreshold, + ) + } + + return nil +} + +func validateUniquePeerIDs(peerIDs []string, fieldName string) error { + seen := make(map[string]struct{}, len(peerIDs)) + for _, id := range peerIDs { + if id == "" { + return errorsmod.Wrapf(types.ErrInvalidRing, "empty peer id in %s", fieldName) + } + if _, dup := seen[id]; dup { + return errorsmod.Wrapf(types.ErrInvalidRing, "duplicate peer id in %s: %q", fieldName, id) + } + seen[id] = struct{}{} + } + return nil +} + +func ringForReshareFinalization(currentRing *types.Ring) (*types.Ring, error) { + finalized := *currentRing + if len(finalized.NewPeerIds) == 0 && !finalized.HasNewThreshold { + return nil, errorsmod.Wrap(types.ErrInvalidRing, "missing new_peer_ids or new_threshold for reshare finalization") + } + + if len(finalized.NewPeerIds) > 0 { + finalized.PeerIds = append([]string(nil), finalized.NewPeerIds...) + } + if finalized.HasNewThreshold { + finalized.Threshold = finalized.NewThreshold + } + finalized.NewPeerIds = nil + finalized.NewThreshold = 0 + finalized.HasNewThreshold = false + + if err := validateRing(&finalized); err != nil { + return nil, err + } + + return &finalized, nil +} + +func validateDocument(document *types.Document) error { + switch { + case document.Id == "": + return types.ErrInvalidDocumentId + case document.Namespace == "": + return types.ErrInvalidNamespaceId + case document.RingId == "": + return types.ErrInvalidRingId + case document.Document == "": + return errorsmod.Wrap(types.ErrInvalidDocument, "missing document") + case document.Proof == "": + return errorsmod.Wrap(types.ErrInvalidDocument, "missing proof") + case document.PolicyId == "" || document.Resource == "" || document.Permission == "": + return errorsmod.Wrap(types.ErrInvalidDocument, "missing policy binding") + } + return nil +} + +func validateKeyDerivation(keyDerivation *types.KeyDerivation) error { + switch { + case keyDerivation.Id == "": + return types.ErrInvalidKeyDerivationId + case keyDerivation.Namespace == "": + return types.ErrInvalidNamespaceId + case keyDerivation.RingId == "": + return types.ErrInvalidRingId + case keyDerivation.Derivation == "": + return errorsmod.Wrap(types.ErrInvalidKeyDerivation, "missing derivation") + case keyDerivation.PolicyId == "" || keyDerivation.Resource == "" || keyDerivation.Permission == "": + return errorsmod.Wrap(types.ErrInvalidKeyDerivation, "missing policy binding") + } + return nil +} diff --git a/x/orbis/module/autocli.go b/x/orbis/module/autocli.go new file mode 100644 index 00000000..8dbaed66 --- /dev/null +++ b/x/orbis/module/autocli.go @@ -0,0 +1,88 @@ +package orbis + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + + modulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/orbis" +) + +// 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: "Shows the parameters of the module"}, + { + RpcMethod: "Ring", + Use: "ring [id]", + Short: "Query ring by id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, + }, + {RpcMethod: "Rings", Use: "rings", Short: "Query rings"}, + { + RpcMethod: "Document", + Use: "document [namespace] [id]", + Short: "Query document by namespace and id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "id"}}, + }, + { + RpcMethod: "Documents", + Use: "documents [namespace]", + Short: "Query documents within a namespace", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}}, + }, + { + RpcMethod: "KeyDerivation", + Use: "key-derivation [namespace] [id]", + Short: "Query key derivation by namespace and id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "id"}}, + }, + { + RpcMethod: "KeyDerivations", + Use: "key-derivations [namespace]", + Short: "Query key derivations within a namespace", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}}, + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: modulev1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + {RpcMethod: "UpdateParams", Skip: true}, + { + RpcMethod: "CreateRing", + Use: "create-ring [namespace] [ring_pk] [threshold]", + Short: "Create an Orbis ring", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "ring_pk"}, {ProtoField: "threshold"}}, + }, + { + RpcMethod: "UpdateRingByAcp", + Use: "update-ring-by-acp [ring_id]", + Short: "Update pending ring reshare fields via external ACP policy", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "ring_id"}}, + }, + { + RpcMethod: "FinalizeRingReshareByThresholdSignature", + Use: "finalize-ring-reshare [ring_id] [signature_scheme] [signature]", + Short: "Finalize a ring reshare using a threshold signature", + Long: "Finalize a ring reshare using a threshold signature. The signature argument is a bytes field and must be base64-encoded.", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "ring_id"}, {ProtoField: "signature_scheme"}, {ProtoField: "signature"}}, + }, + { + RpcMethod: "StoreDocument", + Use: "store-document [namespace] [ring_id] [document] [proof] [policy_id] [resource] [permission]", + Short: "Store an encrypted Orbis document", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "ring_id"}, {ProtoField: "document"}, {ProtoField: "proof"}, {ProtoField: "policy_id"}, {ProtoField: "resource"}, {ProtoField: "permission"}}, + }, + { + RpcMethod: "StoreKeyDerivation", + Use: "store-key-derivation [namespace] [ring_id] [derivation] [policy_id] [resource] [permission]", + Short: "Store an Orbis key derivation", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "ring_id"}, {ProtoField: "derivation"}, {ProtoField: "policy_id"}, {ProtoField: "resource"}, {ProtoField: "permission"}}, + }, + }, + }, + } +} diff --git a/x/orbis/module/genesis.go b/x/orbis/module/genesis.go new file mode 100644 index 00000000..0bce0f30 --- /dev/null +++ b/x/orbis/module/genesis.go @@ -0,0 +1,35 @@ +package orbis + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/sourcenetwork/sourcehub/x/orbis/keeper" + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +// InitGenesis initializes the module's state from a provided genesis state. +func InitGenesis(ctx sdk.Context, k *keeper.Keeper, genState types.GenesisState) { + if err := k.SetParams(ctx, genState.Params); err != nil { + panic(err) + } + + for _, ring := range genState.Rings { + k.SetRing(ctx, ring) + } + for _, document := range genState.Documents { + k.SetDocument(ctx, document) + } + for _, keyDerivation := range genState.KeyDerivations { + k.SetKeyDerivation(ctx, keyDerivation) + } +} + +// ExportGenesis returns the module's exported genesis. +func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { + genesis := types.DefaultGenesis() + genesis.Params = k.GetParams(ctx) + genesis.Rings = k.GetAllRings(ctx) + genesis.Documents = k.GetAllDocuments(ctx) + genesis.KeyDerivations = k.GetAllKeyDerivations(ctx) + return genesis +} diff --git a/x/orbis/module/module.go b/x/orbis/module/module.go new file mode 100644 index 00000000..649b3dee --- /dev/null +++ b/x/orbis/module/module.go @@ -0,0 +1,156 @@ +package orbis + +import ( + "context" + "encoding/json" + "fmt" + + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + + modulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/orbis/module" + "github.com/sourcenetwork/sourcehub/app/metrics" + acpkeeper "github.com/sourcenetwork/sourcehub/x/acp/keeper" + "github.com/sourcenetwork/sourcehub/x/orbis/keeper" + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +var ( + _ module.AppModuleBasic = (*AppModule)(nil) + _ module.AppModuleSimulation = (*AppModule)(nil) + _ module.HasGenesis = (*AppModule)(nil) + _ module.HasInvariants = (*AppModule)(nil) + _ module.HasConsensusVersion = (*AppModule)(nil) + + _ appmodule.AppModule = (*AppModule)(nil) +) + +type AppModuleBasic struct { + cdc codec.BinaryCodec +} + +func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { + return AppModuleBasic{cdc: cdc} +} + +func (AppModuleBasic) Name() string { + return types.ModuleName +} + +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} + +func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { + types.RegisterInterfaces(reg) +} + +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesis()) +} + +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { + var genState types.GenesisState + if err := cdc.UnmarshalJSON(bz, &genState); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + return genState.Validate() +} + +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } +} + +type AppModule struct { + AppModuleBasic + + keeper *keeper.Keeper +} + +func NewAppModule(cdc codec.Codec, keeper *keeper.Keeper) AppModule { + return AppModule{ + AppModuleBasic: NewAppModuleBasic(cdc), + keeper: keeper, + } +} + +func (am AppModule) RegisterServices(cfg module.Configurator) { + descriptor := metrics.WrapMsgServerServiceDescriptor(types.ModuleName, types.Msg_serviceDesc) + cfg.MsgServer().RegisterService(&descriptor, am.keeper) + + descriptor = metrics.WrapQueryServiceDescriptor(types.ModuleName, types.Query_serviceDesc) + cfg.QueryServer().RegisterService(&descriptor, am.keeper) +} + +func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} + +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { + var genState types.GenesisState + cdc.MustUnmarshalJSON(gs, &genState) + InitGenesis(ctx, am.keeper, genState) +} + +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + genState := ExportGenesis(ctx, am.keeper) + return cdc.MustMarshalJSON(genState) +} + +func (AppModule) ConsensusVersion() uint64 { return 1 } + +func (am AppModule) IsOnePerModuleType() {} + +func (am AppModule) IsAppModule() {} + +func init() { + appmodule.Register( + &modulev1.Module{}, + appmodule.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + StoreService store.KVStoreService + Cdc codec.Codec + Config *modulev1.Module + Logger log.Logger + + AccountKeeper types.AccountKeeper + AcpKeeper *acpkeeper.Keeper +} + +type ModuleOutputs struct { + depinject.Out + + OrbisKeeper *keeper.Keeper + Module appmodule.AppModule +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + if in.Config.Authority != "" { + authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) + } + k := keeper.NewKeeper( + in.Cdc, + in.StoreService, + in.Logger, + authority.String(), + in.AccountKeeper, + in.AcpKeeper, + ) + m := NewAppModule(in.Cdc, &k) + + return ModuleOutputs{OrbisKeeper: &k, Module: m} +} diff --git a/x/orbis/module/simulation.go b/x/orbis/module/simulation.go new file mode 100644 index 00000000..21766e6a --- /dev/null +++ b/x/orbis/module/simulation.go @@ -0,0 +1,29 @@ +package orbis + +import ( + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +var _ module.AppModuleSimulation = AppModule{} + +// GenerateGenesisState creates a randomized GenState of the module. +func (AppModule) GenerateGenesisState(*module.SimulationState) {} + +// RegisterStoreDecoder registers a decoder for orbis module's types. +func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} + +// ProposalContents doesn't return any content functions for governance proposals. +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { + return nil +} + +// WeightedOperations returns all the operations from the module with their respective weights. +func (am AppModule) WeightedOperations(module.SimulationState) []simtypes.WeightedOperation { + return nil +} + +// ProposalMsgs returns msgs used for governance proposals for simulations. +func (am AppModule) ProposalMsgs(module.SimulationState) []simtypes.WeightedProposalMsg { + return nil +} diff --git a/x/orbis/types/codec.go b/x/orbis/types/codec.go new file mode 100644 index 00000000..d5b1171a --- /dev/null +++ b/x/orbis/types/codec.go @@ -0,0 +1,20 @@ +package types + +import ( + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +// RegisterInterfaces registers module messages. +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateRing{}, + &MsgUpdateRingByAcp{}, + &MsgFinalizeRingReshareByThresholdSignature{}, + &MsgStoreDocument{}, + &MsgStoreKeyDerivation{}, + &MsgUpdateParams{}, + ) + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/orbis/types/document.pb.go b/x/orbis/types/document.pb.go new file mode 100644 index 00000000..cf5fa6db --- /dev/null +++ b/x/orbis/types/document.pb.go @@ -0,0 +1,903 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/orbis/document.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Document stores an encrypted Orbis document and its policy binding metadata. +type Document struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` + Tier string `protobuf:"bytes,10,opt,name=tier,proto3" json:"tier,omitempty"` + HasTier bool `protobuf:"varint,11,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` + Timestamp uint64 `protobuf:"varint,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + HasTimestamp bool `protobuf:"varint,13,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` +} + +func (m *Document) Reset() { *m = Document{} } +func (m *Document) String() string { return proto.CompactTextString(m) } +func (*Document) ProtoMessage() {} +func (*Document) Descriptor() ([]byte, []int) { + return fileDescriptor_c92869153d87ab26, []int{0} +} +func (m *Document) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Document.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 *Document) XXX_Merge(src proto.Message) { + xxx_messageInfo_Document.Merge(m, src) +} +func (m *Document) XXX_Size() int { + return m.Size() +} +func (m *Document) XXX_DiscardUnknown() { + xxx_messageInfo_Document.DiscardUnknown(m) +} + +var xxx_messageInfo_Document proto.InternalMessageInfo + +func (m *Document) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Document) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *Document) GetCreatorDid() string { + if m != nil { + return m.CreatorDid + } + return "" +} + +func (m *Document) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *Document) GetDocument() string { + if m != nil { + return m.Document + } + return "" +} + +func (m *Document) GetProof() string { + if m != nil { + return m.Proof + } + return "" +} + +func (m *Document) GetPolicyId() string { + if m != nil { + return m.PolicyId + } + return "" +} + +func (m *Document) GetResource() string { + if m != nil { + return m.Resource + } + return "" +} + +func (m *Document) GetPermission() string { + if m != nil { + return m.Permission + } + return "" +} + +func (m *Document) GetTier() string { + if m != nil { + return m.Tier + } + return "" +} + +func (m *Document) GetHasTier() bool { + if m != nil { + return m.HasTier + } + return false +} + +func (m *Document) GetTimestamp() uint64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +func (m *Document) GetHasTimestamp() bool { + if m != nil { + return m.HasTimestamp + } + return false +} + +func init() { + proto.RegisterType((*Document)(nil), "sourcehub.orbis.Document") +} + +func init() { proto.RegisterFile("sourcehub/orbis/document.proto", fileDescriptor_c92869153d87ab26) } + +var fileDescriptor_c92869153d87ab26 = []byte{ + // 340 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0x4f, 0x4e, 0xe3, 0x30, + 0x14, 0xc6, 0xeb, 0x4c, 0xff, 0x24, 0xaf, 0xed, 0x8c, 0x64, 0x8d, 0x34, 0x1e, 0xa8, 0x4c, 0x05, + 0x9b, 0xae, 0x1a, 0x24, 0x6e, 0x80, 0xba, 0x81, 0x65, 0xc5, 0x8a, 0x4d, 0x95, 0xc6, 0xa6, 0x7d, + 0x82, 0xc4, 0x96, 0xed, 0x0a, 0x7a, 0x0b, 0x8e, 0xc5, 0xb2, 0x4b, 0x96, 0xa8, 0x3d, 0x00, 0x57, + 0x40, 0xb1, 0xd3, 0x66, 0x97, 0xf7, 0xfb, 0xf9, 0x7b, 0x7a, 0xd1, 0x07, 0xdc, 0xaa, 0x8d, 0xc9, + 0xe5, 0x7a, 0xb3, 0x4c, 0x95, 0x59, 0xa2, 0x4d, 0x85, 0xca, 0x37, 0x85, 0x2c, 0xdd, 0x54, 0x1b, + 0xe5, 0x14, 0xfd, 0x73, 0xf2, 0x53, 0xef, 0x2f, 0xbf, 0x23, 0x88, 0x67, 0xf5, 0x1b, 0xfa, 0x1b, + 0x22, 0x14, 0x8c, 0x8c, 0xc9, 0x24, 0x99, 0x47, 0x28, 0xe8, 0x08, 0x92, 0x32, 0x2b, 0xa4, 0xd5, + 0x59, 0x2e, 0x59, 0xe4, 0x71, 0x03, 0xe8, 0x05, 0xf4, 0x73, 0x23, 0x33, 0xa7, 0xcc, 0x42, 0xa0, + 0x60, 0xbf, 0xbc, 0x87, 0x1a, 0xcd, 0x50, 0xd0, 0x7f, 0xd0, 0x33, 0x58, 0xae, 0x16, 0x28, 0x58, + 0xdb, 0xcb, 0x6e, 0x35, 0xde, 0x09, 0x7a, 0x06, 0xf1, 0xf1, 0x2e, 0xd6, 0xf1, 0xe6, 0x34, 0xd3, + 0xbf, 0xd0, 0xd1, 0x46, 0xa9, 0x27, 0xd6, 0xf5, 0x22, 0x0c, 0xf4, 0x1c, 0x12, 0xad, 0x5e, 0x30, + 0xdf, 0x56, 0xcb, 0x7a, 0x21, 0x12, 0x40, 0x58, 0x67, 0x64, 0xf8, 0x31, 0x16, 0x07, 0x77, 0x9c, + 0x29, 0x07, 0xd0, 0xd2, 0x14, 0x68, 0x2d, 0xaa, 0x92, 0x25, 0xe1, 0xc6, 0x86, 0x50, 0x0a, 0x6d, + 0x87, 0xd2, 0x30, 0xf0, 0xc6, 0x7f, 0xd3, 0xff, 0x10, 0xaf, 0x33, 0xbb, 0xf0, 0xbc, 0x3f, 0x26, + 0x93, 0x78, 0xde, 0x5b, 0x67, 0xf6, 0xa1, 0x52, 0x23, 0x48, 0x1c, 0x16, 0xd2, 0xba, 0xac, 0xd0, + 0x6c, 0x30, 0x26, 0x93, 0xf6, 0xbc, 0x01, 0xf4, 0x0a, 0x86, 0x21, 0x78, 0x7c, 0x31, 0xf4, 0xe9, + 0x81, 0x4f, 0xd7, 0xec, 0xf6, 0xfe, 0x63, 0xcf, 0xc9, 0x6e, 0xcf, 0xc9, 0xd7, 0x9e, 0x93, 0xf7, + 0x03, 0x6f, 0xed, 0x0e, 0xbc, 0xf5, 0x79, 0xe0, 0xad, 0xc7, 0xeb, 0x15, 0xba, 0xaa, 0x99, 0x5c, + 0x15, 0x69, 0x38, 0xbf, 0x94, 0xee, 0x55, 0x99, 0xe7, 0xb4, 0x69, 0xf5, 0xad, 0xee, 0xd5, 0x6d, + 0xb5, 0xb4, 0xcb, 0xae, 0x6f, 0xf5, 0xe6, 0x27, 0x00, 0x00, 0xff, 0xff, 0x26, 0x7d, 0xce, 0xfa, + 0xf7, 0x01, 0x00, 0x00, +} + +func (m *Document) 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 *Document) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HasTimestamp { + i-- + if m.HasTimestamp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 + } + if m.Timestamp != 0 { + i = encodeVarintDocument(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x60 + } + if m.HasTier { + i-- + if m.HasTier { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if len(m.Tier) > 0 { + i -= len(m.Tier) + copy(dAtA[i:], m.Tier) + i = encodeVarintDocument(dAtA, i, uint64(len(m.Tier))) + i-- + dAtA[i] = 0x52 + } + if len(m.Permission) > 0 { + i -= len(m.Permission) + copy(dAtA[i:], m.Permission) + i = encodeVarintDocument(dAtA, i, uint64(len(m.Permission))) + i-- + dAtA[i] = 0x4a + } + if len(m.Resource) > 0 { + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintDocument(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x42 + } + if len(m.PolicyId) > 0 { + i -= len(m.PolicyId) + copy(dAtA[i:], m.PolicyId) + i = encodeVarintDocument(dAtA, i, uint64(len(m.PolicyId))) + i-- + dAtA[i] = 0x3a + } + if len(m.Proof) > 0 { + i -= len(m.Proof) + copy(dAtA[i:], m.Proof) + i = encodeVarintDocument(dAtA, i, uint64(len(m.Proof))) + i-- + dAtA[i] = 0x32 + } + if len(m.Document) > 0 { + i -= len(m.Document) + copy(dAtA[i:], m.Document) + i = encodeVarintDocument(dAtA, i, uint64(len(m.Document))) + i-- + dAtA[i] = 0x2a + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintDocument(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CreatorDid) > 0 { + i -= len(m.CreatorDid) + copy(dAtA[i:], m.CreatorDid) + i = encodeVarintDocument(dAtA, i, uint64(len(m.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintDocument(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintDocument(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintDocument(dAtA []byte, offset int, v uint64) int { + offset -= sovDocument(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Document) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + l = len(m.CreatorDid) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + l = len(m.Document) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + l = len(m.Proof) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + l = len(m.PolicyId) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + l = len(m.Resource) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + l = len(m.Permission) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + l = len(m.Tier) + if l > 0 { + n += 1 + l + sovDocument(uint64(l)) + } + if m.HasTier { + n += 2 + } + if m.Timestamp != 0 { + n += 1 + sovDocument(uint64(m.Timestamp)) + } + if m.HasTimestamp { + n += 2 + } + return n +} + +func sovDocument(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDocument(x uint64) (n int) { + return sovDocument(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Document) 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 ErrIntOverflowDocument + } + 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: Document: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Document: 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 ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + 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 Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatorDid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Document = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proof = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PolicyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Permission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + 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 ErrInvalidLengthDocument + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDocument + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasTier", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasTier = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasTimestamp", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDocument + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasTimestamp = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipDocument(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDocument + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDocument(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, ErrIntOverflowDocument + } + 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, ErrIntOverflowDocument + } + 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, ErrIntOverflowDocument + } + 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, ErrInvalidLengthDocument + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDocument + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDocument + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDocument = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDocument = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDocument = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/orbis/types/errors.go b/x/orbis/types/errors.go new file mode 100644 index 00000000..86293cb2 --- /dev/null +++ b/x/orbis/types/errors.go @@ -0,0 +1,27 @@ +package types + +import sdkerrors "cosmossdk.io/errors" + +// x/orbis module sentinel errors. +var ( + ErrInvalidSigner = sdkerrors.Register(ModuleName, 1200, "expected gov account as only signer for proposal message") + ErrInvalidNamespaceId = sdkerrors.Register(ModuleName, 1201, "invalid namespace id") + ErrInvalidRingId = sdkerrors.Register(ModuleName, 1202, "invalid ring id") + ErrInvalidDocumentId = sdkerrors.Register(ModuleName, 1203, "invalid document id") + ErrInvalidKeyDerivationId = sdkerrors.Register(ModuleName, 1204, "invalid key derivation id") + ErrInvalidRing = sdkerrors.Register(ModuleName, 1205, "invalid ring") + ErrRingAlreadyExists = sdkerrors.Register(ModuleName, 1206, "ring already exists") + ErrRingNotFound = sdkerrors.Register(ModuleName, 1207, "ring not found") + ErrDocumentAlreadyExists = sdkerrors.Register(ModuleName, 1208, "document already exists") + ErrDocumentNotFound = sdkerrors.Register(ModuleName, 1209, "document not found") + ErrKeyDerivationAlreadyExists = sdkerrors.Register(ModuleName, 1210, "key derivation already exists") + ErrKeyDerivationNotFound = sdkerrors.Register(ModuleName, 1211, "key derivation not found") + ErrInvalidDocument = sdkerrors.Register(ModuleName, 1212, "invalid document") + ErrInvalidKeyDerivation = sdkerrors.Register(ModuleName, 1213, "invalid key derivation") + ErrInvalidRingUpdater = sdkerrors.Register(ModuleName, 1214, "expected authorized account as a ring updater") + ErrRingMissingPolicyId = sdkerrors.Register(ModuleName, 1215, "ring missing policy_id") + ErrReshareInProgress = sdkerrors.Register(ModuleName, 1216, "reshare already in progress: finalize before changing reshare parameters") + ErrInvalidThresholdSignature = sdkerrors.Register(ModuleName, 1217, "invalid threshold signature") + ErrInvalidSignatureScheme = sdkerrors.Register(ModuleName, 1218, "invalid signature scheme") + ErrInvalidSignaturePayload = sdkerrors.Register(ModuleName, 1219, "invalid signature payload") +) diff --git a/x/orbis/types/events.pb.go b/x/orbis/types/events.pb.go new file mode 100644 index 00000000..755c5ded --- /dev/null +++ b/x/orbis/types/events.pb.go @@ -0,0 +1,1450 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/orbis/events.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventRingCreated is emitted when a ring is created. +type EventRingCreated struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (m *EventRingCreated) Reset() { *m = EventRingCreated{} } +func (m *EventRingCreated) String() string { return proto.CompactTextString(m) } +func (*EventRingCreated) ProtoMessage() {} +func (*EventRingCreated) Descriptor() ([]byte, []int) { + return fileDescriptor_cb68216cf0ba47d2, []int{0} +} +func (m *EventRingCreated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRingCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRingCreated.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 *EventRingCreated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRingCreated.Merge(m, src) +} +func (m *EventRingCreated) XXX_Size() int { + return m.Size() +} +func (m *EventRingCreated) XXX_DiscardUnknown() { + xxx_messageInfo_EventRingCreated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRingCreated proto.InternalMessageInfo + +func (m *EventRingCreated) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *EventRingCreated) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *EventRingCreated) GetCreatorDid() string { + if m != nil { + return m.CreatorDid + } + return "" +} + +func (m *EventRingCreated) GetArtifact() string { + if m != nil { + return m.Artifact + } + return "" +} + +// EventRingUpdated is emitted when a ring is updated in place. +type EventRingUpdated struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + UpdaterDid string `protobuf:"bytes,3,opt,name=updater_did,json=updaterDid,proto3" json:"updater_did,omitempty"` + Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (m *EventRingUpdated) Reset() { *m = EventRingUpdated{} } +func (m *EventRingUpdated) String() string { return proto.CompactTextString(m) } +func (*EventRingUpdated) ProtoMessage() {} +func (*EventRingUpdated) Descriptor() ([]byte, []int) { + return fileDescriptor_cb68216cf0ba47d2, []int{1} +} +func (m *EventRingUpdated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRingUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRingUpdated.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 *EventRingUpdated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRingUpdated.Merge(m, src) +} +func (m *EventRingUpdated) XXX_Size() int { + return m.Size() +} +func (m *EventRingUpdated) XXX_DiscardUnknown() { + xxx_messageInfo_EventRingUpdated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRingUpdated proto.InternalMessageInfo + +func (m *EventRingUpdated) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *EventRingUpdated) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *EventRingUpdated) GetUpdaterDid() string { + if m != nil { + return m.UpdaterDid + } + return "" +} + +func (m *EventRingUpdated) GetArtifact() string { + if m != nil { + return m.Artifact + } + return "" +} + +// EventDocumentStored is emitted when an encrypted document is stored. +type EventDocumentStored struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (m *EventDocumentStored) Reset() { *m = EventDocumentStored{} } +func (m *EventDocumentStored) String() string { return proto.CompactTextString(m) } +func (*EventDocumentStored) ProtoMessage() {} +func (*EventDocumentStored) Descriptor() ([]byte, []int) { + return fileDescriptor_cb68216cf0ba47d2, []int{2} +} +func (m *EventDocumentStored) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDocumentStored) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDocumentStored.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 *EventDocumentStored) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDocumentStored.Merge(m, src) +} +func (m *EventDocumentStored) XXX_Size() int { + return m.Size() +} +func (m *EventDocumentStored) XXX_DiscardUnknown() { + xxx_messageInfo_EventDocumentStored.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDocumentStored proto.InternalMessageInfo + +func (m *EventDocumentStored) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *EventDocumentStored) GetDocumentId() string { + if m != nil { + return m.DocumentId + } + return "" +} + +func (m *EventDocumentStored) GetCreatorDid() string { + if m != nil { + return m.CreatorDid + } + return "" +} + +func (m *EventDocumentStored) GetArtifact() string { + if m != nil { + return m.Artifact + } + return "" +} + +// EventKeyDerivationStored is emitted when a key derivation is stored. +type EventKeyDerivationStored struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + KeyDerivationId string `protobuf:"bytes,2,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (m *EventKeyDerivationStored) Reset() { *m = EventKeyDerivationStored{} } +func (m *EventKeyDerivationStored) String() string { return proto.CompactTextString(m) } +func (*EventKeyDerivationStored) ProtoMessage() {} +func (*EventKeyDerivationStored) Descriptor() ([]byte, []int) { + return fileDescriptor_cb68216cf0ba47d2, []int{3} +} +func (m *EventKeyDerivationStored) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventKeyDerivationStored) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventKeyDerivationStored.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 *EventKeyDerivationStored) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventKeyDerivationStored.Merge(m, src) +} +func (m *EventKeyDerivationStored) XXX_Size() int { + return m.Size() +} +func (m *EventKeyDerivationStored) XXX_DiscardUnknown() { + xxx_messageInfo_EventKeyDerivationStored.DiscardUnknown(m) +} + +var xxx_messageInfo_EventKeyDerivationStored proto.InternalMessageInfo + +func (m *EventKeyDerivationStored) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *EventKeyDerivationStored) GetKeyDerivationId() string { + if m != nil { + return m.KeyDerivationId + } + return "" +} + +func (m *EventKeyDerivationStored) GetCreatorDid() string { + if m != nil { + return m.CreatorDid + } + return "" +} + +func (m *EventKeyDerivationStored) GetArtifact() string { + if m != nil { + return m.Artifact + } + return "" +} + +func init() { + proto.RegisterType((*EventRingCreated)(nil), "sourcehub.orbis.EventRingCreated") + proto.RegisterType((*EventRingUpdated)(nil), "sourcehub.orbis.EventRingUpdated") + proto.RegisterType((*EventDocumentStored)(nil), "sourcehub.orbis.EventDocumentStored") + proto.RegisterType((*EventKeyDerivationStored)(nil), "sourcehub.orbis.EventKeyDerivationStored") +} + +func init() { proto.RegisterFile("sourcehub/orbis/events.proto", fileDescriptor_cb68216cf0ba47d2) } + +var fileDescriptor_cb68216cf0ba47d2 = []byte{ + // 317 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xb1, 0x4e, 0xeb, 0x30, + 0x14, 0x86, 0xeb, 0x7b, 0x51, 0xa1, 0xa7, 0x43, 0x21, 0x0c, 0x44, 0xa8, 0x72, 0x11, 0x13, 0x62, + 0x68, 0x90, 0x78, 0x03, 0x28, 0x03, 0xb0, 0x15, 0xb1, 0xb0, 0x54, 0xae, 0x7d, 0x28, 0x56, 0x15, + 0x3b, 0x72, 0x9c, 0x42, 0x5e, 0x80, 0x19, 0x1e, 0x81, 0xb7, 0x61, 0xec, 0xc8, 0x88, 0x92, 0x17, + 0x41, 0x31, 0x21, 0xa1, 0x53, 0x91, 0x32, 0x9e, 0xff, 0x3f, 0x3e, 0xfa, 0x64, 0x7d, 0xd0, 0x8f, + 0x75, 0x62, 0x38, 0x3e, 0x24, 0xd3, 0x40, 0x9b, 0xa9, 0x8c, 0x03, 0x5c, 0xa0, 0xb2, 0xf1, 0x30, + 0x32, 0xda, 0x6a, 0xaf, 0x57, 0xb5, 0x43, 0xd7, 0x1e, 0x3e, 0x13, 0xd8, 0xbe, 0x28, 0x36, 0xc6, + 0x52, 0xcd, 0xce, 0x0d, 0x32, 0x8b, 0xc2, 0xeb, 0x43, 0x47, 0xb1, 0x10, 0xe3, 0x88, 0x71, 0xf4, + 0xc9, 0x01, 0x39, 0xea, 0x8c, 0xeb, 0xc0, 0xdb, 0x83, 0x4d, 0x23, 0xd5, 0x6c, 0x22, 0x85, 0xff, + 0xcf, 0x75, 0xed, 0x62, 0xbc, 0x14, 0xde, 0x00, 0xba, 0xbc, 0xb8, 0xa0, 0xcd, 0x44, 0x48, 0xe1, + 0xff, 0x77, 0x25, 0x94, 0xd1, 0x48, 0x0a, 0x6f, 0x1f, 0xb6, 0x98, 0xb1, 0xf2, 0x9e, 0x71, 0xeb, + 0x6f, 0xb8, 0xb6, 0x9a, 0x57, 0x41, 0x6e, 0x23, 0xd1, 0x10, 0x24, 0x71, 0x17, 0x56, 0x40, 0xca, + 0x68, 0x1d, 0xc8, 0x2b, 0x81, 0x5d, 0x07, 0x32, 0xd2, 0x3c, 0x09, 0x51, 0xd9, 0x1b, 0xab, 0xcd, + 0x5a, 0x96, 0x01, 0x74, 0x45, 0xb9, 0x5f, 0xf3, 0xc0, 0x4f, 0xd4, 0xf4, 0x73, 0xde, 0x08, 0xf8, + 0x8e, 0xe9, 0x1a, 0xd3, 0x11, 0x1a, 0xb9, 0x60, 0x56, 0x6a, 0xf5, 0x27, 0xb0, 0x63, 0xd8, 0x99, + 0x63, 0x3a, 0x11, 0xd5, 0xab, 0x1a, 0xaf, 0x37, 0xff, 0x7d, 0xad, 0x21, 0xe3, 0xd9, 0xd5, 0x7b, + 0x46, 0xc9, 0x32, 0xa3, 0xe4, 0x33, 0xa3, 0xe4, 0x25, 0xa7, 0xad, 0x65, 0x4e, 0x5b, 0x1f, 0x39, + 0x6d, 0xdd, 0x9d, 0xcc, 0xa4, 0x2d, 0x8c, 0xe3, 0x3a, 0x0c, 0xbe, 0xfd, 0x53, 0x68, 0x1f, 0xb5, + 0x99, 0x07, 0xb5, 0xab, 0x4f, 0xa5, 0xad, 0x36, 0x8d, 0x30, 0x9e, 0xb6, 0x9d, 0xad, 0xa7, 0x5f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x3e, 0x79, 0x60, 0xcd, 0x02, 0x00, 0x00, +} + +func (m *EventRingCreated) 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 *EventRingCreated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRingCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Artifact) > 0 { + i -= len(m.Artifact) + copy(dAtA[i:], m.Artifact) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Artifact))) + i-- + dAtA[i] = 0x22 + } + if len(m.CreatorDid) > 0 { + i -= len(m.CreatorDid) + copy(dAtA[i:], m.CreatorDid) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventRingUpdated) 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 *EventRingUpdated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRingUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Artifact) > 0 { + i -= len(m.Artifact) + copy(dAtA[i:], m.Artifact) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Artifact))) + i-- + dAtA[i] = 0x22 + } + if len(m.UpdaterDid) > 0 { + i -= len(m.UpdaterDid) + copy(dAtA[i:], m.UpdaterDid) + i = encodeVarintEvents(dAtA, i, uint64(len(m.UpdaterDid))) + i-- + dAtA[i] = 0x1a + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventDocumentStored) 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 *EventDocumentStored) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDocumentStored) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Artifact) > 0 { + i -= len(m.Artifact) + copy(dAtA[i:], m.Artifact) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Artifact))) + i-- + dAtA[i] = 0x22 + } + if len(m.CreatorDid) > 0 { + i -= len(m.CreatorDid) + copy(dAtA[i:], m.CreatorDid) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(m.DocumentId) > 0 { + i -= len(m.DocumentId) + copy(dAtA[i:], m.DocumentId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DocumentId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventKeyDerivationStored) 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 *EventKeyDerivationStored) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventKeyDerivationStored) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Artifact) > 0 { + i -= len(m.Artifact) + copy(dAtA[i:], m.Artifact) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Artifact))) + i-- + dAtA[i] = 0x22 + } + if len(m.CreatorDid) > 0 { + i -= len(m.CreatorDid) + copy(dAtA[i:], m.CreatorDid) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(m.KeyDerivationId) > 0 { + i -= len(m.KeyDerivationId) + copy(dAtA[i:], m.KeyDerivationId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.KeyDerivationId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventRingCreated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.CreatorDid) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Artifact) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventRingUpdated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.UpdaterDid) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Artifact) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventDocumentStored) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.DocumentId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.CreatorDid) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Artifact) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventKeyDerivationStored) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.KeyDerivationId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.CreatorDid) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Artifact) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventRingCreated) 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 ErrIntOverflowEvents + } + 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: EventRingCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRingCreated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatorDid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Artifact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventRingUpdated) 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 ErrIntOverflowEvents + } + 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: EventRingUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRingUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdaterDid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UpdaterDid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Artifact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventDocumentStored) 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 ErrIntOverflowEvents + } + 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: EventDocumentStored: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDocumentStored: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DocumentId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatorDid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Artifact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventKeyDerivationStored) 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 ErrIntOverflowEvents + } + 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: EventKeyDerivationStored: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventKeyDerivationStored: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyDerivationId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyDerivationId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatorDid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Artifact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(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, ErrIntOverflowEvents + } + 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, ErrIntOverflowEvents + } + 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, ErrIntOverflowEvents + } + 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, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/orbis/types/expected_keepers.go b/x/orbis/types/expected_keepers.go new file mode 100644 index 00000000..2cb461d8 --- /dev/null +++ b/x/orbis/types/expected_keepers.go @@ -0,0 +1,13 @@ +package types + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type AccountKeeper interface { + GetAccount(context.Context, sdk.AccAddress) sdk.AccountI + GetModuleAccount(context.Context, string) sdk.ModuleAccountI + SetAccount(context.Context, sdk.AccountI) +} diff --git a/x/orbis/types/genesis.go b/x/orbis/types/genesis.go new file mode 100644 index 00000000..3944f423 --- /dev/null +++ b/x/orbis/types/genesis.go @@ -0,0 +1,16 @@ +package types + +// DefaultGenesis returns the default genesis state. +func DefaultGenesis() *GenesisState { + return &GenesisState{ + Params: DefaultParams(), + Rings: []Ring{}, + Documents: []Document{}, + KeyDerivations: []KeyDerivation{}, + } +} + +// Validate performs basic genesis state validation. +func (gs GenesisState) Validate() error { + return gs.Params.Validate() +} diff --git a/x/orbis/types/genesis.pb.go b/x/orbis/types/genesis.pb.go new file mode 100644 index 00000000..53871e43 --- /dev/null +++ b/x/orbis/types/genesis.pb.go @@ -0,0 +1,516 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/orbis/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 orbis module's genesis state. +type GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + Rings []Ring `protobuf:"bytes,2,rep,name=rings,proto3" json:"rings"` + Documents []Document `protobuf:"bytes,3,rep,name=documents,proto3" json:"documents"` + KeyDerivations []KeyDerivation `protobuf:"bytes,4,rep,name=key_derivations,json=keyDerivations,proto3" json:"key_derivations"` +} + +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_b5064b91df2d6b77, []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 (m *GenesisState) GetRings() []Ring { + if m != nil { + return m.Rings + } + return nil +} + +func (m *GenesisState) GetDocuments() []Document { + if m != nil { + return m.Documents + } + return nil +} + +func (m *GenesisState) GetKeyDerivations() []KeyDerivation { + if m != nil { + return m.KeyDerivations + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "sourcehub.orbis.GenesisState") +} + +func init() { proto.RegisterFile("sourcehub/orbis/genesis.proto", fileDescriptor_b5064b91df2d6b77) } + +var fileDescriptor_b5064b91df2d6b77 = []byte{ + // 327 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0xce, 0x2f, 0x2d, + 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0xcf, 0x2f, 0x4a, 0xca, 0x2c, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, + 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0x4b, 0xeb, 0x81, 0xa5, + 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x8d, 0x94, 0x48, 0x7a, 0x7e, + 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0xe5, 0xd0, 0x0d, 0x4e, 0xc9, 0x4f, 0x2e, 0xcd, + 0x4d, 0xcd, 0x2b, 0x81, 0xca, 0xab, 0xa0, 0xcb, 0x67, 0xa7, 0x56, 0xc6, 0xa7, 0xa4, 0x16, 0x65, + 0x96, 0x25, 0x96, 0x64, 0xe6, 0xe7, 0x41, 0x55, 0xc9, 0xa0, 0xab, 0x2a, 0x48, 0x2c, 0x4a, 0xcc, + 0x85, 0xba, 0x4e, 0x4a, 0x0a, 0x5d, 0xb6, 0x28, 0x33, 0x2f, 0x1d, 0x22, 0xa7, 0x34, 0x8b, 0x89, + 0x8b, 0xc7, 0x1d, 0xe2, 0x97, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0x21, 0x2b, 0x2e, 0x36, 0x88, 0x66, + 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x71, 0x3d, 0x34, 0xbf, 0xe9, 0x05, 0x80, 0xa5, 0x9d, + 0x38, 0x4f, 0xdc, 0x93, 0x67, 0x58, 0xf1, 0x7c, 0x83, 0x16, 0x63, 0x10, 0x54, 0x87, 0x90, 0x19, + 0x17, 0x2b, 0xc8, 0xe8, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x51, 0x0c, 0xad, 0x41, + 0x99, 0x79, 0xe9, 0xc8, 0x1a, 0x21, 0xca, 0x85, 0x9c, 0xb8, 0x38, 0x61, 0xde, 0x2e, 0x96, 0x60, + 0x06, 0xeb, 0x95, 0xc4, 0xd0, 0xeb, 0x02, 0x55, 0x81, 0xac, 0x1f, 0xa1, 0x4d, 0x28, 0x88, 0x8b, + 0x1f, 0x35, 0x68, 0x8a, 0x25, 0x58, 0xc0, 0x26, 0xc9, 0x61, 0x98, 0xe4, 0x9d, 0x5a, 0xe9, 0x02, + 0x57, 0x86, 0x6c, 0x1c, 0x5f, 0x36, 0xb2, 0x4c, 0xb1, 0x93, 0xd7, 0x89, 0x47, 0x72, 0x8c, 0x17, + 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, + 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa4, 0x67, 0x96, 0x80, 0x0c, 0x4c, 0xce, 0xcf, 0xd5, 0x87, + 0x18, 0x9f, 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0xad, 0x8f, 0x08, 0xeb, 0x0a, 0x68, 0x68, 0x97, + 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xc3, 0xdb, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x9c, + 0x24, 0x57, 0x8a, 0x4a, 0x02, 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 + if len(m.KeyDerivations) > 0 { + for iNdEx := len(m.KeyDerivations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.KeyDerivations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Documents) > 0 { + for iNdEx := len(m.Documents) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Documents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Rings) > 0 { + for iNdEx := len(m.Rings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + 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)) + if len(m.Rings) > 0 { + for _, e := range m.Rings { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Documents) > 0 { + for _, e := range m.Documents { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.KeyDerivations) > 0 { + for _, e := range m.KeyDerivations { + l = e.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 + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rings", 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 + } + m.Rings = append(m.Rings, Ring{}) + if err := m.Rings[len(m.Rings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Documents", 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 + } + m.Documents = append(m.Documents, Document{}) + if err := m.Documents[len(m.Documents)-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 KeyDerivations", 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 + } + m.KeyDerivations = append(m.KeyDerivations, KeyDerivation{}) + if err := m.KeyDerivations[len(m.KeyDerivations)-1].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/orbis/types/key_derivation.pb.go b/x/orbis/types/key_derivation.pb.go new file mode 100644 index 00000000..c93f7f55 --- /dev/null +++ b/x/orbis/types/key_derivation.pb.go @@ -0,0 +1,682 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/orbis/key_derivation.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// KeyDerivation stores a signing derivation and its policy binding metadata. +type KeyDerivation struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Derivation string `protobuf:"bytes,5,opt,name=derivation,proto3" json:"derivation,omitempty"` + PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` +} + +func (m *KeyDerivation) Reset() { *m = KeyDerivation{} } +func (m *KeyDerivation) String() string { return proto.CompactTextString(m) } +func (*KeyDerivation) ProtoMessage() {} +func (*KeyDerivation) Descriptor() ([]byte, []int) { + return fileDescriptor_4ec7b253df726179, []int{0} +} +func (m *KeyDerivation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KeyDerivation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KeyDerivation.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 *KeyDerivation) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyDerivation.Merge(m, src) +} +func (m *KeyDerivation) XXX_Size() int { + return m.Size() +} +func (m *KeyDerivation) XXX_DiscardUnknown() { + xxx_messageInfo_KeyDerivation.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyDerivation proto.InternalMessageInfo + +func (m *KeyDerivation) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *KeyDerivation) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *KeyDerivation) GetCreatorDid() string { + if m != nil { + return m.CreatorDid + } + return "" +} + +func (m *KeyDerivation) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *KeyDerivation) GetDerivation() string { + if m != nil { + return m.Derivation + } + return "" +} + +func (m *KeyDerivation) GetPolicyId() string { + if m != nil { + return m.PolicyId + } + return "" +} + +func (m *KeyDerivation) GetResource() string { + if m != nil { + return m.Resource + } + return "" +} + +func (m *KeyDerivation) GetPermission() string { + if m != nil { + return m.Permission + } + return "" +} + +func init() { + proto.RegisterType((*KeyDerivation)(nil), "sourcehub.orbis.KeyDerivation") +} + +func init() { + proto.RegisterFile("sourcehub/orbis/key_derivation.proto", fileDescriptor_4ec7b253df726179) +} + +var fileDescriptor_4ec7b253df726179 = []byte{ + // 276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0x3f, 0x4e, 0xc3, 0x30, + 0x14, 0xc6, 0xe3, 0x00, 0x69, 0x62, 0x04, 0x48, 0x5e, 0xb0, 0x00, 0x19, 0x84, 0x18, 0x98, 0x1a, + 0x24, 0x6e, 0x80, 0xba, 0x14, 0x36, 0x46, 0x96, 0x28, 0x89, 0x9f, 0xca, 0x53, 0x49, 0x1c, 0xd9, + 0x2e, 0x90, 0x5b, 0x70, 0x2c, 0xc6, 0x8e, 0x8c, 0x28, 0xb9, 0x00, 0x47, 0x40, 0xb1, 0xdb, 0x66, + 0x7c, 0xbf, 0xef, 0x8f, 0xec, 0x8f, 0xde, 0x18, 0xb5, 0xd2, 0x25, 0xbc, 0xae, 0x8a, 0x54, 0xe9, + 0x02, 0x4d, 0xba, 0x84, 0x36, 0x93, 0xa0, 0xf1, 0x3d, 0xb7, 0xa8, 0xea, 0x69, 0xa3, 0x95, 0x55, + 0xec, 0x64, 0xe7, 0x9a, 0x3a, 0xd7, 0xf5, 0x1f, 0xa1, 0x47, 0x4f, 0xd0, 0xce, 0x76, 0x46, 0x76, + 0x4c, 0x43, 0x94, 0x9c, 0x5c, 0x91, 0xdb, 0xe4, 0x39, 0x44, 0xc9, 0x2e, 0x68, 0x52, 0xe7, 0x15, + 0x98, 0x26, 0x2f, 0x81, 0x87, 0x0e, 0x8f, 0x80, 0x5d, 0xd2, 0xc3, 0x52, 0x43, 0x6e, 0x95, 0xce, + 0x24, 0x4a, 0xbe, 0xe7, 0x74, 0xba, 0x41, 0x33, 0x94, 0xec, 0x94, 0x4e, 0x34, 0xd6, 0x8b, 0x0c, + 0x25, 0xdf, 0x77, 0x62, 0x34, 0x9c, 0x73, 0xc9, 0x04, 0xa5, 0xe3, 0xf3, 0xf8, 0x81, 0x0f, 0x8e, + 0x84, 0x9d, 0xd3, 0xa4, 0x51, 0x6f, 0x58, 0xb6, 0x43, 0x34, 0x72, 0x72, 0xec, 0xc1, 0x5c, 0xb2, + 0x33, 0x1a, 0x6b, 0xf0, 0x7f, 0xe1, 0x13, 0xaf, 0x6d, 0xef, 0xa1, 0xb8, 0x01, 0x5d, 0xa1, 0x31, + 0x43, 0x71, 0xec, 0x8b, 0x47, 0xf2, 0xf0, 0xf8, 0xdd, 0x09, 0xb2, 0xee, 0x04, 0xf9, 0xed, 0x04, + 0xf9, 0xea, 0x45, 0xb0, 0xee, 0x45, 0xf0, 0xd3, 0x8b, 0xe0, 0xe5, 0x6e, 0x81, 0x76, 0x98, 0xa6, + 0x54, 0x55, 0xea, 0xcb, 0x6a, 0xb0, 0x1f, 0x4a, 0x2f, 0xd3, 0x71, 0xdc, 0xcf, 0xcd, 0xbc, 0xb6, + 0x6d, 0xc0, 0x14, 0x91, 0x9b, 0xf5, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x99, 0x04, 0xf4, + 0x7e, 0x01, 0x00, 0x00, +} + +func (m *KeyDerivation) 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 *KeyDerivation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KeyDerivation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Permission) > 0 { + i -= len(m.Permission) + copy(dAtA[i:], m.Permission) + i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.Permission))) + i-- + dAtA[i] = 0x42 + } + if len(m.Resource) > 0 { + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x3a + } + if len(m.PolicyId) > 0 { + i -= len(m.PolicyId) + copy(dAtA[i:], m.PolicyId) + i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.PolicyId))) + i-- + dAtA[i] = 0x32 + } + if len(m.Derivation) > 0 { + i -= len(m.Derivation) + copy(dAtA[i:], m.Derivation) + i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.Derivation))) + i-- + dAtA[i] = 0x2a + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CreatorDid) > 0 { + i -= len(m.CreatorDid) + copy(dAtA[i:], m.CreatorDid) + i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintKeyDerivation(dAtA []byte, offset int, v uint64) int { + offset -= sovKeyDerivation(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *KeyDerivation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovKeyDerivation(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovKeyDerivation(uint64(l)) + } + l = len(m.CreatorDid) + if l > 0 { + n += 1 + l + sovKeyDerivation(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovKeyDerivation(uint64(l)) + } + l = len(m.Derivation) + if l > 0 { + n += 1 + l + sovKeyDerivation(uint64(l)) + } + l = len(m.PolicyId) + if l > 0 { + n += 1 + l + sovKeyDerivation(uint64(l)) + } + l = len(m.Resource) + if l > 0 { + n += 1 + l + sovKeyDerivation(uint64(l)) + } + l = len(m.Permission) + if l > 0 { + n += 1 + l + sovKeyDerivation(uint64(l)) + } + return n +} + +func sovKeyDerivation(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozKeyDerivation(x uint64) (n int) { + return sovKeyDerivation(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *KeyDerivation) 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 ErrIntOverflowKeyDerivation + } + 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: KeyDerivation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyDerivation: 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 ErrIntOverflowKeyDerivation + } + 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 ErrInvalidLengthKeyDerivation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeyDerivation + } + 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 Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeyDerivation + } + 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 ErrInvalidLengthKeyDerivation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeyDerivation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeyDerivation + } + 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 ErrInvalidLengthKeyDerivation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeyDerivation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatorDid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeyDerivation + } + 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 ErrInvalidLengthKeyDerivation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeyDerivation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Derivation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeyDerivation + } + 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 ErrInvalidLengthKeyDerivation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeyDerivation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Derivation = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeyDerivation + } + 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 ErrInvalidLengthKeyDerivation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeyDerivation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PolicyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeyDerivation + } + 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 ErrInvalidLengthKeyDerivation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeyDerivation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeyDerivation + } + 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 ErrInvalidLengthKeyDerivation + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeyDerivation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Permission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeyDerivation(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeyDerivation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipKeyDerivation(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, ErrIntOverflowKeyDerivation + } + 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, ErrIntOverflowKeyDerivation + } + 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, ErrIntOverflowKeyDerivation + } + 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, ErrInvalidLengthKeyDerivation + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupKeyDerivation + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthKeyDerivation + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthKeyDerivation = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowKeyDerivation = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupKeyDerivation = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/orbis/types/keys.go b/x/orbis/types/keys.go new file mode 100644 index 00000000..3a7c5c34 --- /dev/null +++ b/x/orbis/types/keys.go @@ -0,0 +1,172 @@ +package types + +import ( + "crypto/sha256" + "encoding/binary" + "encoding/hex" + "strings" +) + +const ( + // ModuleName defines the module name. + ModuleName = "orbis" + + // StoreKey defines the primary module store key. + StoreKey = ModuleName + + RingKeyPrefix = "ring/" + DocumentKeyPrefix = "document/" + KeyDerivationKeyPrefix = "key_derivation/" + + NamespaceIDPrefix = "orbis/" + + NamespaceResource = "namespace" + UpdateRingPermission = "update_ring" +) + +var ( + ParamsKey = []byte("p_orbis") +) + +func KeyPrefix(p string) []byte { + return []byte(p) +} + +// GetNamespaceID adds the Orbis namespace prefix unless it is already present. +func GetNamespaceID(namespace string) string { + if strings.HasPrefix(namespace, NamespaceIDPrefix) { + return namespace + } + return NamespaceIDPrefix + namespace +} + +func DocumentKey(namespaceID, documentID string) []byte { + key := appendLengthPrefixedKeyPart(nil, namespaceID) + return appendLengthPrefixedKeyPart(key, documentID) +} + +func KeyDerivationKey(namespaceID, keyDerivationID string) []byte { + key := appendLengthPrefixedKeyPart(nil, namespaceID) + return appendLengthPrefixedKeyPart(key, keyDerivationID) +} + +func NamespacePrefix(namespaceID string) []byte { + return appendLengthPrefixedKeyPart(nil, namespaceID) +} + +// GenerateRingID returns the stable ID for a ring's creation parameters. +func GenerateRingID(namespaceID, ringPK string, peerIDs []string, threshold uint32, pssInterval *uint64, policyID string) string { + h := newIDHasher("orbis/ring/v1") + h.writeString(namespaceID) + h.writeString(ringPK) + h.writeStringSlice(peerIDs) + h.writeUint32(threshold) + h.writeOptionalUint64(pssInterval) + h.writeString(policyID) + return h.sum() +} + +// GenerateDocumentID returns the stable ID for an encrypted document. +func GenerateDocumentID( + namespaceID string, + ringID string, + document string, + proof string, + policyID string, + resource string, + permission string, + tier *string, + timestamp *uint64, +) string { + h := newIDHasher("orbis/document/v1") + h.writeString(namespaceID) + h.writeString(ringID) + h.writeString(document) + h.writeString(proof) + h.writeString(policyID) + h.writeString(resource) + h.writeString(permission) + h.writeOptionalString(tier) + h.writeOptionalUint64(timestamp) + return h.sum() +} + +// GenerateKeyDerivationID returns the stable ID for a key derivation. +func GenerateKeyDerivationID(namespaceID, ringID, derivation, policyID, resource, permission string) string { + h := newIDHasher("orbis/key_derivation/v1") + h.writeString(namespaceID) + h.writeString(ringID) + h.writeString(derivation) + h.writeString(policyID) + h.writeString(resource) + h.writeString(permission) + return h.sum() +} + +type idHasher struct { + bytes []byte +} + +func newIDHasher(domain string) *idHasher { + h := &idHasher{} + h.writeString(domain) + return h +} + +func (h *idHasher) writeString(value string) { + h.writeBytes([]byte(value)) +} + +func (h *idHasher) writeOptionalString(value *string) { + if value == nil { + h.bytes = append(h.bytes, 0) + return + } + h.bytes = append(h.bytes, 1) + h.writeString(*value) +} + +func (h *idHasher) writeStringSlice(values []string) { + var buf [4]byte + binary.BigEndian.PutUint32(buf[:], uint32(len(values))) + h.bytes = append(h.bytes, buf[:]...) + for _, value := range values { + h.writeString(value) + } +} + +func (h *idHasher) writeUint32(value uint32) { + var buf [4]byte + binary.BigEndian.PutUint32(buf[:], value) + h.bytes = append(h.bytes, buf[:]...) +} + +func (h *idHasher) writeOptionalUint64(value *uint64) { + if value == nil { + h.bytes = append(h.bytes, 0) + return + } + h.bytes = append(h.bytes, 1) + var buf [8]byte + binary.BigEndian.PutUint64(buf[:], *value) + h.bytes = append(h.bytes, buf[:]...) +} + +func (h *idHasher) writeBytes(value []byte) { + var buf [4]byte + binary.BigEndian.PutUint32(buf[:], uint32(len(value))) + h.bytes = append(h.bytes, buf[:]...) + h.bytes = append(h.bytes, value...) +} + +func (h *idHasher) sum() string { + hash := sha256.Sum256(h.bytes) + return hex.EncodeToString(hash[:]) +} + +func appendLengthPrefixedKeyPart(dst []byte, value string) []byte { + var buf [4]byte + binary.BigEndian.PutUint32(buf[:], uint32(len(value))) + dst = append(dst, buf[:]...) + return append(dst, value...) +} diff --git a/x/orbis/types/keys_test.go b/x/orbis/types/keys_test.go new file mode 100644 index 00000000..4a967c82 --- /dev/null +++ b/x/orbis/types/keys_test.go @@ -0,0 +1,21 @@ +package types + +import ( + "bytes" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestNamespaceScopedKeysAreLengthPrefixed(t *testing.T) { + documentKey := DocumentKey("orbis/a", "b/c") + collidingDocumentKey := DocumentKey("orbis/a/b", "c") + require.False(t, bytes.Equal(documentKey, collidingDocumentKey)) + + keyDerivationKey := KeyDerivationKey("orbis/a", "b/c") + collidingKeyDerivationKey := KeyDerivationKey("orbis/a/b", "c") + require.False(t, bytes.Equal(keyDerivationKey, collidingKeyDerivationKey)) + + require.True(t, bytes.HasPrefix(documentKey, NamespacePrefix("orbis/a"))) + require.True(t, bytes.HasPrefix(keyDerivationKey, NamespacePrefix("orbis/a"))) +} diff --git a/x/orbis/types/message_create_ring.go b/x/orbis/types/message_create_ring.go new file mode 100644 index 00000000..64bcc963 --- /dev/null +++ b/x/orbis/types/message_create_ring.go @@ -0,0 +1,38 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgCreateRing{} + +func NewMsgCreateRing(creator, namespace, ringPK string, peerIDs []string, threshold uint32) *MsgCreateRing { + return &MsgCreateRing{ + Creator: creator, + Namespace: namespace, + RingPk: ringPK, + PeerIds: peerIDs, + Threshold: threshold, + } +} + +func (msg *MsgCreateRing) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + if msg.Namespace == "" { + return ErrInvalidNamespaceId + } + if msg.RingPk == "" { + return errorsmod.Wrap(ErrInvalidRing, "missing ring_pk") + } + if len(msg.PeerIds) == 0 { + return errorsmod.Wrap(ErrInvalidRing, "missing peer_ids") + } + if msg.Threshold == 0 || int(msg.Threshold) > len(msg.PeerIds) { + return errorsmod.Wrapf(ErrInvalidRing, "threshold %d is invalid for committee size %d", msg.Threshold, len(msg.PeerIds)) + } + return nil +} diff --git a/x/bulletin/types/message_update_post_by_threshold_signature.go b/x/orbis/types/message_finalize_ring_reshare_by_threshold_signature.go similarity index 59% rename from x/bulletin/types/message_update_post_by_threshold_signature.go rename to x/orbis/types/message_finalize_ring_reshare_by_threshold_signature.go index 2d63c01e..11dc6131 100644 --- a/x/bulletin/types/message_update_post_by_threshold_signature.go +++ b/x/orbis/types/message_finalize_ring_reshare_by_threshold_signature.go @@ -6,35 +6,30 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -var _ sdk.Msg = &MsgUpdateRingPostByThresholdSignature{} +var _ sdk.Msg = &MsgFinalizeRingReshareByThresholdSignature{} -func NewMsgUpdateRingPostByThresholdSignature( +func NewMsgFinalizeRingReshareByThresholdSignature( creator string, - namespace string, - postId string, + ringID string, artifact string, signatureScheme string, signature []byte, -) *MsgUpdateRingPostByThresholdSignature { - return &MsgUpdateRingPostByThresholdSignature{ +) *MsgFinalizeRingReshareByThresholdSignature { + return &MsgFinalizeRingReshareByThresholdSignature{ Creator: creator, - Namespace: namespace, - PostId: postId, + RingId: ringID, Artifact: artifact, SignatureScheme: signatureScheme, Signature: signature, } } -func (msg *MsgUpdateRingPostByThresholdSignature) ValidateBasic() error { +func (msg *MsgFinalizeRingReshareByThresholdSignature) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if msg.Namespace == "" { - return ErrInvalidNamespaceId - } - if msg.PostId == "" { - return ErrInvalidPostId + if msg.RingId == "" { + return ErrInvalidRingId } if msg.SignatureScheme == "" { return ErrInvalidSignatureScheme diff --git a/x/orbis/types/message_store_document.go b/x/orbis/types/message_store_document.go new file mode 100644 index 00000000..c7043539 --- /dev/null +++ b/x/orbis/types/message_store_document.go @@ -0,0 +1,44 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgStoreDocument{} + +func NewMsgStoreDocument(creator, namespace, ringID, document, proof, policyID, resource, permission string) *MsgStoreDocument { + return &MsgStoreDocument{ + Creator: creator, + Namespace: namespace, + RingId: ringID, + Document: document, + Proof: proof, + PolicyId: policyID, + Resource: resource, + Permission: permission, + } +} + +func (msg *MsgStoreDocument) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + if msg.Namespace == "" { + return ErrInvalidNamespaceId + } + if msg.RingId == "" { + return ErrInvalidRingId + } + if msg.Document == "" { + return errorsmod.Wrap(ErrInvalidDocument, "missing document") + } + if msg.Proof == "" { + return errorsmod.Wrap(ErrInvalidDocument, "missing proof") + } + if msg.PolicyId == "" || msg.Resource == "" || msg.Permission == "" { + return errorsmod.Wrap(ErrInvalidDocument, "missing policy binding") + } + return nil +} diff --git a/x/orbis/types/message_store_key_derivation.go b/x/orbis/types/message_store_key_derivation.go new file mode 100644 index 00000000..9edbc90a --- /dev/null +++ b/x/orbis/types/message_store_key_derivation.go @@ -0,0 +1,40 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgStoreKeyDerivation{} + +func NewMsgStoreKeyDerivation(creator, namespace, ringID, derivation, policyID, resource, permission string) *MsgStoreKeyDerivation { + return &MsgStoreKeyDerivation{ + Creator: creator, + Namespace: namespace, + RingId: ringID, + Derivation: derivation, + PolicyId: policyID, + Resource: resource, + Permission: permission, + } +} + +func (msg *MsgStoreKeyDerivation) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + if msg.Namespace == "" { + return ErrInvalidNamespaceId + } + if msg.RingId == "" { + return ErrInvalidRingId + } + if msg.Derivation == "" { + return errorsmod.Wrap(ErrInvalidKeyDerivation, "missing derivation") + } + if msg.PolicyId == "" || msg.Resource == "" || msg.Permission == "" { + return errorsmod.Wrap(ErrInvalidKeyDerivation, "missing policy binding") + } + return nil +} diff --git a/x/orbis/types/message_update_ring_by_acp.go b/x/orbis/types/message_update_ring_by_acp.go new file mode 100644 index 00000000..1befc79b --- /dev/null +++ b/x/orbis/types/message_update_ring_by_acp.go @@ -0,0 +1,26 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgUpdateRingByAcp{} + +func NewMsgUpdateRingByAcp(creator, ringID string) *MsgUpdateRingByAcp { + return &MsgUpdateRingByAcp{ + Creator: creator, + RingId: ringID, + } +} + +func (msg *MsgUpdateRingByAcp) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + if msg.RingId == "" { + return ErrInvalidRingId + } + return nil +} diff --git a/x/orbis/types/msg_update_params.go b/x/orbis/types/msg_update_params.go new file mode 100644 index 00000000..e36d023d --- /dev/null +++ b/x/orbis/types/msg_update_params.go @@ -0,0 +1,21 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var _ sdk.Msg = &MsgUpdateParams{} + +// ValidateBasic does a sanity check on the provided data. +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return errorsmod.Wrap(err, "invalid authority address") + } + + if err := m.Params.Validate(); err != nil { + return err + } + + return nil +} diff --git a/x/orbis/types/params.go b/x/orbis/types/params.go new file mode 100644 index 00000000..8f100107 --- /dev/null +++ b/x/orbis/types/params.go @@ -0,0 +1,30 @@ +package types + +import paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + +var _ paramtypes.ParamSet = (*Params)(nil) + +// ParamKeyTable returns the module param key table. +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// NewParams creates a new Params instance. +func NewParams() Params { + return Params{} +} + +// DefaultParams returns a default set of parameters. +func DefaultParams() Params { + return NewParams() +} + +// ParamSetPairs returns the params.ParamSet. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{} +} + +// Validate validates the set of params. +func (p Params) Validate() error { + return nil +} diff --git a/x/orbis/types/params.pb.go b/x/orbis/types/params.pb.go new file mode 100644 index 00000000..83cfae7c --- /dev/null +++ b/x/orbis/types/params.pb.go @@ -0,0 +1,288 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/orbis/params.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 + +// Params defines the parameters for the module. +type Params struct { +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_6fba60825128be3c, []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 init() { + proto.RegisterType((*Params)(nil), "sourcehub.orbis.Params") +} + +func init() { proto.RegisterFile("sourcehub/orbis/params.proto", fileDescriptor_6fba60825128be3c) } + +var fileDescriptor_6fba60825128be3c = []byte{ + // 172 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xce, 0x2f, 0x2d, + 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0xcf, 0x2f, 0x4a, 0xca, 0x2c, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, + 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0xcb, 0xea, 0x81, 0x65, 0xa5, + 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x8d, 0x94, 0x48, 0x7a, 0x7e, 0x7a, + 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x44, 0x95, 0xb4, 0xb9, 0xd8, 0x02, 0xc0, 0x26, 0x59, 0x29, + 0xbe, 0x58, 0x20, 0xcf, 0xd8, 0xf5, 0x7c, 0x83, 0x96, 0x04, 0xc2, 0xaa, 0x0a, 0xa8, 0x65, 0x10, + 0x25, 0x4e, 0x5e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, + 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x90, 0x9e, + 0x59, 0x02, 0xb2, 0x3d, 0x39, 0x3f, 0x57, 0x1f, 0xa2, 0x3d, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, + 0x5b, 0x1f, 0xd3, 0xb0, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xfd, 0xc6, 0x80, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xa7, 0x13, 0x5e, 0xee, 0xd9, 0x00, 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 + } + 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 + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(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 + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(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 ErrIntOverflowParams + } + 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 { + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/orbis/types/query.pb.go b/x/orbis/types/query.pb.go new file mode 100644 index 00000000..cd2e3dc2 --- /dev/null +++ b/x/orbis/types/query.pb.go @@ -0,0 +1,3360 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/orbis/query.proto + +package types + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "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" + _ "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 + +// QueryParamsRequest is request type for the Query/Params RPC method. +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_349198995878e248, []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 + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []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 Params{} +} + +type QueryRingRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryRingRequest) Reset() { *m = QueryRingRequest{} } +func (m *QueryRingRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRingRequest) ProtoMessage() {} +func (*QueryRingRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{2} +} +func (m *QueryRingRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRingRequest.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 *QueryRingRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRingRequest.Merge(m, src) +} +func (m *QueryRingRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryRingRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRingRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRingRequest proto.InternalMessageInfo + +func (m *QueryRingRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type QueryRingResponse struct { + Ring *Ring `protobuf:"bytes,1,opt,name=ring,proto3" json:"ring,omitempty"` +} + +func (m *QueryRingResponse) Reset() { *m = QueryRingResponse{} } +func (m *QueryRingResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRingResponse) ProtoMessage() {} +func (*QueryRingResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{3} +} +func (m *QueryRingResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRingResponse.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 *QueryRingResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRingResponse.Merge(m, src) +} +func (m *QueryRingResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryRingResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRingResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRingResponse proto.InternalMessageInfo + +func (m *QueryRingResponse) GetRing() *Ring { + if m != nil { + return m.Ring + } + return nil +} + +type QueryRingsRequest struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryRingsRequest) Reset() { *m = QueryRingsRequest{} } +func (m *QueryRingsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRingsRequest) ProtoMessage() {} +func (*QueryRingsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{4} +} +func (m *QueryRingsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRingsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRingsRequest.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 *QueryRingsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRingsRequest.Merge(m, src) +} +func (m *QueryRingsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryRingsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRingsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRingsRequest proto.InternalMessageInfo + +func (m *QueryRingsRequest) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *QueryRingsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryRingsResponse struct { + Rings []Ring `protobuf:"bytes,1,rep,name=rings,proto3" json:"rings"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryRingsResponse) Reset() { *m = QueryRingsResponse{} } +func (m *QueryRingsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRingsResponse) ProtoMessage() {} +func (*QueryRingsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{5} +} +func (m *QueryRingsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRingsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRingsResponse.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 *QueryRingsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRingsResponse.Merge(m, src) +} +func (m *QueryRingsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryRingsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRingsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRingsResponse proto.InternalMessageInfo + +func (m *QueryRingsResponse) GetRings() []Ring { + if m != nil { + return m.Rings + } + return nil +} + +func (m *QueryRingsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryDocumentRequest struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryDocumentRequest) Reset() { *m = QueryDocumentRequest{} } +func (m *QueryDocumentRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDocumentRequest) ProtoMessage() {} +func (*QueryDocumentRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{6} +} +func (m *QueryDocumentRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDocumentRequest.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 *QueryDocumentRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDocumentRequest.Merge(m, src) +} +func (m *QueryDocumentRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDocumentRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDocumentRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDocumentRequest proto.InternalMessageInfo + +func (m *QueryDocumentRequest) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *QueryDocumentRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type QueryDocumentResponse struct { + Document *Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` +} + +func (m *QueryDocumentResponse) Reset() { *m = QueryDocumentResponse{} } +func (m *QueryDocumentResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDocumentResponse) ProtoMessage() {} +func (*QueryDocumentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{7} +} +func (m *QueryDocumentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDocumentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDocumentResponse.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 *QueryDocumentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDocumentResponse.Merge(m, src) +} +func (m *QueryDocumentResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDocumentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDocumentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDocumentResponse proto.InternalMessageInfo + +func (m *QueryDocumentResponse) GetDocument() *Document { + if m != nil { + return m.Document + } + return nil +} + +type QueryDocumentsRequest struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDocumentsRequest) Reset() { *m = QueryDocumentsRequest{} } +func (m *QueryDocumentsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDocumentsRequest) ProtoMessage() {} +func (*QueryDocumentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{8} +} +func (m *QueryDocumentsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDocumentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDocumentsRequest.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 *QueryDocumentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDocumentsRequest.Merge(m, src) +} +func (m *QueryDocumentsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDocumentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDocumentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDocumentsRequest proto.InternalMessageInfo + +func (m *QueryDocumentsRequest) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *QueryDocumentsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryDocumentsResponse struct { + Documents []Document `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDocumentsResponse) Reset() { *m = QueryDocumentsResponse{} } +func (m *QueryDocumentsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDocumentsResponse) ProtoMessage() {} +func (*QueryDocumentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{9} +} +func (m *QueryDocumentsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDocumentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDocumentsResponse.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 *QueryDocumentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDocumentsResponse.Merge(m, src) +} +func (m *QueryDocumentsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDocumentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDocumentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDocumentsResponse proto.InternalMessageInfo + +func (m *QueryDocumentsResponse) GetDocuments() []Document { + if m != nil { + return m.Documents + } + return nil +} + +func (m *QueryDocumentsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryKeyDerivationRequest struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryKeyDerivationRequest) Reset() { *m = QueryKeyDerivationRequest{} } +func (m *QueryKeyDerivationRequest) String() string { return proto.CompactTextString(m) } +func (*QueryKeyDerivationRequest) ProtoMessage() {} +func (*QueryKeyDerivationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{10} +} +func (m *QueryKeyDerivationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryKeyDerivationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryKeyDerivationRequest.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 *QueryKeyDerivationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryKeyDerivationRequest.Merge(m, src) +} +func (m *QueryKeyDerivationRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryKeyDerivationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryKeyDerivationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryKeyDerivationRequest proto.InternalMessageInfo + +func (m *QueryKeyDerivationRequest) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *QueryKeyDerivationRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type QueryKeyDerivationResponse struct { + KeyDerivation *KeyDerivation `protobuf:"bytes,1,opt,name=key_derivation,json=keyDerivation,proto3" json:"key_derivation,omitempty"` +} + +func (m *QueryKeyDerivationResponse) Reset() { *m = QueryKeyDerivationResponse{} } +func (m *QueryKeyDerivationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryKeyDerivationResponse) ProtoMessage() {} +func (*QueryKeyDerivationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{11} +} +func (m *QueryKeyDerivationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryKeyDerivationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryKeyDerivationResponse.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 *QueryKeyDerivationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryKeyDerivationResponse.Merge(m, src) +} +func (m *QueryKeyDerivationResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryKeyDerivationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryKeyDerivationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryKeyDerivationResponse proto.InternalMessageInfo + +func (m *QueryKeyDerivationResponse) GetKeyDerivation() *KeyDerivation { + if m != nil { + return m.KeyDerivation + } + return nil +} + +type QueryKeyDerivationsRequest struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryKeyDerivationsRequest) Reset() { *m = QueryKeyDerivationsRequest{} } +func (m *QueryKeyDerivationsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryKeyDerivationsRequest) ProtoMessage() {} +func (*QueryKeyDerivationsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{12} +} +func (m *QueryKeyDerivationsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryKeyDerivationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryKeyDerivationsRequest.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 *QueryKeyDerivationsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryKeyDerivationsRequest.Merge(m, src) +} +func (m *QueryKeyDerivationsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryKeyDerivationsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryKeyDerivationsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryKeyDerivationsRequest proto.InternalMessageInfo + +func (m *QueryKeyDerivationsRequest) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *QueryKeyDerivationsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryKeyDerivationsResponse struct { + KeyDerivations []KeyDerivation `protobuf:"bytes,1,rep,name=key_derivations,json=keyDerivations,proto3" json:"key_derivations"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryKeyDerivationsResponse) Reset() { *m = QueryKeyDerivationsResponse{} } +func (m *QueryKeyDerivationsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryKeyDerivationsResponse) ProtoMessage() {} +func (*QueryKeyDerivationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{13} +} +func (m *QueryKeyDerivationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryKeyDerivationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryKeyDerivationsResponse.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 *QueryKeyDerivationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryKeyDerivationsResponse.Merge(m, src) +} +func (m *QueryKeyDerivationsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryKeyDerivationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryKeyDerivationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryKeyDerivationsResponse proto.InternalMessageInfo + +func (m *QueryKeyDerivationsResponse) GetKeyDerivations() []KeyDerivation { + if m != nil { + return m.KeyDerivations + } + return nil +} + +func (m *QueryKeyDerivationsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "sourcehub.orbis.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "sourcehub.orbis.QueryParamsResponse") + proto.RegisterType((*QueryRingRequest)(nil), "sourcehub.orbis.QueryRingRequest") + proto.RegisterType((*QueryRingResponse)(nil), "sourcehub.orbis.QueryRingResponse") + proto.RegisterType((*QueryRingsRequest)(nil), "sourcehub.orbis.QueryRingsRequest") + proto.RegisterType((*QueryRingsResponse)(nil), "sourcehub.orbis.QueryRingsResponse") + proto.RegisterType((*QueryDocumentRequest)(nil), "sourcehub.orbis.QueryDocumentRequest") + proto.RegisterType((*QueryDocumentResponse)(nil), "sourcehub.orbis.QueryDocumentResponse") + proto.RegisterType((*QueryDocumentsRequest)(nil), "sourcehub.orbis.QueryDocumentsRequest") + proto.RegisterType((*QueryDocumentsResponse)(nil), "sourcehub.orbis.QueryDocumentsResponse") + proto.RegisterType((*QueryKeyDerivationRequest)(nil), "sourcehub.orbis.QueryKeyDerivationRequest") + proto.RegisterType((*QueryKeyDerivationResponse)(nil), "sourcehub.orbis.QueryKeyDerivationResponse") + proto.RegisterType((*QueryKeyDerivationsRequest)(nil), "sourcehub.orbis.QueryKeyDerivationsRequest") + proto.RegisterType((*QueryKeyDerivationsResponse)(nil), "sourcehub.orbis.QueryKeyDerivationsResponse") +} + +func init() { proto.RegisterFile("sourcehub/orbis/query.proto", fileDescriptor_349198995878e248) } + +var fileDescriptor_349198995878e248 = []byte{ + // 814 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcf, 0x4f, 0xd4, 0x5a, + 0x14, 0xc7, 0xe7, 0xce, 0x03, 0xc2, 0x9c, 0x17, 0x86, 0xc7, 0x7d, 0xf0, 0x1e, 0x14, 0x52, 0xb5, + 0xfc, 0x74, 0xc4, 0x16, 0x50, 0x89, 0x21, 0x84, 0x90, 0x09, 0x62, 0xd4, 0xc4, 0xc0, 0x2c, 0xdd, + 0x98, 0xce, 0xcc, 0x4d, 0x6d, 0x70, 0x7a, 0x87, 0xb6, 0x83, 0x4e, 0x08, 0x9a, 0xf0, 0x17, 0x98, + 0x18, 0x37, 0xba, 0x36, 0x71, 0x63, 0x64, 0xed, 0x5f, 0xc0, 0x92, 0xc4, 0x8d, 0x2b, 0x63, 0xc0, + 0xc4, 0x7f, 0xc3, 0xf4, 0xde, 0xdb, 0xd2, 0x76, 0xca, 0x74, 0x34, 0x84, 0x0d, 0x29, 0xbd, 0xe7, + 0x9c, 0xef, 0xe7, 0x9c, 0x6f, 0xef, 0x01, 0x18, 0x75, 0x68, 0xc3, 0xae, 0x90, 0x27, 0x8d, 0xb2, + 0x46, 0xed, 0xb2, 0xe9, 0x68, 0xdb, 0x0d, 0x62, 0x37, 0xd5, 0xba, 0x4d, 0x5d, 0x8a, 0xfb, 0x83, + 0x43, 0x95, 0x1d, 0x4a, 0x03, 0x7a, 0xcd, 0xb4, 0xa8, 0xc6, 0x7e, 0xf2, 0x18, 0xa9, 0x50, 0xa1, + 0x4e, 0x8d, 0x3a, 0x5a, 0x59, 0x77, 0x08, 0x4f, 0xd6, 0x76, 0xe6, 0xcb, 0xc4, 0xd5, 0xe7, 0xb5, + 0xba, 0x6e, 0x98, 0x96, 0xee, 0x9a, 0xd4, 0x12, 0xb1, 0x83, 0x06, 0x35, 0x28, 0x7b, 0xd4, 0xbc, + 0x27, 0xf1, 0x76, 0xcc, 0xa0, 0xd4, 0x78, 0x4a, 0x34, 0xbd, 0x6e, 0x6a, 0xba, 0x65, 0x51, 0x97, + 0xa5, 0x38, 0xe2, 0x54, 0x8e, 0x03, 0x56, 0x69, 0xa5, 0x51, 0x23, 0x96, 0x2b, 0xce, 0x27, 0xe2, + 0xe7, 0x5b, 0xa4, 0xf9, 0xb8, 0x4a, 0x6c, 0x73, 0x27, 0xac, 0x3c, 0x16, 0x8f, 0xaa, 0xeb, 0xb6, + 0x5e, 0xf3, 0x35, 0xa4, 0xf8, 0xa9, 0x6d, 0x5a, 0x06, 0x3f, 0x53, 0x06, 0x01, 0x6f, 0x7a, 0x5d, + 0x6d, 0xb0, 0x84, 0x12, 0xd9, 0x6e, 0x10, 0xc7, 0x55, 0x36, 0xe1, 0xdf, 0xc8, 0x5b, 0xa7, 0x4e, + 0x2d, 0x87, 0xe0, 0x25, 0xe8, 0xe1, 0x85, 0x87, 0xd1, 0x65, 0x34, 0xf3, 0xf7, 0xc2, 0xff, 0x6a, + 0x6c, 0x82, 0x2a, 0x4f, 0x28, 0xe6, 0x0e, 0xbf, 0x5d, 0xca, 0x7c, 0xf8, 0x79, 0x50, 0x40, 0x25, + 0x91, 0xa1, 0x28, 0xf0, 0x0f, 0x2b, 0x59, 0x32, 0x2d, 0x43, 0xc8, 0xe0, 0x3c, 0x64, 0xcd, 0x2a, + 0xab, 0x95, 0x2b, 0x65, 0xcd, 0xaa, 0xb2, 0x02, 0x03, 0xa1, 0x18, 0x21, 0x7a, 0x15, 0xba, 0x3c, + 0x5e, 0x21, 0x39, 0xd4, 0x22, 0xc9, 0x82, 0x59, 0x88, 0xd2, 0x0c, 0xe5, 0xfb, 0xbd, 0xe0, 0x31, + 0xc8, 0x59, 0x7a, 0x8d, 0x38, 0x75, 0xbd, 0x42, 0x84, 0xd6, 0xe9, 0x0b, 0xbc, 0x0e, 0x70, 0xea, + 0xe3, 0x70, 0x96, 0x69, 0x4c, 0xa9, 0xdc, 0x74, 0xd5, 0x33, 0x5d, 0xe5, 0x5f, 0x8c, 0x30, 0x5d, + 0xdd, 0xd0, 0x0d, 0x22, 0x2a, 0x97, 0x42, 0x99, 0xca, 0x1b, 0x24, 0x06, 0x29, 0xb4, 0x05, 0xfc, + 0x22, 0x74, 0x7b, 0x64, 0xde, 0xc0, 0xfe, 0x3a, 0x93, 0x3e, 0x3c, 0x2e, 0x1e, 0x8e, 0xef, 0x26, + 0x60, 0x4d, 0xa7, 0x62, 0x71, 0xd1, 0x08, 0xd7, 0x1a, 0x0c, 0x32, 0xac, 0x35, 0xf1, 0x59, 0x75, + 0x36, 0x15, 0x6e, 0x4c, 0x36, 0x30, 0xe6, 0x21, 0x0c, 0xc5, 0xaa, 0x88, 0xfe, 0x6e, 0x41, 0xaf, + 0xff, 0xc1, 0x0a, 0x83, 0x46, 0x5a, 0x5a, 0x0c, 0x92, 0x82, 0x50, 0x65, 0x2f, 0x56, 0xef, 0x82, + 0xcd, 0x7a, 0x8f, 0xe0, 0xbf, 0xb8, 0xbe, 0x68, 0xa8, 0x08, 0x39, 0x9f, 0xd2, 0x37, 0xed, 0xec, + 0x8e, 0xc2, 0xc6, 0x9d, 0xa6, 0x9d, 0x9f, 0x79, 0xf7, 0x60, 0x84, 0x61, 0x3e, 0x20, 0xcd, 0xb5, + 0xe0, 0xca, 0xff, 0x99, 0x83, 0x15, 0x90, 0x92, 0x4a, 0x89, 0xae, 0xef, 0x40, 0x3e, 0xba, 0x57, + 0x84, 0x99, 0x72, 0x4b, 0xeb, 0xd1, 0xfc, 0xbe, 0xad, 0xf0, 0xaf, 0xca, 0x3e, 0x4a, 0x52, 0xb9, + 0x60, 0x73, 0x3f, 0x23, 0x18, 0x4d, 0x84, 0x10, 0xbd, 0x96, 0xa0, 0x3f, 0xda, 0xab, 0xef, 0x73, + 0x4a, 0xb3, 0x61, 0xb3, 0xf3, 0x91, 0xbe, 0xcf, 0xcf, 0xf1, 0x85, 0x8f, 0xbd, 0xd0, 0xcd, 0xe0, + 0xf1, 0x3e, 0x82, 0x1e, 0xbe, 0x4d, 0xf1, 0x78, 0x0b, 0x58, 0xeb, 0xca, 0x96, 0x26, 0xda, 0x07, + 0x71, 0x2d, 0xe5, 0xfa, 0xfe, 0x97, 0x1f, 0xaf, 0xb3, 0xd3, 0x78, 0x52, 0xe3, 0xd1, 0x16, 0x71, + 0x9f, 0x51, 0x7b, 0x4b, 0x4b, 0xfe, 0xfb, 0x81, 0x5f, 0x42, 0x97, 0xb7, 0xa0, 0xf0, 0x95, 0xe4, + 0xe2, 0xa1, 0x5d, 0x2e, 0x29, 0xed, 0x42, 0x84, 0xfa, 0x1c, 0x53, 0x2f, 0xe0, 0x99, 0x14, 0x75, + 0x6f, 0x07, 0x6a, 0xbb, 0x66, 0x75, 0x0f, 0xbf, 0x80, 0x6e, 0xb6, 0x50, 0x71, 0x9b, 0xf2, 0xc1, + 0x08, 0xc6, 0xdb, 0xc6, 0x08, 0x86, 0x59, 0xc6, 0x30, 0x85, 0x27, 0x3a, 0x60, 0x70, 0xf0, 0x3b, + 0x04, 0xbd, 0xfe, 0x6d, 0xc7, 0x93, 0xc9, 0xf5, 0x63, 0xab, 0x55, 0x9a, 0x4a, 0x0b, 0x13, 0x24, + 0xab, 0x8c, 0x64, 0x09, 0xdf, 0x4e, 0x21, 0xf1, 0x17, 0x8b, 0xb6, 0x1b, 0x5c, 0x96, 0x3d, 0x3e, + 0x9d, 0xb7, 0x08, 0x72, 0xc1, 0x0a, 0xc3, 0x29, 0xba, 0xc1, 0x98, 0xa6, 0x53, 0xe3, 0x04, 0xe0, + 0x32, 0x03, 0x5c, 0xc4, 0x37, 0x3b, 0x04, 0x74, 0xc2, 0x84, 0xf8, 0x00, 0x41, 0x5f, 0xe4, 0x02, + 0xe1, 0x42, 0xb2, 0x70, 0xd2, 0x76, 0x93, 0xae, 0x75, 0x14, 0x2b, 0x40, 0xd7, 0x19, 0xe8, 0x2a, + 0x5e, 0x49, 0x01, 0x8d, 0xde, 0xfb, 0xd6, 0x79, 0x7e, 0x42, 0x90, 0x8f, 0x6e, 0x0d, 0xdc, 0x09, + 0x47, 0x30, 0xd9, 0xd9, 0xce, 0x82, 0x05, 0x75, 0x91, 0x51, 0x2f, 0xe3, 0xa5, 0xdf, 0xa2, 0x8e, + 0x0c, 0xb9, 0x78, 0xff, 0xf0, 0x58, 0x46, 0x47, 0xc7, 0x32, 0xfa, 0x7e, 0x2c, 0xa3, 0x57, 0x27, + 0x72, 0xe6, 0xe8, 0x44, 0xce, 0x7c, 0x3d, 0x91, 0x33, 0x8f, 0xe6, 0x0c, 0xd3, 0xf5, 0x38, 0x2a, + 0xb4, 0x76, 0x66, 0xfd, 0xe7, 0x42, 0xc1, 0x6d, 0xd6, 0x89, 0x53, 0xee, 0x61, 0xff, 0x11, 0xde, + 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff, 0x56, 0x52, 0x53, 0x60, 0x34, 0x0b, 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 { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Ring queries a ring by id. + Ring(ctx context.Context, in *QueryRingRequest, opts ...grpc.CallOption) (*QueryRingResponse, error) + // Rings queries rings, optionally filtered by namespace. + Rings(ctx context.Context, in *QueryRingsRequest, opts ...grpc.CallOption) (*QueryRingsResponse, error) + // Document queries an encrypted document by namespace and id. + Document(ctx context.Context, in *QueryDocumentRequest, opts ...grpc.CallOption) (*QueryDocumentResponse, error) + // Documents queries encrypted documents within a namespace. + Documents(ctx context.Context, in *QueryDocumentsRequest, opts ...grpc.CallOption) (*QueryDocumentsResponse, error) + // KeyDerivation queries a key derivation by namespace and id. + KeyDerivation(ctx context.Context, in *QueryKeyDerivationRequest, opts ...grpc.CallOption) (*QueryKeyDerivationResponse, error) + // KeyDerivations queries key derivations within a namespace. + KeyDerivations(ctx context.Context, in *QueryKeyDerivationsRequest, opts ...grpc.CallOption) (*QueryKeyDerivationsResponse, 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, "/sourcehub.orbis.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Ring(ctx context.Context, in *QueryRingRequest, opts ...grpc.CallOption) (*QueryRingResponse, error) { + out := new(QueryRingResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Query/Ring", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Rings(ctx context.Context, in *QueryRingsRequest, opts ...grpc.CallOption) (*QueryRingsResponse, error) { + out := new(QueryRingsResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Query/Rings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Document(ctx context.Context, in *QueryDocumentRequest, opts ...grpc.CallOption) (*QueryDocumentResponse, error) { + out := new(QueryDocumentResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Query/Document", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Documents(ctx context.Context, in *QueryDocumentsRequest, opts ...grpc.CallOption) (*QueryDocumentsResponse, error) { + out := new(QueryDocumentsResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Query/Documents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) KeyDerivation(ctx context.Context, in *QueryKeyDerivationRequest, opts ...grpc.CallOption) (*QueryKeyDerivationResponse, error) { + out := new(QueryKeyDerivationResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Query/KeyDerivation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) KeyDerivations(ctx context.Context, in *QueryKeyDerivationsRequest, opts ...grpc.CallOption) (*QueryKeyDerivationsResponse, error) { + out := new(QueryKeyDerivationsResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Query/KeyDerivations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Ring queries a ring by id. + Ring(context.Context, *QueryRingRequest) (*QueryRingResponse, error) + // Rings queries rings, optionally filtered by namespace. + Rings(context.Context, *QueryRingsRequest) (*QueryRingsResponse, error) + // Document queries an encrypted document by namespace and id. + Document(context.Context, *QueryDocumentRequest) (*QueryDocumentResponse, error) + // Documents queries encrypted documents within a namespace. + Documents(context.Context, *QueryDocumentsRequest) (*QueryDocumentsResponse, error) + // KeyDerivation queries a key derivation by namespace and id. + KeyDerivation(context.Context, *QueryKeyDerivationRequest) (*QueryKeyDerivationResponse, error) + // KeyDerivations queries key derivations within a namespace. + KeyDerivations(context.Context, *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, 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) Ring(ctx context.Context, req *QueryRingRequest) (*QueryRingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ring not implemented") +} +func (*UnimplementedQueryServer) Rings(ctx context.Context, req *QueryRingsRequest) (*QueryRingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Rings not implemented") +} +func (*UnimplementedQueryServer) Document(ctx context.Context, req *QueryDocumentRequest) (*QueryDocumentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Document not implemented") +} +func (*UnimplementedQueryServer) Documents(ctx context.Context, req *QueryDocumentsRequest) (*QueryDocumentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Documents not implemented") +} +func (*UnimplementedQueryServer) KeyDerivation(ctx context.Context, req *QueryKeyDerivationRequest) (*QueryKeyDerivationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method KeyDerivation not implemented") +} +func (*UnimplementedQueryServer) KeyDerivations(ctx context.Context, req *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method KeyDerivations 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: "/sourcehub.orbis.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_Ring_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Ring(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Query/Ring", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Ring(ctx, req.(*QueryRingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Rings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Rings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Query/Rings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Rings(ctx, req.(*QueryRingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Document_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDocumentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Document(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Query/Document", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Document(ctx, req.(*QueryDocumentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Documents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDocumentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Documents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Query/Documents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Documents(ctx, req.(*QueryDocumentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_KeyDerivation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryKeyDerivationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).KeyDerivation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Query/KeyDerivation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).KeyDerivation(ctx, req.(*QueryKeyDerivationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_KeyDerivations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryKeyDerivationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).KeyDerivations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Query/KeyDerivations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).KeyDerivations(ctx, req.(*QueryKeyDerivationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var Query_serviceDesc = _Query_serviceDesc +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sourcehub.orbis.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Ring", + Handler: _Query_Ring_Handler, + }, + { + MethodName: "Rings", + Handler: _Query_Rings_Handler, + }, + { + MethodName: "Document", + Handler: _Query_Document_Handler, + }, + { + MethodName: "Documents", + Handler: _Query_Documents_Handler, + }, + { + MethodName: "KeyDerivation", + Handler: _Query_KeyDerivation_Handler, + }, + { + MethodName: "KeyDerivations", + Handler: _Query_KeyDerivations_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sourcehub/orbis/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 + { + 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 *QueryRingRequest) 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 *QueryRingRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryRingResponse) 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 *QueryRingResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Ring != nil { + { + size, err := m.Ring.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 *QueryRingsRequest) 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 *QueryRingsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRingsRequest) 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.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryRingsResponse) 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 *QueryRingsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRingsResponse) 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.Rings) > 0 { + for iNdEx := len(m.Rings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rings[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 *QueryDocumentRequest) 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 *QueryDocumentRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDocumentResponse) 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 *QueryDocumentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDocumentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Document != nil { + { + size, err := m.Document.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 *QueryDocumentsRequest) 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 *QueryDocumentsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDocumentsRequest) 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.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDocumentsResponse) 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 *QueryDocumentsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDocumentsResponse) 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.Documents) > 0 { + for iNdEx := len(m.Documents) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Documents[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 *QueryKeyDerivationRequest) 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 *QueryKeyDerivationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryKeyDerivationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryKeyDerivationResponse) 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 *QueryKeyDerivationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryKeyDerivationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.KeyDerivation != nil { + { + size, err := m.KeyDerivation.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 *QueryKeyDerivationsRequest) 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 *QueryKeyDerivationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryKeyDerivationsRequest) 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.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryKeyDerivationsResponse) 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 *QueryKeyDerivationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryKeyDerivationsResponse) 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.KeyDerivations) > 0 { + for iNdEx := len(m.KeyDerivations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.KeyDerivations[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 + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryRingRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryRingResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Ring != nil { + l = m.Ring.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryRingsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryRingsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rings) > 0 { + for _, e := range m.Rings { + 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 *QueryDocumentRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDocumentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Document != nil { + l = m.Document.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDocumentsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDocumentsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Documents) > 0 { + for _, e := range m.Documents { + 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 *QueryKeyDerivationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryKeyDerivationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.KeyDerivation != nil { + l = m.KeyDerivation.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryKeyDerivationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryKeyDerivationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.KeyDerivations) > 0 { + for _, e := range m.KeyDerivations { + 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 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 *QueryRingRequest) 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: QueryRingRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRingRequest: 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 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.Id = 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 *QueryRingResponse) 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: QueryRingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ring", 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.Ring == nil { + m.Ring = &Ring{} + } + if err := m.Ring.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 *QueryRingsRequest) 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: QueryRingsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRingsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) + 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.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 *QueryRingsResponse) 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: QueryRingsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRingsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rings", 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.Rings = append(m.Rings, Ring{}) + if err := m.Rings[len(m.Rings)-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 *QueryDocumentRequest) 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: QueryDocumentRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 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.Id = 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 *QueryDocumentResponse) 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: QueryDocumentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Document", 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.Document == nil { + m.Document = &Document{} + } + if err := m.Document.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 *QueryDocumentsRequest) 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: QueryDocumentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDocumentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) + 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.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 *QueryDocumentsResponse) 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: QueryDocumentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDocumentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Documents", 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.Documents = append(m.Documents, Document{}) + if err := m.Documents[len(m.Documents)-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 *QueryKeyDerivationRequest) 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: QueryKeyDerivationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryKeyDerivationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 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.Id = 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 *QueryKeyDerivationResponse) 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: QueryKeyDerivationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryKeyDerivationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyDerivation", 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.KeyDerivation == nil { + m.KeyDerivation = &KeyDerivation{} + } + if err := m.KeyDerivation.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 *QueryKeyDerivationsRequest) 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: QueryKeyDerivationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryKeyDerivationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) + 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.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 *QueryKeyDerivationsResponse) 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: QueryKeyDerivationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryKeyDerivationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyDerivations", 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.KeyDerivations = append(m.KeyDerivations, KeyDerivation{}) + if err := m.KeyDerivations[len(m.KeyDerivations)-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/orbis/types/query.pb.gw.go b/x/orbis/types/query.pb.gw.go new file mode 100644 index 00000000..0336c617 --- /dev/null +++ b/x/orbis/types/query.pb.gw.go @@ -0,0 +1,821 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: sourcehub/orbis/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_Ring_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRingRequest + 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.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.Ring(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Ring_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRingRequest + 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.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.Ring(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Rings_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Rings_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRingsRequest + 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_Rings_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Rings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Rings_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRingsRequest + 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_Rings_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Rings(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Document_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDocumentRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.Document(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Document_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDocumentRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.Document(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Documents_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_Documents_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDocumentsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Documents_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Documents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Documents_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDocumentsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Documents_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Documents(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_KeyDerivation_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryKeyDerivationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.KeyDerivation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_KeyDerivation_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryKeyDerivationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.KeyDerivation(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_KeyDerivations_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_KeyDerivations_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryKeyDerivationsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_KeyDerivations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.KeyDerivations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_KeyDerivations_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryKeyDerivationsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_KeyDerivations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.KeyDerivations(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_Ring_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_Ring_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_Ring_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Rings_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_Rings_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_Rings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Document_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_Document_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_Document_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Documents_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_Documents_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_Documents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_KeyDerivation_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_KeyDerivation_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_KeyDerivation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_KeyDerivations_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_KeyDerivations_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_KeyDerivations_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_Ring_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_Ring_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_Ring_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Rings_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_Rings_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_Rings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Document_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_Document_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_Document_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Documents_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_Documents_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_Documents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_KeyDerivation_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_KeyDerivation_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_KeyDerivation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_KeyDerivations_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_KeyDerivations_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_KeyDerivations_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, 2, 3}, []string{"sourcenetwork", "sourcehub", "orbis", "params"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_Ring_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "ring", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_Rings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "orbis", "rings"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_Document_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sourcenetwork", "sourcehub", "orbis", "document", "namespace", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_Documents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "documents", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_KeyDerivation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sourcenetwork", "sourcehub", "orbis", "key_derivation", "namespace", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_KeyDerivations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "key_derivations", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Ring_0 = runtime.ForwardResponseMessage + + forward_Query_Rings_0 = runtime.ForwardResponseMessage + + forward_Query_Document_0 = runtime.ForwardResponseMessage + + forward_Query_Documents_0 = runtime.ForwardResponseMessage + + forward_Query_KeyDerivation_0 = runtime.ForwardResponseMessage + + forward_Query_KeyDerivations_0 = runtime.ForwardResponseMessage +) diff --git a/x/orbis/types/ring.pb.go b/x/orbis/types/ring.pb.go new file mode 100644 index 00000000..a0055cc3 --- /dev/null +++ b/x/orbis/types/ring.pb.go @@ -0,0 +1,866 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/orbis/ring.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Ring stores the active and pending committee metadata for an Orbis ring. +type Ring struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` + NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + NewThreshold uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` + HasNewThreshold bool `protobuf:"varint,9,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` + PssInterval uint64 `protobuf:"varint,10,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` + HasPssInterval bool `protobuf:"varint,11,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,12,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + PolicyId string `protobuf:"bytes,13,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` +} + +func (m *Ring) Reset() { *m = Ring{} } +func (m *Ring) String() string { return proto.CompactTextString(m) } +func (*Ring) ProtoMessage() {} +func (*Ring) Descriptor() ([]byte, []int) { + return fileDescriptor_be6c219726da9c21, []int{0} +} +func (m *Ring) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Ring) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Ring.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 *Ring) XXX_Merge(src proto.Message) { + xxx_messageInfo_Ring.Merge(m, src) +} +func (m *Ring) XXX_Size() int { + return m.Size() +} +func (m *Ring) XXX_DiscardUnknown() { + xxx_messageInfo_Ring.DiscardUnknown(m) +} + +var xxx_messageInfo_Ring proto.InternalMessageInfo + +func (m *Ring) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Ring) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *Ring) GetCreatorDid() string { + if m != nil { + return m.CreatorDid + } + return "" +} + +func (m *Ring) GetRingPk() string { + if m != nil { + return m.RingPk + } + return "" +} + +func (m *Ring) GetPeerIds() []string { + if m != nil { + return m.PeerIds + } + return nil +} + +func (m *Ring) GetThreshold() uint32 { + if m != nil { + return m.Threshold + } + return 0 +} + +func (m *Ring) GetNewPeerIds() []string { + if m != nil { + return m.NewPeerIds + } + return nil +} + +func (m *Ring) GetNewThreshold() uint32 { + if m != nil { + return m.NewThreshold + } + return 0 +} + +func (m *Ring) GetHasNewThreshold() bool { + if m != nil { + return m.HasNewThreshold + } + return false +} + +func (m *Ring) GetPssInterval() uint64 { + if m != nil { + return m.PssInterval + } + return 0 +} + +func (m *Ring) GetHasPssInterval() bool { + if m != nil { + return m.HasPssInterval + } + return false +} + +func (m *Ring) GetBlockNumberNonce() uint64 { + if m != nil { + return m.BlockNumberNonce + } + return 0 +} + +func (m *Ring) GetPolicyId() string { + if m != nil { + return m.PolicyId + } + return "" +} + +func init() { + proto.RegisterType((*Ring)(nil), "sourcehub.orbis.Ring") +} + +func init() { proto.RegisterFile("sourcehub/orbis/ring.proto", fileDescriptor_be6c219726da9c21) } + +var fileDescriptor_be6c219726da9c21 = []byte{ + // 388 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0x4d, 0x8e, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0xb6, 0xb4, 0xc9, 0x6b, 0x3b, 0x33, 0x78, 0x83, 0xf9, 0x50, 0x08, 0xb0, 0x89, + 0x10, 0x9a, 0x20, 0x71, 0x03, 0xc4, 0xa6, 0x2c, 0xaa, 0x2a, 0x62, 0xc5, 0xc6, 0x4a, 0x62, 0xab, + 0xb1, 0x92, 0xda, 0x96, 0x9d, 0x52, 0xe6, 0x16, 0x9c, 0x85, 0x53, 0xb0, 0x9c, 0x25, 0x4b, 0xd4, + 0x5e, 0x04, 0xd9, 0x8d, 0x9a, 0x76, 0xe9, 0xdf, 0xff, 0xe3, 0x49, 0x7e, 0x0f, 0x5e, 0x58, 0xb5, + 0x33, 0x25, 0xaf, 0x76, 0x45, 0xaa, 0x4c, 0x21, 0x6c, 0x6a, 0x84, 0xdc, 0xdc, 0x6b, 0xa3, 0x5a, + 0x85, 0x6f, 0xcf, 0xda, 0xbd, 0xd7, 0xde, 0xfe, 0x1e, 0xc1, 0x38, 0x13, 0x72, 0x83, 0x6f, 0x60, + 0x28, 0x18, 0x41, 0x31, 0x4a, 0xc2, 0x6c, 0x28, 0x18, 0x7e, 0x05, 0xa1, 0xcc, 0xb7, 0xdc, 0xea, + 0xbc, 0xe4, 0x64, 0xe8, 0x71, 0x0f, 0xf0, 0x6b, 0x98, 0x95, 0x86, 0xe7, 0xad, 0x32, 0x94, 0x09, + 0x46, 0x46, 0x5e, 0x87, 0x0e, 0x7d, 0x11, 0x0c, 0x3f, 0x83, 0xa9, 0x1b, 0x4b, 0x75, 0x4d, 0xc6, + 0x5e, 0x9c, 0xb8, 0xe7, 0xba, 0xc6, 0xcf, 0x21, 0xd0, 0x9c, 0x1b, 0x2a, 0x98, 0x25, 0x4f, 0xe2, + 0x51, 0x12, 0x66, 0x53, 0xf7, 0x5e, 0x32, 0xeb, 0x46, 0xb6, 0x95, 0xe1, 0xb6, 0x52, 0x0d, 0x23, + 0x93, 0x18, 0x25, 0x8b, 0xac, 0x07, 0x38, 0x86, 0xb9, 0xe4, 0x7b, 0x7a, 0x0e, 0x4f, 0x7d, 0x18, + 0x24, 0xdf, 0xaf, 0xbb, 0xfc, 0x3b, 0x58, 0x38, 0x47, 0xdf, 0x11, 0xf8, 0x0e, 0x17, 0xfb, 0x76, + 0xae, 0x79, 0x0f, 0x4f, 0xab, 0xdc, 0xd2, 0x6b, 0x63, 0x18, 0xa3, 0x24, 0xc8, 0x6e, 0xab, 0xdc, + 0xae, 0x2e, 0xbd, 0x6f, 0x60, 0xae, 0xad, 0xa5, 0x42, 0xb6, 0xdc, 0xfc, 0xc8, 0x1b, 0x02, 0x31, + 0x4a, 0xc6, 0xd9, 0x4c, 0x5b, 0xbb, 0xec, 0x10, 0x4e, 0xe0, 0xce, 0xd5, 0x5d, 0xd9, 0x66, 0xbe, + 0xed, 0xa6, 0xca, 0xed, 0xfa, 0xc2, 0xf9, 0x01, 0x70, 0xd1, 0xa8, 0xb2, 0xa6, 0x72, 0xb7, 0x2d, + 0xb8, 0xa1, 0x52, 0xc9, 0x92, 0x93, 0xb9, 0xaf, 0xbc, 0xf3, 0xca, 0xca, 0x0b, 0x2b, 0xc7, 0xf1, + 0x4b, 0x08, 0xb5, 0x6a, 0x44, 0xf9, 0x40, 0x05, 0x23, 0x0b, 0xff, 0x83, 0xc1, 0x09, 0x2c, 0xd9, + 0xe7, 0xaf, 0x7f, 0x0e, 0x11, 0x7a, 0x3c, 0x44, 0xe8, 0xdf, 0x21, 0x42, 0xbf, 0x8e, 0xd1, 0xe0, + 0xf1, 0x18, 0x0d, 0xfe, 0x1e, 0xa3, 0xc1, 0xf7, 0x8f, 0x1b, 0xd1, 0xba, 0xe5, 0x96, 0x6a, 0x9b, + 0x9e, 0x56, 0x2d, 0x79, 0xbb, 0x57, 0xa6, 0x4e, 0xfb, 0xa3, 0xf8, 0xd9, 0x9d, 0x45, 0xfb, 0xa0, + 0xb9, 0x2d, 0x26, 0xfe, 0x30, 0x3e, 0xfd, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x82, 0xfc, 0x33, 0xfb, + 0x36, 0x02, 0x00, 0x00, +} + +func (m *Ring) 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 *Ring) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ring) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PolicyId) > 0 { + i -= len(m.PolicyId) + copy(dAtA[i:], m.PolicyId) + i = encodeVarintRing(dAtA, i, uint64(len(m.PolicyId))) + i-- + dAtA[i] = 0x6a + } + if m.BlockNumberNonce != 0 { + i = encodeVarintRing(dAtA, i, uint64(m.BlockNumberNonce)) + i-- + dAtA[i] = 0x60 + } + if m.HasPssInterval { + i-- + if m.HasPssInterval { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.PssInterval != 0 { + i = encodeVarintRing(dAtA, i, uint64(m.PssInterval)) + i-- + dAtA[i] = 0x50 + } + if m.HasNewThreshold { + i-- + if m.HasNewThreshold { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.NewThreshold != 0 { + i = encodeVarintRing(dAtA, i, uint64(m.NewThreshold)) + i-- + dAtA[i] = 0x40 + } + if len(m.NewPeerIds) > 0 { + for iNdEx := len(m.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NewPeerIds[iNdEx]) + copy(dAtA[i:], m.NewPeerIds[iNdEx]) + i = encodeVarintRing(dAtA, i, uint64(len(m.NewPeerIds[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if m.Threshold != 0 { + i = encodeVarintRing(dAtA, i, uint64(m.Threshold)) + i-- + dAtA[i] = 0x30 + } + if len(m.PeerIds) > 0 { + for iNdEx := len(m.PeerIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PeerIds[iNdEx]) + copy(dAtA[i:], m.PeerIds[iNdEx]) + i = encodeVarintRing(dAtA, i, uint64(len(m.PeerIds[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.RingPk) > 0 { + i -= len(m.RingPk) + copy(dAtA[i:], m.RingPk) + i = encodeVarintRing(dAtA, i, uint64(len(m.RingPk))) + i-- + dAtA[i] = 0x22 + } + if len(m.CreatorDid) > 0 { + i -= len(m.CreatorDid) + copy(dAtA[i:], m.CreatorDid) + i = encodeVarintRing(dAtA, i, uint64(len(m.CreatorDid))) + i-- + dAtA[i] = 0x1a + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRing(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRing(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintRing(dAtA []byte, offset int, v uint64) int { + offset -= sovRing(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Ring) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRing(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRing(uint64(l)) + } + l = len(m.CreatorDid) + if l > 0 { + n += 1 + l + sovRing(uint64(l)) + } + l = len(m.RingPk) + if l > 0 { + n += 1 + l + sovRing(uint64(l)) + } + if len(m.PeerIds) > 0 { + for _, s := range m.PeerIds { + l = len(s) + n += 1 + l + sovRing(uint64(l)) + } + } + if m.Threshold != 0 { + n += 1 + sovRing(uint64(m.Threshold)) + } + if len(m.NewPeerIds) > 0 { + for _, s := range m.NewPeerIds { + l = len(s) + n += 1 + l + sovRing(uint64(l)) + } + } + if m.NewThreshold != 0 { + n += 1 + sovRing(uint64(m.NewThreshold)) + } + if m.HasNewThreshold { + n += 2 + } + if m.PssInterval != 0 { + n += 1 + sovRing(uint64(m.PssInterval)) + } + if m.HasPssInterval { + n += 2 + } + if m.BlockNumberNonce != 0 { + n += 1 + sovRing(uint64(m.BlockNumberNonce)) + } + l = len(m.PolicyId) + if l > 0 { + n += 1 + l + sovRing(uint64(l)) + } + return n +} + +func sovRing(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRing(x uint64) (n int) { + return sovRing(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Ring) 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 ErrIntOverflowRing + } + 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: Ring: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ring: 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 ErrIntOverflowRing + } + 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 ErrInvalidLengthRing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRing + } + 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 Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + 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 ErrInvalidLengthRing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + 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 ErrInvalidLengthRing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatorDid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingPk", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + 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 ErrInvalidLengthRing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RingPk = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + 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 ErrInvalidLengthRing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerIds = append(m.PeerIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + m.Threshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Threshold |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + 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 ErrInvalidLengthRing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewPeerIds = append(m.NewPeerIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) + } + m.NewThreshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NewThreshold |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasNewThreshold", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasNewThreshold = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) + } + m.PssInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PssInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasPssInterval = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) + } + m.BlockNumberNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumberNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + 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 ErrInvalidLengthRing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PolicyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRing(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRing + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRing(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, ErrIntOverflowRing + } + 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, ErrIntOverflowRing + } + 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, ErrIntOverflowRing + } + 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, ErrInvalidLengthRing + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRing + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRing + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRing = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRing = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRing = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/orbis/types/tx.pb.go b/x/orbis/types/tx.pb.go new file mode 100644 index 00000000..a6029136 --- /dev/null +++ b/x/orbis/types/tx.pb.go @@ -0,0 +1,4761 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/orbis/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. +type MsgUpdateParams struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + 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_7711ae63507074e0, []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 MsgUpdateParams. +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_7711ae63507074e0, []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 + +type MsgCreateRing struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` + HasPssInterval bool `protobuf:"varint,7,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` + PolicyId string `protobuf:"bytes,8,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Artifact string `protobuf:"bytes,9,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (m *MsgCreateRing) Reset() { *m = MsgCreateRing{} } +func (m *MsgCreateRing) String() string { return proto.CompactTextString(m) } +func (*MsgCreateRing) ProtoMessage() {} +func (*MsgCreateRing) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{2} +} +func (m *MsgCreateRing) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateRing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateRing.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 *MsgCreateRing) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateRing.Merge(m, src) +} +func (m *MsgCreateRing) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateRing) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateRing.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateRing proto.InternalMessageInfo + +func (m *MsgCreateRing) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgCreateRing) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *MsgCreateRing) GetRingPk() string { + if m != nil { + return m.RingPk + } + return "" +} + +func (m *MsgCreateRing) GetPeerIds() []string { + if m != nil { + return m.PeerIds + } + return nil +} + +func (m *MsgCreateRing) GetThreshold() uint32 { + if m != nil { + return m.Threshold + } + return 0 +} + +func (m *MsgCreateRing) GetPssInterval() uint64 { + if m != nil { + return m.PssInterval + } + return 0 +} + +func (m *MsgCreateRing) GetHasPssInterval() bool { + if m != nil { + return m.HasPssInterval + } + return false +} + +func (m *MsgCreateRing) GetPolicyId() string { + if m != nil { + return m.PolicyId + } + return "" +} + +func (m *MsgCreateRing) GetArtifact() string { + if m != nil { + return m.Artifact + } + return "" +} + +type MsgCreateRingResponse struct { + RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` +} + +func (m *MsgCreateRingResponse) Reset() { *m = MsgCreateRingResponse{} } +func (m *MsgCreateRingResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateRingResponse) ProtoMessage() {} +func (*MsgCreateRingResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{3} +} +func (m *MsgCreateRingResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateRingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateRingResponse.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 *MsgCreateRingResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateRingResponse.Merge(m, src) +} +func (m *MsgCreateRingResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateRingResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateRingResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateRingResponse proto.InternalMessageInfo + +func (m *MsgCreateRingResponse) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +type MsgUpdateRingByAcp struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Artifact string `protobuf:"bytes,3,opt,name=artifact,proto3" json:"artifact,omitempty"` + NewPeerIds []string `protobuf:"bytes,4,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + NewThreshold uint32 `protobuf:"varint,5,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` + HasNewThreshold bool `protobuf:"varint,6,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` + PssInterval uint64 `protobuf:"varint,7,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` + HasPssInterval bool `protobuf:"varint,8,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` +} + +func (m *MsgUpdateRingByAcp) Reset() { *m = MsgUpdateRingByAcp{} } +func (m *MsgUpdateRingByAcp) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRingByAcp) ProtoMessage() {} +func (*MsgUpdateRingByAcp) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{4} +} +func (m *MsgUpdateRingByAcp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateRingByAcp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateRingByAcp.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 *MsgUpdateRingByAcp) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRingByAcp.Merge(m, src) +} +func (m *MsgUpdateRingByAcp) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateRingByAcp) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRingByAcp.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateRingByAcp proto.InternalMessageInfo + +func (m *MsgUpdateRingByAcp) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgUpdateRingByAcp) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *MsgUpdateRingByAcp) GetArtifact() string { + if m != nil { + return m.Artifact + } + return "" +} + +func (m *MsgUpdateRingByAcp) GetNewPeerIds() []string { + if m != nil { + return m.NewPeerIds + } + return nil +} + +func (m *MsgUpdateRingByAcp) GetNewThreshold() uint32 { + if m != nil { + return m.NewThreshold + } + return 0 +} + +func (m *MsgUpdateRingByAcp) GetHasNewThreshold() bool { + if m != nil { + return m.HasNewThreshold + } + return false +} + +func (m *MsgUpdateRingByAcp) GetPssInterval() uint64 { + if m != nil { + return m.PssInterval + } + return 0 +} + +func (m *MsgUpdateRingByAcp) GetHasPssInterval() bool { + if m != nil { + return m.HasPssInterval + } + return false +} + +type MsgUpdateRingByAcpResponse struct { +} + +func (m *MsgUpdateRingByAcpResponse) Reset() { *m = MsgUpdateRingByAcpResponse{} } +func (m *MsgUpdateRingByAcpResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRingByAcpResponse) ProtoMessage() {} +func (*MsgUpdateRingByAcpResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{5} +} +func (m *MsgUpdateRingByAcpResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateRingByAcpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateRingByAcpResponse.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 *MsgUpdateRingByAcpResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRingByAcpResponse.Merge(m, src) +} +func (m *MsgUpdateRingByAcpResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateRingByAcpResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRingByAcpResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateRingByAcpResponse proto.InternalMessageInfo + +type MsgFinalizeRingReshareByThresholdSignature struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Artifact string `protobuf:"bytes,3,opt,name=artifact,proto3" json:"artifact,omitempty"` + SignatureScheme string `protobuf:"bytes,4,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` + Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *MsgFinalizeRingReshareByThresholdSignature) Reset() { + *m = MsgFinalizeRingReshareByThresholdSignature{} +} +func (m *MsgFinalizeRingReshareByThresholdSignature) String() string { + return proto.CompactTextString(m) +} +func (*MsgFinalizeRingReshareByThresholdSignature) ProtoMessage() {} +func (*MsgFinalizeRingReshareByThresholdSignature) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{6} +} +func (m *MsgFinalizeRingReshareByThresholdSignature) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFinalizeRingReshareByThresholdSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFinalizeRingReshareByThresholdSignature.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 *MsgFinalizeRingReshareByThresholdSignature) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFinalizeRingReshareByThresholdSignature.Merge(m, src) +} +func (m *MsgFinalizeRingReshareByThresholdSignature) XXX_Size() int { + return m.Size() +} +func (m *MsgFinalizeRingReshareByThresholdSignature) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFinalizeRingReshareByThresholdSignature.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFinalizeRingReshareByThresholdSignature proto.InternalMessageInfo + +func (m *MsgFinalizeRingReshareByThresholdSignature) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgFinalizeRingReshareByThresholdSignature) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *MsgFinalizeRingReshareByThresholdSignature) GetArtifact() string { + if m != nil { + return m.Artifact + } + return "" +} + +func (m *MsgFinalizeRingReshareByThresholdSignature) GetSignatureScheme() string { + if m != nil { + return m.SignatureScheme + } + return "" +} + +func (m *MsgFinalizeRingReshareByThresholdSignature) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type MsgFinalizeRingReshareByThresholdSignatureResponse struct { +} + +func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) Reset() { + *m = MsgFinalizeRingReshareByThresholdSignatureResponse{} +} +func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoMessage() {} +func (*MsgFinalizeRingReshareByThresholdSignatureResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{7} +} +func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFinalizeRingReshareByThresholdSignatureResponse.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 *MsgFinalizeRingReshareByThresholdSignatureResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFinalizeRingReshareByThresholdSignatureResponse.Merge(m, src) +} +func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFinalizeRingReshareByThresholdSignatureResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFinalizeRingReshareByThresholdSignatureResponse proto.InternalMessageInfo + +type RingReshareFinalizeSignDoc struct { + Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + RingPk string `protobuf:"bytes,5,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + CurrentRingSha256 []byte `protobuf:"bytes,6,opt,name=current_ring_sha256,json=currentRingSha256,proto3" json:"current_ring_sha256,omitempty"` + FinalizedRingSha256 []byte `protobuf:"bytes,7,opt,name=finalized_ring_sha256,json=finalizedRingSha256,proto3" json:"finalized_ring_sha256,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,8,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` +} + +func (m *RingReshareFinalizeSignDoc) Reset() { *m = RingReshareFinalizeSignDoc{} } +func (m *RingReshareFinalizeSignDoc) String() string { return proto.CompactTextString(m) } +func (*RingReshareFinalizeSignDoc) ProtoMessage() {} +func (*RingReshareFinalizeSignDoc) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{8} +} +func (m *RingReshareFinalizeSignDoc) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RingReshareFinalizeSignDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RingReshareFinalizeSignDoc.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 *RingReshareFinalizeSignDoc) XXX_Merge(src proto.Message) { + xxx_messageInfo_RingReshareFinalizeSignDoc.Merge(m, src) +} +func (m *RingReshareFinalizeSignDoc) XXX_Size() int { + return m.Size() +} +func (m *RingReshareFinalizeSignDoc) XXX_DiscardUnknown() { + xxx_messageInfo_RingReshareFinalizeSignDoc.DiscardUnknown(m) +} + +var xxx_messageInfo_RingReshareFinalizeSignDoc proto.InternalMessageInfo + +func (m *RingReshareFinalizeSignDoc) GetDomain() string { + if m != nil { + return m.Domain + } + return "" +} + +func (m *RingReshareFinalizeSignDoc) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *RingReshareFinalizeSignDoc) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *RingReshareFinalizeSignDoc) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *RingReshareFinalizeSignDoc) GetRingPk() string { + if m != nil { + return m.RingPk + } + return "" +} + +func (m *RingReshareFinalizeSignDoc) GetCurrentRingSha256() []byte { + if m != nil { + return m.CurrentRingSha256 + } + return nil +} + +func (m *RingReshareFinalizeSignDoc) GetFinalizedRingSha256() []byte { + if m != nil { + return m.FinalizedRingSha256 + } + return nil +} + +func (m *RingReshareFinalizeSignDoc) GetBlockNumberNonce() uint64 { + if m != nil { + return m.BlockNumberNonce + } + return 0 +} + +type MsgStoreDocument struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` + Tier string `protobuf:"bytes,9,opt,name=tier,proto3" json:"tier,omitempty"` + HasTier bool `protobuf:"varint,10,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` + Timestamp uint64 `protobuf:"varint,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + HasTimestamp bool `protobuf:"varint,12,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` + Artifact string `protobuf:"bytes,13,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (m *MsgStoreDocument) Reset() { *m = MsgStoreDocument{} } +func (m *MsgStoreDocument) String() string { return proto.CompactTextString(m) } +func (*MsgStoreDocument) ProtoMessage() {} +func (*MsgStoreDocument) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{9} +} +func (m *MsgStoreDocument) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStoreDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStoreDocument.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 *MsgStoreDocument) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStoreDocument.Merge(m, src) +} +func (m *MsgStoreDocument) XXX_Size() int { + return m.Size() +} +func (m *MsgStoreDocument) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStoreDocument.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStoreDocument proto.InternalMessageInfo + +func (m *MsgStoreDocument) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgStoreDocument) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *MsgStoreDocument) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *MsgStoreDocument) GetDocument() string { + if m != nil { + return m.Document + } + return "" +} + +func (m *MsgStoreDocument) GetProof() string { + if m != nil { + return m.Proof + } + return "" +} + +func (m *MsgStoreDocument) GetPolicyId() string { + if m != nil { + return m.PolicyId + } + return "" +} + +func (m *MsgStoreDocument) GetResource() string { + if m != nil { + return m.Resource + } + return "" +} + +func (m *MsgStoreDocument) GetPermission() string { + if m != nil { + return m.Permission + } + return "" +} + +func (m *MsgStoreDocument) GetTier() string { + if m != nil { + return m.Tier + } + return "" +} + +func (m *MsgStoreDocument) GetHasTier() bool { + if m != nil { + return m.HasTier + } + return false +} + +func (m *MsgStoreDocument) GetTimestamp() uint64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +func (m *MsgStoreDocument) GetHasTimestamp() bool { + if m != nil { + return m.HasTimestamp + } + return false +} + +func (m *MsgStoreDocument) GetArtifact() string { + if m != nil { + return m.Artifact + } + return "" +} + +type MsgStoreDocumentResponse struct { + DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` +} + +func (m *MsgStoreDocumentResponse) Reset() { *m = MsgStoreDocumentResponse{} } +func (m *MsgStoreDocumentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStoreDocumentResponse) ProtoMessage() {} +func (*MsgStoreDocumentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{10} +} +func (m *MsgStoreDocumentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStoreDocumentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStoreDocumentResponse.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 *MsgStoreDocumentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStoreDocumentResponse.Merge(m, src) +} +func (m *MsgStoreDocumentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStoreDocumentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStoreDocumentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStoreDocumentResponse proto.InternalMessageInfo + +func (m *MsgStoreDocumentResponse) GetDocumentId() string { + if m != nil { + return m.DocumentId + } + return "" +} + +type MsgStoreKeyDerivation struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Derivation string `protobuf:"bytes,4,opt,name=derivation,proto3" json:"derivation,omitempty"` + PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` + Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` +} + +func (m *MsgStoreKeyDerivation) Reset() { *m = MsgStoreKeyDerivation{} } +func (m *MsgStoreKeyDerivation) String() string { return proto.CompactTextString(m) } +func (*MsgStoreKeyDerivation) ProtoMessage() {} +func (*MsgStoreKeyDerivation) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{11} +} +func (m *MsgStoreKeyDerivation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStoreKeyDerivation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStoreKeyDerivation.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 *MsgStoreKeyDerivation) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStoreKeyDerivation.Merge(m, src) +} +func (m *MsgStoreKeyDerivation) XXX_Size() int { + return m.Size() +} +func (m *MsgStoreKeyDerivation) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStoreKeyDerivation.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStoreKeyDerivation proto.InternalMessageInfo + +func (m *MsgStoreKeyDerivation) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgStoreKeyDerivation) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *MsgStoreKeyDerivation) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *MsgStoreKeyDerivation) GetDerivation() string { + if m != nil { + return m.Derivation + } + return "" +} + +func (m *MsgStoreKeyDerivation) GetPolicyId() string { + if m != nil { + return m.PolicyId + } + return "" +} + +func (m *MsgStoreKeyDerivation) GetResource() string { + if m != nil { + return m.Resource + } + return "" +} + +func (m *MsgStoreKeyDerivation) GetPermission() string { + if m != nil { + return m.Permission + } + return "" +} + +func (m *MsgStoreKeyDerivation) GetArtifact() string { + if m != nil { + return m.Artifact + } + return "" +} + +type MsgStoreKeyDerivationResponse struct { + KeyDerivationId string `protobuf:"bytes,1,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` +} + +func (m *MsgStoreKeyDerivationResponse) Reset() { *m = MsgStoreKeyDerivationResponse{} } +func (m *MsgStoreKeyDerivationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStoreKeyDerivationResponse) ProtoMessage() {} +func (*MsgStoreKeyDerivationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{12} +} +func (m *MsgStoreKeyDerivationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStoreKeyDerivationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStoreKeyDerivationResponse.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 *MsgStoreKeyDerivationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStoreKeyDerivationResponse.Merge(m, src) +} +func (m *MsgStoreKeyDerivationResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStoreKeyDerivationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStoreKeyDerivationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStoreKeyDerivationResponse proto.InternalMessageInfo + +func (m *MsgStoreKeyDerivationResponse) GetKeyDerivationId() string { + if m != nil { + return m.KeyDerivationId + } + return "" +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "sourcehub.orbis.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "sourcehub.orbis.MsgUpdateParamsResponse") + proto.RegisterType((*MsgCreateRing)(nil), "sourcehub.orbis.MsgCreateRing") + proto.RegisterType((*MsgCreateRingResponse)(nil), "sourcehub.orbis.MsgCreateRingResponse") + proto.RegisterType((*MsgUpdateRingByAcp)(nil), "sourcehub.orbis.MsgUpdateRingByAcp") + proto.RegisterType((*MsgUpdateRingByAcpResponse)(nil), "sourcehub.orbis.MsgUpdateRingByAcpResponse") + proto.RegisterType((*MsgFinalizeRingReshareByThresholdSignature)(nil), "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature") + proto.RegisterType((*MsgFinalizeRingReshareByThresholdSignatureResponse)(nil), "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse") + proto.RegisterType((*RingReshareFinalizeSignDoc)(nil), "sourcehub.orbis.RingReshareFinalizeSignDoc") + proto.RegisterType((*MsgStoreDocument)(nil), "sourcehub.orbis.MsgStoreDocument") + proto.RegisterType((*MsgStoreDocumentResponse)(nil), "sourcehub.orbis.MsgStoreDocumentResponse") + proto.RegisterType((*MsgStoreKeyDerivation)(nil), "sourcehub.orbis.MsgStoreKeyDerivation") + proto.RegisterType((*MsgStoreKeyDerivationResponse)(nil), "sourcehub.orbis.MsgStoreKeyDerivationResponse") +} + +func init() { proto.RegisterFile("sourcehub/orbis/tx.proto", fileDescriptor_7711ae63507074e0) } + +var fileDescriptor_7711ae63507074e0 = []byte{ + // 1141 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x36, 0x25, 0xeb, 0x6f, 0x2c, 0x57, 0x36, 0x93, 0xd4, 0x0c, 0x9b, 0x2a, 0x8a, 0x02, 0xa4, + 0x8a, 0xda, 0x4a, 0xa9, 0x9b, 0xe6, 0x90, 0x9c, 0xe2, 0x04, 0x05, 0xd4, 0xc0, 0x81, 0x41, 0xa7, + 0x97, 0x00, 0x05, 0x41, 0x93, 0x1b, 0x72, 0x21, 0x91, 0x4b, 0xec, 0x52, 0x71, 0xd4, 0x53, 0xd1, + 0x63, 0x7a, 0xe9, 0x13, 0xf4, 0x5c, 0xa0, 0x28, 0xe0, 0x00, 0xbd, 0xf5, 0x05, 0x72, 0x0c, 0x72, + 0xea, 0xa9, 0x28, 0xec, 0x83, 0x5f, 0xa3, 0xd8, 0xe5, 0x3f, 0x2d, 0x2b, 0x02, 0x92, 0x8b, 0xad, + 0x99, 0xf9, 0x66, 0x76, 0xe6, 0x9b, 0x9d, 0xe1, 0x82, 0xc2, 0xc8, 0x94, 0x9a, 0xc8, 0x99, 0x1e, + 0x0c, 0x09, 0x3d, 0xc0, 0x6c, 0x18, 0xbc, 0x18, 0xf8, 0x94, 0x04, 0x44, 0x6e, 0x25, 0x96, 0x81, + 0xb0, 0xa8, 0x9b, 0x86, 0x8b, 0x3d, 0x32, 0x14, 0x7f, 0x43, 0x8c, 0xba, 0x65, 0x12, 0xe6, 0x12, + 0x36, 0x74, 0x99, 0x3d, 0x7c, 0xfe, 0x15, 0xff, 0x17, 0x19, 0x2e, 0x87, 0x06, 0x5d, 0x48, 0xc3, + 0x50, 0x88, 0x4c, 0x17, 0x6d, 0x62, 0x93, 0x50, 0xcf, 0x7f, 0x45, 0xda, 0x2b, 0xc5, 0x3c, 0x7c, + 0x83, 0x1a, 0x6e, 0xe4, 0xd3, 0xfd, 0x5b, 0x82, 0xd6, 0x2e, 0xb3, 0xbf, 0xf7, 0x2d, 0x23, 0x40, + 0x7b, 0xc2, 0x22, 0xdf, 0x81, 0x86, 0x31, 0x0d, 0x1c, 0x42, 0x71, 0x30, 0x53, 0xa4, 0x8e, 0xd4, + 0x6b, 0xec, 0x28, 0x6f, 0xff, 0xfa, 0xf2, 0x62, 0x74, 0xd8, 0x7d, 0xcb, 0xa2, 0x88, 0xb1, 0xfd, + 0x80, 0x62, 0xcf, 0xd6, 0x52, 0xa8, 0x7c, 0x17, 0xaa, 0x61, 0x6c, 0xa5, 0xd4, 0x91, 0x7a, 0x6b, + 0xdb, 0x5b, 0x83, 0x42, 0xa1, 0x83, 0xf0, 0x80, 0x9d, 0xc6, 0xeb, 0x7f, 0xaf, 0xae, 0xfc, 0x7e, + 0x7a, 0xd4, 0x97, 0xb4, 0xc8, 0xe3, 0xee, 0xed, 0x9f, 0x4f, 0x8f, 0xfa, 0x69, 0xac, 0x97, 0xa7, + 0x47, 0xfd, 0x6b, 0x69, 0xe2, 0x2f, 0xa2, 0xd4, 0x0b, 0x99, 0x76, 0x2f, 0xc3, 0x56, 0x41, 0xa5, + 0x21, 0xe6, 0x13, 0x8f, 0xa1, 0xee, 0x9f, 0x25, 0x58, 0xdf, 0x65, 0xf6, 0x03, 0x8a, 0x8c, 0x00, + 0x69, 0xd8, 0xb3, 0x65, 0x05, 0x6a, 0x26, 0x97, 0x08, 0x0d, 0x8b, 0xd2, 0x62, 0x51, 0xbe, 0x02, + 0x0d, 0xcf, 0x70, 0x11, 0xf3, 0x0d, 0x13, 0x89, 0xdc, 0x1b, 0x5a, 0xaa, 0x90, 0xb7, 0xa0, 0xc6, + 0x2b, 0xd5, 0xfd, 0xb1, 0x52, 0x16, 0xb6, 0x2a, 0x17, 0xf7, 0xc6, 0xf2, 0x65, 0xa8, 0xfb, 0x08, + 0x51, 0x1d, 0x5b, 0x4c, 0x59, 0xed, 0x94, 0x79, 0x44, 0x2e, 0x8f, 0x2c, 0xc6, 0x23, 0x06, 0x0e, + 0x45, 0xcc, 0x21, 0x13, 0x4b, 0xa9, 0x74, 0xa4, 0xde, 0xba, 0x96, 0x2a, 0xe4, 0x6b, 0xd0, 0xf4, + 0x19, 0xd3, 0xb1, 0x17, 0x20, 0xfa, 0xdc, 0x98, 0x28, 0xd5, 0x8e, 0xd4, 0x5b, 0xd5, 0xd6, 0x7c, + 0xc6, 0x46, 0x91, 0x4a, 0xee, 0xc1, 0x86, 0x63, 0x30, 0x3d, 0x07, 0xab, 0x75, 0xa4, 0x5e, 0x5d, + 0xfb, 0xc8, 0x31, 0xd8, 0x5e, 0x06, 0xf9, 0x09, 0x34, 0x7c, 0x32, 0xc1, 0xe6, 0x4c, 0xc7, 0x96, + 0x52, 0x17, 0x09, 0xd6, 0x43, 0xc5, 0xc8, 0x92, 0x55, 0xa8, 0x1b, 0x34, 0xc0, 0xcf, 0x0c, 0x33, + 0x50, 0x1a, 0xa1, 0x2d, 0x96, 0xef, 0x36, 0x39, 0xe5, 0x31, 0x07, 0xdd, 0x5b, 0x70, 0x29, 0x47, + 0x57, 0x4c, 0x64, 0x52, 0x3e, 0xb6, 0x22, 0xda, 0x44, 0xf9, 0x23, 0xab, 0xfb, 0xaa, 0x04, 0x72, + 0xc2, 0x3e, 0x77, 0xd9, 0x99, 0xdd, 0x37, 0xfd, 0x05, 0x34, 0x67, 0x22, 0x95, 0xb2, 0x91, 0x72, + 0x59, 0x96, 0xf3, 0x59, 0xca, 0x1d, 0x68, 0x7a, 0xe8, 0x50, 0x2f, 0x10, 0x0d, 0x1e, 0x3a, 0xdc, + 0x8b, 0xb8, 0xbe, 0x0e, 0xeb, 0x1c, 0x51, 0xe4, 0x9b, 0xbb, 0x3d, 0x49, 0x28, 0xef, 0xc3, 0x26, + 0xe7, 0x33, 0x0f, 0xac, 0x0a, 0x42, 0x5b, 0x8e, 0xc1, 0x1e, 0x67, 0xb1, 0xc5, 0xf6, 0xd4, 0x96, + 0x6b, 0x4f, 0x7d, 0x5e, 0x7b, 0x0a, 0x2c, 0x5f, 0x01, 0xf5, 0x2c, 0x65, 0xc9, 0x9d, 0x7d, 0x2b, + 0x41, 0x7f, 0x97, 0xd9, 0xdf, 0x62, 0xcf, 0x98, 0xe0, 0x1f, 0xe3, 0x36, 0x38, 0x06, 0x45, 0x3b, + 0xb3, 0x24, 0xbd, 0x7d, 0x6c, 0x7b, 0x46, 0x30, 0xa5, 0xe8, 0x43, 0x33, 0x7d, 0x13, 0x36, 0x58, + 0x1c, 0x5b, 0x67, 0xa6, 0x83, 0x5c, 0xa4, 0xac, 0x0a, 0x4c, 0x2b, 0xd1, 0xef, 0x0b, 0x35, 0xbf, + 0xde, 0x89, 0x4a, 0xd0, 0xdd, 0xd4, 0x52, 0x45, 0xa1, 0xe4, 0xdb, 0xb0, 0xbd, 0x7c, 0x4d, 0x09, + 0x15, 0xaf, 0x4a, 0xa0, 0x66, 0xb0, 0xb1, 0x3b, 0x07, 0x3e, 0x24, 0xa6, 0xfc, 0x31, 0x54, 0x2d, + 0xe2, 0x1a, 0xd8, 0x8b, 0xef, 0x64, 0x28, 0xf1, 0x91, 0x34, 0x1d, 0x03, 0x7b, 0x69, 0xe5, 0x35, + 0x21, 0x8f, 0xac, 0xfc, 0x90, 0x97, 0xcf, 0x1b, 0x72, 0x6c, 0x45, 0x35, 0xc7, 0x8c, 0x65, 0xa6, + 0xbf, 0x92, 0x9b, 0xfe, 0x01, 0x5c, 0x30, 0xa7, 0x94, 0x22, 0x2f, 0xd0, 0x05, 0x80, 0x39, 0xc6, + 0xf6, 0x37, 0x77, 0xc4, 0x9d, 0x6a, 0x6a, 0x9b, 0x91, 0x89, 0x97, 0xb0, 0x2f, 0x0c, 0xf2, 0x36, + 0x5c, 0x7a, 0x16, 0x55, 0x61, 0xe5, 0x3c, 0x6a, 0xc2, 0xe3, 0x42, 0x62, 0xcc, 0xf8, 0x7c, 0x01, + 0xf2, 0xc1, 0x84, 0x98, 0x63, 0xdd, 0x9b, 0xba, 0x07, 0x88, 0xea, 0x1e, 0xf1, 0x4c, 0x24, 0x2e, + 0xda, 0xaa, 0xb6, 0x21, 0x2c, 0x8f, 0x85, 0xe1, 0x31, 0xd7, 0x77, 0x5f, 0x96, 0x61, 0x63, 0x97, + 0xd9, 0xfb, 0x01, 0xa1, 0xe8, 0x21, 0x31, 0xa7, 0x2e, 0xf2, 0x82, 0xf7, 0xde, 0x7a, 0xd8, 0xca, + 0x6e, 0xbd, 0xf0, 0x0a, 0x59, 0x51, 0xf0, 0x88, 0xaa, 0x44, 0x96, 0x2f, 0x42, 0xc5, 0xa7, 0x84, + 0x3c, 0x8b, 0xa8, 0x0a, 0x85, 0xfc, 0x86, 0xaa, 0x9e, 0xdd, 0x50, 0x14, 0x85, 0x9b, 0x5e, 0x30, + 0xd1, 0xd0, 0x12, 0x59, 0x6e, 0x03, 0xf8, 0x88, 0xba, 0x98, 0x31, 0x4c, 0xbc, 0x68, 0xb7, 0x65, + 0x34, 0xb2, 0x0c, 0xab, 0x01, 0x46, 0x34, 0xda, 0x6c, 0xe2, 0x37, 0xbf, 0x01, 0x7c, 0x32, 0x85, + 0x1e, 0xc4, 0x44, 0xd6, 0x1c, 0x83, 0x3d, 0xe1, 0x26, 0xbe, 0x94, 0xb1, 0x8b, 0x58, 0x60, 0xb8, + 0xbe, 0xb2, 0x26, 0x48, 0x4c, 0x15, 0x7c, 0x8d, 0x84, 0x8e, 0x31, 0xa2, 0x29, 0xbc, 0x9b, 0xc2, + 0x3b, 0x06, 0x65, 0xe7, 0x67, 0x7d, 0xe1, 0x3e, 0xbd, 0x07, 0x4a, 0xb1, 0x17, 0xc9, 0x4a, 0xbd, + 0x0a, 0x6b, 0x31, 0x65, 0xe9, 0x5a, 0x85, 0x58, 0x35, 0xb2, 0xba, 0xbf, 0x94, 0xc4, 0x36, 0x16, + 0xde, 0x8f, 0xd0, 0xec, 0x21, 0xa2, 0xf8, 0xb9, 0x11, 0xf0, 0x92, 0x3f, 0x78, 0x3b, 0xdb, 0x00, + 0x56, 0x12, 0x3e, 0x6a, 0x68, 0x46, 0x93, 0x6f, 0x5e, 0x65, 0x41, 0xf3, 0xaa, 0x0b, 0x9b, 0x57, + 0x3b, 0xd3, 0xbc, 0x2c, 0x95, 0xf5, 0x85, 0x54, 0x3e, 0x82, 0x4f, 0xe7, 0x92, 0x91, 0xf0, 0xd9, + 0x87, 0xcd, 0x31, 0x9a, 0xe9, 0x69, 0xd6, 0x29, 0xab, 0xad, 0x71, 0xd6, 0x63, 0x64, 0x6d, 0xff, + 0x56, 0x81, 0xf2, 0x2e, 0xb3, 0xe5, 0xa7, 0xd0, 0xcc, 0x3d, 0x7a, 0x3a, 0x67, 0x1e, 0x2b, 0x85, + 0x97, 0x85, 0xda, 0x7b, 0x17, 0x22, 0xc9, 0xe7, 0x09, 0x40, 0xe6, 0xdd, 0xd1, 0x9e, 0xe7, 0x97, + 0xda, 0xd5, 0x1b, 0x8b, 0xed, 0x49, 0x54, 0x13, 0x5a, 0xc5, 0x6f, 0xed, 0xf5, 0xf3, 0x53, 0x4a, + 0x40, 0xea, 0xe7, 0x4b, 0x80, 0x92, 0x43, 0xfe, 0x90, 0xe0, 0xb3, 0x65, 0xbf, 0x3f, 0xf7, 0xe6, + 0x05, 0x5e, 0xd2, 0x59, 0x7d, 0xf0, 0x1e, 0xce, 0x49, 0xb6, 0x3f, 0xc0, 0x7a, 0x7e, 0xdb, 0x5d, + 0x9b, 0x17, 0x35, 0x07, 0x51, 0x6f, 0xbe, 0x13, 0x92, 0x84, 0x9f, 0x80, 0x3c, 0x67, 0x04, 0x6f, + 0x9c, 0x1b, 0x20, 0x87, 0x53, 0x07, 0xcb, 0xe1, 0xe2, 0xd3, 0xd4, 0xca, 0x4f, 0xfc, 0x45, 0xbc, + 0xf3, 0xdd, 0xeb, 0xe3, 0xb6, 0xf4, 0xe6, 0xb8, 0x2d, 0xfd, 0x77, 0xdc, 0x96, 0x7e, 0x3d, 0x69, + 0xaf, 0xbc, 0x39, 0x69, 0xaf, 0xfc, 0x73, 0xd2, 0x5e, 0x79, 0x7a, 0xcb, 0xc6, 0x01, 0x0f, 0x66, + 0x12, 0x77, 0x18, 0x86, 0xf6, 0x50, 0x70, 0x48, 0xe8, 0x78, 0x78, 0xf6, 0xa5, 0x1c, 0xcc, 0x7c, + 0xc4, 0x0e, 0xaa, 0xe2, 0x91, 0xff, 0xf5, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc6, 0x63, 0x83, + 0x11, 0x8c, 0x0c, 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 module parameters. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + CreateRing(ctx context.Context, in *MsgCreateRing, opts ...grpc.CallOption) (*MsgCreateRingResponse, error) + UpdateRingByAcp(ctx context.Context, in *MsgUpdateRingByAcp, opts ...grpc.CallOption) (*MsgUpdateRingByAcpResponse, error) + FinalizeRingReshareByThresholdSignature(ctx context.Context, in *MsgFinalizeRingReshareByThresholdSignature, opts ...grpc.CallOption) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) + StoreDocument(ctx context.Context, in *MsgStoreDocument, opts ...grpc.CallOption) (*MsgStoreDocumentResponse, error) + StoreKeyDerivation(ctx context.Context, in *MsgStoreKeyDerivation, opts ...grpc.CallOption) (*MsgStoreKeyDerivationResponse, 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, "/sourcehub.orbis.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateRing(ctx context.Context, in *MsgCreateRing, opts ...grpc.CallOption) (*MsgCreateRingResponse, error) { + out := new(MsgCreateRingResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Msg/CreateRing", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateRingByAcp(ctx context.Context, in *MsgUpdateRingByAcp, opts ...grpc.CallOption) (*MsgUpdateRingByAcpResponse, error) { + out := new(MsgUpdateRingByAcpResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Msg/UpdateRingByAcp", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) FinalizeRingReshareByThresholdSignature(ctx context.Context, in *MsgFinalizeRingReshareByThresholdSignature, opts ...grpc.CallOption) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) { + out := new(MsgFinalizeRingReshareByThresholdSignatureResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Msg/FinalizeRingReshareByThresholdSignature", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StoreDocument(ctx context.Context, in *MsgStoreDocument, opts ...grpc.CallOption) (*MsgStoreDocumentResponse, error) { + out := new(MsgStoreDocumentResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Msg/StoreDocument", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StoreKeyDerivation(ctx context.Context, in *MsgStoreKeyDerivation, opts ...grpc.CallOption) (*MsgStoreKeyDerivationResponse, error) { + out := new(MsgStoreKeyDerivationResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Msg/StoreKeyDerivation", 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 module parameters. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + CreateRing(context.Context, *MsgCreateRing) (*MsgCreateRingResponse, error) + UpdateRingByAcp(context.Context, *MsgUpdateRingByAcp) (*MsgUpdateRingByAcpResponse, error) + FinalizeRingReshareByThresholdSignature(context.Context, *MsgFinalizeRingReshareByThresholdSignature) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) + StoreDocument(context.Context, *MsgStoreDocument) (*MsgStoreDocumentResponse, error) + StoreKeyDerivation(context.Context, *MsgStoreKeyDerivation) (*MsgStoreKeyDerivationResponse, 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) CreateRing(ctx context.Context, req *MsgCreateRing) (*MsgCreateRingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRing not implemented") +} +func (*UnimplementedMsgServer) UpdateRingByAcp(ctx context.Context, req *MsgUpdateRingByAcp) (*MsgUpdateRingByAcpResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRingByAcp not implemented") +} +func (*UnimplementedMsgServer) FinalizeRingReshareByThresholdSignature(ctx context.Context, req *MsgFinalizeRingReshareByThresholdSignature) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FinalizeRingReshareByThresholdSignature not implemented") +} +func (*UnimplementedMsgServer) StoreDocument(ctx context.Context, req *MsgStoreDocument) (*MsgStoreDocumentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StoreDocument not implemented") +} +func (*UnimplementedMsgServer) StoreKeyDerivation(ctx context.Context, req *MsgStoreKeyDerivation) (*MsgStoreKeyDerivationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StoreKeyDerivation 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: "/sourcehub.orbis.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_CreateRing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateRing) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateRing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Msg/CreateRing", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateRing(ctx, req.(*MsgCreateRing)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateRingByAcp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateRingByAcp) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateRingByAcp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Msg/UpdateRingByAcp", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateRingByAcp(ctx, req.(*MsgUpdateRingByAcp)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_FinalizeRingReshareByThresholdSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFinalizeRingReshareByThresholdSignature) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FinalizeRingReshareByThresholdSignature(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Msg/FinalizeRingReshareByThresholdSignature", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FinalizeRingReshareByThresholdSignature(ctx, req.(*MsgFinalizeRingReshareByThresholdSignature)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StoreDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStoreDocument) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StoreDocument(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Msg/StoreDocument", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StoreDocument(ctx, req.(*MsgStoreDocument)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StoreKeyDerivation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStoreKeyDerivation) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StoreKeyDerivation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Msg/StoreKeyDerivation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StoreKeyDerivation(ctx, req.(*MsgStoreKeyDerivation)) + } + return interceptor(ctx, in, info, handler) +} + +var Msg_serviceDesc = _Msg_serviceDesc +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sourcehub.orbis.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "CreateRing", + Handler: _Msg_CreateRing_Handler, + }, + { + MethodName: "UpdateRingByAcp", + Handler: _Msg_UpdateRingByAcp_Handler, + }, + { + MethodName: "FinalizeRingReshareByThresholdSignature", + Handler: _Msg_FinalizeRingReshareByThresholdSignature_Handler, + }, + { + MethodName: "StoreDocument", + Handler: _Msg_StoreDocument_Handler, + }, + { + MethodName: "StoreKeyDerivation", + Handler: _Msg_StoreKeyDerivation_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sourcehub/orbis/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 *MsgCreateRing) 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 *MsgCreateRing) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateRing) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Artifact) > 0 { + i -= len(m.Artifact) + copy(dAtA[i:], m.Artifact) + i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) + i-- + dAtA[i] = 0x4a + } + if len(m.PolicyId) > 0 { + i -= len(m.PolicyId) + copy(dAtA[i:], m.PolicyId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) + i-- + dAtA[i] = 0x42 + } + if m.HasPssInterval { + i-- + if m.HasPssInterval { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.PssInterval != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) + i-- + dAtA[i] = 0x30 + } + if m.Threshold != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Threshold)) + i-- + dAtA[i] = 0x28 + } + if len(m.PeerIds) > 0 { + for iNdEx := len(m.PeerIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PeerIds[iNdEx]) + copy(dAtA[i:], m.PeerIds[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.PeerIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.RingPk) > 0 { + i -= len(m.RingPk) + copy(dAtA[i:], m.RingPk) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingPk))) + i-- + dAtA[i] = 0x1a + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateRingResponse) 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 *MsgCreateRingResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateRingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateRingByAcp) 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 *MsgUpdateRingByAcp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRingByAcp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HasPssInterval { + i-- + if m.HasPssInterval { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.PssInterval != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) + i-- + dAtA[i] = 0x38 + } + if m.HasNewThreshold { + i-- + if m.HasNewThreshold { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.NewThreshold != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.NewThreshold)) + i-- + dAtA[i] = 0x28 + } + if len(m.NewPeerIds) > 0 { + for iNdEx := len(m.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NewPeerIds[iNdEx]) + copy(dAtA[i:], m.NewPeerIds[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewPeerIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Artifact) > 0 { + i -= len(m.Artifact) + copy(dAtA[i:], m.Artifact) + i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) + i-- + dAtA[i] = 0x1a + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateRingByAcpResponse) 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 *MsgUpdateRingByAcpResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRingByAcpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgFinalizeRingReshareByThresholdSignature) 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 *MsgFinalizeRingReshareByThresholdSignature) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFinalizeRingReshareByThresholdSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x2a + } + if len(m.SignatureScheme) > 0 { + i -= len(m.SignatureScheme) + copy(dAtA[i:], m.SignatureScheme) + i = encodeVarintTx(dAtA, i, uint64(len(m.SignatureScheme))) + i-- + dAtA[i] = 0x22 + } + if len(m.Artifact) > 0 { + i -= len(m.Artifact) + copy(dAtA[i:], m.Artifact) + i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) + i-- + dAtA[i] = 0x1a + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) 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 *MsgFinalizeRingReshareByThresholdSignatureResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RingReshareFinalizeSignDoc) 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 *RingReshareFinalizeSignDoc) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RingReshareFinalizeSignDoc) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockNumberNonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.BlockNumberNonce)) + i-- + dAtA[i] = 0x40 + } + if len(m.FinalizedRingSha256) > 0 { + i -= len(m.FinalizedRingSha256) + copy(dAtA[i:], m.FinalizedRingSha256) + i = encodeVarintTx(dAtA, i, uint64(len(m.FinalizedRingSha256))) + i-- + dAtA[i] = 0x3a + } + if len(m.CurrentRingSha256) > 0 { + i -= len(m.CurrentRingSha256) + copy(dAtA[i:], m.CurrentRingSha256) + i = encodeVarintTx(dAtA, i, uint64(len(m.CurrentRingSha256))) + i-- + dAtA[i] = 0x32 + } + if len(m.RingPk) > 0 { + i -= len(m.RingPk) + copy(dAtA[i:], m.RingPk) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingPk))) + i-- + dAtA[i] = 0x2a + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x22 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Domain) > 0 { + i -= len(m.Domain) + copy(dAtA[i:], m.Domain) + i = encodeVarintTx(dAtA, i, uint64(len(m.Domain))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStoreDocument) 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 *MsgStoreDocument) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStoreDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Artifact) > 0 { + i -= len(m.Artifact) + copy(dAtA[i:], m.Artifact) + i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) + i-- + dAtA[i] = 0x6a + } + if m.HasTimestamp { + i-- + if m.HasTimestamp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.Timestamp != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x58 + } + if m.HasTier { + i-- + if m.HasTier { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if len(m.Tier) > 0 { + i -= len(m.Tier) + copy(dAtA[i:], m.Tier) + i = encodeVarintTx(dAtA, i, uint64(len(m.Tier))) + i-- + dAtA[i] = 0x4a + } + if len(m.Permission) > 0 { + i -= len(m.Permission) + copy(dAtA[i:], m.Permission) + i = encodeVarintTx(dAtA, i, uint64(len(m.Permission))) + i-- + dAtA[i] = 0x42 + } + if len(m.Resource) > 0 { + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintTx(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x3a + } + if len(m.PolicyId) > 0 { + i -= len(m.PolicyId) + copy(dAtA[i:], m.PolicyId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) + i-- + dAtA[i] = 0x32 + } + if len(m.Proof) > 0 { + i -= len(m.Proof) + copy(dAtA[i:], m.Proof) + i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + i-- + dAtA[i] = 0x2a + } + if len(m.Document) > 0 { + i -= len(m.Document) + copy(dAtA[i:], m.Document) + i = encodeVarintTx(dAtA, i, uint64(len(m.Document))) + i-- + dAtA[i] = 0x22 + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x1a + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStoreDocumentResponse) 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 *MsgStoreDocumentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStoreDocumentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DocumentId) > 0 { + i -= len(m.DocumentId) + copy(dAtA[i:], m.DocumentId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DocumentId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStoreKeyDerivation) 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 *MsgStoreKeyDerivation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStoreKeyDerivation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Artifact) > 0 { + i -= len(m.Artifact) + copy(dAtA[i:], m.Artifact) + i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) + i-- + dAtA[i] = 0x42 + } + if len(m.Permission) > 0 { + i -= len(m.Permission) + copy(dAtA[i:], m.Permission) + i = encodeVarintTx(dAtA, i, uint64(len(m.Permission))) + i-- + dAtA[i] = 0x3a + } + if len(m.Resource) > 0 { + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintTx(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x32 + } + if len(m.PolicyId) > 0 { + i -= len(m.PolicyId) + copy(dAtA[i:], m.PolicyId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) + i-- + dAtA[i] = 0x2a + } + if len(m.Derivation) > 0 { + i -= len(m.Derivation) + copy(dAtA[i:], m.Derivation) + i = encodeVarintTx(dAtA, i, uint64(len(m.Derivation))) + i-- + dAtA[i] = 0x22 + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x1a + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStoreKeyDerivationResponse) 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 *MsgStoreKeyDerivationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStoreKeyDerivationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.KeyDerivationId) > 0 { + i -= len(m.KeyDerivationId) + copy(dAtA[i:], m.KeyDerivationId) + i = encodeVarintTx(dAtA, i, uint64(len(m.KeyDerivationId))) + i-- + dAtA[i] = 0xa + } + 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 *MsgCreateRing) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RingPk) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.PeerIds) > 0 { + for _, s := range m.PeerIds { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if m.Threshold != 0 { + n += 1 + sovTx(uint64(m.Threshold)) + } + if m.PssInterval != 0 { + n += 1 + sovTx(uint64(m.PssInterval)) + } + if m.HasPssInterval { + n += 2 + } + l = len(m.PolicyId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Artifact) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateRingResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateRingByAcp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Artifact) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.NewPeerIds) > 0 { + for _, s := range m.NewPeerIds { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if m.NewThreshold != 0 { + n += 1 + sovTx(uint64(m.NewThreshold)) + } + if m.HasNewThreshold { + n += 2 + } + if m.PssInterval != 0 { + n += 1 + sovTx(uint64(m.PssInterval)) + } + if m.HasPssInterval { + n += 2 + } + return n +} + +func (m *MsgUpdateRingByAcpResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgFinalizeRingReshareByThresholdSignature) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Artifact) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SignatureScheme) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RingReshareFinalizeSignDoc) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Domain) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RingPk) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.CurrentRingSha256) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.FinalizedRingSha256) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.BlockNumberNonce != 0 { + n += 1 + sovTx(uint64(m.BlockNumberNonce)) + } + return n +} + +func (m *MsgStoreDocument) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Document) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Proof) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.PolicyId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Resource) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Permission) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Tier) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.HasTier { + n += 2 + } + if m.Timestamp != 0 { + n += 1 + sovTx(uint64(m.Timestamp)) + } + if m.HasTimestamp { + n += 2 + } + l = len(m.Artifact) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgStoreDocumentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DocumentId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgStoreKeyDerivation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Derivation) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.PolicyId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Resource) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Permission) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Artifact) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgStoreKeyDerivationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.KeyDerivationId) + if l > 0 { + n += 1 + l + sovTx(uint64(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 *MsgCreateRing) 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: MsgCreateRing: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateRing: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingPk", 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.RingPk = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerIds", 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.PeerIds = append(m.PeerIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + m.Threshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Threshold |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) + } + m.PssInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PssInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasPssInterval = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = 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 *MsgCreateRingResponse) 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: MsgCreateRingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateRingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", 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.RingId = 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 *MsgUpdateRingByAcp) 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: MsgUpdateRingByAcp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateRingByAcp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", 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.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", 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.NewPeerIds = append(m.NewPeerIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) + } + m.NewThreshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NewThreshold |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasNewThreshold", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasNewThreshold = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) + } + m.PssInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PssInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasPssInterval = bool(v != 0) + 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 *MsgUpdateRingByAcpResponse) 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: MsgUpdateRingByAcpResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateRingByAcpResponse: 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 *MsgFinalizeRingReshareByThresholdSignature) 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: MsgFinalizeRingReshareByThresholdSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", 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.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignatureScheme", 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.SignatureScheme = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + 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 *MsgFinalizeRingReshareByThresholdSignatureResponse) 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: MsgFinalizeRingReshareByThresholdSignatureResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignatureResponse: 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 *RingReshareFinalizeSignDoc) 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: RingReshareFinalizeSignDoc: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RingReshareFinalizeSignDoc: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Domain", 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.Domain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", 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.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingPk", 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.RingPk = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentRingSha256", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrentRingSha256 = append(m.CurrentRingSha256[:0], dAtA[iNdEx:postIndex]...) + if m.CurrentRingSha256 == nil { + m.CurrentRingSha256 = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FinalizedRingSha256", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FinalizedRingSha256 = append(m.FinalizedRingSha256[:0], dAtA[iNdEx:postIndex]...) + if m.FinalizedRingSha256 == nil { + m.FinalizedRingSha256 = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) + } + m.BlockNumberNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumberNonce |= uint64(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 *MsgStoreDocument) 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: MsgStoreDocument: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStoreDocument: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", 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.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Document", 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.Document = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", 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.Proof = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", 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.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permission", 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.Permission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", 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.Tier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasTier", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasTier = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasTimestamp", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasTimestamp = bool(v != 0) + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = 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 *MsgStoreDocumentResponse) 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: MsgStoreDocumentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStoreDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", 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.DocumentId = 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 *MsgStoreKeyDerivation) 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: MsgStoreKeyDerivation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStoreKeyDerivation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", 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.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Derivation", 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.Derivation = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", 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.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permission", 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.Permission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = 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 *MsgStoreKeyDerivationResponse) 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: MsgStoreKeyDerivationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStoreKeyDerivationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyDerivationId", 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.KeyDerivationId = 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 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") +) From 4f542c62f6c64f45fcd4c9e3623dcaa3771ebc23 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Wed, 20 May 2026 10:51:42 -0400 Subject: [PATCH 2/8] remove unneeded artifact fields --- api/sourcehub/orbis/events.pulsar.go | 290 ++--------- api/sourcehub/orbis/tx.pulsar.go | 473 ++++-------------- go.mod | 2 +- proto/sourcehub/orbis/events.proto | 3 - proto/sourcehub/orbis/tx.proto | 4 - x/orbis/keeper/msg_server.go | 4 - x/orbis/types/events.pb.go | 195 +------- ...ize_ring_reshare_by_threshold_signature.go | 2 - x/orbis/types/tx.pb.go | 349 +++---------- 9 files changed, 217 insertions(+), 1105 deletions(-) diff --git a/api/sourcehub/orbis/events.pulsar.go b/api/sourcehub/orbis/events.pulsar.go index ecfdf338..071e98ef 100644 --- a/api/sourcehub/orbis/events.pulsar.go +++ b/api/sourcehub/orbis/events.pulsar.go @@ -629,7 +629,6 @@ var ( fd_EventRingUpdated_namespace protoreflect.FieldDescriptor fd_EventRingUpdated_ring_id protoreflect.FieldDescriptor fd_EventRingUpdated_updater_did protoreflect.FieldDescriptor - fd_EventRingUpdated_artifact protoreflect.FieldDescriptor ) func init() { @@ -638,7 +637,6 @@ func init() { fd_EventRingUpdated_namespace = md_EventRingUpdated.Fields().ByName("namespace") fd_EventRingUpdated_ring_id = md_EventRingUpdated.Fields().ByName("ring_id") fd_EventRingUpdated_updater_did = md_EventRingUpdated.Fields().ByName("updater_did") - fd_EventRingUpdated_artifact = md_EventRingUpdated.Fields().ByName("artifact") } var _ protoreflect.Message = (*fastReflection_EventRingUpdated)(nil) @@ -724,12 +722,6 @@ func (x *fastReflection_EventRingUpdated) Range(f func(protoreflect.FieldDescrip return } } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_EventRingUpdated_artifact, value) { - return - } - } } // Has reports whether a field is populated. @@ -751,8 +743,6 @@ func (x *fastReflection_EventRingUpdated) Has(fd protoreflect.FieldDescriptor) b return x.RingId != "" case "sourcehub.orbis.EventRingUpdated.updater_did": return x.UpdaterDid != "" - case "sourcehub.orbis.EventRingUpdated.artifact": - return x.Artifact != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) @@ -775,8 +765,6 @@ func (x *fastReflection_EventRingUpdated) Clear(fd protoreflect.FieldDescriptor) x.RingId = "" case "sourcehub.orbis.EventRingUpdated.updater_did": x.UpdaterDid = "" - case "sourcehub.orbis.EventRingUpdated.artifact": - x.Artifact = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) @@ -802,9 +790,6 @@ func (x *fastReflection_EventRingUpdated) Get(descriptor protoreflect.FieldDescr case "sourcehub.orbis.EventRingUpdated.updater_did": value := x.UpdaterDid return protoreflect.ValueOfString(value) - case "sourcehub.orbis.EventRingUpdated.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) @@ -831,8 +816,6 @@ func (x *fastReflection_EventRingUpdated) Set(fd protoreflect.FieldDescriptor, v x.RingId = value.Interface().(string) case "sourcehub.orbis.EventRingUpdated.updater_did": x.UpdaterDid = value.Interface().(string) - case "sourcehub.orbis.EventRingUpdated.artifact": - x.Artifact = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) @@ -859,8 +842,6 @@ func (x *fastReflection_EventRingUpdated) Mutable(fd protoreflect.FieldDescripto panic(fmt.Errorf("field ring_id of message sourcehub.orbis.EventRingUpdated is not mutable")) case "sourcehub.orbis.EventRingUpdated.updater_did": panic(fmt.Errorf("field updater_did of message sourcehub.orbis.EventRingUpdated is not mutable")) - case "sourcehub.orbis.EventRingUpdated.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.orbis.EventRingUpdated is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) @@ -880,8 +861,6 @@ func (x *fastReflection_EventRingUpdated) NewField(fd protoreflect.FieldDescript return protoreflect.ValueOfString("") case "sourcehub.orbis.EventRingUpdated.updater_did": return protoreflect.ValueOfString("") - case "sourcehub.orbis.EventRingUpdated.artifact": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingUpdated")) @@ -963,10 +942,6 @@ func (x *fastReflection_EventRingUpdated) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -996,13 +971,6 @@ func (x *fastReflection_EventRingUpdated) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x22 - } if len(x.UpdaterDid) > 0 { i -= len(x.UpdaterDid) copy(dAtA[i:], x.UpdaterDid) @@ -1169,38 +1137,6 @@ func (x *fastReflection_EventRingUpdated) ProtoMethods() *protoiface.Methods { } x.UpdaterDid = 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 Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1241,7 +1177,6 @@ var ( fd_EventDocumentStored_namespace protoreflect.FieldDescriptor fd_EventDocumentStored_document_id protoreflect.FieldDescriptor fd_EventDocumentStored_creator_did protoreflect.FieldDescriptor - fd_EventDocumentStored_artifact protoreflect.FieldDescriptor ) func init() { @@ -1250,7 +1185,6 @@ func init() { fd_EventDocumentStored_namespace = md_EventDocumentStored.Fields().ByName("namespace") fd_EventDocumentStored_document_id = md_EventDocumentStored.Fields().ByName("document_id") fd_EventDocumentStored_creator_did = md_EventDocumentStored.Fields().ByName("creator_did") - fd_EventDocumentStored_artifact = md_EventDocumentStored.Fields().ByName("artifact") } var _ protoreflect.Message = (*fastReflection_EventDocumentStored)(nil) @@ -1336,12 +1270,6 @@ func (x *fastReflection_EventDocumentStored) Range(f func(protoreflect.FieldDesc return } } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_EventDocumentStored_artifact, value) { - return - } - } } // Has reports whether a field is populated. @@ -1363,8 +1291,6 @@ func (x *fastReflection_EventDocumentStored) Has(fd protoreflect.FieldDescriptor return x.DocumentId != "" case "sourcehub.orbis.EventDocumentStored.creator_did": return x.CreatorDid != "" - case "sourcehub.orbis.EventDocumentStored.artifact": - return x.Artifact != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) @@ -1387,8 +1313,6 @@ func (x *fastReflection_EventDocumentStored) Clear(fd protoreflect.FieldDescript x.DocumentId = "" case "sourcehub.orbis.EventDocumentStored.creator_did": x.CreatorDid = "" - case "sourcehub.orbis.EventDocumentStored.artifact": - x.Artifact = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) @@ -1414,9 +1338,6 @@ func (x *fastReflection_EventDocumentStored) Get(descriptor protoreflect.FieldDe case "sourcehub.orbis.EventDocumentStored.creator_did": value := x.CreatorDid return protoreflect.ValueOfString(value) - case "sourcehub.orbis.EventDocumentStored.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) @@ -1443,8 +1364,6 @@ func (x *fastReflection_EventDocumentStored) Set(fd protoreflect.FieldDescriptor x.DocumentId = value.Interface().(string) case "sourcehub.orbis.EventDocumentStored.creator_did": x.CreatorDid = value.Interface().(string) - case "sourcehub.orbis.EventDocumentStored.artifact": - x.Artifact = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) @@ -1471,8 +1390,6 @@ func (x *fastReflection_EventDocumentStored) Mutable(fd protoreflect.FieldDescri panic(fmt.Errorf("field document_id of message sourcehub.orbis.EventDocumentStored is not mutable")) case "sourcehub.orbis.EventDocumentStored.creator_did": panic(fmt.Errorf("field creator_did of message sourcehub.orbis.EventDocumentStored is not mutable")) - case "sourcehub.orbis.EventDocumentStored.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.orbis.EventDocumentStored is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) @@ -1492,8 +1409,6 @@ func (x *fastReflection_EventDocumentStored) NewField(fd protoreflect.FieldDescr return protoreflect.ValueOfString("") case "sourcehub.orbis.EventDocumentStored.creator_did": return protoreflect.ValueOfString("") - case "sourcehub.orbis.EventDocumentStored.artifact": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventDocumentStored")) @@ -1575,10 +1490,6 @@ func (x *fastReflection_EventDocumentStored) ProtoMethods() *protoiface.Methods if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1608,13 +1519,6 @@ func (x *fastReflection_EventDocumentStored) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x22 - } if len(x.CreatorDid) > 0 { i -= len(x.CreatorDid) copy(dAtA[i:], x.CreatorDid) @@ -1781,38 +1685,6 @@ func (x *fastReflection_EventDocumentStored) ProtoMethods() *protoiface.Methods } x.CreatorDid = 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 Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1853,7 +1725,6 @@ var ( fd_EventKeyDerivationStored_namespace protoreflect.FieldDescriptor fd_EventKeyDerivationStored_key_derivation_id protoreflect.FieldDescriptor fd_EventKeyDerivationStored_creator_did protoreflect.FieldDescriptor - fd_EventKeyDerivationStored_artifact protoreflect.FieldDescriptor ) func init() { @@ -1862,7 +1733,6 @@ func init() { fd_EventKeyDerivationStored_namespace = md_EventKeyDerivationStored.Fields().ByName("namespace") fd_EventKeyDerivationStored_key_derivation_id = md_EventKeyDerivationStored.Fields().ByName("key_derivation_id") fd_EventKeyDerivationStored_creator_did = md_EventKeyDerivationStored.Fields().ByName("creator_did") - fd_EventKeyDerivationStored_artifact = md_EventKeyDerivationStored.Fields().ByName("artifact") } var _ protoreflect.Message = (*fastReflection_EventKeyDerivationStored)(nil) @@ -1948,12 +1818,6 @@ func (x *fastReflection_EventKeyDerivationStored) Range(f func(protoreflect.Fiel return } } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_EventKeyDerivationStored_artifact, value) { - return - } - } } // Has reports whether a field is populated. @@ -1975,8 +1839,6 @@ func (x *fastReflection_EventKeyDerivationStored) Has(fd protoreflect.FieldDescr return x.KeyDerivationId != "" case "sourcehub.orbis.EventKeyDerivationStored.creator_did": return x.CreatorDid != "" - case "sourcehub.orbis.EventKeyDerivationStored.artifact": - return x.Artifact != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) @@ -1999,8 +1861,6 @@ func (x *fastReflection_EventKeyDerivationStored) Clear(fd protoreflect.FieldDes x.KeyDerivationId = "" case "sourcehub.orbis.EventKeyDerivationStored.creator_did": x.CreatorDid = "" - case "sourcehub.orbis.EventKeyDerivationStored.artifact": - x.Artifact = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) @@ -2026,9 +1886,6 @@ func (x *fastReflection_EventKeyDerivationStored) Get(descriptor protoreflect.Fi case "sourcehub.orbis.EventKeyDerivationStored.creator_did": value := x.CreatorDid return protoreflect.ValueOfString(value) - case "sourcehub.orbis.EventKeyDerivationStored.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) @@ -2055,8 +1912,6 @@ func (x *fastReflection_EventKeyDerivationStored) Set(fd protoreflect.FieldDescr x.KeyDerivationId = value.Interface().(string) case "sourcehub.orbis.EventKeyDerivationStored.creator_did": x.CreatorDid = value.Interface().(string) - case "sourcehub.orbis.EventKeyDerivationStored.artifact": - x.Artifact = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) @@ -2083,8 +1938,6 @@ func (x *fastReflection_EventKeyDerivationStored) Mutable(fd protoreflect.FieldD panic(fmt.Errorf("field key_derivation_id of message sourcehub.orbis.EventKeyDerivationStored is not mutable")) case "sourcehub.orbis.EventKeyDerivationStored.creator_did": panic(fmt.Errorf("field creator_did of message sourcehub.orbis.EventKeyDerivationStored is not mutable")) - case "sourcehub.orbis.EventKeyDerivationStored.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.orbis.EventKeyDerivationStored is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) @@ -2104,8 +1957,6 @@ func (x *fastReflection_EventKeyDerivationStored) NewField(fd protoreflect.Field return protoreflect.ValueOfString("") case "sourcehub.orbis.EventKeyDerivationStored.creator_did": return protoreflect.ValueOfString("") - case "sourcehub.orbis.EventKeyDerivationStored.artifact": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventKeyDerivationStored")) @@ -2187,10 +2038,6 @@ func (x *fastReflection_EventKeyDerivationStored) ProtoMethods() *protoiface.Met if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2220,13 +2067,6 @@ func (x *fastReflection_EventKeyDerivationStored) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x22 - } if len(x.CreatorDid) > 0 { i -= len(x.CreatorDid) copy(dAtA[i:], x.CreatorDid) @@ -2393,38 +2233,6 @@ func (x *fastReflection_EventKeyDerivationStored) ProtoMethods() *protoiface.Met } x.CreatorDid = 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 Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2542,7 +2350,6 @@ type EventRingUpdated struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` UpdaterDid string `protobuf:"bytes,3,opt,name=updater_did,json=updaterDid,proto3" json:"updater_did,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (x *EventRingUpdated) Reset() { @@ -2586,13 +2393,6 @@ func (x *EventRingUpdated) GetUpdaterDid() string { return "" } -func (x *EventRingUpdated) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - // EventDocumentStored is emitted when an encrypted document is stored. type EventDocumentStored struct { state protoimpl.MessageState @@ -2602,7 +2402,6 @@ type EventDocumentStored struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (x *EventDocumentStored) Reset() { @@ -2646,13 +2445,6 @@ func (x *EventDocumentStored) GetCreatorDid() string { return "" } -func (x *EventDocumentStored) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - // EventKeyDerivationStored is emitted when a key derivation is stored. type EventKeyDerivationStored struct { state protoimpl.MessageState @@ -2662,7 +2454,6 @@ type EventKeyDerivationStored struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` KeyDerivationId string `protobuf:"bytes,2,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (x *EventKeyDerivationStored) Reset() { @@ -2706,13 +2497,6 @@ func (x *EventKeyDerivationStored) GetCreatorDid() string { return "" } -func (x *EventKeyDerivationStored) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - var File_sourcehub_orbis_events_proto protoreflect.FileDescriptor var file_sourcehub_orbis_events_proto_rawDesc = []byte{ @@ -2727,46 +2511,40 @@ var file_sourcehub_orbis_events_proto_rawDesc = []byte{ 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x10, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, - 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x5f, - 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x22, 0x91, 0x01, 0x0a, 0x13, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4b, - 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x6f, 0x72, - 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x2a, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, - 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0xa1, 0x01, 0x0a, 0x13, 0x63, 0x6f, - 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, - 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x22, 0x6a, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, + 0x67, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x64, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x72, 0x44, 0x69, 0x64, 0x22, 0x75, 0x0a, 0x13, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x18, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x44, 0x69, 0x64, 0x42, 0xa1, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0b, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, + 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, + 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/sourcehub/orbis/tx.pulsar.go b/api/sourcehub/orbis/tx.pulsar.go index bca76f1b..eb4a487f 100644 --- a/api/sourcehub/orbis/tx.pulsar.go +++ b/api/sourcehub/orbis/tx.pulsar.go @@ -2291,7 +2291,6 @@ var ( md_MsgUpdateRingByAcp protoreflect.MessageDescriptor fd_MsgUpdateRingByAcp_creator protoreflect.FieldDescriptor fd_MsgUpdateRingByAcp_ring_id protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_artifact protoreflect.FieldDescriptor fd_MsgUpdateRingByAcp_new_peer_ids protoreflect.FieldDescriptor fd_MsgUpdateRingByAcp_new_threshold protoreflect.FieldDescriptor fd_MsgUpdateRingByAcp_has_new_threshold protoreflect.FieldDescriptor @@ -2304,7 +2303,6 @@ func init() { md_MsgUpdateRingByAcp = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgUpdateRingByAcp") fd_MsgUpdateRingByAcp_creator = md_MsgUpdateRingByAcp.Fields().ByName("creator") fd_MsgUpdateRingByAcp_ring_id = md_MsgUpdateRingByAcp.Fields().ByName("ring_id") - fd_MsgUpdateRingByAcp_artifact = md_MsgUpdateRingByAcp.Fields().ByName("artifact") fd_MsgUpdateRingByAcp_new_peer_ids = md_MsgUpdateRingByAcp.Fields().ByName("new_peer_ids") fd_MsgUpdateRingByAcp_new_threshold = md_MsgUpdateRingByAcp.Fields().ByName("new_threshold") fd_MsgUpdateRingByAcp_has_new_threshold = md_MsgUpdateRingByAcp.Fields().ByName("has_new_threshold") @@ -2389,12 +2387,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) Range(f func(protoreflect.FieldDescr return } } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_MsgUpdateRingByAcp_artifact, value) { - return - } - } if len(x.NewPeerIds) != 0 { value := protoreflect.ValueOfList(&_MsgUpdateRingByAcp_4_list{list: &x.NewPeerIds}) if !f(fd_MsgUpdateRingByAcp_new_peer_ids, value) { @@ -2444,8 +2436,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) Has(fd protoreflect.FieldDescriptor) return x.Creator != "" case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": return x.RingId != "" - case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": - return x.Artifact != "" case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": return len(x.NewPeerIds) != 0 case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": @@ -2476,8 +2466,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) Clear(fd protoreflect.FieldDescripto x.Creator = "" case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": x.RingId = "" - case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": - x.Artifact = "" case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": x.NewPeerIds = nil case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": @@ -2510,9 +2498,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) Get(descriptor protoreflect.FieldDes case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": value := x.RingId return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": if len(x.NewPeerIds) == 0 { return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_4_list{}) @@ -2555,8 +2540,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) Set(fd protoreflect.FieldDescriptor, x.Creator = value.Interface().(string) case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": x.RingId = value.Interface().(string) - case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": - x.Artifact = value.Interface().(string) case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": lv := value.List() clv := lv.(*_MsgUpdateRingByAcp_4_list) @@ -2599,8 +2582,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) Mutable(fd protoreflect.FieldDescrip panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) - case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": panic(fmt.Errorf("field new_threshold of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": @@ -2626,8 +2607,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) NewField(fd protoreflect.FieldDescri return protoreflect.ValueOfString("") case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgUpdateRingByAcp.artifact": - return protoreflect.ValueOfString("") case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": list := []string{} return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_4_list{list: &list}) @@ -2716,10 +2695,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if len(x.NewPeerIds) > 0 { for _, s := range x.NewPeerIds { l = len(s) @@ -2806,13 +2781,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x22 } } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x1a - } if len(x.RingId) > 0 { i -= len(x.RingId) copy(dAtA[i:], x.RingId) @@ -2940,38 +2908,6 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { } x.RingId = 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 Artifact", 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.Artifact = 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 NewPeerIds", wireType) @@ -3477,7 +3413,6 @@ var ( md_MsgFinalizeRingReshareByThresholdSignature protoreflect.MessageDescriptor fd_MsgFinalizeRingReshareByThresholdSignature_creator protoreflect.FieldDescriptor fd_MsgFinalizeRingReshareByThresholdSignature_ring_id protoreflect.FieldDescriptor - fd_MsgFinalizeRingReshareByThresholdSignature_artifact protoreflect.FieldDescriptor fd_MsgFinalizeRingReshareByThresholdSignature_signature_scheme protoreflect.FieldDescriptor fd_MsgFinalizeRingReshareByThresholdSignature_signature protoreflect.FieldDescriptor ) @@ -3487,7 +3422,6 @@ func init() { md_MsgFinalizeRingReshareByThresholdSignature = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgFinalizeRingReshareByThresholdSignature") fd_MsgFinalizeRingReshareByThresholdSignature_creator = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("creator") fd_MsgFinalizeRingReshareByThresholdSignature_ring_id = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("ring_id") - fd_MsgFinalizeRingReshareByThresholdSignature_artifact = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("artifact") fd_MsgFinalizeRingReshareByThresholdSignature_signature_scheme = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("signature_scheme") fd_MsgFinalizeRingReshareByThresholdSignature_signature = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("signature") } @@ -3569,12 +3503,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Range(f func return } } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_MsgFinalizeRingReshareByThresholdSignature_artifact, value) { - return - } - } if x.SignatureScheme != "" { value := protoreflect.ValueOfString(x.SignatureScheme) if !f(fd_MsgFinalizeRingReshareByThresholdSignature_signature_scheme, value) { @@ -3606,8 +3534,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Has(fd proto return x.Creator != "" case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": return x.RingId != "" - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": - return x.Artifact != "" case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": return x.SignatureScheme != "" case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": @@ -3632,8 +3558,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Clear(fd pro x.Creator = "" case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": x.RingId = "" - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": - x.Artifact = "" case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": x.SignatureScheme = "" case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": @@ -3660,9 +3584,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Get(descript case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": value := x.RingId return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": value := x.SignatureScheme return protoreflect.ValueOfString(value) @@ -3693,8 +3614,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Set(fd proto x.Creator = value.Interface().(string) case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": x.RingId = value.Interface().(string) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": - x.Artifact = value.Interface().(string) case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": x.SignatureScheme = value.Interface().(string) case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": @@ -3723,8 +3642,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Mutable(fd p panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": panic(fmt.Errorf("field signature_scheme of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": @@ -3746,8 +3663,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) NewField(fd return protoreflect.ValueOfString("") case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.artifact": - return protoreflect.ValueOfString("") case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": return protoreflect.ValueOfString("") case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": @@ -3829,10 +3744,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) ProtoMethods if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.SignatureScheme) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -3884,13 +3795,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) ProtoMethods i-- dAtA[i] = 0x22 } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x1a - } if len(x.RingId) > 0 { i -= len(x.RingId) copy(dAtA[i:], x.RingId) @@ -4018,38 +3922,6 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) ProtoMethods } x.RingId = 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 Artifact", 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.Artifact = 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 SignatureScheme", wireType) @@ -5377,7 +5249,6 @@ var ( fd_MsgStoreDocument_has_tier protoreflect.FieldDescriptor fd_MsgStoreDocument_timestamp protoreflect.FieldDescriptor fd_MsgStoreDocument_has_timestamp protoreflect.FieldDescriptor - fd_MsgStoreDocument_artifact protoreflect.FieldDescriptor ) func init() { @@ -5395,7 +5266,6 @@ func init() { fd_MsgStoreDocument_has_tier = md_MsgStoreDocument.Fields().ByName("has_tier") fd_MsgStoreDocument_timestamp = md_MsgStoreDocument.Fields().ByName("timestamp") fd_MsgStoreDocument_has_timestamp = md_MsgStoreDocument.Fields().ByName("has_timestamp") - fd_MsgStoreDocument_artifact = md_MsgStoreDocument.Fields().ByName("artifact") } var _ protoreflect.Message = (*fastReflection_MsgStoreDocument)(nil) @@ -5535,12 +5405,6 @@ func (x *fastReflection_MsgStoreDocument) Range(f func(protoreflect.FieldDescrip return } } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_MsgStoreDocument_artifact, value) { - return - } - } } // Has reports whether a field is populated. @@ -5580,8 +5444,6 @@ func (x *fastReflection_MsgStoreDocument) Has(fd protoreflect.FieldDescriptor) b return x.Timestamp != uint64(0) case "sourcehub.orbis.MsgStoreDocument.has_timestamp": return x.HasTimestamp != false - case "sourcehub.orbis.MsgStoreDocument.artifact": - return x.Artifact != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5622,8 +5484,6 @@ func (x *fastReflection_MsgStoreDocument) Clear(fd protoreflect.FieldDescriptor) x.Timestamp = uint64(0) case "sourcehub.orbis.MsgStoreDocument.has_timestamp": x.HasTimestamp = false - case "sourcehub.orbis.MsgStoreDocument.artifact": - x.Artifact = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5676,9 +5536,6 @@ func (x *fastReflection_MsgStoreDocument) Get(descriptor protoreflect.FieldDescr case "sourcehub.orbis.MsgStoreDocument.has_timestamp": value := x.HasTimestamp return protoreflect.ValueOfBool(value) - case "sourcehub.orbis.MsgStoreDocument.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5723,8 +5580,6 @@ func (x *fastReflection_MsgStoreDocument) Set(fd protoreflect.FieldDescriptor, v x.Timestamp = value.Uint() case "sourcehub.orbis.MsgStoreDocument.has_timestamp": x.HasTimestamp = value.Bool() - case "sourcehub.orbis.MsgStoreDocument.artifact": - x.Artifact = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5769,8 +5624,6 @@ func (x *fastReflection_MsgStoreDocument) Mutable(fd protoreflect.FieldDescripto panic(fmt.Errorf("field timestamp of message sourcehub.orbis.MsgStoreDocument is not mutable")) case "sourcehub.orbis.MsgStoreDocument.has_timestamp": panic(fmt.Errorf("field has_timestamp of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgStoreDocument is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5808,8 +5661,6 @@ func (x *fastReflection_MsgStoreDocument) NewField(fd protoreflect.FieldDescript return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.orbis.MsgStoreDocument.has_timestamp": return protoreflect.ValueOfBool(false) - case "sourcehub.orbis.MsgStoreDocument.artifact": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5924,10 +5775,6 @@ func (x *fastReflection_MsgStoreDocument) ProtoMethods() *protoiface.Methods { if x.HasTimestamp { n += 2 } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -5957,13 +5804,6 @@ func (x *fastReflection_MsgStoreDocument) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x6a - } if x.HasTimestamp { i-- if x.HasTimestamp { @@ -6448,38 +6288,6 @@ func (x *fastReflection_MsgStoreDocument) ProtoMethods() *protoiface.Methods { } } x.HasTimestamp = bool(v != 0) - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -6944,7 +6752,6 @@ var ( fd_MsgStoreKeyDerivation_policy_id protoreflect.FieldDescriptor fd_MsgStoreKeyDerivation_resource protoreflect.FieldDescriptor fd_MsgStoreKeyDerivation_permission protoreflect.FieldDescriptor - fd_MsgStoreKeyDerivation_artifact protoreflect.FieldDescriptor ) func init() { @@ -6957,7 +6764,6 @@ func init() { fd_MsgStoreKeyDerivation_policy_id = md_MsgStoreKeyDerivation.Fields().ByName("policy_id") fd_MsgStoreKeyDerivation_resource = md_MsgStoreKeyDerivation.Fields().ByName("resource") fd_MsgStoreKeyDerivation_permission = md_MsgStoreKeyDerivation.Fields().ByName("permission") - fd_MsgStoreKeyDerivation_artifact = md_MsgStoreKeyDerivation.Fields().ByName("artifact") } var _ protoreflect.Message = (*fastReflection_MsgStoreKeyDerivation)(nil) @@ -7067,12 +6873,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) Range(f func(protoreflect.FieldDe return } } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_MsgStoreKeyDerivation_artifact, value) { - return - } - } } // Has reports whether a field is populated. @@ -7102,8 +6902,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) Has(fd protoreflect.FieldDescript return x.Resource != "" case "sourcehub.orbis.MsgStoreKeyDerivation.permission": return x.Permission != "" - case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": - return x.Artifact != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) @@ -7134,8 +6932,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) Clear(fd protoreflect.FieldDescri x.Resource = "" case "sourcehub.orbis.MsgStoreKeyDerivation.permission": x.Permission = "" - case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": - x.Artifact = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) @@ -7173,9 +6969,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) Get(descriptor protoreflect.Field case "sourcehub.orbis.MsgStoreKeyDerivation.permission": value := x.Permission return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) @@ -7210,8 +7003,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) Set(fd protoreflect.FieldDescript x.Resource = value.Interface().(string) case "sourcehub.orbis.MsgStoreKeyDerivation.permission": x.Permission = value.Interface().(string) - case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": - x.Artifact = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) @@ -7246,8 +7037,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) Mutable(fd protoreflect.FieldDesc panic(fmt.Errorf("field resource of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) case "sourcehub.orbis.MsgStoreKeyDerivation.permission": panic(fmt.Errorf("field permission of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) - case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) @@ -7275,8 +7064,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) NewField(fd protoreflect.FieldDes return protoreflect.ValueOfString("") case "sourcehub.orbis.MsgStoreKeyDerivation.permission": return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreKeyDerivation.artifact": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) @@ -7374,10 +7161,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) ProtoMethods() *protoiface.Method if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -7407,13 +7190,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) ProtoMethods() *protoiface.Method i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x42 - } if len(x.Permission) > 0 { i -= len(x.Permission) copy(dAtA[i:], x.Permission) @@ -7736,38 +7512,6 @@ func (x *fastReflection_MsgStoreKeyDerivation) ProtoMethods() *protoiface.Method } x.Permission = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -8448,7 +8192,6 @@ type MsgUpdateRingByAcp struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Artifact string `protobuf:"bytes,3,opt,name=artifact,proto3" json:"artifact,omitempty"` NewPeerIds []string `protobuf:"bytes,4,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` NewThreshold uint32 `protobuf:"varint,5,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` HasNewThreshold bool `protobuf:"varint,6,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` @@ -8490,13 +8233,6 @@ func (x *MsgUpdateRingByAcp) GetRingId() string { return "" } -func (x *MsgUpdateRingByAcp) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - func (x *MsgUpdateRingByAcp) GetNewPeerIds() []string { if x != nil { return x.NewPeerIds @@ -8565,7 +8301,6 @@ type MsgFinalizeRingReshareByThresholdSignature struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Artifact string `protobuf:"bytes,3,opt,name=artifact,proto3" json:"artifact,omitempty"` SignatureScheme string `protobuf:"bytes,4,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` } @@ -8604,13 +8339,6 @@ func (x *MsgFinalizeRingReshareByThresholdSignature) GetRingId() string { return "" } -func (x *MsgFinalizeRingReshareByThresholdSignature) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - func (x *MsgFinalizeRingReshareByThresholdSignature) GetSignatureScheme() string { if x != nil { return x.SignatureScheme @@ -8759,7 +8487,6 @@ type MsgStoreDocument struct { HasTier bool `protobuf:"varint,10,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` Timestamp uint64 `protobuf:"varint,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"` HasTimestamp bool `protobuf:"varint,12,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` - Artifact string `protobuf:"bytes,13,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (x *MsgStoreDocument) Reset() { @@ -8866,13 +8593,6 @@ func (x *MsgStoreDocument) GetHasTimestamp() bool { return false } -func (x *MsgStoreDocument) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - type MsgStoreDocumentResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -8920,7 +8640,6 @@ type MsgStoreKeyDerivation struct { PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` - Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (x *MsgStoreKeyDerivation) Reset() { @@ -8992,13 +8711,6 @@ func (x *MsgStoreKeyDerivation) GetPermission() string { return "" } -func (x *MsgStoreKeyDerivation) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - type MsgStoreKeyDerivationResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -9083,108 +8795,101 @@ var file_sourcehub_orbis_tx_proto_rawDesc = []byte{ 0x30, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, - 0x64, 0x22, 0xb1, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x64, 0x22, 0x95, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, - 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, - 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x77, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2a, - 0x0a, 0x11, 0x68, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x4e, 0x65, - 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x73, - 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x28, 0x0a, - 0x10, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x50, 0x73, 0x73, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x2a, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, - 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, - 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x34, 0x0a, 0x32, 0x4d, 0x73, 0x67, 0x46, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6e, + 0x65, 0x77, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, + 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, + 0x61, 0x73, 0x4e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, + 0x50, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, + 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x2a, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, - 0x02, 0x0a, 0x1a, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x46, 0x69, - 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x16, 0x0a, - 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, - 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x70, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x6b, - 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, - 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, - 0x61, 0x32, 0x35, 0x36, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x6f, 0x6e, - 0x63, 0x65, 0x22, 0x8a, 0x03, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x69, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x74, - 0x69, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x54, 0x69, - 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, - 0x3b, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x8b, 0x02, 0x0a, - 0x15, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, - 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x3a, 0x0c, 0x82, 0xe7, + 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x22, 0x34, 0x0a, 0x32, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x1a, 0x52, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x69, + 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x0a, + 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x69, + 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, + 0x36, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x2c, 0x0a, 0x12, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0xee, 0x02, 0x0a, 0x10, 0x4d, + 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x69, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x54, 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0c, 0x68, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x0c, 0x82, + 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3b, 0x0a, 0x18, 0x4d, + 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xef, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, + 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, + 0x67, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4b, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6b, diff --git a/go.mod b/go.mod index 1c3ca5da..7d48b7c9 100644 --- a/go.mod +++ b/go.mod @@ -34,6 +34,7 @@ require ( github.com/cosmos/ibc-go/v10 v10.1.1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 + github.com/docker/docker v28.5.2+incompatible github.com/go-jose/go-jose/v3 v3.0.5 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 @@ -185,7 +186,6 @@ require ( github.com/distribution/reference v0.6.0 // indirect github.com/docker/cli v29.2.0+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v28.5.2+incompatible // indirect github.com/docker/docker-credential-helpers v0.9.3 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect diff --git a/proto/sourcehub/orbis/events.proto b/proto/sourcehub/orbis/events.proto index 7cc8b327..2b6e164f 100644 --- a/proto/sourcehub/orbis/events.proto +++ b/proto/sourcehub/orbis/events.proto @@ -17,7 +17,6 @@ message EventRingUpdated { string namespace = 1; string ring_id = 2; string updater_did = 3; - string artifact = 4; } // EventDocumentStored is emitted when an encrypted document is stored. @@ -25,7 +24,6 @@ message EventDocumentStored { string namespace = 1; string document_id = 2; string creator_did = 3; - string artifact = 4; } // EventKeyDerivationStored is emitted when a key derivation is stored. @@ -33,5 +31,4 @@ message EventKeyDerivationStored { string namespace = 1; string key_derivation_id = 2; string creator_did = 3; - string artifact = 4; } diff --git a/proto/sourcehub/orbis/tx.proto b/proto/sourcehub/orbis/tx.proto index 6c943906..93e6f6ef 100644 --- a/proto/sourcehub/orbis/tx.proto +++ b/proto/sourcehub/orbis/tx.proto @@ -60,7 +60,6 @@ message MsgUpdateRingByAcp { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string ring_id = 2; - string artifact = 3; repeated string new_peer_ids = 4; uint32 new_threshold = 5; bool has_new_threshold = 6; @@ -74,7 +73,6 @@ message MsgFinalizeRingReshareByThresholdSignature { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string ring_id = 2; - string artifact = 3; string signature_scheme = 4; bytes signature = 5; } @@ -106,7 +104,6 @@ message MsgStoreDocument { bool has_tier = 10; uint64 timestamp = 11; bool has_timestamp = 12; - string artifact = 13; } message MsgStoreDocumentResponse { @@ -122,7 +119,6 @@ message MsgStoreKeyDerivation { string policy_id = 5; string resource = 6; string permission = 7; - string artifact = 8; } message MsgStoreKeyDerivationResponse { diff --git a/x/orbis/keeper/msg_server.go b/x/orbis/keeper/msg_server.go index 25703359..bb56d7b5 100644 --- a/x/orbis/keeper/msg_server.go +++ b/x/orbis/keeper/msg_server.go @@ -130,7 +130,6 @@ func (k *Keeper) UpdateRingByAcp(goCtx context.Context, msg *types.MsgUpdateRing Namespace: ring.Namespace, RingId: ring.Id, UpdaterDid: updaterDID, - Artifact: msg.Artifact, }); err != nil { return nil, err } @@ -184,7 +183,6 @@ func (k *Keeper) FinalizeRingReshareByThresholdSignature( Namespace: finalizedRing.Namespace, RingId: finalizedRing.Id, UpdaterDid: updaterDID, - Artifact: msg.Artifact, }); err != nil { return nil, err } @@ -250,7 +248,6 @@ func (k *Keeper) StoreDocument(goCtx context.Context, msg *types.MsgStoreDocumen Namespace: namespaceID, DocumentId: documentID, CreatorDid: creatorDID, - Artifact: msg.Artifact, }); err != nil { return nil, err } @@ -296,7 +293,6 @@ func (k *Keeper) StoreKeyDerivation(goCtx context.Context, msg *types.MsgStoreKe Namespace: namespaceID, KeyDerivationId: keyDerivationID, CreatorDid: creatorDID, - Artifact: msg.Artifact, }); err != nil { return nil, err } diff --git a/x/orbis/types/events.pb.go b/x/orbis/types/events.pb.go index 755c5ded..4b487f1b 100644 --- a/x/orbis/types/events.pb.go +++ b/x/orbis/types/events.pb.go @@ -96,7 +96,6 @@ type EventRingUpdated struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` UpdaterDid string `protobuf:"bytes,3,opt,name=updater_did,json=updaterDid,proto3" json:"updater_did,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (m *EventRingUpdated) Reset() { *m = EventRingUpdated{} } @@ -153,19 +152,11 @@ func (m *EventRingUpdated) GetUpdaterDid() string { return "" } -func (m *EventRingUpdated) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - // EventDocumentStored is emitted when an encrypted document is stored. type EventDocumentStored struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (m *EventDocumentStored) Reset() { *m = EventDocumentStored{} } @@ -222,19 +213,11 @@ func (m *EventDocumentStored) GetCreatorDid() string { return "" } -func (m *EventDocumentStored) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - // EventKeyDerivationStored is emitted when a key derivation is stored. type EventKeyDerivationStored struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` KeyDerivationId string `protobuf:"bytes,2,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (m *EventKeyDerivationStored) Reset() { *m = EventKeyDerivationStored{} } @@ -291,13 +274,6 @@ func (m *EventKeyDerivationStored) GetCreatorDid() string { return "" } -func (m *EventKeyDerivationStored) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - func init() { proto.RegisterType((*EventRingCreated)(nil), "sourcehub.orbis.EventRingCreated") proto.RegisterType((*EventRingUpdated)(nil), "sourcehub.orbis.EventRingUpdated") @@ -308,27 +284,27 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/events.proto", fileDescriptor_cb68216cf0ba47d2) } var fileDescriptor_cb68216cf0ba47d2 = []byte{ - // 317 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xb1, 0x4e, 0xeb, 0x30, - 0x14, 0x86, 0xeb, 0x7b, 0x51, 0xa1, 0xa7, 0x43, 0x21, 0x0c, 0x44, 0xa8, 0x72, 0x11, 0x13, 0x62, - 0x68, 0x90, 0x78, 0x03, 0x28, 0x03, 0xb0, 0x15, 0xb1, 0xb0, 0x54, 0xae, 0x7d, 0x28, 0x56, 0x15, - 0x3b, 0x72, 0x9c, 0x42, 0x5e, 0x80, 0x19, 0x1e, 0x81, 0xb7, 0x61, 0xec, 0xc8, 0x88, 0x92, 0x17, - 0x41, 0x31, 0x21, 0xa1, 0x53, 0x91, 0x32, 0x9e, 0xff, 0x3f, 0x3e, 0xfa, 0x64, 0x7d, 0xd0, 0x8f, - 0x75, 0x62, 0x38, 0x3e, 0x24, 0xd3, 0x40, 0x9b, 0xa9, 0x8c, 0x03, 0x5c, 0xa0, 0xb2, 0xf1, 0x30, - 0x32, 0xda, 0x6a, 0xaf, 0x57, 0xb5, 0x43, 0xd7, 0x1e, 0x3e, 0x13, 0xd8, 0xbe, 0x28, 0x36, 0xc6, - 0x52, 0xcd, 0xce, 0x0d, 0x32, 0x8b, 0xc2, 0xeb, 0x43, 0x47, 0xb1, 0x10, 0xe3, 0x88, 0x71, 0xf4, - 0xc9, 0x01, 0x39, 0xea, 0x8c, 0xeb, 0xc0, 0xdb, 0x83, 0x4d, 0x23, 0xd5, 0x6c, 0x22, 0x85, 0xff, - 0xcf, 0x75, 0xed, 0x62, 0xbc, 0x14, 0xde, 0x00, 0xba, 0xbc, 0xb8, 0xa0, 0xcd, 0x44, 0x48, 0xe1, - 0xff, 0x77, 0x25, 0x94, 0xd1, 0x48, 0x0a, 0x6f, 0x1f, 0xb6, 0x98, 0xb1, 0xf2, 0x9e, 0x71, 0xeb, - 0x6f, 0xb8, 0xb6, 0x9a, 0x57, 0x41, 0x6e, 0x23, 0xd1, 0x10, 0x24, 0x71, 0x17, 0x56, 0x40, 0xca, - 0x68, 0x1d, 0xc8, 0x2b, 0x81, 0x5d, 0x07, 0x32, 0xd2, 0x3c, 0x09, 0x51, 0xd9, 0x1b, 0xab, 0xcd, - 0x5a, 0x96, 0x01, 0x74, 0x45, 0xb9, 0x5f, 0xf3, 0xc0, 0x4f, 0xd4, 0xf4, 0x73, 0xde, 0x08, 0xf8, - 0x8e, 0xe9, 0x1a, 0xd3, 0x11, 0x1a, 0xb9, 0x60, 0x56, 0x6a, 0xf5, 0x27, 0xb0, 0x63, 0xd8, 0x99, - 0x63, 0x3a, 0x11, 0xd5, 0xab, 0x1a, 0xaf, 0x37, 0xff, 0x7d, 0xad, 0x21, 0xe3, 0xd9, 0xd5, 0x7b, - 0x46, 0xc9, 0x32, 0xa3, 0xe4, 0x33, 0xa3, 0xe4, 0x25, 0xa7, 0xad, 0x65, 0x4e, 0x5b, 0x1f, 0x39, - 0x6d, 0xdd, 0x9d, 0xcc, 0xa4, 0x2d, 0x8c, 0xe3, 0x3a, 0x0c, 0xbe, 0xfd, 0x53, 0x68, 0x1f, 0xb5, - 0x99, 0x07, 0xb5, 0xab, 0x4f, 0xa5, 0xad, 0x36, 0x8d, 0x30, 0x9e, 0xb6, 0x9d, 0xad, 0xa7, 0x5f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x3e, 0x79, 0x60, 0xcd, 0x02, 0x00, 0x00, + // 318 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xb1, 0x4e, 0xf3, 0x30, + 0x14, 0x85, 0xeb, 0xff, 0x47, 0x85, 0xde, 0x0e, 0x85, 0x30, 0x10, 0xa1, 0xca, 0x45, 0x99, 0x10, + 0x43, 0x83, 0xc4, 0x1b, 0x40, 0x18, 0x80, 0xad, 0x88, 0x85, 0xa5, 0x72, 0xed, 0x4b, 0x31, 0x55, + 0xed, 0xc8, 0x71, 0x0a, 0x7d, 0x00, 0x98, 0x79, 0x2c, 0xc6, 0x8e, 0x8c, 0x28, 0x79, 0x11, 0x14, + 0x13, 0x92, 0x32, 0x11, 0x89, 0xf1, 0x9e, 0x73, 0x7d, 0xcf, 0xb1, 0xf4, 0x41, 0x3f, 0xd1, 0xa9, + 0xe1, 0x78, 0x9f, 0x4e, 0x42, 0x6d, 0x26, 0x32, 0x09, 0x71, 0x81, 0xca, 0x26, 0xc3, 0xd8, 0x68, + 0xab, 0xbd, 0x5e, 0xe5, 0x0e, 0x9d, 0x1b, 0xbc, 0x10, 0xd8, 0x3e, 0x2f, 0x36, 0x46, 0x52, 0x4d, + 0xcf, 0x0c, 0x32, 0x8b, 0xc2, 0xeb, 0x43, 0x47, 0xb1, 0x39, 0x26, 0x31, 0xe3, 0xe8, 0x93, 0x03, + 0x72, 0xd8, 0x19, 0xd5, 0x82, 0xb7, 0x07, 0x9b, 0x46, 0xaa, 0xe9, 0x58, 0x0a, 0xff, 0x9f, 0xf3, + 0xda, 0xc5, 0x78, 0x21, 0xbc, 0x01, 0x74, 0x79, 0x71, 0x41, 0x9b, 0xb1, 0x90, 0xc2, 0xff, 0xef, + 0x4c, 0x28, 0xa5, 0x48, 0x0a, 0x6f, 0x1f, 0xb6, 0x98, 0xb1, 0xf2, 0x8e, 0x71, 0xeb, 0x6f, 0x38, + 0xb7, 0x9a, 0x83, 0x87, 0xb5, 0x1e, 0x37, 0xb1, 0xf8, 0x63, 0x8f, 0xd4, 0x5d, 0xf8, 0xd1, 0xa3, + 0x94, 0x22, 0x29, 0x82, 0x14, 0x76, 0x5d, 0x56, 0xa4, 0x79, 0x3a, 0x47, 0x65, 0xaf, 0xad, 0x36, + 0xbf, 0xc6, 0x0d, 0xa0, 0x2b, 0xca, 0xfd, 0x3a, 0x12, 0xbe, 0xa5, 0x06, 0xdf, 0x0f, 0x9e, 0x09, + 0xf8, 0x2e, 0xf7, 0x0a, 0x97, 0x11, 0x1a, 0xb9, 0x60, 0x56, 0x6a, 0xd5, 0x28, 0xfc, 0x08, 0x76, + 0x66, 0xb8, 0x1c, 0x8b, 0xea, 0x55, 0x5d, 0xa1, 0x37, 0x5b, 0xbf, 0xd6, 0xa0, 0xc7, 0xe9, 0xe5, + 0x5b, 0x46, 0xc9, 0x2a, 0xa3, 0xe4, 0x23, 0xa3, 0xe4, 0x35, 0xa7, 0xad, 0x55, 0x4e, 0x5b, 0xef, + 0x39, 0x6d, 0xdd, 0x1e, 0x4f, 0xa5, 0x2d, 0xd8, 0xe0, 0x7a, 0x1e, 0x7e, 0x91, 0xa2, 0xd0, 0x3e, + 0x6a, 0x33, 0x0b, 0x6b, 0xaa, 0x9e, 0x4a, 0xae, 0xec, 0x32, 0xc6, 0x64, 0xd2, 0x76, 0x5c, 0x9d, + 0x7c, 0x06, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x71, 0x72, 0xb9, 0x77, 0x02, 0x00, 0x00, } func (m *EventRingCreated) Marshal() (dAtA []byte, err error) { @@ -402,13 +378,6 @@ func (m *EventRingUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x22 - } if len(m.UpdaterDid) > 0 { i -= len(m.UpdaterDid) copy(dAtA[i:], m.UpdaterDid) @@ -453,13 +422,6 @@ func (m *EventDocumentStored) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x22 - } if len(m.CreatorDid) > 0 { i -= len(m.CreatorDid) copy(dAtA[i:], m.CreatorDid) @@ -504,13 +466,6 @@ func (m *EventKeyDerivationStored) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x22 - } if len(m.CreatorDid) > 0 { i -= len(m.CreatorDid) copy(dAtA[i:], m.CreatorDid) @@ -589,10 +544,6 @@ func (m *EventRingUpdated) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } return n } @@ -614,10 +565,6 @@ func (m *EventDocumentStored) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } return n } @@ -639,10 +586,6 @@ func (m *EventKeyDerivationStored) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } return n } @@ -955,38 +898,6 @@ func (m *EventRingUpdated) Unmarshal(dAtA []byte) error { } m.UpdaterDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -1133,38 +1044,6 @@ func (m *EventDocumentStored) Unmarshal(dAtA []byte) error { } m.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -1311,38 +1190,6 @@ func (m *EventKeyDerivationStored) Unmarshal(dAtA []byte) error { } m.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/x/orbis/types/message_finalize_ring_reshare_by_threshold_signature.go b/x/orbis/types/message_finalize_ring_reshare_by_threshold_signature.go index 11dc6131..37e08c90 100644 --- a/x/orbis/types/message_finalize_ring_reshare_by_threshold_signature.go +++ b/x/orbis/types/message_finalize_ring_reshare_by_threshold_signature.go @@ -11,14 +11,12 @@ var _ sdk.Msg = &MsgFinalizeRingReshareByThresholdSignature{} func NewMsgFinalizeRingReshareByThresholdSignature( creator string, ringID string, - artifact string, signatureScheme string, signature []byte, ) *MsgFinalizeRingReshareByThresholdSignature { return &MsgFinalizeRingReshareByThresholdSignature{ Creator: creator, RingId: ringID, - Artifact: artifact, SignatureScheme: signatureScheme, Signature: signature, } diff --git a/x/orbis/types/tx.pb.go b/x/orbis/types/tx.pb.go index a6029136..35fcc0a7 100644 --- a/x/orbis/types/tx.pb.go +++ b/x/orbis/types/tx.pb.go @@ -276,7 +276,6 @@ func (m *MsgCreateRingResponse) GetRingId() string { type MsgUpdateRingByAcp struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Artifact string `protobuf:"bytes,3,opt,name=artifact,proto3" json:"artifact,omitempty"` NewPeerIds []string `protobuf:"bytes,4,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` NewThreshold uint32 `protobuf:"varint,5,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` HasNewThreshold bool `protobuf:"varint,6,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` @@ -331,13 +330,6 @@ func (m *MsgUpdateRingByAcp) GetRingId() string { return "" } -func (m *MsgUpdateRingByAcp) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - func (m *MsgUpdateRingByAcp) GetNewPeerIds() []string { if m != nil { return m.NewPeerIds @@ -412,7 +404,6 @@ var xxx_messageInfo_MsgUpdateRingByAcpResponse proto.InternalMessageInfo type MsgFinalizeRingReshareByThresholdSignature struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Artifact string `protobuf:"bytes,3,opt,name=artifact,proto3" json:"artifact,omitempty"` SignatureScheme string `protobuf:"bytes,4,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` } @@ -468,13 +459,6 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) GetRingId() string { return "" } -func (m *MsgFinalizeRingReshareByThresholdSignature) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - func (m *MsgFinalizeRingReshareByThresholdSignature) GetSignatureScheme() string { if m != nil { return m.SignatureScheme @@ -642,7 +626,6 @@ type MsgStoreDocument struct { HasTier bool `protobuf:"varint,10,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` Timestamp uint64 `protobuf:"varint,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"` HasTimestamp bool `protobuf:"varint,12,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` - Artifact string `protobuf:"bytes,13,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (m *MsgStoreDocument) Reset() { *m = MsgStoreDocument{} } @@ -762,13 +745,6 @@ func (m *MsgStoreDocument) GetHasTimestamp() bool { return false } -func (m *MsgStoreDocument) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - type MsgStoreDocumentResponse struct { DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` } @@ -821,7 +797,6 @@ type MsgStoreKeyDerivation struct { PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` - Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (m *MsgStoreKeyDerivation) Reset() { *m = MsgStoreKeyDerivation{} } @@ -906,13 +881,6 @@ func (m *MsgStoreKeyDerivation) GetPermission() string { return "" } -func (m *MsgStoreKeyDerivation) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - type MsgStoreKeyDerivationResponse struct { KeyDerivationId string `protobuf:"bytes,1,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` } @@ -976,79 +944,78 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/tx.proto", fileDescriptor_7711ae63507074e0) } var fileDescriptor_7711ae63507074e0 = []byte{ - // 1141 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x36, 0x25, 0xeb, 0x6f, 0x2c, 0x57, 0x36, 0x93, 0xd4, 0x0c, 0x9b, 0x2a, 0x8a, 0x02, 0xa4, - 0x8a, 0xda, 0x4a, 0xa9, 0x9b, 0xe6, 0x90, 0x9c, 0xe2, 0x04, 0x05, 0xd4, 0xc0, 0x81, 0x41, 0xa7, - 0x97, 0x00, 0x05, 0x41, 0x93, 0x1b, 0x72, 0x21, 0x91, 0x4b, 0xec, 0x52, 0x71, 0xd4, 0x53, 0xd1, - 0x63, 0x7a, 0xe9, 0x13, 0xf4, 0x5c, 0xa0, 0x28, 0xe0, 0x00, 0xbd, 0xf5, 0x05, 0x72, 0x0c, 0x72, - 0xea, 0xa9, 0x28, 0xec, 0x83, 0x5f, 0xa3, 0xd8, 0xe5, 0x3f, 0x2d, 0x2b, 0x02, 0x92, 0x8b, 0xad, - 0x99, 0xf9, 0x66, 0x76, 0xe6, 0x9b, 0x9d, 0xe1, 0x82, 0xc2, 0xc8, 0x94, 0x9a, 0xc8, 0x99, 0x1e, - 0x0c, 0x09, 0x3d, 0xc0, 0x6c, 0x18, 0xbc, 0x18, 0xf8, 0x94, 0x04, 0x44, 0x6e, 0x25, 0x96, 0x81, - 0xb0, 0xa8, 0x9b, 0x86, 0x8b, 0x3d, 0x32, 0x14, 0x7f, 0x43, 0x8c, 0xba, 0x65, 0x12, 0xe6, 0x12, - 0x36, 0x74, 0x99, 0x3d, 0x7c, 0xfe, 0x15, 0xff, 0x17, 0x19, 0x2e, 0x87, 0x06, 0x5d, 0x48, 0xc3, - 0x50, 0x88, 0x4c, 0x17, 0x6d, 0x62, 0x93, 0x50, 0xcf, 0x7f, 0x45, 0xda, 0x2b, 0xc5, 0x3c, 0x7c, - 0x83, 0x1a, 0x6e, 0xe4, 0xd3, 0xfd, 0x5b, 0x82, 0xd6, 0x2e, 0xb3, 0xbf, 0xf7, 0x2d, 0x23, 0x40, - 0x7b, 0xc2, 0x22, 0xdf, 0x81, 0x86, 0x31, 0x0d, 0x1c, 0x42, 0x71, 0x30, 0x53, 0xa4, 0x8e, 0xd4, - 0x6b, 0xec, 0x28, 0x6f, 0xff, 0xfa, 0xf2, 0x62, 0x74, 0xd8, 0x7d, 0xcb, 0xa2, 0x88, 0xb1, 0xfd, - 0x80, 0x62, 0xcf, 0xd6, 0x52, 0xa8, 0x7c, 0x17, 0xaa, 0x61, 0x6c, 0xa5, 0xd4, 0x91, 0x7a, 0x6b, - 0xdb, 0x5b, 0x83, 0x42, 0xa1, 0x83, 0xf0, 0x80, 0x9d, 0xc6, 0xeb, 0x7f, 0xaf, 0xae, 0xfc, 0x7e, - 0x7a, 0xd4, 0x97, 0xb4, 0xc8, 0xe3, 0xee, 0xed, 0x9f, 0x4f, 0x8f, 0xfa, 0x69, 0xac, 0x97, 0xa7, - 0x47, 0xfd, 0x6b, 0x69, 0xe2, 0x2f, 0xa2, 0xd4, 0x0b, 0x99, 0x76, 0x2f, 0xc3, 0x56, 0x41, 0xa5, - 0x21, 0xe6, 0x13, 0x8f, 0xa1, 0xee, 0x9f, 0x25, 0x58, 0xdf, 0x65, 0xf6, 0x03, 0x8a, 0x8c, 0x00, - 0x69, 0xd8, 0xb3, 0x65, 0x05, 0x6a, 0x26, 0x97, 0x08, 0x0d, 0x8b, 0xd2, 0x62, 0x51, 0xbe, 0x02, - 0x0d, 0xcf, 0x70, 0x11, 0xf3, 0x0d, 0x13, 0x89, 0xdc, 0x1b, 0x5a, 0xaa, 0x90, 0xb7, 0xa0, 0xc6, - 0x2b, 0xd5, 0xfd, 0xb1, 0x52, 0x16, 0xb6, 0x2a, 0x17, 0xf7, 0xc6, 0xf2, 0x65, 0xa8, 0xfb, 0x08, - 0x51, 0x1d, 0x5b, 0x4c, 0x59, 0xed, 0x94, 0x79, 0x44, 0x2e, 0x8f, 0x2c, 0xc6, 0x23, 0x06, 0x0e, - 0x45, 0xcc, 0x21, 0x13, 0x4b, 0xa9, 0x74, 0xa4, 0xde, 0xba, 0x96, 0x2a, 0xe4, 0x6b, 0xd0, 0xf4, - 0x19, 0xd3, 0xb1, 0x17, 0x20, 0xfa, 0xdc, 0x98, 0x28, 0xd5, 0x8e, 0xd4, 0x5b, 0xd5, 0xd6, 0x7c, - 0xc6, 0x46, 0x91, 0x4a, 0xee, 0xc1, 0x86, 0x63, 0x30, 0x3d, 0x07, 0xab, 0x75, 0xa4, 0x5e, 0x5d, - 0xfb, 0xc8, 0x31, 0xd8, 0x5e, 0x06, 0xf9, 0x09, 0x34, 0x7c, 0x32, 0xc1, 0xe6, 0x4c, 0xc7, 0x96, - 0x52, 0x17, 0x09, 0xd6, 0x43, 0xc5, 0xc8, 0x92, 0x55, 0xa8, 0x1b, 0x34, 0xc0, 0xcf, 0x0c, 0x33, - 0x50, 0x1a, 0xa1, 0x2d, 0x96, 0xef, 0x36, 0x39, 0xe5, 0x31, 0x07, 0xdd, 0x5b, 0x70, 0x29, 0x47, - 0x57, 0x4c, 0x64, 0x52, 0x3e, 0xb6, 0x22, 0xda, 0x44, 0xf9, 0x23, 0xab, 0xfb, 0xaa, 0x04, 0x72, - 0xc2, 0x3e, 0x77, 0xd9, 0x99, 0xdd, 0x37, 0xfd, 0x05, 0x34, 0x67, 0x22, 0x95, 0xb2, 0x91, 0x72, - 0x59, 0x96, 0xf3, 0x59, 0xca, 0x1d, 0x68, 0x7a, 0xe8, 0x50, 0x2f, 0x10, 0x0d, 0x1e, 0x3a, 0xdc, - 0x8b, 0xb8, 0xbe, 0x0e, 0xeb, 0x1c, 0x51, 0xe4, 0x9b, 0xbb, 0x3d, 0x49, 0x28, 0xef, 0xc3, 0x26, - 0xe7, 0x33, 0x0f, 0xac, 0x0a, 0x42, 0x5b, 0x8e, 0xc1, 0x1e, 0x67, 0xb1, 0xc5, 0xf6, 0xd4, 0x96, - 0x6b, 0x4f, 0x7d, 0x5e, 0x7b, 0x0a, 0x2c, 0x5f, 0x01, 0xf5, 0x2c, 0x65, 0xc9, 0x9d, 0x7d, 0x2b, - 0x41, 0x7f, 0x97, 0xd9, 0xdf, 0x62, 0xcf, 0x98, 0xe0, 0x1f, 0xe3, 0x36, 0x38, 0x06, 0x45, 0x3b, - 0xb3, 0x24, 0xbd, 0x7d, 0x6c, 0x7b, 0x46, 0x30, 0xa5, 0xe8, 0x43, 0x33, 0x7d, 0x13, 0x36, 0x58, - 0x1c, 0x5b, 0x67, 0xa6, 0x83, 0x5c, 0xa4, 0xac, 0x0a, 0x4c, 0x2b, 0xd1, 0xef, 0x0b, 0x35, 0xbf, - 0xde, 0x89, 0x4a, 0xd0, 0xdd, 0xd4, 0x52, 0x45, 0xa1, 0xe4, 0xdb, 0xb0, 0xbd, 0x7c, 0x4d, 0x09, - 0x15, 0xaf, 0x4a, 0xa0, 0x66, 0xb0, 0xb1, 0x3b, 0x07, 0x3e, 0x24, 0xa6, 0xfc, 0x31, 0x54, 0x2d, - 0xe2, 0x1a, 0xd8, 0x8b, 0xef, 0x64, 0x28, 0xf1, 0x91, 0x34, 0x1d, 0x03, 0x7b, 0x69, 0xe5, 0x35, - 0x21, 0x8f, 0xac, 0xfc, 0x90, 0x97, 0xcf, 0x1b, 0x72, 0x6c, 0x45, 0x35, 0xc7, 0x8c, 0x65, 0xa6, - 0xbf, 0x92, 0x9b, 0xfe, 0x01, 0x5c, 0x30, 0xa7, 0x94, 0x22, 0x2f, 0xd0, 0x05, 0x80, 0x39, 0xc6, - 0xf6, 0x37, 0x77, 0xc4, 0x9d, 0x6a, 0x6a, 0x9b, 0x91, 0x89, 0x97, 0xb0, 0x2f, 0x0c, 0xf2, 0x36, - 0x5c, 0x7a, 0x16, 0x55, 0x61, 0xe5, 0x3c, 0x6a, 0xc2, 0xe3, 0x42, 0x62, 0xcc, 0xf8, 0x7c, 0x01, - 0xf2, 0xc1, 0x84, 0x98, 0x63, 0xdd, 0x9b, 0xba, 0x07, 0x88, 0xea, 0x1e, 0xf1, 0x4c, 0x24, 0x2e, - 0xda, 0xaa, 0xb6, 0x21, 0x2c, 0x8f, 0x85, 0xe1, 0x31, 0xd7, 0x77, 0x5f, 0x96, 0x61, 0x63, 0x97, - 0xd9, 0xfb, 0x01, 0xa1, 0xe8, 0x21, 0x31, 0xa7, 0x2e, 0xf2, 0x82, 0xf7, 0xde, 0x7a, 0xd8, 0xca, - 0x6e, 0xbd, 0xf0, 0x0a, 0x59, 0x51, 0xf0, 0x88, 0xaa, 0x44, 0x96, 0x2f, 0x42, 0xc5, 0xa7, 0x84, - 0x3c, 0x8b, 0xa8, 0x0a, 0x85, 0xfc, 0x86, 0xaa, 0x9e, 0xdd, 0x50, 0x14, 0x85, 0x9b, 0x5e, 0x30, - 0xd1, 0xd0, 0x12, 0x59, 0x6e, 0x03, 0xf8, 0x88, 0xba, 0x98, 0x31, 0x4c, 0xbc, 0x68, 0xb7, 0x65, - 0x34, 0xb2, 0x0c, 0xab, 0x01, 0x46, 0x34, 0xda, 0x6c, 0xe2, 0x37, 0xbf, 0x01, 0x7c, 0x32, 0x85, - 0x1e, 0xc4, 0x44, 0xd6, 0x1c, 0x83, 0x3d, 0xe1, 0x26, 0xbe, 0x94, 0xb1, 0x8b, 0x58, 0x60, 0xb8, - 0xbe, 0xb2, 0x26, 0x48, 0x4c, 0x15, 0x7c, 0x8d, 0x84, 0x8e, 0x31, 0xa2, 0x29, 0xbc, 0x9b, 0xc2, - 0x3b, 0x06, 0x65, 0xe7, 0x67, 0x7d, 0xe1, 0x3e, 0xbd, 0x07, 0x4a, 0xb1, 0x17, 0xc9, 0x4a, 0xbd, - 0x0a, 0x6b, 0x31, 0x65, 0xe9, 0x5a, 0x85, 0x58, 0x35, 0xb2, 0xba, 0xbf, 0x94, 0xc4, 0x36, 0x16, - 0xde, 0x8f, 0xd0, 0xec, 0x21, 0xa2, 0xf8, 0xb9, 0x11, 0xf0, 0x92, 0x3f, 0x78, 0x3b, 0xdb, 0x00, - 0x56, 0x12, 0x3e, 0x6a, 0x68, 0x46, 0x93, 0x6f, 0x5e, 0x65, 0x41, 0xf3, 0xaa, 0x0b, 0x9b, 0x57, - 0x3b, 0xd3, 0xbc, 0x2c, 0x95, 0xf5, 0x85, 0x54, 0x3e, 0x82, 0x4f, 0xe7, 0x92, 0x91, 0xf0, 0xd9, - 0x87, 0xcd, 0x31, 0x9a, 0xe9, 0x69, 0xd6, 0x29, 0xab, 0xad, 0x71, 0xd6, 0x63, 0x64, 0x6d, 0xff, - 0x56, 0x81, 0xf2, 0x2e, 0xb3, 0xe5, 0xa7, 0xd0, 0xcc, 0x3d, 0x7a, 0x3a, 0x67, 0x1e, 0x2b, 0x85, - 0x97, 0x85, 0xda, 0x7b, 0x17, 0x22, 0xc9, 0xe7, 0x09, 0x40, 0xe6, 0xdd, 0xd1, 0x9e, 0xe7, 0x97, - 0xda, 0xd5, 0x1b, 0x8b, 0xed, 0x49, 0x54, 0x13, 0x5a, 0xc5, 0x6f, 0xed, 0xf5, 0xf3, 0x53, 0x4a, - 0x40, 0xea, 0xe7, 0x4b, 0x80, 0x92, 0x43, 0xfe, 0x90, 0xe0, 0xb3, 0x65, 0xbf, 0x3f, 0xf7, 0xe6, - 0x05, 0x5e, 0xd2, 0x59, 0x7d, 0xf0, 0x1e, 0xce, 0x49, 0xb6, 0x3f, 0xc0, 0x7a, 0x7e, 0xdb, 0x5d, - 0x9b, 0x17, 0x35, 0x07, 0x51, 0x6f, 0xbe, 0x13, 0x92, 0x84, 0x9f, 0x80, 0x3c, 0x67, 0x04, 0x6f, - 0x9c, 0x1b, 0x20, 0x87, 0x53, 0x07, 0xcb, 0xe1, 0xe2, 0xd3, 0xd4, 0xca, 0x4f, 0xfc, 0x45, 0xbc, - 0xf3, 0xdd, 0xeb, 0xe3, 0xb6, 0xf4, 0xe6, 0xb8, 0x2d, 0xfd, 0x77, 0xdc, 0x96, 0x7e, 0x3d, 0x69, - 0xaf, 0xbc, 0x39, 0x69, 0xaf, 0xfc, 0x73, 0xd2, 0x5e, 0x79, 0x7a, 0xcb, 0xc6, 0x01, 0x0f, 0x66, - 0x12, 0x77, 0x18, 0x86, 0xf6, 0x50, 0x70, 0x48, 0xe8, 0x78, 0x78, 0xf6, 0xa5, 0x1c, 0xcc, 0x7c, - 0xc4, 0x0e, 0xaa, 0xe2, 0x91, 0xff, 0xf5, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc6, 0x63, 0x83, - 0x11, 0x8c, 0x0c, 0x00, 0x00, + // 1130 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0x3a, 0xf1, 0xaf, 0x17, 0x07, 0x27, 0xdb, 0x96, 0x6c, 0x97, 0xe2, 0xba, 0xae, 0x54, + 0x5c, 0x03, 0x76, 0x09, 0xa5, 0x87, 0xf6, 0xd4, 0xb4, 0x42, 0x32, 0x55, 0xa2, 0x68, 0x13, 0x2e, + 0x95, 0xd0, 0x6a, 0xb3, 0x3b, 0xd9, 0x1d, 0xd9, 0xbb, 0xb3, 0x9a, 0x59, 0x27, 0x35, 0x27, 0xc4, + 0x91, 0x13, 0x17, 0xae, 0x9c, 0x91, 0x10, 0x52, 0x90, 0x10, 0x17, 0xfe, 0x81, 0x1e, 0x2b, 0x4e, + 0x9c, 0x10, 0x4a, 0x0e, 0xb9, 0xc1, 0xbf, 0x80, 0x66, 0xf6, 0xf7, 0xc6, 0x49, 0x2d, 0xca, 0x25, + 0xf1, 0xfb, 0xde, 0xf7, 0xde, 0xbc, 0xf7, 0xcd, 0xcc, 0xdb, 0x01, 0x85, 0x91, 0x09, 0x35, 0x91, + 0x33, 0xd9, 0x1f, 0x10, 0xba, 0x8f, 0xd9, 0x20, 0x78, 0xd1, 0xf7, 0x29, 0x09, 0x88, 0xdc, 0x4c, + 0x3c, 0x7d, 0xe1, 0x51, 0xd7, 0x0c, 0x17, 0x7b, 0x64, 0x20, 0xfe, 0x86, 0x1c, 0x75, 0xdd, 0x24, + 0xcc, 0x25, 0x6c, 0xe0, 0x32, 0x7b, 0x70, 0xf8, 0x11, 0xff, 0x17, 0x39, 0xae, 0x87, 0x0e, 0x5d, + 0x58, 0x83, 0xd0, 0x88, 0x5c, 0x57, 0x6d, 0x62, 0x93, 0x10, 0xe7, 0xbf, 0x22, 0xf4, 0x46, 0xb1, + 0x0e, 0xdf, 0xa0, 0x86, 0x1b, 0xc5, 0x74, 0x7e, 0x93, 0xa0, 0xb9, 0xc5, 0xec, 0xcf, 0x7d, 0xcb, + 0x08, 0xd0, 0x8e, 0xf0, 0xc8, 0x0f, 0xa0, 0x6e, 0x4c, 0x02, 0x87, 0x50, 0x1c, 0x4c, 0x15, 0xa9, + 0x2d, 0x75, 0xeb, 0x9b, 0xca, 0xef, 0xbf, 0x7c, 0x78, 0x35, 0x5a, 0xec, 0xb1, 0x65, 0x51, 0xc4, + 0xd8, 0x6e, 0x40, 0xb1, 0x67, 0x6b, 0x29, 0x55, 0x7e, 0x08, 0x95, 0x30, 0xb7, 0x52, 0x6a, 0x4b, + 0xdd, 0xe5, 0x8d, 0xf5, 0x7e, 0xa1, 0xd1, 0x7e, 0xb8, 0xc0, 0x66, 0xfd, 0xe5, 0x9f, 0x37, 0x17, + 0x7e, 0x38, 0x3b, 0xee, 0x49, 0x5a, 0x14, 0xf1, 0xf0, 0xfe, 0xd7, 0x67, 0xc7, 0xbd, 0x34, 0xd7, + 0x37, 0x67, 0xc7, 0xbd, 0x5b, 0x69, 0xe1, 0x2f, 0xa2, 0xd2, 0x0b, 0x95, 0x76, 0xae, 0xc3, 0x7a, + 0x01, 0xd2, 0x10, 0xf3, 0x89, 0xc7, 0x50, 0xe7, 0xa7, 0x12, 0xac, 0x6c, 0x31, 0xfb, 0x09, 0x45, + 0x46, 0x80, 0x34, 0xec, 0xd9, 0xb2, 0x02, 0x55, 0x93, 0x5b, 0x84, 0x86, 0x4d, 0x69, 0xb1, 0x29, + 0xdf, 0x80, 0xba, 0x67, 0xb8, 0x88, 0xf9, 0x86, 0x89, 0x44, 0xed, 0x75, 0x2d, 0x05, 0xe4, 0x75, + 0xa8, 0xf2, 0x4e, 0x75, 0x7f, 0xa4, 0x2c, 0x0a, 0x5f, 0x85, 0x9b, 0x3b, 0x23, 0xf9, 0x3a, 0xd4, + 0x7c, 0x84, 0xa8, 0x8e, 0x2d, 0xa6, 0x2c, 0xb5, 0x17, 0x79, 0x46, 0x6e, 0x0f, 0x2d, 0xc6, 0x33, + 0x06, 0x0e, 0x45, 0xcc, 0x21, 0x63, 0x4b, 0x29, 0xb7, 0xa5, 0xee, 0x8a, 0x96, 0x02, 0xf2, 0x2d, + 0x68, 0xf8, 0x8c, 0xe9, 0xd8, 0x0b, 0x10, 0x3d, 0x34, 0xc6, 0x4a, 0xa5, 0x2d, 0x75, 0x97, 0xb4, + 0x65, 0x9f, 0xb1, 0x61, 0x04, 0xc9, 0x5d, 0x58, 0x75, 0x0c, 0xa6, 0xe7, 0x68, 0xd5, 0xb6, 0xd4, + 0xad, 0x69, 0x6f, 0x39, 0x06, 0xdb, 0xc9, 0x30, 0xdf, 0x81, 0xba, 0x4f, 0xc6, 0xd8, 0x9c, 0xea, + 0xd8, 0x52, 0x6a, 0xa2, 0xc0, 0x5a, 0x08, 0x0c, 0x2d, 0x59, 0x85, 0x9a, 0x41, 0x03, 0x7c, 0x60, + 0x98, 0x81, 0x52, 0x0f, 0x7d, 0xb1, 0xfd, 0xb0, 0xc1, 0x25, 0x8f, 0x35, 0xe8, 0xdc, 0x83, 0x6b, + 0x39, 0xb9, 0x62, 0x21, 0x93, 0xf6, 0xb1, 0x15, 0xc9, 0x26, 0xda, 0x1f, 0x5a, 0x9d, 0xef, 0x4a, + 0x20, 0x27, 0xea, 0xf3, 0x90, 0xcd, 0xe9, 0x63, 0xd3, 0xbf, 0x44, 0xe6, 0x4c, 0xa6, 0x52, 0x36, + 0x93, 0xdc, 0x86, 0x86, 0x87, 0x8e, 0xf4, 0x82, 0x98, 0xe0, 0xa1, 0xa3, 0x9d, 0x48, 0xcf, 0xdb, + 0xb0, 0xc2, 0x19, 0x45, 0x4d, 0x79, 0xd8, 0x5e, 0x22, 0x6b, 0x0f, 0xd6, 0xb8, 0x66, 0x79, 0x62, + 0x45, 0x88, 0xd6, 0x74, 0x0c, 0xb6, 0x9d, 0xe5, 0x16, 0xb7, 0xa0, 0x3a, 0xdf, 0x16, 0xd4, 0x66, + 0x6d, 0x41, 0x41, 0xc9, 0x1b, 0xa0, 0x9e, 0x97, 0x25, 0x39, 0x97, 0xbf, 0x4a, 0xd0, 0xdb, 0x62, + 0xf6, 0xa7, 0xd8, 0x33, 0xc6, 0xf8, 0xcb, 0x58, 0x6a, 0xc7, 0xa0, 0x68, 0x73, 0x9a, 0x94, 0xb7, + 0x8b, 0x6d, 0xcf, 0x08, 0x26, 0x14, 0xfd, 0x17, 0x35, 0xef, 0xc2, 0x2a, 0x8b, 0xe3, 0x75, 0x66, + 0x3a, 0xc8, 0x45, 0xca, 0x92, 0x60, 0x34, 0x13, 0x7c, 0x57, 0xc0, 0xfc, 0x98, 0x26, 0x90, 0x90, + 0xb4, 0xa1, 0xa5, 0x40, 0xa1, 0xad, 0xfb, 0xb0, 0x31, 0x7f, 0xdd, 0x49, 0xbb, 0x3f, 0x97, 0x40, + 0xcd, 0x70, 0xe3, 0x70, 0x4e, 0x7c, 0x4a, 0x4c, 0xf9, 0x6d, 0xa8, 0x58, 0xc4, 0x35, 0xb0, 0x17, + 0x9f, 0xad, 0xd0, 0xe2, 0x57, 0xcb, 0x74, 0x0c, 0xec, 0xa5, 0xdd, 0x55, 0x85, 0x3d, 0xb4, 0xf2, + 0x97, 0x75, 0xf1, 0xa2, 0xcb, 0x8a, 0xad, 0xa8, 0xe7, 0x58, 0x95, 0xcc, 0x2d, 0x2e, 0xe7, 0x6e, + 0x71, 0x1f, 0xae, 0x98, 0x13, 0x4a, 0x91, 0x17, 0xe8, 0x82, 0xc0, 0x1c, 0x63, 0xe3, 0x93, 0x07, + 0xe2, 0xdc, 0x34, 0xb4, 0xb5, 0xc8, 0xc5, 0x5b, 0xd8, 0x15, 0x0e, 0x79, 0x03, 0xae, 0x1d, 0x44, + 0x5d, 0x58, 0xb9, 0x88, 0xaa, 0x88, 0xb8, 0x92, 0x38, 0x33, 0x31, 0x1f, 0x80, 0xbc, 0x3f, 0x26, + 0xe6, 0x48, 0xf7, 0x26, 0xee, 0x3e, 0xa2, 0xba, 0x47, 0x3c, 0x13, 0x89, 0xc3, 0xb4, 0xa4, 0xad, + 0x0a, 0xcf, 0xb6, 0x70, 0x6c, 0x73, 0xbc, 0xf3, 0x77, 0x09, 0x56, 0xb7, 0x98, 0xbd, 0x1b, 0x10, + 0x8a, 0x9e, 0x12, 0x73, 0xe2, 0x22, 0x2f, 0x78, 0xe3, 0xe9, 0x85, 0xad, 0xec, 0xf4, 0x0a, 0x47, + 0x83, 0x15, 0x25, 0x8f, 0xa4, 0x4a, 0x6c, 0xf9, 0x2a, 0x94, 0x7d, 0x4a, 0xc8, 0x41, 0x24, 0x55, + 0x68, 0xe4, 0x27, 0x4d, 0xe5, 0xfc, 0xa4, 0xa1, 0x28, 0x9c, 0xd8, 0x42, 0x89, 0xba, 0x96, 0xd8, + 0x72, 0x0b, 0xc0, 0x47, 0xd4, 0xc5, 0x8c, 0x61, 0xe2, 0x45, 0x33, 0x2a, 0x83, 0xc8, 0x32, 0x2c, + 0x05, 0x18, 0xd1, 0x68, 0x42, 0x89, 0xdf, 0xfc, 0x04, 0xf0, 0xdb, 0x27, 0x70, 0x10, 0xb7, 0xae, + 0xea, 0x18, 0x6c, 0x8f, 0xbb, 0xf8, 0x70, 0xc5, 0x2e, 0x62, 0x81, 0xe1, 0xfa, 0xca, 0xb2, 0x10, + 0x31, 0x05, 0xf8, 0xa8, 0x08, 0x03, 0x63, 0x46, 0x43, 0x44, 0x37, 0x44, 0x74, 0x84, 0x15, 0x8e, + 0xf6, 0x23, 0x50, 0x8a, 0x7a, 0x27, 0xe3, 0xef, 0x26, 0x2c, 0xc7, 0xb2, 0xa4, 0x23, 0x10, 0x62, + 0x68, 0x68, 0x75, 0xfe, 0x91, 0xc4, 0xe4, 0x14, 0xd1, 0xcf, 0xd0, 0xf4, 0x29, 0xa2, 0xf8, 0xd0, + 0x08, 0x78, 0x5b, 0xff, 0xfb, 0x96, 0xb5, 0x00, 0xac, 0x24, 0x7d, 0xb4, 0x69, 0x19, 0x24, 0xbf, + 0x41, 0xe5, 0x4b, 0x36, 0xa8, 0x72, 0xe9, 0x06, 0x55, 0x8b, 0x1b, 0x54, 0x90, 0xeb, 0x19, 0xbc, + 0x3b, 0xb3, 0xe1, 0x44, 0xb3, 0x1e, 0xac, 0x8d, 0xd0, 0x54, 0x4f, 0x2b, 0x4b, 0x95, 0x6b, 0x8e, + 0xb2, 0x11, 0x43, 0x6b, 0xe3, 0xfb, 0x32, 0x2c, 0x6e, 0x31, 0x5b, 0x7e, 0x0e, 0x8d, 0xdc, 0x23, + 0xa4, 0x7d, 0xee, 0xf1, 0x50, 0xf8, 0xd2, 0xab, 0xdd, 0xd7, 0x31, 0x92, 0x7a, 0xf6, 0x00, 0x32, + 0xef, 0x80, 0xd6, 0xac, 0xb8, 0xd4, 0xaf, 0xde, 0xb9, 0xdc, 0x9f, 0x64, 0x35, 0xa1, 0x59, 0xfc, + 0xf6, 0xdd, 0xbe, 0xb8, 0xa4, 0x84, 0xa4, 0xbe, 0x3f, 0x07, 0x29, 0x59, 0xe4, 0x47, 0x09, 0xde, + 0x9b, 0xf7, 0x5b, 0xf1, 0x68, 0x56, 0xe2, 0x39, 0x83, 0xd5, 0x27, 0x6f, 0x10, 0x9c, 0x54, 0xfb, + 0x05, 0xac, 0xe4, 0xa7, 0xd6, 0xad, 0x59, 0x59, 0x73, 0x14, 0xf5, 0xee, 0x6b, 0x29, 0x49, 0xfa, + 0x31, 0xc8, 0x33, 0xae, 0xd9, 0x9d, 0x0b, 0x13, 0xe4, 0x78, 0x6a, 0x7f, 0x3e, 0x5e, 0xbc, 0x9a, + 0x5a, 0xfe, 0x8a, 0xbf, 0x50, 0x37, 0x3f, 0x7b, 0x79, 0xd2, 0x92, 0x5e, 0x9d, 0xb4, 0xa4, 0xbf, + 0x4e, 0x5a, 0xd2, 0xb7, 0xa7, 0xad, 0x85, 0x57, 0xa7, 0xad, 0x85, 0x3f, 0x4e, 0x5b, 0x0b, 0xcf, + 0xef, 0xd9, 0x38, 0xe0, 0xc9, 0x4c, 0xe2, 0x0e, 0xc2, 0xd4, 0x1e, 0x0a, 0x8e, 0x08, 0x1d, 0x0d, + 0xce, 0xbf, 0x5c, 0x83, 0xa9, 0x8f, 0xd8, 0x7e, 0x45, 0x3c, 0xba, 0x3f, 0xfe, 0x37, 0x00, 0x00, + 0xff, 0xff, 0x5f, 0xc9, 0x91, 0x01, 0x1c, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1553,13 +1520,6 @@ func (m *MsgUpdateRingByAcp) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } } - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x1a - } if len(m.RingId) > 0 { i -= len(m.RingId) copy(dAtA[i:], m.RingId) @@ -1634,13 +1594,6 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) MarshalToSizedBuffer(dAtA [ i-- dAtA[i] = 0x22 } - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x1a - } if len(m.RingId) > 0 { i -= len(m.RingId) copy(dAtA[i:], m.RingId) @@ -1778,13 +1731,6 @@ func (m *MsgStoreDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x6a - } if m.HasTimestamp { i-- if m.HasTimestamp { @@ -1926,13 +1872,6 @@ func (m *MsgStoreKeyDerivation) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x42 - } if len(m.Permission) > 0 { i -= len(m.Permission) copy(dAtA[i:], m.Permission) @@ -2121,10 +2060,6 @@ func (m *MsgUpdateRingByAcp) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } if len(m.NewPeerIds) > 0 { for _, s := range m.NewPeerIds { l = len(s) @@ -2169,10 +2104,6 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } l = len(m.SignatureScheme) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2284,10 +2215,6 @@ func (m *MsgStoreDocument) Size() (n int) { if m.HasTimestamp { n += 2 } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } return n } @@ -2338,10 +2265,6 @@ func (m *MsgStoreKeyDerivation) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } return n } @@ -3004,38 +2927,6 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { } m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", wireType) @@ -3310,38 +3201,6 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) erro } m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SignatureScheme", wireType) @@ -4152,38 +4011,6 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { } } m.HasTimestamp = bool(v != 0) - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4540,38 +4367,6 @@ func (m *MsgStoreKeyDerivation) Unmarshal(dAtA []byte) error { } m.Permission = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From 650c0ecbb229d0b8ee9586a899f78d650291235c Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Wed, 20 May 2026 11:41:38 -0400 Subject: [PATCH 3/8] update proto field numbers --- api/sourcehub/orbis/tx.pulsar.go | 88 +++++++-------- proto/sourcehub/orbis/tx.proto | 14 +-- x/orbis/types/tx.pb.go | 184 +++++++++++++++---------------- 3 files changed, 143 insertions(+), 143 deletions(-) diff --git a/api/sourcehub/orbis/tx.pulsar.go b/api/sourcehub/orbis/tx.pulsar.go index eb4a487f..7173fb0a 100644 --- a/api/sourcehub/orbis/tx.pulsar.go +++ b/api/sourcehub/orbis/tx.pulsar.go @@ -2241,49 +2241,49 @@ func (x *fastReflection_MsgCreateRingResponse) ProtoMethods() *protoiface.Method } } -var _ protoreflect.List = (*_MsgUpdateRingByAcp_4_list)(nil) +var _ protoreflect.List = (*_MsgUpdateRingByAcp_3_list)(nil) -type _MsgUpdateRingByAcp_4_list struct { +type _MsgUpdateRingByAcp_3_list struct { list *[]string } -func (x *_MsgUpdateRingByAcp_4_list) Len() int { +func (x *_MsgUpdateRingByAcp_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgUpdateRingByAcp_4_list) Get(i int) protoreflect.Value { +func (x *_MsgUpdateRingByAcp_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_MsgUpdateRingByAcp_4_list) Set(i int, value protoreflect.Value) { +func (x *_MsgUpdateRingByAcp_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_MsgUpdateRingByAcp_4_list) Append(value protoreflect.Value) { +func (x *_MsgUpdateRingByAcp_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_MsgUpdateRingByAcp_4_list) AppendMutable() protoreflect.Value { +func (x *_MsgUpdateRingByAcp_3_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message MsgUpdateRingByAcp at list field NewPeerIds as it is not of Message kind")) } -func (x *_MsgUpdateRingByAcp_4_list) Truncate(n int) { +func (x *_MsgUpdateRingByAcp_3_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_MsgUpdateRingByAcp_4_list) NewElement() protoreflect.Value { +func (x *_MsgUpdateRingByAcp_3_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_MsgUpdateRingByAcp_4_list) IsValid() bool { +func (x *_MsgUpdateRingByAcp_3_list) IsValid() bool { return x.list != nil } @@ -2388,7 +2388,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) Range(f func(protoreflect.FieldDescr } } if len(x.NewPeerIds) != 0 { - value := protoreflect.ValueOfList(&_MsgUpdateRingByAcp_4_list{list: &x.NewPeerIds}) + value := protoreflect.ValueOfList(&_MsgUpdateRingByAcp_3_list{list: &x.NewPeerIds}) if !f(fd_MsgUpdateRingByAcp_new_peer_ids, value) { return } @@ -2500,9 +2500,9 @@ func (x *fastReflection_MsgUpdateRingByAcp) Get(descriptor protoreflect.FieldDes return protoreflect.ValueOfString(value) case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": if len(x.NewPeerIds) == 0 { - return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_4_list{}) + return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_3_list{}) } - listValue := &_MsgUpdateRingByAcp_4_list{list: &x.NewPeerIds} + listValue := &_MsgUpdateRingByAcp_3_list{list: &x.NewPeerIds} return protoreflect.ValueOfList(listValue) case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": value := x.NewThreshold @@ -2542,7 +2542,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) Set(fd protoreflect.FieldDescriptor, x.RingId = value.Interface().(string) case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": lv := value.List() - clv := lv.(*_MsgUpdateRingByAcp_4_list) + clv := lv.(*_MsgUpdateRingByAcp_3_list) x.NewPeerIds = *clv.list case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": x.NewThreshold = uint32(value.Uint()) @@ -2576,7 +2576,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) Mutable(fd protoreflect.FieldDescrip if x.NewPeerIds == nil { x.NewPeerIds = []string{} } - value := &_MsgUpdateRingByAcp_4_list{list: &x.NewPeerIds} + value := &_MsgUpdateRingByAcp_3_list{list: &x.NewPeerIds} return protoreflect.ValueOfList(value) case "sourcehub.orbis.MsgUpdateRingByAcp.creator": panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) @@ -2609,7 +2609,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) NewField(fd protoreflect.FieldDescri return protoreflect.ValueOfString("") case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": list := []string{} - return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_4_list{list: &list}) + return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_3_list{list: &list}) case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": return protoreflect.ValueOfUint32(uint32(0)) case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": @@ -2750,12 +2750,12 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { dAtA[i] = 0 } i-- - dAtA[i] = 0x40 + dAtA[i] = 0x38 } if x.PssInterval != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.PssInterval)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x30 } if x.HasNewThreshold { i-- @@ -2765,12 +2765,12 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { dAtA[i] = 0 } i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if x.NewThreshold != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.NewThreshold)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x20 } if len(x.NewPeerIds) > 0 { for iNdEx := len(x.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { @@ -2778,7 +2778,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.NewPeerIds[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewPeerIds[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } } if len(x.RingId) > 0 { @@ -2908,7 +2908,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { } x.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", wireType) } @@ -2940,7 +2940,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { } x.NewPeerIds = append(x.NewPeerIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 5: + case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } @@ -2959,7 +2959,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { break } } - case 6: + case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasNewThreshold", wireType) } @@ -2979,7 +2979,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { } } x.HasNewThreshold = bool(v != 0) - case 7: + case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } @@ -2998,7 +2998,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { break } } - case 8: + case 7: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) } @@ -3786,14 +3786,14 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) ProtoMethods copy(dAtA[i:], x.Signature) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(x.SignatureScheme) > 0 { i -= len(x.SignatureScheme) copy(dAtA[i:], x.SignatureScheme) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignatureScheme))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(x.RingId) > 0 { i -= len(x.RingId) @@ -3922,7 +3922,7 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) ProtoMethods } x.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignatureScheme", wireType) } @@ -3954,7 +3954,7 @@ func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) ProtoMethods } x.SignatureScheme = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } @@ -8192,11 +8192,11 @@ type MsgUpdateRingByAcp struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - NewPeerIds []string `protobuf:"bytes,4,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - NewThreshold uint32 `protobuf:"varint,5,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` - HasNewThreshold bool `protobuf:"varint,6,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` - PssInterval uint64 `protobuf:"varint,7,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` - HasPssInterval bool `protobuf:"varint,8,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` + NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + NewThreshold uint32 `protobuf:"varint,4,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` + HasNewThreshold bool `protobuf:"varint,5,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` + PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` + HasPssInterval bool `protobuf:"varint,7,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` } func (x *MsgUpdateRingByAcp) Reset() { @@ -8301,8 +8301,8 @@ type MsgFinalizeRingReshareByThresholdSignature struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - SignatureScheme string `protobuf:"bytes,4,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` + SignatureScheme string `protobuf:"bytes,3,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` + Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` } func (x *MsgFinalizeRingReshareByThresholdSignature) Reset() { @@ -8800,17 +8800,17 @@ var file_sourcehub_orbis_tx_proto_rawDesc = []byte{ 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6e, - 0x65, 0x77, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x65, 0x77, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, - 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, + 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x4e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, + 0x0a, 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x50, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x52, @@ -8821,10 +8821,10 @@ var file_sourcehub_orbis_tx_proto_rawDesc = []byte{ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x34, 0x0a, 0x32, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, diff --git a/proto/sourcehub/orbis/tx.proto b/proto/sourcehub/orbis/tx.proto index 93e6f6ef..3540e215 100644 --- a/proto/sourcehub/orbis/tx.proto +++ b/proto/sourcehub/orbis/tx.proto @@ -60,11 +60,11 @@ message MsgUpdateRingByAcp { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string ring_id = 2; - repeated string new_peer_ids = 4; - uint32 new_threshold = 5; - bool has_new_threshold = 6; - uint64 pss_interval = 7; - bool has_pss_interval = 8; + repeated string new_peer_ids = 3; + uint32 new_threshold = 4; + bool has_new_threshold = 5; + uint64 pss_interval = 6; + bool has_pss_interval = 7; } message MsgUpdateRingByAcpResponse {} @@ -73,8 +73,8 @@ message MsgFinalizeRingReshareByThresholdSignature { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string ring_id = 2; - string signature_scheme = 4; - bytes signature = 5; + string signature_scheme = 3; + bytes signature = 4; } message MsgFinalizeRingReshareByThresholdSignatureResponse {} diff --git a/x/orbis/types/tx.pb.go b/x/orbis/types/tx.pb.go index 35fcc0a7..ab2ec2b8 100644 --- a/x/orbis/types/tx.pb.go +++ b/x/orbis/types/tx.pb.go @@ -276,11 +276,11 @@ func (m *MsgCreateRingResponse) GetRingId() string { type MsgUpdateRingByAcp struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - NewPeerIds []string `protobuf:"bytes,4,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - NewThreshold uint32 `protobuf:"varint,5,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` - HasNewThreshold bool `protobuf:"varint,6,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` - PssInterval uint64 `protobuf:"varint,7,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` - HasPssInterval bool `protobuf:"varint,8,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` + NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + NewThreshold uint32 `protobuf:"varint,4,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` + HasNewThreshold bool `protobuf:"varint,5,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` + PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` + HasPssInterval bool `protobuf:"varint,7,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` } func (m *MsgUpdateRingByAcp) Reset() { *m = MsgUpdateRingByAcp{} } @@ -404,8 +404,8 @@ var xxx_messageInfo_MsgUpdateRingByAcpResponse proto.InternalMessageInfo type MsgFinalizeRingReshareByThresholdSignature struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - SignatureScheme string `protobuf:"bytes,4,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` + SignatureScheme string `protobuf:"bytes,3,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` + Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` } func (m *MsgFinalizeRingReshareByThresholdSignature) Reset() { @@ -945,77 +945,77 @@ func init() { proto.RegisterFile("sourcehub/orbis/tx.proto", fileDescriptor_7711 var fileDescriptor_7711ae63507074e0 = []byte{ // 1130 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x3a, 0xf1, 0xaf, 0x17, 0x07, 0x27, 0xdb, 0x96, 0x6c, 0x97, 0xe2, 0xba, 0xae, 0x54, - 0x5c, 0x03, 0x76, 0x09, 0xa5, 0x87, 0xf6, 0xd4, 0xb4, 0x42, 0x32, 0x55, 0xa2, 0x68, 0x13, 0x2e, - 0x95, 0xd0, 0x6a, 0xb3, 0x3b, 0xd9, 0x1d, 0xd9, 0xbb, 0xb3, 0x9a, 0x59, 0x27, 0x35, 0x27, 0xc4, - 0x91, 0x13, 0x17, 0xae, 0x9c, 0x91, 0x10, 0x52, 0x90, 0x10, 0x17, 0xfe, 0x81, 0x1e, 0x2b, 0x4e, - 0x9c, 0x10, 0x4a, 0x0e, 0xb9, 0xc1, 0xbf, 0x80, 0x66, 0xf6, 0xf7, 0xc6, 0x49, 0x2d, 0xca, 0x25, - 0xf1, 0xfb, 0xde, 0xf7, 0xde, 0xbc, 0xf7, 0xcd, 0xcc, 0xdb, 0x01, 0x85, 0x91, 0x09, 0x35, 0x91, - 0x33, 0xd9, 0x1f, 0x10, 0xba, 0x8f, 0xd9, 0x20, 0x78, 0xd1, 0xf7, 0x29, 0x09, 0x88, 0xdc, 0x4c, - 0x3c, 0x7d, 0xe1, 0x51, 0xd7, 0x0c, 0x17, 0x7b, 0x64, 0x20, 0xfe, 0x86, 0x1c, 0x75, 0xdd, 0x24, - 0xcc, 0x25, 0x6c, 0xe0, 0x32, 0x7b, 0x70, 0xf8, 0x11, 0xff, 0x17, 0x39, 0xae, 0x87, 0x0e, 0x5d, - 0x58, 0x83, 0xd0, 0x88, 0x5c, 0x57, 0x6d, 0x62, 0x93, 0x10, 0xe7, 0xbf, 0x22, 0xf4, 0x46, 0xb1, - 0x0e, 0xdf, 0xa0, 0x86, 0x1b, 0xc5, 0x74, 0x7e, 0x93, 0xa0, 0xb9, 0xc5, 0xec, 0xcf, 0x7d, 0xcb, - 0x08, 0xd0, 0x8e, 0xf0, 0xc8, 0x0f, 0xa0, 0x6e, 0x4c, 0x02, 0x87, 0x50, 0x1c, 0x4c, 0x15, 0xa9, - 0x2d, 0x75, 0xeb, 0x9b, 0xca, 0xef, 0xbf, 0x7c, 0x78, 0x35, 0x5a, 0xec, 0xb1, 0x65, 0x51, 0xc4, - 0xd8, 0x6e, 0x40, 0xb1, 0x67, 0x6b, 0x29, 0x55, 0x7e, 0x08, 0x95, 0x30, 0xb7, 0x52, 0x6a, 0x4b, - 0xdd, 0xe5, 0x8d, 0xf5, 0x7e, 0xa1, 0xd1, 0x7e, 0xb8, 0xc0, 0x66, 0xfd, 0xe5, 0x9f, 0x37, 0x17, - 0x7e, 0x38, 0x3b, 0xee, 0x49, 0x5a, 0x14, 0xf1, 0xf0, 0xfe, 0xd7, 0x67, 0xc7, 0xbd, 0x34, 0xd7, - 0x37, 0x67, 0xc7, 0xbd, 0x5b, 0x69, 0xe1, 0x2f, 0xa2, 0xd2, 0x0b, 0x95, 0x76, 0xae, 0xc3, 0x7a, - 0x01, 0xd2, 0x10, 0xf3, 0x89, 0xc7, 0x50, 0xe7, 0xa7, 0x12, 0xac, 0x6c, 0x31, 0xfb, 0x09, 0x45, - 0x46, 0x80, 0x34, 0xec, 0xd9, 0xb2, 0x02, 0x55, 0x93, 0x5b, 0x84, 0x86, 0x4d, 0x69, 0xb1, 0x29, - 0xdf, 0x80, 0xba, 0x67, 0xb8, 0x88, 0xf9, 0x86, 0x89, 0x44, 0xed, 0x75, 0x2d, 0x05, 0xe4, 0x75, - 0xa8, 0xf2, 0x4e, 0x75, 0x7f, 0xa4, 0x2c, 0x0a, 0x5f, 0x85, 0x9b, 0x3b, 0x23, 0xf9, 0x3a, 0xd4, - 0x7c, 0x84, 0xa8, 0x8e, 0x2d, 0xa6, 0x2c, 0xb5, 0x17, 0x79, 0x46, 0x6e, 0x0f, 0x2d, 0xc6, 0x33, - 0x06, 0x0e, 0x45, 0xcc, 0x21, 0x63, 0x4b, 0x29, 0xb7, 0xa5, 0xee, 0x8a, 0x96, 0x02, 0xf2, 0x2d, - 0x68, 0xf8, 0x8c, 0xe9, 0xd8, 0x0b, 0x10, 0x3d, 0x34, 0xc6, 0x4a, 0xa5, 0x2d, 0x75, 0x97, 0xb4, - 0x65, 0x9f, 0xb1, 0x61, 0x04, 0xc9, 0x5d, 0x58, 0x75, 0x0c, 0xa6, 0xe7, 0x68, 0xd5, 0xb6, 0xd4, - 0xad, 0x69, 0x6f, 0x39, 0x06, 0xdb, 0xc9, 0x30, 0xdf, 0x81, 0xba, 0x4f, 0xc6, 0xd8, 0x9c, 0xea, - 0xd8, 0x52, 0x6a, 0xa2, 0xc0, 0x5a, 0x08, 0x0c, 0x2d, 0x59, 0x85, 0x9a, 0x41, 0x03, 0x7c, 0x60, - 0x98, 0x81, 0x52, 0x0f, 0x7d, 0xb1, 0xfd, 0xb0, 0xc1, 0x25, 0x8f, 0x35, 0xe8, 0xdc, 0x83, 0x6b, - 0x39, 0xb9, 0x62, 0x21, 0x93, 0xf6, 0xb1, 0x15, 0xc9, 0x26, 0xda, 0x1f, 0x5a, 0x9d, 0xef, 0x4a, - 0x20, 0x27, 0xea, 0xf3, 0x90, 0xcd, 0xe9, 0x63, 0xd3, 0xbf, 0x44, 0xe6, 0x4c, 0xa6, 0x52, 0x36, - 0x93, 0xdc, 0x86, 0x86, 0x87, 0x8e, 0xf4, 0x82, 0x98, 0xe0, 0xa1, 0xa3, 0x9d, 0x48, 0xcf, 0xdb, - 0xb0, 0xc2, 0x19, 0x45, 0x4d, 0x79, 0xd8, 0x5e, 0x22, 0x6b, 0x0f, 0xd6, 0xb8, 0x66, 0x79, 0x62, - 0x45, 0x88, 0xd6, 0x74, 0x0c, 0xb6, 0x9d, 0xe5, 0x16, 0xb7, 0xa0, 0x3a, 0xdf, 0x16, 0xd4, 0x66, - 0x6d, 0x41, 0x41, 0xc9, 0x1b, 0xa0, 0x9e, 0x97, 0x25, 0x39, 0x97, 0xbf, 0x4a, 0xd0, 0xdb, 0x62, - 0xf6, 0xa7, 0xd8, 0x33, 0xc6, 0xf8, 0xcb, 0x58, 0x6a, 0xc7, 0xa0, 0x68, 0x73, 0x9a, 0x94, 0xb7, - 0x8b, 0x6d, 0xcf, 0x08, 0x26, 0x14, 0xfd, 0x17, 0x35, 0xef, 0xc2, 0x2a, 0x8b, 0xe3, 0x75, 0x66, - 0x3a, 0xc8, 0x45, 0xca, 0x92, 0x60, 0x34, 0x13, 0x7c, 0x57, 0xc0, 0xfc, 0x98, 0x26, 0x90, 0x90, - 0xb4, 0xa1, 0xa5, 0x40, 0xa1, 0xad, 0xfb, 0xb0, 0x31, 0x7f, 0xdd, 0x49, 0xbb, 0x3f, 0x97, 0x40, - 0xcd, 0x70, 0xe3, 0x70, 0x4e, 0x7c, 0x4a, 0x4c, 0xf9, 0x6d, 0xa8, 0x58, 0xc4, 0x35, 0xb0, 0x17, - 0x9f, 0xad, 0xd0, 0xe2, 0x57, 0xcb, 0x74, 0x0c, 0xec, 0xa5, 0xdd, 0x55, 0x85, 0x3d, 0xb4, 0xf2, - 0x97, 0x75, 0xf1, 0xa2, 0xcb, 0x8a, 0xad, 0xa8, 0xe7, 0x58, 0x95, 0xcc, 0x2d, 0x2e, 0xe7, 0x6e, - 0x71, 0x1f, 0xae, 0x98, 0x13, 0x4a, 0x91, 0x17, 0xe8, 0x82, 0xc0, 0x1c, 0x63, 0xe3, 0x93, 0x07, - 0xe2, 0xdc, 0x34, 0xb4, 0xb5, 0xc8, 0xc5, 0x5b, 0xd8, 0x15, 0x0e, 0x79, 0x03, 0xae, 0x1d, 0x44, - 0x5d, 0x58, 0xb9, 0x88, 0xaa, 0x88, 0xb8, 0x92, 0x38, 0x33, 0x31, 0x1f, 0x80, 0xbc, 0x3f, 0x26, - 0xe6, 0x48, 0xf7, 0x26, 0xee, 0x3e, 0xa2, 0xba, 0x47, 0x3c, 0x13, 0x89, 0xc3, 0xb4, 0xa4, 0xad, - 0x0a, 0xcf, 0xb6, 0x70, 0x6c, 0x73, 0xbc, 0xf3, 0x77, 0x09, 0x56, 0xb7, 0x98, 0xbd, 0x1b, 0x10, - 0x8a, 0x9e, 0x12, 0x73, 0xe2, 0x22, 0x2f, 0x78, 0xe3, 0xe9, 0x85, 0xad, 0xec, 0xf4, 0x0a, 0x47, - 0x83, 0x15, 0x25, 0x8f, 0xa4, 0x4a, 0x6c, 0xf9, 0x2a, 0x94, 0x7d, 0x4a, 0xc8, 0x41, 0x24, 0x55, - 0x68, 0xe4, 0x27, 0x4d, 0xe5, 0xfc, 0xa4, 0xa1, 0x28, 0x9c, 0xd8, 0x42, 0x89, 0xba, 0x96, 0xd8, - 0x72, 0x0b, 0xc0, 0x47, 0xd4, 0xc5, 0x8c, 0x61, 0xe2, 0x45, 0x33, 0x2a, 0x83, 0xc8, 0x32, 0x2c, - 0x05, 0x18, 0xd1, 0x68, 0x42, 0x89, 0xdf, 0xfc, 0x04, 0xf0, 0xdb, 0x27, 0x70, 0x10, 0xb7, 0xae, - 0xea, 0x18, 0x6c, 0x8f, 0xbb, 0xf8, 0x70, 0xc5, 0x2e, 0x62, 0x81, 0xe1, 0xfa, 0xca, 0xb2, 0x10, - 0x31, 0x05, 0xf8, 0xa8, 0x08, 0x03, 0x63, 0x46, 0x43, 0x44, 0x37, 0x44, 0x74, 0x84, 0x15, 0x8e, - 0xf6, 0x23, 0x50, 0x8a, 0x7a, 0x27, 0xe3, 0xef, 0x26, 0x2c, 0xc7, 0xb2, 0xa4, 0x23, 0x10, 0x62, - 0x68, 0x68, 0x75, 0xfe, 0x91, 0xc4, 0xe4, 0x14, 0xd1, 0xcf, 0xd0, 0xf4, 0x29, 0xa2, 0xf8, 0xd0, - 0x08, 0x78, 0x5b, 0xff, 0xfb, 0x96, 0xb5, 0x00, 0xac, 0x24, 0x7d, 0xb4, 0x69, 0x19, 0x24, 0xbf, - 0x41, 0xe5, 0x4b, 0x36, 0xa8, 0x72, 0xe9, 0x06, 0x55, 0x8b, 0x1b, 0x54, 0x90, 0xeb, 0x19, 0xbc, - 0x3b, 0xb3, 0xe1, 0x44, 0xb3, 0x1e, 0xac, 0x8d, 0xd0, 0x54, 0x4f, 0x2b, 0x4b, 0x95, 0x6b, 0x8e, - 0xb2, 0x11, 0x43, 0x6b, 0xe3, 0xfb, 0x32, 0x2c, 0x6e, 0x31, 0x5b, 0x7e, 0x0e, 0x8d, 0xdc, 0x23, - 0xa4, 0x7d, 0xee, 0xf1, 0x50, 0xf8, 0xd2, 0xab, 0xdd, 0xd7, 0x31, 0x92, 0x7a, 0xf6, 0x00, 0x32, - 0xef, 0x80, 0xd6, 0xac, 0xb8, 0xd4, 0xaf, 0xde, 0xb9, 0xdc, 0x9f, 0x64, 0x35, 0xa1, 0x59, 0xfc, - 0xf6, 0xdd, 0xbe, 0xb8, 0xa4, 0x84, 0xa4, 0xbe, 0x3f, 0x07, 0x29, 0x59, 0xe4, 0x47, 0x09, 0xde, - 0x9b, 0xf7, 0x5b, 0xf1, 0x68, 0x56, 0xe2, 0x39, 0x83, 0xd5, 0x27, 0x6f, 0x10, 0x9c, 0x54, 0xfb, - 0x05, 0xac, 0xe4, 0xa7, 0xd6, 0xad, 0x59, 0x59, 0x73, 0x14, 0xf5, 0xee, 0x6b, 0x29, 0x49, 0xfa, - 0x31, 0xc8, 0x33, 0xae, 0xd9, 0x9d, 0x0b, 0x13, 0xe4, 0x78, 0x6a, 0x7f, 0x3e, 0x5e, 0xbc, 0x9a, - 0x5a, 0xfe, 0x8a, 0xbf, 0x50, 0x37, 0x3f, 0x7b, 0x79, 0xd2, 0x92, 0x5e, 0x9d, 0xb4, 0xa4, 0xbf, - 0x4e, 0x5a, 0xd2, 0xb7, 0xa7, 0xad, 0x85, 0x57, 0xa7, 0xad, 0x85, 0x3f, 0x4e, 0x5b, 0x0b, 0xcf, - 0xef, 0xd9, 0x38, 0xe0, 0xc9, 0x4c, 0xe2, 0x0e, 0xc2, 0xd4, 0x1e, 0x0a, 0x8e, 0x08, 0x1d, 0x0d, - 0xce, 0xbf, 0x5c, 0x83, 0xa9, 0x8f, 0xd8, 0x7e, 0x45, 0x3c, 0xba, 0x3f, 0xfe, 0x37, 0x00, 0x00, - 0xff, 0xff, 0x5f, 0xc9, 0x91, 0x01, 0x1c, 0x0c, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0x3a, 0xb1, 0x1d, 0xbf, 0x38, 0x5f, 0x27, 0xdb, 0xf4, 0x9b, 0xcd, 0x12, 0x5c, 0xc7, + 0x95, 0x8a, 0x6b, 0xc0, 0x2e, 0xa1, 0xf4, 0x90, 0x9e, 0x9a, 0x46, 0x48, 0xa6, 0x4a, 0x14, 0x6d, + 0xc2, 0xa5, 0x12, 0x5a, 0x6d, 0x76, 0x27, 0xbb, 0x23, 0x7b, 0x77, 0x56, 0x33, 0xeb, 0xa4, 0xe6, + 0x84, 0x38, 0x72, 0xe2, 0xc2, 0x95, 0x33, 0x12, 0x42, 0x0a, 0x12, 0xe2, 0xc2, 0x3f, 0xd0, 0x63, + 0xc5, 0x89, 0x13, 0x42, 0xc9, 0x21, 0x37, 0xf8, 0x17, 0xd0, 0xcc, 0xfe, 0xde, 0xfc, 0x68, 0x44, + 0x7b, 0x49, 0xfc, 0x3e, 0xef, 0xf3, 0xde, 0xbc, 0xf7, 0x99, 0x99, 0xb7, 0x03, 0x0a, 0x23, 0x63, + 0x6a, 0x22, 0x67, 0x7c, 0xd0, 0x27, 0xf4, 0x00, 0xb3, 0x7e, 0xf0, 0xa2, 0xe7, 0x53, 0x12, 0x10, + 0xb9, 0x91, 0x78, 0x7a, 0xc2, 0xa3, 0x2e, 0x1a, 0x2e, 0xf6, 0x48, 0x5f, 0xfc, 0x0d, 0x39, 0xea, + 0xb2, 0x49, 0x98, 0x4b, 0x58, 0xdf, 0x65, 0x76, 0xff, 0xe8, 0x23, 0xfe, 0x2f, 0x72, 0xac, 0x84, + 0x0e, 0x5d, 0x58, 0xfd, 0xd0, 0x88, 0x5c, 0x4b, 0x36, 0xb1, 0x49, 0x88, 0xf3, 0x5f, 0x11, 0xba, + 0x5a, 0xac, 0xc3, 0x37, 0xa8, 0xe1, 0x46, 0x31, 0xed, 0xdf, 0x24, 0x68, 0x6c, 0x33, 0xfb, 0x73, + 0xdf, 0x32, 0x02, 0xb4, 0x2b, 0x3c, 0xf2, 0x23, 0xa8, 0x19, 0xe3, 0xc0, 0x21, 0x14, 0x07, 0x13, + 0x45, 0x6a, 0x49, 0x9d, 0xda, 0xa6, 0xf2, 0xfb, 0x2f, 0x1f, 0x2e, 0x45, 0x8b, 0x3d, 0xb1, 0x2c, + 0x8a, 0x18, 0xdb, 0x0b, 0x28, 0xf6, 0x6c, 0x2d, 0xa5, 0xca, 0x1b, 0x50, 0x09, 0x73, 0x2b, 0xa5, + 0x96, 0xd4, 0x99, 0x5b, 0x5f, 0xee, 0x15, 0x1a, 0xed, 0x85, 0x0b, 0x6c, 0xd6, 0x5e, 0xfe, 0x79, + 0x67, 0xea, 0x87, 0xf3, 0x93, 0xae, 0xa4, 0x45, 0x11, 0x1b, 0x0f, 0xbf, 0x3e, 0x3f, 0xe9, 0xa6, + 0xb9, 0xbe, 0x39, 0x3f, 0xe9, 0xae, 0xa5, 0x85, 0xbf, 0x88, 0x4a, 0x2f, 0x54, 0xda, 0x5e, 0x81, + 0xe5, 0x02, 0xa4, 0x21, 0xe6, 0x13, 0x8f, 0xa1, 0xf6, 0x4f, 0x25, 0x98, 0xdf, 0x66, 0xf6, 0x53, + 0x8a, 0x8c, 0x00, 0x69, 0xd8, 0xb3, 0x65, 0x05, 0xaa, 0x26, 0xb7, 0x08, 0x0d, 0x9b, 0xd2, 0x62, + 0x53, 0x5e, 0x85, 0x9a, 0x67, 0xb8, 0x88, 0xf9, 0x86, 0x89, 0x44, 0xed, 0x35, 0x2d, 0x05, 0xe4, + 0x65, 0xa8, 0xf2, 0x4e, 0x75, 0x7f, 0xa8, 0x4c, 0x0b, 0x5f, 0x85, 0x9b, 0xbb, 0x43, 0x79, 0x05, + 0x66, 0x7d, 0x84, 0xa8, 0x8e, 0x2d, 0xa6, 0xcc, 0xb4, 0xa6, 0x79, 0x46, 0x6e, 0x0f, 0x2c, 0xc6, + 0x33, 0x06, 0x0e, 0x45, 0xcc, 0x21, 0x23, 0x4b, 0x29, 0xb7, 0xa4, 0xce, 0xbc, 0x96, 0x02, 0xf2, + 0x1a, 0xd4, 0x7d, 0xc6, 0x74, 0xec, 0x05, 0x88, 0x1e, 0x19, 0x23, 0xa5, 0xd2, 0x92, 0x3a, 0x33, + 0xda, 0x9c, 0xcf, 0xd8, 0x20, 0x82, 0xe4, 0x0e, 0x2c, 0x38, 0x06, 0xd3, 0x73, 0xb4, 0x6a, 0x4b, + 0xea, 0xcc, 0x6a, 0xff, 0x73, 0x0c, 0xb6, 0x9b, 0x61, 0xbe, 0x03, 0x35, 0x9f, 0x8c, 0xb0, 0x39, + 0xd1, 0xb1, 0xa5, 0xcc, 0x8a, 0x02, 0x67, 0x43, 0x60, 0x60, 0xc9, 0x2a, 0xcc, 0x1a, 0x34, 0xc0, + 0x87, 0x86, 0x19, 0x28, 0xb5, 0xd0, 0x17, 0xdb, 0x1b, 0x75, 0x2e, 0x79, 0xac, 0x41, 0xfb, 0x01, + 0xdc, 0xce, 0xc9, 0x15, 0x0b, 0x99, 0xb4, 0x8f, 0xad, 0x48, 0x36, 0xd1, 0xfe, 0xc0, 0x6a, 0x7f, + 0x57, 0x02, 0x39, 0x51, 0x9f, 0x87, 0x6c, 0x4e, 0x9e, 0x98, 0xfe, 0x35, 0x32, 0x67, 0x32, 0x95, + 0xb2, 0x99, 0xe4, 0x16, 0xd4, 0x3d, 0x74, 0xac, 0x27, 0x62, 0x4e, 0x0b, 0x31, 0xc1, 0x43, 0xc7, + 0xbb, 0x91, 0x9e, 0x77, 0x61, 0x9e, 0x33, 0x52, 0x4d, 0x67, 0x84, 0xa6, 0x3c, 0x6c, 0x3f, 0x91, + 0xb5, 0x0b, 0x8b, 0x5c, 0xb3, 0x3c, 0xb1, 0x2c, 0x44, 0x6b, 0x38, 0x06, 0xdb, 0xc9, 0x72, 0xdf, + 0xe6, 0x16, 0x14, 0x94, 0x5c, 0x05, 0xf5, 0xa2, 0x2c, 0xc9, 0xb9, 0xfc, 0x55, 0x82, 0xee, 0x36, + 0xb3, 0x3f, 0xc5, 0x9e, 0x31, 0xc2, 0x5f, 0xc6, 0x52, 0x3b, 0x06, 0x45, 0x9b, 0x93, 0xa4, 0xbc, + 0x3d, 0x6c, 0x7b, 0x46, 0x30, 0xa6, 0xe8, 0xbf, 0xa8, 0x79, 0x1f, 0x16, 0x58, 0x1c, 0xaf, 0x33, + 0xd3, 0x41, 0x2e, 0x8a, 0x0e, 0x6e, 0x23, 0xc1, 0xf7, 0x04, 0xcc, 0x8f, 0x69, 0x02, 0x09, 0x49, + 0xeb, 0x5a, 0x0a, 0x14, 0xda, 0x7a, 0x08, 0xeb, 0x37, 0xaf, 0x3b, 0x69, 0xf7, 0xe7, 0x12, 0xa8, + 0x19, 0x6e, 0x1c, 0xce, 0x89, 0x5b, 0xc4, 0x94, 0xff, 0x0f, 0x15, 0x8b, 0xb8, 0x06, 0xf6, 0xe2, + 0xb3, 0x15, 0x5a, 0xfc, 0x6a, 0x99, 0x8e, 0x81, 0xbd, 0xb4, 0xbb, 0xaa, 0xb0, 0x07, 0x56, 0xfe, + 0xb2, 0x4e, 0x5f, 0x75, 0x59, 0x71, 0x78, 0x44, 0x52, 0x55, 0x32, 0xb7, 0xb8, 0x9c, 0xbb, 0xc5, + 0x3d, 0xb8, 0x65, 0x8e, 0x29, 0x45, 0x5e, 0xa0, 0x0b, 0x02, 0x73, 0x8c, 0xf5, 0x4f, 0x1e, 0x89, + 0x03, 0x51, 0xd7, 0x16, 0x23, 0x17, 0x6f, 0x61, 0x4f, 0x38, 0xe4, 0x75, 0xb8, 0x7d, 0x18, 0x75, + 0x61, 0xe5, 0x22, 0xaa, 0x22, 0xe2, 0x56, 0xe2, 0xcc, 0xc4, 0x7c, 0x00, 0xf2, 0xc1, 0x88, 0x98, + 0x43, 0xdd, 0x1b, 0xbb, 0x07, 0x88, 0xea, 0x1e, 0xf1, 0x4c, 0x24, 0x2e, 0xeb, 0x8c, 0xb6, 0x20, + 0x3c, 0x3b, 0xc2, 0xb1, 0xc3, 0xf1, 0xf6, 0xdf, 0x25, 0x58, 0xd8, 0x66, 0xf6, 0x5e, 0x40, 0x28, + 0xda, 0x22, 0xe6, 0xd8, 0x45, 0x5e, 0xf0, 0xc6, 0xd3, 0x0b, 0x5b, 0xd9, 0xe9, 0x15, 0x8e, 0x06, + 0x2b, 0x4a, 0x1e, 0x49, 0x95, 0xd8, 0xf2, 0x12, 0x94, 0x7d, 0x4a, 0xc8, 0x61, 0x24, 0x55, 0x68, + 0xe4, 0x27, 0x4d, 0xe5, 0xe2, 0xa4, 0xa1, 0x28, 0x9c, 0xd8, 0x42, 0x89, 0x9a, 0x96, 0xd8, 0x72, + 0x13, 0xc0, 0x47, 0xd4, 0xc5, 0x8c, 0x61, 0xe2, 0x45, 0x33, 0x2a, 0x83, 0xc8, 0x32, 0xcc, 0x04, + 0x18, 0xd1, 0x68, 0x42, 0x89, 0xdf, 0xfc, 0x04, 0xf0, 0xdb, 0x27, 0x70, 0x10, 0xb7, 0xae, 0xea, + 0x18, 0x6c, 0x9f, 0xbb, 0xf8, 0x70, 0xc5, 0x2e, 0x62, 0x81, 0xe1, 0xfa, 0xca, 0x9c, 0x10, 0x31, + 0x05, 0xf8, 0xa8, 0x08, 0x03, 0x63, 0x46, 0x5d, 0x44, 0xd7, 0x45, 0x74, 0x84, 0x15, 0x8e, 0xf6, + 0x63, 0x50, 0x8a, 0x7a, 0x27, 0xe3, 0xef, 0x0e, 0xcc, 0xc5, 0xb2, 0xa4, 0x23, 0x10, 0x62, 0x68, + 0x60, 0xb5, 0xff, 0x91, 0xc4, 0xe4, 0x14, 0xd1, 0xcf, 0xd0, 0x64, 0x0b, 0x51, 0x7c, 0x64, 0x04, + 0xbc, 0xad, 0xb7, 0xbe, 0x65, 0x4d, 0x00, 0x2b, 0x49, 0x1f, 0x6d, 0x5a, 0x06, 0xc9, 0x6f, 0x50, + 0xf9, 0x9a, 0x0d, 0xaa, 0x5c, 0xbb, 0x41, 0xd5, 0xe2, 0x06, 0x15, 0xe4, 0x7a, 0x06, 0xef, 0x5e, + 0xda, 0x70, 0xa2, 0x59, 0x17, 0x16, 0x87, 0x68, 0xa2, 0xa7, 0x95, 0xa5, 0xca, 0x35, 0x86, 0xd9, + 0x88, 0x81, 0xb5, 0xfe, 0x7d, 0x19, 0xa6, 0xb7, 0x99, 0x2d, 0x3f, 0x87, 0x7a, 0xee, 0x11, 0xd2, + 0xba, 0xf0, 0x78, 0x28, 0x7c, 0xe9, 0xd5, 0xce, 0xeb, 0x18, 0x49, 0x3d, 0xfb, 0x00, 0x99, 0x77, + 0x40, 0xf3, 0xb2, 0xb8, 0xd4, 0xaf, 0xde, 0xbb, 0xde, 0x9f, 0x64, 0x35, 0xa1, 0x51, 0xfc, 0xf6, + 0xdd, 0xbd, 0xba, 0xa4, 0x84, 0xa4, 0xbe, 0x7f, 0x03, 0x52, 0xb2, 0xc8, 0x8f, 0x12, 0xbc, 0x77, + 0xd3, 0x6f, 0xc5, 0xe3, 0xcb, 0x12, 0xdf, 0x30, 0x58, 0x7d, 0xfa, 0x06, 0xc1, 0x49, 0xb5, 0x5f, + 0xc0, 0x7c, 0x7e, 0x6a, 0xad, 0x5d, 0x96, 0x35, 0x47, 0x51, 0xef, 0xbf, 0x96, 0x92, 0xa4, 0x1f, + 0x81, 0x7c, 0xc9, 0x35, 0xbb, 0x77, 0x65, 0x82, 0x1c, 0x4f, 0xed, 0xdd, 0x8c, 0x17, 0xaf, 0xa6, + 0x96, 0xbf, 0xe2, 0x2f, 0xd4, 0xcd, 0xcf, 0x5e, 0x9e, 0x36, 0xa5, 0x57, 0xa7, 0x4d, 0xe9, 0xaf, + 0xd3, 0xa6, 0xf4, 0xed, 0x59, 0x73, 0xea, 0xd5, 0x59, 0x73, 0xea, 0x8f, 0xb3, 0xe6, 0xd4, 0xf3, + 0x07, 0x36, 0x0e, 0x78, 0x32, 0x93, 0xb8, 0xfd, 0x30, 0xb5, 0x87, 0x82, 0x63, 0x42, 0x87, 0xfd, + 0x8b, 0x2f, 0xd7, 0x60, 0xe2, 0x23, 0x76, 0x50, 0x11, 0x8f, 0xee, 0x8f, 0xff, 0x0d, 0x00, 0x00, + 0xff, 0xff, 0x62, 0x5b, 0xa7, 0xd5, 0x1c, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1489,12 +1489,12 @@ func (m *MsgUpdateRingByAcp) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x40 + dAtA[i] = 0x38 } if m.PssInterval != 0 { i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x30 } if m.HasNewThreshold { i-- @@ -1504,12 +1504,12 @@ func (m *MsgUpdateRingByAcp) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if m.NewThreshold != 0 { i = encodeVarintTx(dAtA, i, uint64(m.NewThreshold)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x20 } if len(m.NewPeerIds) > 0 { for iNdEx := len(m.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { @@ -1517,7 +1517,7 @@ func (m *MsgUpdateRingByAcp) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.NewPeerIds[iNdEx]) i = encodeVarintTx(dAtA, i, uint64(len(m.NewPeerIds[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } } if len(m.RingId) > 0 { @@ -1585,14 +1585,14 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) MarshalToSizedBuffer(dAtA [ copy(dAtA[i:], m.Signature) i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(m.SignatureScheme) > 0 { i -= len(m.SignatureScheme) copy(dAtA[i:], m.SignatureScheme) i = encodeVarintTx(dAtA, i, uint64(len(m.SignatureScheme))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(m.RingId) > 0 { i -= len(m.RingId) @@ -2927,7 +2927,7 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { } m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", wireType) } @@ -2959,7 +2959,7 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { } m.NewPeerIds = append(m.NewPeerIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 5: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } @@ -2978,7 +2978,7 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { break } } - case 6: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HasNewThreshold", wireType) } @@ -2998,7 +2998,7 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { } } m.HasNewThreshold = bool(v != 0) - case 7: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } @@ -3017,7 +3017,7 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { break } } - case 8: + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) } @@ -3201,7 +3201,7 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) erro } m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SignatureScheme", wireType) } @@ -3233,7 +3233,7 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) erro } m.SignatureScheme = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } From 46130c6168b1126dadbe7419fb6745788bf86162 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Thu, 21 May 2026 10:35:18 -0400 Subject: [PATCH 4/8] optional fields --- api/sourcehub/orbis/document.pulsar.go | 337 ++++---- api/sourcehub/orbis/ring.pulsar.go | 335 +++----- api/sourcehub/orbis/tx.pulsar.go | 1052 ++++++++++-------------- proto/sourcehub/orbis/document.proto | 8 +- proto/sourcehub/orbis/ring.proto | 12 +- proto/sourcehub/orbis/tx.proto | 24 +- x/orbis/keeper/msg_server.go | 47 +- x/orbis/keeper/msg_server_test.go | 157 +++- x/orbis/keeper/optional.go | 75 ++ x/orbis/keeper/validation.go | 17 +- x/orbis/types/document.pb.go | 279 ++++--- x/orbis/types/ring.pb.go | 298 +++---- x/orbis/types/tx.pb.go | 731 ++++++++-------- 13 files changed, 1653 insertions(+), 1719 deletions(-) create mode 100644 x/orbis/keeper/optional.go diff --git a/api/sourcehub/orbis/document.pulsar.go b/api/sourcehub/orbis/document.pulsar.go index fff2d9e9..800a1025 100644 --- a/api/sourcehub/orbis/document.pulsar.go +++ b/api/sourcehub/orbis/document.pulsar.go @@ -13,20 +13,18 @@ import ( ) var ( - md_Document protoreflect.MessageDescriptor - fd_Document_id protoreflect.FieldDescriptor - fd_Document_namespace protoreflect.FieldDescriptor - fd_Document_creator_did protoreflect.FieldDescriptor - fd_Document_ring_id protoreflect.FieldDescriptor - fd_Document_document protoreflect.FieldDescriptor - fd_Document_proof protoreflect.FieldDescriptor - fd_Document_policy_id protoreflect.FieldDescriptor - fd_Document_resource protoreflect.FieldDescriptor - fd_Document_permission protoreflect.FieldDescriptor - fd_Document_tier protoreflect.FieldDescriptor - fd_Document_has_tier protoreflect.FieldDescriptor - fd_Document_timestamp protoreflect.FieldDescriptor - fd_Document_has_timestamp protoreflect.FieldDescriptor + md_Document protoreflect.MessageDescriptor + fd_Document_id protoreflect.FieldDescriptor + fd_Document_namespace protoreflect.FieldDescriptor + fd_Document_creator_did protoreflect.FieldDescriptor + fd_Document_ring_id protoreflect.FieldDescriptor + fd_Document_document protoreflect.FieldDescriptor + fd_Document_proof protoreflect.FieldDescriptor + fd_Document_policy_id protoreflect.FieldDescriptor + fd_Document_resource protoreflect.FieldDescriptor + fd_Document_permission protoreflect.FieldDescriptor + fd_Document_tier protoreflect.FieldDescriptor + fd_Document_timestamp protoreflect.FieldDescriptor ) func init() { @@ -42,9 +40,7 @@ func init() { fd_Document_resource = md_Document.Fields().ByName("resource") fd_Document_permission = md_Document.Fields().ByName("permission") fd_Document_tier = md_Document.Fields().ByName("tier") - fd_Document_has_tier = md_Document.Fields().ByName("has_tier") fd_Document_timestamp = md_Document.Fields().ByName("timestamp") - fd_Document_has_timestamp = md_Document.Fields().ByName("has_timestamp") } var _ protoreflect.Message = (*fastReflection_Document)(nil) @@ -166,28 +162,24 @@ func (x *fastReflection_Document) Range(f func(protoreflect.FieldDescriptor, pro return } } - if x.Tier != "" { - value := protoreflect.ValueOfString(x.Tier) - if !f(fd_Document_tier, value) { - return - } - } - if x.HasTier != false { - value := protoreflect.ValueOfBool(x.HasTier) - if !f(fd_Document_has_tier, value) { - return - } - } - if x.Timestamp != uint64(0) { - value := protoreflect.ValueOfUint64(x.Timestamp) - if !f(fd_Document_timestamp, value) { - return + if x.XTier != nil { + switch o := x.XTier.(type) { + case *Document_Tier: + v := o.Tier + value := protoreflect.ValueOfString(v) + if !f(fd_Document_tier, value) { + return + } } } - if x.HasTimestamp != false { - value := protoreflect.ValueOfBool(x.HasTimestamp) - if !f(fd_Document_has_timestamp, value) { - return + if x.XTimestamp != nil { + switch o := x.XTimestamp.(type) { + case *Document_Timestamp: + v := o.Timestamp + value := protoreflect.ValueOfUint64(v) + if !f(fd_Document_timestamp, value) { + return + } } } } @@ -224,13 +216,21 @@ func (x *fastReflection_Document) Has(fd protoreflect.FieldDescriptor) bool { case "sourcehub.orbis.Document.permission": return x.Permission != "" case "sourcehub.orbis.Document.tier": - return x.Tier != "" - case "sourcehub.orbis.Document.has_tier": - return x.HasTier != false + if x.XTier == nil { + return false + } else if _, ok := x.XTier.(*Document_Tier); ok { + return true + } else { + return false + } case "sourcehub.orbis.Document.timestamp": - return x.Timestamp != uint64(0) - case "sourcehub.orbis.Document.has_timestamp": - return x.HasTimestamp != false + if x.XTimestamp == nil { + return false + } else if _, ok := x.XTimestamp.(*Document_Timestamp); ok { + return true + } else { + return false + } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) @@ -266,13 +266,9 @@ func (x *fastReflection_Document) Clear(fd protoreflect.FieldDescriptor) { case "sourcehub.orbis.Document.permission": x.Permission = "" case "sourcehub.orbis.Document.tier": - x.Tier = "" - case "sourcehub.orbis.Document.has_tier": - x.HasTier = false + x.XTier = nil case "sourcehub.orbis.Document.timestamp": - x.Timestamp = uint64(0) - case "sourcehub.orbis.Document.has_timestamp": - x.HasTimestamp = false + x.XTimestamp = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) @@ -317,17 +313,21 @@ func (x *fastReflection_Document) Get(descriptor protoreflect.FieldDescriptor) p value := x.Permission return protoreflect.ValueOfString(value) case "sourcehub.orbis.Document.tier": - value := x.Tier - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.has_tier": - value := x.HasTier - return protoreflect.ValueOfBool(value) + if x.XTier == nil { + return protoreflect.ValueOfString("") + } else if v, ok := x.XTier.(*Document_Tier); ok { + return protoreflect.ValueOfString(v.Tier) + } else { + return protoreflect.ValueOfString("") + } case "sourcehub.orbis.Document.timestamp": - value := x.Timestamp - return protoreflect.ValueOfUint64(value) - case "sourcehub.orbis.Document.has_timestamp": - value := x.HasTimestamp - return protoreflect.ValueOfBool(value) + if x.XTimestamp == nil { + return protoreflect.ValueOfUint64(uint64(0)) + } else if v, ok := x.XTimestamp.(*Document_Timestamp); ok { + return protoreflect.ValueOfUint64(v.Timestamp) + } else { + return protoreflect.ValueOfUint64(uint64(0)) + } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) @@ -367,13 +367,11 @@ func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value pro case "sourcehub.orbis.Document.permission": x.Permission = value.Interface().(string) case "sourcehub.orbis.Document.tier": - x.Tier = value.Interface().(string) - case "sourcehub.orbis.Document.has_tier": - x.HasTier = value.Bool() + cv := value.Interface().(string) + x.XTier = &Document_Tier{Tier: cv} case "sourcehub.orbis.Document.timestamp": - x.Timestamp = value.Uint() - case "sourcehub.orbis.Document.has_timestamp": - x.HasTimestamp = value.Bool() + cv := value.Uint() + x.XTimestamp = &Document_Timestamp{Timestamp: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) @@ -414,12 +412,8 @@ func (x *fastReflection_Document) Mutable(fd protoreflect.FieldDescriptor) proto panic(fmt.Errorf("field permission of message sourcehub.orbis.Document is not mutable")) case "sourcehub.orbis.Document.tier": panic(fmt.Errorf("field tier of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.has_tier": - panic(fmt.Errorf("field has_tier of message sourcehub.orbis.Document is not mutable")) case "sourcehub.orbis.Document.timestamp": panic(fmt.Errorf("field timestamp of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.has_timestamp": - panic(fmt.Errorf("field has_timestamp of message sourcehub.orbis.Document is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) @@ -453,12 +447,8 @@ func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) prot return protoreflect.ValueOfString("") case "sourcehub.orbis.Document.tier": return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.has_tier": - return protoreflect.ValueOfBool(false) case "sourcehub.orbis.Document.timestamp": return protoreflect.ValueOfUint64(uint64(0)) - case "sourcehub.orbis.Document.has_timestamp": - return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) @@ -472,6 +462,22 @@ func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) prot // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Document) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { + case "sourcehub.orbis.Document._tier": + if x.XTier == nil { + return nil + } + switch x.XTier.(type) { + case *Document_Tier: + return x.Descriptor().Fields().ByName("tier") + } + case "sourcehub.orbis.Document._timestamp": + if x.XTimestamp == nil { + return nil + } + switch x.XTimestamp.(type) { + case *Document_Timestamp: + return x.Descriptor().Fields().ByName("timestamp") + } default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.Document", d.FullName())) } @@ -564,18 +570,12 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Tier) - if l > 0 { + if x.Tier != nil { + l = len(*x.Tier) n += 1 + l + runtime.Sov(uint64(l)) } - if x.HasTier { - n += 2 - } - if x.Timestamp != 0 { - n += 1 + runtime.Sov(uint64(x.Timestamp)) - } - if x.HasTimestamp { - n += 2 + if x.Timestamp != nil { + n += 1 + runtime.Sov(uint64(*x.Timestamp)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -606,35 +606,29 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.HasTimestamp { - i-- - if x.HasTimestamp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + switch x := x.XTimestamp.(type) { + case *Document_Timestamp: + i = runtime.EncodeVarint(dAtA, i, uint64(*x.Timestamp)) i-- - dAtA[i] = 0x68 + dAtA[i] = 0x58 } - if x.Timestamp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Timestamp)) + switch x := x.XTier.(type) { + case *Document_Tier: + i -= len(*x.Tier) + copy(dAtA[i:], *x.Tier) + i = runtime.EncodeVarint(dAtA, i, uint64(len(*x.Tier))) i-- - dAtA[i] = 0x60 + dAtA[i] = 0x52 } - if x.HasTier { - i-- - if x.HasTier { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if x.Timestamp != nil { + i = runtime.EncodeVarint(dAtA, i, uint64(*x.Timestamp)) i-- dAtA[i] = 0x58 } - if len(x.Tier) > 0 { - i -= len(x.Tier) - copy(dAtA[i:], x.Tier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tier))) + if x.Tier != nil { + i -= len(*x.Tier) + copy(dAtA[i:], *x.Tier) + i = runtime.EncodeVarint(dAtA, i, uint64(len(*x.Tier))) i-- dAtA[i] = 0x52 } @@ -1068,52 +1062,14 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Tier = string(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + x.Tier = &s iNdEx = postIndex case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasTier", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.HasTier = bool(v != 0) - case 12: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } - x.Timestamp = 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.Timestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasTimestamp", wireType) - } - var v int + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1123,12 +1079,12 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - x.HasTimestamp = bool(v != 0) + x.Timestamp = &v default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1183,19 +1139,19 @@ type Document struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` - Tier string `protobuf:"bytes,10,opt,name=tier,proto3" json:"tier,omitempty"` - HasTier bool `protobuf:"varint,11,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` - Timestamp uint64 `protobuf:"varint,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - HasTimestamp bool `protobuf:"varint,13,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` + // Absent means no tier. + Tier *string `protobuf:"bytes,10,opt,name=tier,proto3,oneof" json:"tier,omitempty"` + // Absent means no timestamp. + Timestamp *uint64 `protobuf:"varint,11,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` } func (x *Document) Reset() { @@ -1282,40 +1238,26 @@ func (x *Document) GetPermission() string { } func (x *Document) GetTier() string { - if x != nil { - return x.Tier + if x != nil && x.Tier != nil { + return *x.Tier } return "" } -func (x *Document) GetHasTier() bool { - if x != nil { - return x.HasTier - } - return false -} - func (x *Document) GetTimestamp() uint64 { - if x != nil { - return x.Timestamp + if x != nil && x.Timestamp != nil { + return *x.Timestamp } return 0 } -func (x *Document) GetHasTimestamp() bool { - if x != nil { - return x.HasTimestamp - } - return false -} - var File_sourcehub_orbis_document_proto protoreflect.FileDescriptor var file_sourcehub_orbis_document_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x22, 0xef, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, + 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, @@ -1331,25 +1273,23 @@ var file_sourcehub_orbis_document_proto_rawDesc = []byte{ 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x69, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x65, - 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x54, 0x69, 0x65, 0x72, - 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, - 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x42, 0xa3, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0d, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, - 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x74, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0xa3, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0d, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, + 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1395,6 +1335,7 @@ func file_sourcehub_orbis_document_proto_init() { } } } + file_sourcehub_orbis_document_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/sourcehub/orbis/ring.pulsar.go b/api/sourcehub/orbis/ring.pulsar.go index b87b26f8..b1e03151 100644 --- a/api/sourcehub/orbis/ring.pulsar.go +++ b/api/sourcehub/orbis/ring.pulsar.go @@ -114,9 +114,7 @@ var ( fd_Ring_threshold protoreflect.FieldDescriptor fd_Ring_new_peer_ids protoreflect.FieldDescriptor fd_Ring_new_threshold protoreflect.FieldDescriptor - fd_Ring_has_new_threshold protoreflect.FieldDescriptor fd_Ring_pss_interval protoreflect.FieldDescriptor - fd_Ring_has_pss_interval protoreflect.FieldDescriptor fd_Ring_block_number_nonce protoreflect.FieldDescriptor fd_Ring_policy_id protoreflect.FieldDescriptor ) @@ -132,9 +130,7 @@ func init() { fd_Ring_threshold = md_Ring.Fields().ByName("threshold") fd_Ring_new_peer_ids = md_Ring.Fields().ByName("new_peer_ids") fd_Ring_new_threshold = md_Ring.Fields().ByName("new_threshold") - fd_Ring_has_new_threshold = md_Ring.Fields().ByName("has_new_threshold") fd_Ring_pss_interval = md_Ring.Fields().ByName("pss_interval") - fd_Ring_has_pss_interval = md_Ring.Fields().ByName("has_pss_interval") fd_Ring_block_number_nonce = md_Ring.Fields().ByName("block_number_nonce") fd_Ring_policy_id = md_Ring.Fields().ByName("policy_id") } @@ -246,28 +242,24 @@ func (x *fastReflection_Ring) Range(f func(protoreflect.FieldDescriptor, protore return } } - if x.NewThreshold != uint32(0) { - value := protoreflect.ValueOfUint32(x.NewThreshold) - if !f(fd_Ring_new_threshold, value) { - return - } - } - if x.HasNewThreshold != false { - value := protoreflect.ValueOfBool(x.HasNewThreshold) - if !f(fd_Ring_has_new_threshold, value) { - return - } - } - if x.PssInterval != uint64(0) { - value := protoreflect.ValueOfUint64(x.PssInterval) - if !f(fd_Ring_pss_interval, value) { - return + if x.XNewThreshold != nil { + switch o := x.XNewThreshold.(type) { + case *Ring_NewThreshold: + v := o.NewThreshold + value := protoreflect.ValueOfUint32(v) + if !f(fd_Ring_new_threshold, value) { + return + } } } - if x.HasPssInterval != false { - value := protoreflect.ValueOfBool(x.HasPssInterval) - if !f(fd_Ring_has_pss_interval, value) { - return + if x.XPssInterval != nil { + switch o := x.XPssInterval.(type) { + case *Ring_PssInterval: + v := o.PssInterval + value := protoreflect.ValueOfUint64(v) + if !f(fd_Ring_pss_interval, value) { + return + } } } if x.BlockNumberNonce != uint64(0) { @@ -312,13 +304,21 @@ func (x *fastReflection_Ring) Has(fd protoreflect.FieldDescriptor) bool { case "sourcehub.orbis.Ring.new_peer_ids": return len(x.NewPeerIds) != 0 case "sourcehub.orbis.Ring.new_threshold": - return x.NewThreshold != uint32(0) - case "sourcehub.orbis.Ring.has_new_threshold": - return x.HasNewThreshold != false + if x.XNewThreshold == nil { + return false + } else if _, ok := x.XNewThreshold.(*Ring_NewThreshold); ok { + return true + } else { + return false + } case "sourcehub.orbis.Ring.pss_interval": - return x.PssInterval != uint64(0) - case "sourcehub.orbis.Ring.has_pss_interval": - return x.HasPssInterval != false + if x.XPssInterval == nil { + return false + } else if _, ok := x.XPssInterval.(*Ring_PssInterval); ok { + return true + } else { + return false + } case "sourcehub.orbis.Ring.block_number_nonce": return x.BlockNumberNonce != uint64(0) case "sourcehub.orbis.Ring.policy_id": @@ -354,13 +354,9 @@ func (x *fastReflection_Ring) Clear(fd protoreflect.FieldDescriptor) { case "sourcehub.orbis.Ring.new_peer_ids": x.NewPeerIds = nil case "sourcehub.orbis.Ring.new_threshold": - x.NewThreshold = uint32(0) - case "sourcehub.orbis.Ring.has_new_threshold": - x.HasNewThreshold = false + x.XNewThreshold = nil case "sourcehub.orbis.Ring.pss_interval": - x.PssInterval = uint64(0) - case "sourcehub.orbis.Ring.has_pss_interval": - x.HasPssInterval = false + x.XPssInterval = nil case "sourcehub.orbis.Ring.block_number_nonce": x.BlockNumberNonce = uint64(0) case "sourcehub.orbis.Ring.policy_id": @@ -409,17 +405,21 @@ func (x *fastReflection_Ring) Get(descriptor protoreflect.FieldDescriptor) proto listValue := &_Ring_7_list{list: &x.NewPeerIds} return protoreflect.ValueOfList(listValue) case "sourcehub.orbis.Ring.new_threshold": - value := x.NewThreshold - return protoreflect.ValueOfUint32(value) - case "sourcehub.orbis.Ring.has_new_threshold": - value := x.HasNewThreshold - return protoreflect.ValueOfBool(value) + if x.XNewThreshold == nil { + return protoreflect.ValueOfUint32(uint32(0)) + } else if v, ok := x.XNewThreshold.(*Ring_NewThreshold); ok { + return protoreflect.ValueOfUint32(v.NewThreshold) + } else { + return protoreflect.ValueOfUint32(uint32(0)) + } case "sourcehub.orbis.Ring.pss_interval": - value := x.PssInterval - return protoreflect.ValueOfUint64(value) - case "sourcehub.orbis.Ring.has_pss_interval": - value := x.HasPssInterval - return protoreflect.ValueOfBool(value) + if x.XPssInterval == nil { + return protoreflect.ValueOfUint64(uint64(0)) + } else if v, ok := x.XPssInterval.(*Ring_PssInterval); ok { + return protoreflect.ValueOfUint64(v.PssInterval) + } else { + return protoreflect.ValueOfUint64(uint64(0)) + } case "sourcehub.orbis.Ring.block_number_nonce": value := x.BlockNumberNonce return protoreflect.ValueOfUint64(value) @@ -465,13 +465,11 @@ func (x *fastReflection_Ring) Set(fd protoreflect.FieldDescriptor, value protore clv := lv.(*_Ring_7_list) x.NewPeerIds = *clv.list case "sourcehub.orbis.Ring.new_threshold": - x.NewThreshold = uint32(value.Uint()) - case "sourcehub.orbis.Ring.has_new_threshold": - x.HasNewThreshold = value.Bool() + cv := uint32(value.Uint()) + x.XNewThreshold = &Ring_NewThreshold{NewThreshold: cv} case "sourcehub.orbis.Ring.pss_interval": - x.PssInterval = value.Uint() - case "sourcehub.orbis.Ring.has_pss_interval": - x.HasPssInterval = value.Bool() + cv := value.Uint() + x.XPssInterval = &Ring_PssInterval{PssInterval: cv} case "sourcehub.orbis.Ring.block_number_nonce": x.BlockNumberNonce = value.Uint() case "sourcehub.orbis.Ring.policy_id": @@ -520,12 +518,8 @@ func (x *fastReflection_Ring) Mutable(fd protoreflect.FieldDescriptor) protorefl panic(fmt.Errorf("field threshold of message sourcehub.orbis.Ring is not mutable")) case "sourcehub.orbis.Ring.new_threshold": panic(fmt.Errorf("field new_threshold of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.has_new_threshold": - panic(fmt.Errorf("field has_new_threshold of message sourcehub.orbis.Ring is not mutable")) case "sourcehub.orbis.Ring.pss_interval": panic(fmt.Errorf("field pss_interval of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.has_pss_interval": - panic(fmt.Errorf("field has_pss_interval of message sourcehub.orbis.Ring is not mutable")) case "sourcehub.orbis.Ring.block_number_nonce": panic(fmt.Errorf("field block_number_nonce of message sourcehub.orbis.Ring is not mutable")) case "sourcehub.orbis.Ring.policy_id": @@ -561,12 +555,8 @@ func (x *fastReflection_Ring) NewField(fd protoreflect.FieldDescriptor) protoref return protoreflect.ValueOfList(&_Ring_7_list{list: &list}) case "sourcehub.orbis.Ring.new_threshold": return protoreflect.ValueOfUint32(uint32(0)) - case "sourcehub.orbis.Ring.has_new_threshold": - return protoreflect.ValueOfBool(false) case "sourcehub.orbis.Ring.pss_interval": return protoreflect.ValueOfUint64(uint64(0)) - case "sourcehub.orbis.Ring.has_pss_interval": - return protoreflect.ValueOfBool(false) case "sourcehub.orbis.Ring.block_number_nonce": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.orbis.Ring.policy_id": @@ -584,6 +574,22 @@ func (x *fastReflection_Ring) NewField(fd protoreflect.FieldDescriptor) protoref // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Ring) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { + case "sourcehub.orbis.Ring._new_threshold": + if x.XNewThreshold == nil { + return nil + } + switch x.XNewThreshold.(type) { + case *Ring_NewThreshold: + return x.Descriptor().Fields().ByName("new_threshold") + } + case "sourcehub.orbis.Ring._pss_interval": + if x.XPssInterval == nil { + return nil + } + switch x.XPssInterval.(type) { + case *Ring_PssInterval: + return x.Descriptor().Fields().ByName("pss_interval") + } default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.Ring", d.FullName())) } @@ -671,17 +677,11 @@ func (x *fastReflection_Ring) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.NewThreshold != 0 { - n += 1 + runtime.Sov(uint64(x.NewThreshold)) + if x.NewThreshold != nil { + n += 1 + runtime.Sov(uint64(*x.NewThreshold)) } - if x.HasNewThreshold { - n += 2 - } - if x.PssInterval != 0 { - n += 1 + runtime.Sov(uint64(x.PssInterval)) - } - if x.HasPssInterval { - n += 2 + if x.PssInterval != nil { + n += 1 + runtime.Sov(uint64(*x.PssInterval)) } if x.BlockNumberNonce != 0 { n += 1 + runtime.Sov(uint64(x.BlockNumberNonce)) @@ -719,45 +719,37 @@ func (x *fastReflection_Ring) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + switch x := x.XPssInterval.(type) { + case *Ring_PssInterval: + i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) + i-- + dAtA[i] = 0x48 + } + switch x := x.XNewThreshold.(type) { + case *Ring_NewThreshold: + i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) + i-- + dAtA[i] = 0x40 + } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- - dAtA[i] = 0x6a + dAtA[i] = 0x5a } if x.BlockNumberNonce != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockNumberNonce)) i-- - dAtA[i] = 0x60 - } - if x.HasPssInterval { - i-- - if x.HasPssInterval { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if x.PssInterval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PssInterval)) - i-- dAtA[i] = 0x50 } - if x.HasNewThreshold { - i-- - if x.HasNewThreshold { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if x.PssInterval != nil { + i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) i-- dAtA[i] = 0x48 } - if x.NewThreshold != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.NewThreshold)) + if x.NewThreshold != nil { + i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) i-- dAtA[i] = 0x40 } @@ -1076,7 +1068,7 @@ func (x *fastReflection_Ring) ProtoMethods() *protoiface.Methods { if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } - x.NewThreshold = 0 + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1086,55 +1078,17 @@ func (x *fastReflection_Ring) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.NewThreshold |= uint32(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } + x.NewThreshold = &v case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasNewThreshold", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.HasNewThreshold = bool(v != 0) - case 10: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } - x.PssInterval = 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.PssInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) - } - var v int + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1144,13 +1098,13 @@ func (x *fastReflection_Ring) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - x.HasPssInterval = bool(v != 0) - case 12: + x.PssInterval = &v + case 10: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) } @@ -1169,7 +1123,7 @@ func (x *fastReflection_Ring) ProtoMethods() *protoiface.Methods { break } } - case 13: + case 11: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -1255,19 +1209,19 @@ type Ring struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` - NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - NewThreshold uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` - HasNewThreshold bool `protobuf:"varint,9,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` - PssInterval uint64 `protobuf:"varint,10,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` - HasPssInterval bool `protobuf:"varint,11,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` - BlockNumberNonce uint64 `protobuf:"varint,12,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` - PolicyId string `protobuf:"bytes,13,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` + NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + // Absent means no pending threshold update. + NewThreshold *uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` + // Absent means automatic PSS refresh is disabled. + PssInterval *uint64 `protobuf:"varint,9,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,10,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + PolicyId string `protobuf:"bytes,11,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` } func (x *Ring) Reset() { @@ -1340,33 +1294,19 @@ func (x *Ring) GetNewPeerIds() []string { } func (x *Ring) GetNewThreshold() uint32 { - if x != nil { - return x.NewThreshold + if x != nil && x.NewThreshold != nil { + return *x.NewThreshold } return 0 } -func (x *Ring) GetHasNewThreshold() bool { - if x != nil { - return x.HasNewThreshold - } - return false -} - func (x *Ring) GetPssInterval() uint64 { - if x != nil { - return x.PssInterval + if x != nil && x.PssInterval != nil { + return *x.PssInterval } return 0 } -func (x *Ring) GetHasPssInterval() bool { - if x != nil { - return x.HasPssInterval - } - return false -} - func (x *Ring) GetBlockNumberNonce() uint64 { if x != nil { return x.BlockNumberNonce @@ -1386,7 +1326,7 @@ var File_sourcehub_orbis_ring_proto protoreflect.FileDescriptor var file_sourcehub_orbis_ring_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x22, 0xb2, 0x03, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x22, 0x89, 0x03, 0x0a, 0x04, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, @@ -1399,32 +1339,30 @@ var file_sourcehub_orbis_ring_proto_rawDesc = []byte{ 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, - 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x77, + 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2a, - 0x0a, 0x11, 0x68, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x4e, 0x65, - 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x73, - 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x28, 0x0a, - 0x10, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x50, 0x73, 0x73, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, - 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x49, 0x64, 0x42, 0x9f, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x09, 0x52, 0x69, 0x6e, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, - 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, - 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, - 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, - 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, - 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0b, 0x70, 0x73, 0x73, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x12, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x73, 0x73, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x9f, 0x01, 0x0a, 0x13, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x42, 0x09, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, + 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1470,6 +1408,7 @@ func file_sourcehub_orbis_ring_proto_init() { } } } + file_sourcehub_orbis_ring_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/sourcehub/orbis/tx.pulsar.go b/api/sourcehub/orbis/tx.pulsar.go index 7173fb0a..4228790b 100644 --- a/api/sourcehub/orbis/tx.pulsar.go +++ b/api/sourcehub/orbis/tx.pulsar.go @@ -918,16 +918,15 @@ func (x *_MsgCreateRing_4_list) IsValid() bool { } var ( - md_MsgCreateRing protoreflect.MessageDescriptor - fd_MsgCreateRing_creator protoreflect.FieldDescriptor - fd_MsgCreateRing_namespace protoreflect.FieldDescriptor - fd_MsgCreateRing_ring_pk protoreflect.FieldDescriptor - fd_MsgCreateRing_peer_ids protoreflect.FieldDescriptor - fd_MsgCreateRing_threshold protoreflect.FieldDescriptor - fd_MsgCreateRing_pss_interval protoreflect.FieldDescriptor - fd_MsgCreateRing_has_pss_interval protoreflect.FieldDescriptor - fd_MsgCreateRing_policy_id protoreflect.FieldDescriptor - fd_MsgCreateRing_artifact protoreflect.FieldDescriptor + md_MsgCreateRing protoreflect.MessageDescriptor + fd_MsgCreateRing_creator protoreflect.FieldDescriptor + fd_MsgCreateRing_namespace protoreflect.FieldDescriptor + fd_MsgCreateRing_ring_pk protoreflect.FieldDescriptor + fd_MsgCreateRing_peer_ids protoreflect.FieldDescriptor + fd_MsgCreateRing_threshold protoreflect.FieldDescriptor + fd_MsgCreateRing_pss_interval protoreflect.FieldDescriptor + fd_MsgCreateRing_policy_id protoreflect.FieldDescriptor + fd_MsgCreateRing_artifact protoreflect.FieldDescriptor ) func init() { @@ -939,7 +938,6 @@ func init() { fd_MsgCreateRing_peer_ids = md_MsgCreateRing.Fields().ByName("peer_ids") fd_MsgCreateRing_threshold = md_MsgCreateRing.Fields().ByName("threshold") fd_MsgCreateRing_pss_interval = md_MsgCreateRing.Fields().ByName("pss_interval") - fd_MsgCreateRing_has_pss_interval = md_MsgCreateRing.Fields().ByName("has_pss_interval") fd_MsgCreateRing_policy_id = md_MsgCreateRing.Fields().ByName("policy_id") fd_MsgCreateRing_artifact = md_MsgCreateRing.Fields().ByName("artifact") } @@ -1039,16 +1037,14 @@ func (x *fastReflection_MsgCreateRing) Range(f func(protoreflect.FieldDescriptor return } } - if x.PssInterval != uint64(0) { - value := protoreflect.ValueOfUint64(x.PssInterval) - if !f(fd_MsgCreateRing_pss_interval, value) { - return - } - } - if x.HasPssInterval != false { - value := protoreflect.ValueOfBool(x.HasPssInterval) - if !f(fd_MsgCreateRing_has_pss_interval, value) { - return + if x.XPssInterval != nil { + switch o := x.XPssInterval.(type) { + case *MsgCreateRing_PssInterval: + v := o.PssInterval + value := protoreflect.ValueOfUint64(v) + if !f(fd_MsgCreateRing_pss_interval, value) { + return + } } } if x.PolicyId != "" { @@ -1089,9 +1085,13 @@ func (x *fastReflection_MsgCreateRing) Has(fd protoreflect.FieldDescriptor) bool case "sourcehub.orbis.MsgCreateRing.threshold": return x.Threshold != uint32(0) case "sourcehub.orbis.MsgCreateRing.pss_interval": - return x.PssInterval != uint64(0) - case "sourcehub.orbis.MsgCreateRing.has_pss_interval": - return x.HasPssInterval != false + if x.XPssInterval == nil { + return false + } else if _, ok := x.XPssInterval.(*MsgCreateRing_PssInterval); ok { + return true + } else { + return false + } case "sourcehub.orbis.MsgCreateRing.policy_id": return x.PolicyId != "" case "sourcehub.orbis.MsgCreateRing.artifact": @@ -1123,9 +1123,7 @@ func (x *fastReflection_MsgCreateRing) Clear(fd protoreflect.FieldDescriptor) { case "sourcehub.orbis.MsgCreateRing.threshold": x.Threshold = uint32(0) case "sourcehub.orbis.MsgCreateRing.pss_interval": - x.PssInterval = uint64(0) - case "sourcehub.orbis.MsgCreateRing.has_pss_interval": - x.HasPssInterval = false + x.XPssInterval = nil case "sourcehub.orbis.MsgCreateRing.policy_id": x.PolicyId = "" case "sourcehub.orbis.MsgCreateRing.artifact": @@ -1165,11 +1163,13 @@ func (x *fastReflection_MsgCreateRing) Get(descriptor protoreflect.FieldDescript value := x.Threshold return protoreflect.ValueOfUint32(value) case "sourcehub.orbis.MsgCreateRing.pss_interval": - value := x.PssInterval - return protoreflect.ValueOfUint64(value) - case "sourcehub.orbis.MsgCreateRing.has_pss_interval": - value := x.HasPssInterval - return protoreflect.ValueOfBool(value) + if x.XPssInterval == nil { + return protoreflect.ValueOfUint64(uint64(0)) + } else if v, ok := x.XPssInterval.(*MsgCreateRing_PssInterval); ok { + return protoreflect.ValueOfUint64(v.PssInterval) + } else { + return protoreflect.ValueOfUint64(uint64(0)) + } case "sourcehub.orbis.MsgCreateRing.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) @@ -1209,9 +1209,8 @@ func (x *fastReflection_MsgCreateRing) Set(fd protoreflect.FieldDescriptor, valu case "sourcehub.orbis.MsgCreateRing.threshold": x.Threshold = uint32(value.Uint()) case "sourcehub.orbis.MsgCreateRing.pss_interval": - x.PssInterval = value.Uint() - case "sourcehub.orbis.MsgCreateRing.has_pss_interval": - x.HasPssInterval = value.Bool() + cv := value.Uint() + x.XPssInterval = &MsgCreateRing_PssInterval{PssInterval: cv} case "sourcehub.orbis.MsgCreateRing.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.orbis.MsgCreateRing.artifact": @@ -1252,8 +1251,6 @@ func (x *fastReflection_MsgCreateRing) Mutable(fd protoreflect.FieldDescriptor) panic(fmt.Errorf("field threshold of message sourcehub.orbis.MsgCreateRing is not mutable")) case "sourcehub.orbis.MsgCreateRing.pss_interval": panic(fmt.Errorf("field pss_interval of message sourcehub.orbis.MsgCreateRing is not mutable")) - case "sourcehub.orbis.MsgCreateRing.has_pss_interval": - panic(fmt.Errorf("field has_pss_interval of message sourcehub.orbis.MsgCreateRing is not mutable")) case "sourcehub.orbis.MsgCreateRing.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.orbis.MsgCreateRing is not mutable")) case "sourcehub.orbis.MsgCreateRing.artifact": @@ -1284,8 +1281,6 @@ func (x *fastReflection_MsgCreateRing) NewField(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfUint32(uint32(0)) case "sourcehub.orbis.MsgCreateRing.pss_interval": return protoreflect.ValueOfUint64(uint64(0)) - case "sourcehub.orbis.MsgCreateRing.has_pss_interval": - return protoreflect.ValueOfBool(false) case "sourcehub.orbis.MsgCreateRing.policy_id": return protoreflect.ValueOfString("") case "sourcehub.orbis.MsgCreateRing.artifact": @@ -1303,6 +1298,14 @@ func (x *fastReflection_MsgCreateRing) NewField(fd protoreflect.FieldDescriptor) // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCreateRing) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { + case "sourcehub.orbis.MsgCreateRing._pss_interval": + if x.XPssInterval == nil { + return nil + } + switch x.XPssInterval.(type) { + case *MsgCreateRing_PssInterval: + return x.Descriptor().Fields().ByName("pss_interval") + } default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgCreateRing", d.FullName())) } @@ -1380,11 +1383,8 @@ func (x *fastReflection_MsgCreateRing) ProtoMethods() *protoiface.Methods { if x.Threshold != 0 { n += 1 + runtime.Sov(uint64(x.Threshold)) } - if x.PssInterval != 0 { - n += 1 + runtime.Sov(uint64(x.PssInterval)) - } - if x.HasPssInterval { - n += 2 + if x.PssInterval != nil { + n += 1 + runtime.Sov(uint64(*x.PssInterval)) } l = len(x.PolicyId) if l > 0 { @@ -1423,32 +1423,28 @@ func (x *fastReflection_MsgCreateRing) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + switch x := x.XPssInterval.(type) { + case *MsgCreateRing_PssInterval: + i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) + i-- + dAtA[i] = 0x30 + } if len(x.Artifact) > 0 { i -= len(x.Artifact) copy(dAtA[i:], x.Artifact) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- - dAtA[i] = 0x42 - } - if x.HasPssInterval { - i-- - if x.HasPssInterval { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 + dAtA[i] = 0x3a } - if x.PssInterval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PssInterval)) + if x.PssInterval != nil { + i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) i-- dAtA[i] = 0x30 } @@ -1687,7 +1683,7 @@ func (x *fastReflection_MsgCreateRing) ProtoMethods() *protoiface.Methods { if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } - x.PssInterval = 0 + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1697,32 +1693,13 @@ func (x *fastReflection_MsgCreateRing) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.PssInterval |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } + x.PssInterval = &v case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.HasPssInterval = bool(v != 0) - case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -1754,7 +1731,7 @@ func (x *fastReflection_MsgCreateRing) ProtoMethods() *protoiface.Methods { } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) } @@ -2288,14 +2265,12 @@ func (x *_MsgUpdateRingByAcp_3_list) IsValid() bool { } var ( - md_MsgUpdateRingByAcp protoreflect.MessageDescriptor - fd_MsgUpdateRingByAcp_creator protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_ring_id protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_new_peer_ids protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_new_threshold protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_has_new_threshold protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_pss_interval protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_has_pss_interval protoreflect.FieldDescriptor + md_MsgUpdateRingByAcp protoreflect.MessageDescriptor + fd_MsgUpdateRingByAcp_creator protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_ring_id protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_new_peer_ids protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_new_threshold protoreflect.FieldDescriptor + fd_MsgUpdateRingByAcp_pss_interval protoreflect.FieldDescriptor ) func init() { @@ -2305,9 +2280,7 @@ func init() { fd_MsgUpdateRingByAcp_ring_id = md_MsgUpdateRingByAcp.Fields().ByName("ring_id") fd_MsgUpdateRingByAcp_new_peer_ids = md_MsgUpdateRingByAcp.Fields().ByName("new_peer_ids") fd_MsgUpdateRingByAcp_new_threshold = md_MsgUpdateRingByAcp.Fields().ByName("new_threshold") - fd_MsgUpdateRingByAcp_has_new_threshold = md_MsgUpdateRingByAcp.Fields().ByName("has_new_threshold") fd_MsgUpdateRingByAcp_pss_interval = md_MsgUpdateRingByAcp.Fields().ByName("pss_interval") - fd_MsgUpdateRingByAcp_has_pss_interval = md_MsgUpdateRingByAcp.Fields().ByName("has_pss_interval") } var _ protoreflect.Message = (*fastReflection_MsgUpdateRingByAcp)(nil) @@ -2393,28 +2366,24 @@ func (x *fastReflection_MsgUpdateRingByAcp) Range(f func(protoreflect.FieldDescr return } } - if x.NewThreshold != uint32(0) { - value := protoreflect.ValueOfUint32(x.NewThreshold) - if !f(fd_MsgUpdateRingByAcp_new_threshold, value) { - return - } - } - if x.HasNewThreshold != false { - value := protoreflect.ValueOfBool(x.HasNewThreshold) - if !f(fd_MsgUpdateRingByAcp_has_new_threshold, value) { - return - } - } - if x.PssInterval != uint64(0) { - value := protoreflect.ValueOfUint64(x.PssInterval) - if !f(fd_MsgUpdateRingByAcp_pss_interval, value) { - return + if x.XNewThreshold != nil { + switch o := x.XNewThreshold.(type) { + case *MsgUpdateRingByAcp_NewThreshold: + v := o.NewThreshold + value := protoreflect.ValueOfUint32(v) + if !f(fd_MsgUpdateRingByAcp_new_threshold, value) { + return + } } } - if x.HasPssInterval != false { - value := protoreflect.ValueOfBool(x.HasPssInterval) - if !f(fd_MsgUpdateRingByAcp_has_pss_interval, value) { - return + if x.XPssInterval != nil { + switch o := x.XPssInterval.(type) { + case *MsgUpdateRingByAcp_PssInterval: + v := o.PssInterval + value := protoreflect.ValueOfUint64(v) + if !f(fd_MsgUpdateRingByAcp_pss_interval, value) { + return + } } } } @@ -2439,13 +2408,21 @@ func (x *fastReflection_MsgUpdateRingByAcp) Has(fd protoreflect.FieldDescriptor) case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": return len(x.NewPeerIds) != 0 case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - return x.NewThreshold != uint32(0) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": - return x.HasNewThreshold != false + if x.XNewThreshold == nil { + return false + } else if _, ok := x.XNewThreshold.(*MsgUpdateRingByAcp_NewThreshold); ok { + return true + } else { + return false + } case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - return x.PssInterval != uint64(0) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": - return x.HasPssInterval != false + if x.XPssInterval == nil { + return false + } else if _, ok := x.XPssInterval.(*MsgUpdateRingByAcp_PssInterval); ok { + return true + } else { + return false + } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) @@ -2469,13 +2446,9 @@ func (x *fastReflection_MsgUpdateRingByAcp) Clear(fd protoreflect.FieldDescripto case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": x.NewPeerIds = nil case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - x.NewThreshold = uint32(0) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": - x.HasNewThreshold = false + x.XNewThreshold = nil case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - x.PssInterval = uint64(0) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": - x.HasPssInterval = false + x.XPssInterval = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) @@ -2505,17 +2478,21 @@ func (x *fastReflection_MsgUpdateRingByAcp) Get(descriptor protoreflect.FieldDes listValue := &_MsgUpdateRingByAcp_3_list{list: &x.NewPeerIds} return protoreflect.ValueOfList(listValue) case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - value := x.NewThreshold - return protoreflect.ValueOfUint32(value) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": - value := x.HasNewThreshold - return protoreflect.ValueOfBool(value) + if x.XNewThreshold == nil { + return protoreflect.ValueOfUint32(uint32(0)) + } else if v, ok := x.XNewThreshold.(*MsgUpdateRingByAcp_NewThreshold); ok { + return protoreflect.ValueOfUint32(v.NewThreshold) + } else { + return protoreflect.ValueOfUint32(uint32(0)) + } case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - value := x.PssInterval - return protoreflect.ValueOfUint64(value) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": - value := x.HasPssInterval - return protoreflect.ValueOfBool(value) + if x.XPssInterval == nil { + return protoreflect.ValueOfUint64(uint64(0)) + } else if v, ok := x.XPssInterval.(*MsgUpdateRingByAcp_PssInterval); ok { + return protoreflect.ValueOfUint64(v.PssInterval) + } else { + return protoreflect.ValueOfUint64(uint64(0)) + } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) @@ -2545,13 +2522,11 @@ func (x *fastReflection_MsgUpdateRingByAcp) Set(fd protoreflect.FieldDescriptor, clv := lv.(*_MsgUpdateRingByAcp_3_list) x.NewPeerIds = *clv.list case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - x.NewThreshold = uint32(value.Uint()) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": - x.HasNewThreshold = value.Bool() + cv := uint32(value.Uint()) + x.XNewThreshold = &MsgUpdateRingByAcp_NewThreshold{NewThreshold: cv} case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - x.PssInterval = value.Uint() - case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": - x.HasPssInterval = value.Bool() + cv := value.Uint() + x.XPssInterval = &MsgUpdateRingByAcp_PssInterval{PssInterval: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) @@ -2584,12 +2559,8 @@ func (x *fastReflection_MsgUpdateRingByAcp) Mutable(fd protoreflect.FieldDescrip panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": panic(fmt.Errorf("field new_threshold of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": - panic(fmt.Errorf("field has_new_threshold of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": panic(fmt.Errorf("field pss_interval of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": - panic(fmt.Errorf("field has_pss_interval of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) @@ -2612,12 +2583,8 @@ func (x *fastReflection_MsgUpdateRingByAcp) NewField(fd protoreflect.FieldDescri return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_3_list{list: &list}) case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": return protoreflect.ValueOfUint32(uint32(0)) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_new_threshold": - return protoreflect.ValueOfBool(false) case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": return protoreflect.ValueOfUint64(uint64(0)) - case "sourcehub.orbis.MsgUpdateRingByAcp.has_pss_interval": - return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) @@ -2631,6 +2598,22 @@ func (x *fastReflection_MsgUpdateRingByAcp) NewField(fd protoreflect.FieldDescri // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateRingByAcp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { + case "sourcehub.orbis.MsgUpdateRingByAcp._new_threshold": + if x.XNewThreshold == nil { + return nil + } + switch x.XNewThreshold.(type) { + case *MsgUpdateRingByAcp_NewThreshold: + return x.Descriptor().Fields().ByName("new_threshold") + } + case "sourcehub.orbis.MsgUpdateRingByAcp._pss_interval": + if x.XPssInterval == nil { + return nil + } + switch x.XPssInterval.(type) { + case *MsgUpdateRingByAcp_PssInterval: + return x.Descriptor().Fields().ByName("pss_interval") + } default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgUpdateRingByAcp", d.FullName())) } @@ -2701,17 +2684,11 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.NewThreshold != 0 { - n += 1 + runtime.Sov(uint64(x.NewThreshold)) + if x.NewThreshold != nil { + n += 1 + runtime.Sov(uint64(*x.NewThreshold)) } - if x.HasNewThreshold { - n += 2 - } - if x.PssInterval != 0 { - n += 1 + runtime.Sov(uint64(x.PssInterval)) - } - if x.HasPssInterval { - n += 2 + if x.PssInterval != nil { + n += 1 + runtime.Sov(uint64(*x.PssInterval)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -2742,33 +2719,25 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.HasPssInterval { - i-- - if x.HasPssInterval { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + switch x := x.XPssInterval.(type) { + case *MsgUpdateRingByAcp_PssInterval: + i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x28 } - if x.PssInterval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PssInterval)) + switch x := x.XNewThreshold.(type) { + case *MsgUpdateRingByAcp_NewThreshold: + i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x20 } - if x.HasNewThreshold { - i-- - if x.HasNewThreshold { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if x.PssInterval != nil { + i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) i-- dAtA[i] = 0x28 } - if x.NewThreshold != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.NewThreshold)) + if x.NewThreshold != nil { + i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) i-- dAtA[i] = 0x20 } @@ -2944,7 +2913,7 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } - x.NewThreshold = 0 + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2954,36 +2923,17 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.NewThreshold |= uint32(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } + x.NewThreshold = &v case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasNewThreshold", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.HasNewThreshold = bool(v != 0) - case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } - x.PssInterval = 0 + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2993,31 +2943,12 @@ func (x *fastReflection_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.PssInterval |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.HasPssInterval = bool(v != 0) + x.PssInterval = &v default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5236,19 +5167,17 @@ func (x *fastReflection_RingReshareFinalizeSignDoc) ProtoMethods() *protoiface.M } var ( - md_MsgStoreDocument protoreflect.MessageDescriptor - fd_MsgStoreDocument_creator protoreflect.FieldDescriptor - fd_MsgStoreDocument_namespace protoreflect.FieldDescriptor - fd_MsgStoreDocument_ring_id protoreflect.FieldDescriptor - fd_MsgStoreDocument_document protoreflect.FieldDescriptor - fd_MsgStoreDocument_proof protoreflect.FieldDescriptor - fd_MsgStoreDocument_policy_id protoreflect.FieldDescriptor - fd_MsgStoreDocument_resource protoreflect.FieldDescriptor - fd_MsgStoreDocument_permission protoreflect.FieldDescriptor - fd_MsgStoreDocument_tier protoreflect.FieldDescriptor - fd_MsgStoreDocument_has_tier protoreflect.FieldDescriptor - fd_MsgStoreDocument_timestamp protoreflect.FieldDescriptor - fd_MsgStoreDocument_has_timestamp protoreflect.FieldDescriptor + md_MsgStoreDocument protoreflect.MessageDescriptor + fd_MsgStoreDocument_creator protoreflect.FieldDescriptor + fd_MsgStoreDocument_namespace protoreflect.FieldDescriptor + fd_MsgStoreDocument_ring_id protoreflect.FieldDescriptor + fd_MsgStoreDocument_document protoreflect.FieldDescriptor + fd_MsgStoreDocument_proof protoreflect.FieldDescriptor + fd_MsgStoreDocument_policy_id protoreflect.FieldDescriptor + fd_MsgStoreDocument_resource protoreflect.FieldDescriptor + fd_MsgStoreDocument_permission protoreflect.FieldDescriptor + fd_MsgStoreDocument_tier protoreflect.FieldDescriptor + fd_MsgStoreDocument_timestamp protoreflect.FieldDescriptor ) func init() { @@ -5263,9 +5192,7 @@ func init() { fd_MsgStoreDocument_resource = md_MsgStoreDocument.Fields().ByName("resource") fd_MsgStoreDocument_permission = md_MsgStoreDocument.Fields().ByName("permission") fd_MsgStoreDocument_tier = md_MsgStoreDocument.Fields().ByName("tier") - fd_MsgStoreDocument_has_tier = md_MsgStoreDocument.Fields().ByName("has_tier") fd_MsgStoreDocument_timestamp = md_MsgStoreDocument.Fields().ByName("timestamp") - fd_MsgStoreDocument_has_timestamp = md_MsgStoreDocument.Fields().ByName("has_timestamp") } var _ protoreflect.Message = (*fastReflection_MsgStoreDocument)(nil) @@ -5381,28 +5308,24 @@ func (x *fastReflection_MsgStoreDocument) Range(f func(protoreflect.FieldDescrip return } } - if x.Tier != "" { - value := protoreflect.ValueOfString(x.Tier) - if !f(fd_MsgStoreDocument_tier, value) { - return - } - } - if x.HasTier != false { - value := protoreflect.ValueOfBool(x.HasTier) - if !f(fd_MsgStoreDocument_has_tier, value) { - return - } - } - if x.Timestamp != uint64(0) { - value := protoreflect.ValueOfUint64(x.Timestamp) - if !f(fd_MsgStoreDocument_timestamp, value) { - return + if x.XTier != nil { + switch o := x.XTier.(type) { + case *MsgStoreDocument_Tier: + v := o.Tier + value := protoreflect.ValueOfString(v) + if !f(fd_MsgStoreDocument_tier, value) { + return + } } } - if x.HasTimestamp != false { - value := protoreflect.ValueOfBool(x.HasTimestamp) - if !f(fd_MsgStoreDocument_has_timestamp, value) { - return + if x.XTimestamp != nil { + switch o := x.XTimestamp.(type) { + case *MsgStoreDocument_Timestamp: + v := o.Timestamp + value := protoreflect.ValueOfUint64(v) + if !f(fd_MsgStoreDocument_timestamp, value) { + return + } } } } @@ -5437,13 +5360,21 @@ func (x *fastReflection_MsgStoreDocument) Has(fd protoreflect.FieldDescriptor) b case "sourcehub.orbis.MsgStoreDocument.permission": return x.Permission != "" case "sourcehub.orbis.MsgStoreDocument.tier": - return x.Tier != "" - case "sourcehub.orbis.MsgStoreDocument.has_tier": - return x.HasTier != false + if x.XTier == nil { + return false + } else if _, ok := x.XTier.(*MsgStoreDocument_Tier); ok { + return true + } else { + return false + } case "sourcehub.orbis.MsgStoreDocument.timestamp": - return x.Timestamp != uint64(0) - case "sourcehub.orbis.MsgStoreDocument.has_timestamp": - return x.HasTimestamp != false + if x.XTimestamp == nil { + return false + } else if _, ok := x.XTimestamp.(*MsgStoreDocument_Timestamp); ok { + return true + } else { + return false + } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5477,13 +5408,9 @@ func (x *fastReflection_MsgStoreDocument) Clear(fd protoreflect.FieldDescriptor) case "sourcehub.orbis.MsgStoreDocument.permission": x.Permission = "" case "sourcehub.orbis.MsgStoreDocument.tier": - x.Tier = "" - case "sourcehub.orbis.MsgStoreDocument.has_tier": - x.HasTier = false + x.XTier = nil case "sourcehub.orbis.MsgStoreDocument.timestamp": - x.Timestamp = uint64(0) - case "sourcehub.orbis.MsgStoreDocument.has_timestamp": - x.HasTimestamp = false + x.XTimestamp = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5525,17 +5452,21 @@ func (x *fastReflection_MsgStoreDocument) Get(descriptor protoreflect.FieldDescr value := x.Permission return protoreflect.ValueOfString(value) case "sourcehub.orbis.MsgStoreDocument.tier": - value := x.Tier - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreDocument.has_tier": - value := x.HasTier - return protoreflect.ValueOfBool(value) + if x.XTier == nil { + return protoreflect.ValueOfString("") + } else if v, ok := x.XTier.(*MsgStoreDocument_Tier); ok { + return protoreflect.ValueOfString(v.Tier) + } else { + return protoreflect.ValueOfString("") + } case "sourcehub.orbis.MsgStoreDocument.timestamp": - value := x.Timestamp - return protoreflect.ValueOfUint64(value) - case "sourcehub.orbis.MsgStoreDocument.has_timestamp": - value := x.HasTimestamp - return protoreflect.ValueOfBool(value) + if x.XTimestamp == nil { + return protoreflect.ValueOfUint64(uint64(0)) + } else if v, ok := x.XTimestamp.(*MsgStoreDocument_Timestamp); ok { + return protoreflect.ValueOfUint64(v.Timestamp) + } else { + return protoreflect.ValueOfUint64(uint64(0)) + } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5573,13 +5504,11 @@ func (x *fastReflection_MsgStoreDocument) Set(fd protoreflect.FieldDescriptor, v case "sourcehub.orbis.MsgStoreDocument.permission": x.Permission = value.Interface().(string) case "sourcehub.orbis.MsgStoreDocument.tier": - x.Tier = value.Interface().(string) - case "sourcehub.orbis.MsgStoreDocument.has_tier": - x.HasTier = value.Bool() + cv := value.Interface().(string) + x.XTier = &MsgStoreDocument_Tier{Tier: cv} case "sourcehub.orbis.MsgStoreDocument.timestamp": - x.Timestamp = value.Uint() - case "sourcehub.orbis.MsgStoreDocument.has_timestamp": - x.HasTimestamp = value.Bool() + cv := value.Uint() + x.XTimestamp = &MsgStoreDocument_Timestamp{Timestamp: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5618,12 +5547,8 @@ func (x *fastReflection_MsgStoreDocument) Mutable(fd protoreflect.FieldDescripto panic(fmt.Errorf("field permission of message sourcehub.orbis.MsgStoreDocument is not mutable")) case "sourcehub.orbis.MsgStoreDocument.tier": panic(fmt.Errorf("field tier of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.has_tier": - panic(fmt.Errorf("field has_tier of message sourcehub.orbis.MsgStoreDocument is not mutable")) case "sourcehub.orbis.MsgStoreDocument.timestamp": panic(fmt.Errorf("field timestamp of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.has_timestamp": - panic(fmt.Errorf("field has_timestamp of message sourcehub.orbis.MsgStoreDocument is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5655,12 +5580,8 @@ func (x *fastReflection_MsgStoreDocument) NewField(fd protoreflect.FieldDescript return protoreflect.ValueOfString("") case "sourcehub.orbis.MsgStoreDocument.tier": return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.has_tier": - return protoreflect.ValueOfBool(false) case "sourcehub.orbis.MsgStoreDocument.timestamp": return protoreflect.ValueOfUint64(uint64(0)) - case "sourcehub.orbis.MsgStoreDocument.has_timestamp": - return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) @@ -5674,6 +5595,22 @@ func (x *fastReflection_MsgStoreDocument) NewField(fd protoreflect.FieldDescript // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgStoreDocument) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { + case "sourcehub.orbis.MsgStoreDocument._tier": + if x.XTier == nil { + return nil + } + switch x.XTier.(type) { + case *MsgStoreDocument_Tier: + return x.Descriptor().Fields().ByName("tier") + } + case "sourcehub.orbis.MsgStoreDocument._timestamp": + if x.XTimestamp == nil { + return nil + } + switch x.XTimestamp.(type) { + case *MsgStoreDocument_Timestamp: + return x.Descriptor().Fields().ByName("timestamp") + } default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgStoreDocument", d.FullName())) } @@ -5762,18 +5699,12 @@ func (x *fastReflection_MsgStoreDocument) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Tier) - if l > 0 { + if x.Tier != nil { + l = len(*x.Tier) n += 1 + l + runtime.Sov(uint64(l)) } - if x.HasTier { - n += 2 - } - if x.Timestamp != 0 { - n += 1 + runtime.Sov(uint64(x.Timestamp)) - } - if x.HasTimestamp { - n += 2 + if x.Timestamp != nil { + n += 1 + runtime.Sov(uint64(*x.Timestamp)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -5804,35 +5735,29 @@ func (x *fastReflection_MsgStoreDocument) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.HasTimestamp { + switch x := x.XTimestamp.(type) { + case *MsgStoreDocument_Timestamp: + i = runtime.EncodeVarint(dAtA, i, uint64(*x.Timestamp)) i-- - if x.HasTimestamp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 + dAtA[i] = 0x50 } - if x.Timestamp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Timestamp)) + switch x := x.XTier.(type) { + case *MsgStoreDocument_Tier: + i -= len(*x.Tier) + copy(dAtA[i:], *x.Tier) + i = runtime.EncodeVarint(dAtA, i, uint64(len(*x.Tier))) i-- - dAtA[i] = 0x58 + dAtA[i] = 0x4a } - if x.HasTier { - i-- - if x.HasTier { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if x.Timestamp != nil { + i = runtime.EncodeVarint(dAtA, i, uint64(*x.Timestamp)) i-- dAtA[i] = 0x50 } - if len(x.Tier) > 0 { - i -= len(x.Tier) - copy(dAtA[i:], x.Tier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tier))) + if x.Tier != nil { + i -= len(*x.Tier) + copy(dAtA[i:], *x.Tier) + i = runtime.EncodeVarint(dAtA, i, uint64(len(*x.Tier))) i-- dAtA[i] = 0x4a } @@ -6227,52 +6152,14 @@ func (x *fastReflection_MsgStoreDocument) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Tier = string(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + x.Tier = &s iNdEx = postIndex case 10: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasTier", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.HasTier = bool(v != 0) - case 11: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } - x.Timestamp = 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.Timestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasTimestamp", wireType) - } - var v int + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -6282,12 +6169,12 @@ func (x *fastReflection_MsgStoreDocument) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - x.HasTimestamp = bool(v != 0) + x.Timestamp = &v default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -8056,15 +7943,15 @@ type MsgCreateRing struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` - PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` - HasPssInterval bool `protobuf:"varint,7,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` - PolicyId string `protobuf:"bytes,8,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Artifact string `protobuf:"bytes,9,opt,name=artifact,proto3" json:"artifact,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + // Absent means automatic PSS refresh is disabled. + PssInterval *uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (x *MsgCreateRing) Reset() { @@ -8123,19 +8010,12 @@ func (x *MsgCreateRing) GetThreshold() uint32 { } func (x *MsgCreateRing) GetPssInterval() uint64 { - if x != nil { - return x.PssInterval + if x != nil && x.PssInterval != nil { + return *x.PssInterval } return 0 } -func (x *MsgCreateRing) GetHasPssInterval() bool { - if x != nil { - return x.HasPssInterval - } - return false -} - func (x *MsgCreateRing) GetPolicyId() string { if x != nil { return x.PolicyId @@ -8190,13 +8070,13 @@ type MsgUpdateRingByAcp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - NewThreshold uint32 `protobuf:"varint,4,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` - HasNewThreshold bool `protobuf:"varint,5,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` - PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` - HasPssInterval bool `protobuf:"varint,7,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + // Absent means no pending threshold update. + NewThreshold *uint32 `protobuf:"varint,4,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` + // Absent means no PSS refresh interval update. + PssInterval *uint64 `protobuf:"varint,5,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` } func (x *MsgUpdateRingByAcp) Reset() { @@ -8241,33 +8121,19 @@ func (x *MsgUpdateRingByAcp) GetNewPeerIds() []string { } func (x *MsgUpdateRingByAcp) GetNewThreshold() uint32 { - if x != nil { - return x.NewThreshold + if x != nil && x.NewThreshold != nil { + return *x.NewThreshold } return 0 } -func (x *MsgUpdateRingByAcp) GetHasNewThreshold() bool { - if x != nil { - return x.HasNewThreshold - } - return false -} - func (x *MsgUpdateRingByAcp) GetPssInterval() uint64 { - if x != nil { - return x.PssInterval + if x != nil && x.PssInterval != nil { + return *x.PssInterval } return 0 } -func (x *MsgUpdateRingByAcp) GetHasPssInterval() bool { - if x != nil { - return x.HasPssInterval - } - return false -} - type MsgUpdateRingByAcpResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -8475,18 +8341,18 @@ type MsgStoreDocument struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` - Tier string `protobuf:"bytes,9,opt,name=tier,proto3" json:"tier,omitempty"` - HasTier bool `protobuf:"varint,10,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` - Timestamp uint64 `protobuf:"varint,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - HasTimestamp bool `protobuf:"varint,12,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` + // Absent means no tier. + Tier *string `protobuf:"bytes,9,opt,name=tier,proto3,oneof" json:"tier,omitempty"` + // Absent means no timestamp. + Timestamp *uint64 `protobuf:"varint,10,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` } func (x *MsgStoreDocument) Reset() { @@ -8566,33 +8432,19 @@ func (x *MsgStoreDocument) GetPermission() string { } func (x *MsgStoreDocument) GetTier() string { - if x != nil { - return x.Tier + if x != nil && x.Tier != nil { + return *x.Tier } return "" } -func (x *MsgStoreDocument) GetHasTier() bool { - if x != nil { - return x.HasTier - } - return false -} - func (x *MsgStoreDocument) GetTimestamp() uint64 { - if x != nil { - return x.Timestamp + if x != nil && x.Timestamp != nil { + return *x.Timestamp } return 0 } -func (x *MsgStoreDocument) GetHasTimestamp() bool { - if x != nil { - return x.HasTimestamp - } - return false -} - type MsgStoreDocumentResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -8773,7 +8625,7 @@ var file_sourcehub_orbis_tx_proto_rawDesc = []byte{ 0x72, 0x62, 0x69, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, - 0xad, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, + 0x99, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, @@ -8782,172 +8634,167 @@ var file_sourcehub_orbis_tx_proto_rawDesc = []byte{ 0x50, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x28, - 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x50, 0x73, 0x73, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, - 0x30, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, - 0x64, 0x22, 0x95, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6e, - 0x65, 0x77, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, - 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, - 0x61, 0x73, 0x4e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, - 0x50, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, - 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x2a, 0x4d, 0x73, 0x67, 0x46, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, - 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x22, 0x34, 0x0a, 0x32, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x1a, 0x52, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x69, - 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x0a, - 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, - 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x69, - 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, - 0x36, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x64, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x2c, 0x0a, 0x12, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, - 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0xee, 0x02, 0x0a, 0x10, 0x4d, - 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x69, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x65, 0x72, 0x12, - 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x54, 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0c, 0x68, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x0c, 0x82, - 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3b, 0x0a, 0x18, 0x4d, - 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xef, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, - 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x04, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x3a, 0x0c, 0x82, 0xe7, + 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, + 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x30, 0x0a, 0x15, 0x4d, + 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0xec, 0x01, + 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, + 0x79, 0x41, 0x63, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x17, + 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, + 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, + 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x6e, 0x65, 0x77, + 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0b, 0x70, 0x73, 0x73, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, + 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, + 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, + 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x2a, 0x4d, + 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x22, 0x34, 0x0a, 0x32, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x1a, 0x52, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, + 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6b, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x32, + 0x35, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x32, 0x0a, 0x15, 0x66, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, + 0x61, 0x32, 0x35, 0x36, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, + 0x2c, 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0xcf, 0x02, + 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, - 0x67, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x0c, 0x82, 0xe7, - 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4b, 0x0a, 0x1d, 0x4d, 0x73, - 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6b, - 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0x9e, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, - 0x5a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x1a, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, - 0x62, 0x69, 0x73, 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, 0x54, 0x0a, 0x0a, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x63, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, - 0x79, 0x41, 0x63, 0x70, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xab, 0x01, 0x0a, 0x27, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, - 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x3b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, - 0x43, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, - 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, + 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x74, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x69, 0x65, + 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, + 0x3b, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xef, 0x01, 0x0a, + 0x15, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, + 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4b, + 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2a, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x44, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0x9e, 0x05, 0x0a, 0x03, + 0x4d, 0x73, 0x67, 0x12, 0x5a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, + 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 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, + 0x54, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x1a, 0x26, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x1a, 0x2b, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, + 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xab, 0x01, 0x0a, 0x27, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, + 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, + 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x1a, 0x43, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, + 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, - 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, - 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9d, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, - 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, - 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, - 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x29, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, + 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, + 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9d, 0x01, 0x0a, + 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -9164,6 +9011,9 @@ func file_sourcehub_orbis_tx_proto_init() { } } } + file_sourcehub_orbis_tx_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_sourcehub_orbis_tx_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_sourcehub_orbis_tx_proto_msgTypes[9].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/proto/sourcehub/orbis/document.proto b/proto/sourcehub/orbis/document.proto index bea3ef87..0c3db960 100644 --- a/proto/sourcehub/orbis/document.proto +++ b/proto/sourcehub/orbis/document.proto @@ -14,8 +14,8 @@ message Document { string policy_id = 7; string resource = 8; string permission = 9; - string tier = 10; - bool has_tier = 11; - uint64 timestamp = 12; - bool has_timestamp = 13; + // Absent means no tier. + optional string tier = 10; + // Absent means no timestamp. + optional uint64 timestamp = 11; } diff --git a/proto/sourcehub/orbis/ring.proto b/proto/sourcehub/orbis/ring.proto index 06b66d1c..d074f9fb 100644 --- a/proto/sourcehub/orbis/ring.proto +++ b/proto/sourcehub/orbis/ring.proto @@ -12,10 +12,10 @@ message Ring { repeated string peer_ids = 5; uint32 threshold = 6; repeated string new_peer_ids = 7; - uint32 new_threshold = 8; - bool has_new_threshold = 9; - uint64 pss_interval = 10; - bool has_pss_interval = 11; - uint64 block_number_nonce = 12; - string policy_id = 13; + // Absent means no pending threshold update. + optional uint32 new_threshold = 8; + // Absent means automatic PSS refresh is disabled. + optional uint64 pss_interval = 9; + uint64 block_number_nonce = 10; + string policy_id = 11; } diff --git a/proto/sourcehub/orbis/tx.proto b/proto/sourcehub/orbis/tx.proto index 3540e215..db02c097 100644 --- a/proto/sourcehub/orbis/tx.proto +++ b/proto/sourcehub/orbis/tx.proto @@ -46,10 +46,10 @@ message MsgCreateRing { string ring_pk = 3; repeated string peer_ids = 4; uint32 threshold = 5; - uint64 pss_interval = 6; - bool has_pss_interval = 7; - string policy_id = 8; - string artifact = 9; + // Absent means automatic PSS refresh is disabled. + optional uint64 pss_interval = 6; + string policy_id = 7; + string artifact = 8; } message MsgCreateRingResponse { @@ -61,10 +61,10 @@ message MsgUpdateRingByAcp { string creator = 1; string ring_id = 2; repeated string new_peer_ids = 3; - uint32 new_threshold = 4; - bool has_new_threshold = 5; - uint64 pss_interval = 6; - bool has_pss_interval = 7; + // Absent means no pending threshold update. + optional uint32 new_threshold = 4; + // Absent means no PSS refresh interval update. + optional uint64 pss_interval = 5; } message MsgUpdateRingByAcpResponse {} @@ -100,10 +100,10 @@ message MsgStoreDocument { string policy_id = 6; string resource = 7; string permission = 8; - string tier = 9; - bool has_tier = 10; - uint64 timestamp = 11; - bool has_timestamp = 12; + // Absent means no tier. + optional string tier = 9; + // Absent means no timestamp. + optional uint64 timestamp = 10; } message MsgStoreDocumentResponse { diff --git a/x/orbis/keeper/msg_server.go b/x/orbis/keeper/msg_server.go index bb56d7b5..22cdb063 100644 --- a/x/orbis/keeper/msg_server.go +++ b/x/orbis/keeper/msg_server.go @@ -33,11 +33,7 @@ func (k *Keeper) CreateRing(goCtx context.Context, msg *types.MsgCreateRing) (*t return nil, err } - var pssInterval *uint64 - if msg.HasPssInterval { - v := msg.GetPssInterval() - pssInterval = &v - } + pssInterval := optionalCreateRingPSSInterval(msg) ringID := types.GenerateRingID(namespaceID, msg.RingPk, msg.PeerIds, msg.Threshold, pssInterval, msg.PolicyId) if existing := k.GetRing(goCtx, ringID); existing != nil { @@ -54,10 +50,7 @@ func (k *Keeper) CreateRing(goCtx context.Context, msg *types.MsgCreateRing) (*t PolicyId: msg.PolicyId, BlockNumberNonce: 0, } - if pssInterval != nil { - ring.PssInterval = *pssInterval - ring.HasPssInterval = true - } + setRingPSSInterval(&ring, pssInterval) if err := validateRing(&ring); err != nil { return nil, err } @@ -100,11 +93,7 @@ func (k *Keeper) UpdateRingByAcp(goCtx context.Context, msg *types.MsgUpdateRing return nil, types.ErrInvalidRingUpdater } - var newThreshold *uint32 - if msg.HasNewThreshold { - v := msg.GetNewThreshold() - newThreshold = &v - } + newThreshold := optionalUpdateRingNewThreshold(msg) if err := validateRingUpdate(msg.NewPeerIds, newThreshold, ring); err != nil { return nil, err } @@ -113,12 +102,10 @@ func (k *Keeper) UpdateRingByAcp(goCtx context.Context, msg *types.MsgUpdateRing ring.NewPeerIds = append([]string(nil), msg.NewPeerIds...) } if newThreshold != nil { - ring.NewThreshold = *newThreshold - ring.HasNewThreshold = true + setRingNewThreshold(ring, newThreshold) } - if msg.HasPssInterval { - ring.PssInterval = msg.GetPssInterval() - ring.HasPssInterval = true + if msg.XPssInterval != nil { + setRingPSSInterval(ring, optionalUpdateRingPSSInterval(msg)) } if err := validateRing(ring); err != nil { return nil, err @@ -203,16 +190,8 @@ func (k *Keeper) StoreDocument(goCtx context.Context, msg *types.MsgStoreDocumen return nil, err } - var tier *string - if msg.HasTier { - v := msg.GetTier() - tier = &v - } - var timestamp *uint64 - if msg.HasTimestamp { - v := msg.GetTimestamp() - timestamp = &v - } + tier := optionalStoreDocumentTier(msg) + timestamp := optionalStoreDocumentTimestamp(msg) documentID := types.GenerateDocumentID(namespaceID, msg.RingId, msg.Document, msg.Proof, msg.PolicyId, msg.Resource, msg.Permission, tier, timestamp) if existing := k.GetDocument(goCtx, namespaceID, documentID); existing != nil { @@ -230,14 +209,8 @@ func (k *Keeper) StoreDocument(goCtx context.Context, msg *types.MsgStoreDocumen Resource: msg.Resource, Permission: msg.Permission, } - if tier != nil { - document.Tier = *tier - document.HasTier = true - } - if timestamp != nil { - document.Timestamp = *timestamp - document.HasTimestamp = true - } + setDocumentTier(&document, tier) + setDocumentTimestamp(&document, timestamp) if err := validateDocument(&document); err != nil { return nil, err } diff --git a/x/orbis/keeper/msg_server_test.go b/x/orbis/keeper/msg_server_test.go index 948d478c..08f8f2ee 100644 --- a/x/orbis/keeper/msg_server_test.go +++ b/x/orbis/keeper/msg_server_test.go @@ -24,15 +24,16 @@ func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { pssInterval := uint64(600) createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ - Creator: creator, - Namespace: namespace, - RingPk: "ring-pk", - PeerIds: []string{"peer-1", "peer-2", "peer-3"}, - Threshold: 2, - PssInterval: pssInterval, - HasPssInterval: true, - PolicyId: "policy-ring", - Artifact: "ring-artifact", + Creator: creator, + Namespace: namespace, + RingPk: "ring-pk", + PeerIds: []string{"peer-1", "peer-2", "peer-3"}, + Threshold: 2, + XPssInterval: &types.MsgCreateRing_PssInterval{ + PssInterval: pssInterval, + }, + PolicyId: "policy-ring", + Artifact: "ring-artifact", }) require.NoError(t, err) @@ -43,36 +44,39 @@ func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { require.Equal(t, "ring-pk", ring.RingPk) require.Equal(t, []string{"peer-1", "peer-2", "peer-3"}, ring.PeerIds) require.Equal(t, uint32(2), ring.Threshold) - require.True(t, ring.HasPssInterval) - require.Equal(t, pssInterval, ring.PssInterval) + require.NotNil(t, ring.XPssInterval) + require.Equal(t, pssInterval, ring.GetPssInterval()) _, err = k.CreateRing(ctx, &types.MsgCreateRing{ - Creator: creator, - Namespace: namespace, - RingPk: "ring-pk", - PeerIds: []string{"peer-1", "peer-2", "peer-3"}, - Threshold: 2, - PssInterval: pssInterval, - HasPssInterval: true, - PolicyId: "policy-ring", + Creator: creator, + Namespace: namespace, + RingPk: "ring-pk", + PeerIds: []string{"peer-1", "peer-2", "peer-3"}, + Threshold: 2, + XPssInterval: &types.MsgCreateRing_PssInterval{ + PssInterval: pssInterval, + }, + PolicyId: "policy-ring", }) require.ErrorIs(t, err, types.ErrRingAlreadyExists) tier := "gold" timestamp := uint64(42) storeDocumentMsg := &types.MsgStoreDocument{ - Creator: creator, - Namespace: namespace, - RingId: createRingResp.RingId, - Document: "ciphertext", - Proof: "proof", - PolicyId: "policy-doc", - Resource: "secret", - Permission: "decrypt", - Tier: tier, - HasTier: true, - Timestamp: timestamp, - HasTimestamp: true, + Creator: creator, + Namespace: namespace, + RingId: createRingResp.RingId, + Document: "ciphertext", + Proof: "proof", + PolicyId: "policy-doc", + Resource: "secret", + Permission: "decrypt", + XTier: &types.MsgStoreDocument_Tier{ + Tier: tier, + }, + XTimestamp: &types.MsgStoreDocument_Timestamp{ + Timestamp: timestamp, + }, } storeDocumentResp, err := k.StoreDocument(ctx, storeDocumentMsg) require.NoError(t, err) @@ -85,10 +89,10 @@ func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { document := k.GetDocument(ctx, namespaceID, storeDocumentResp.DocumentId) require.NotNil(t, document) require.Equal(t, testDID, document.CreatorDid) - require.True(t, document.HasTier) - require.Equal(t, tier, document.Tier) - require.True(t, document.HasTimestamp) - require.Equal(t, timestamp, document.Timestamp) + require.NotNil(t, document.XTier) + require.NotNil(t, document.XTimestamp) + require.Equal(t, tier, document.GetTier()) + require.Equal(t, timestamp, document.GetTimestamp()) _, err = k.StoreDocument(ctx, storeDocumentMsg) require.ErrorIs(t, err, types.ErrDocumentAlreadyExists) @@ -119,6 +123,78 @@ func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { require.ErrorIs(t, err, types.ErrKeyDerivationAlreadyExists) } +func TestMsgServer_AbsentOptionalFieldsAreTreatedAsNone(t *testing.T) { + k, ctx := keepertestutil.OrbisKeeper(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creator := testAddress() + namespace := "vault" + namespaceID := types.GetNamespaceID(namespace) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creator, + Namespace: namespace, + RingPk: "ring-pk", + PeerIds: []string{"peer-1", "peer-2"}, + Threshold: 1, + }) + require.NoError(t, err) + require.Equal( + t, + types.GenerateRingID(namespaceID, "ring-pk", []string{"peer-1", "peer-2"}, 1, nil, ""), + createRingResp.RingId, + ) + + storeDocumentResp, err := k.StoreDocument(ctx, &types.MsgStoreDocument{ + Creator: creator, + Namespace: namespace, + RingId: createRingResp.RingId, + Document: "ciphertext", + Proof: "proof", + PolicyId: "policy-doc", + Resource: "secret", + Permission: "decrypt", + }) + require.NoError(t, err) + require.Equal( + t, + types.GenerateDocumentID(namespaceID, createRingResp.RingId, "ciphertext", "proof", "policy-doc", "secret", "decrypt", nil, nil), + storeDocumentResp.DocumentId, + ) +} + +func TestMsgServer_ZeroPSSIntervalIsPreservedWhenPresent(t *testing.T) { + k, ctx := keepertestutil.OrbisKeeper(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creator := testAddress() + namespace := "vault" + namespaceID := types.GetNamespaceID(namespace) + pssInterval := uint64(0) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creator, + Namespace: namespace, + RingPk: "ring-pk", + PeerIds: []string{"peer-1", "peer-2"}, + Threshold: 1, + XPssInterval: &types.MsgCreateRing_PssInterval{ + PssInterval: pssInterval, + }, + }) + require.NoError(t, err) + require.Equal( + t, + types.GenerateRingID(namespaceID, "ring-pk", []string{"peer-1", "peer-2"}, 1, &pssInterval, ""), + createRingResp.RingId, + ) + + ring := k.GetRing(ctx, createRingResp.RingId) + require.NotNil(t, ring) + require.NotNil(t, ring.XPssInterval) + require.Equal(t, pssInterval, ring.GetPssInterval()) +} + func TestMsgServer_UpdateRingByAcpRequiresPolicy(t *testing.T) { k, ctx := keepertestutil.OrbisKeeper(t) ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) @@ -133,11 +209,12 @@ func TestMsgServer_UpdateRingByAcpRequiresPolicy(t *testing.T) { require.NoError(t, err) _, err = k.UpdateRingByAcp(ctx, &types.MsgUpdateRingByAcp{ - Creator: testAddress(), - RingId: createRingResp.RingId, - NewPeerIds: []string{"peer-3", "peer-4"}, - NewThreshold: 1, - HasNewThreshold: true, + Creator: testAddress(), + RingId: createRingResp.RingId, + NewPeerIds: []string{"peer-3", "peer-4"}, + XNewThreshold: &types.MsgUpdateRingByAcp_NewThreshold{ + NewThreshold: 1, + }, }) require.ErrorIs(t, err, types.ErrRingMissingPolicyId) } diff --git a/x/orbis/keeper/optional.go b/x/orbis/keeper/optional.go new file mode 100644 index 00000000..a0c7f6c6 --- /dev/null +++ b/x/orbis/keeper/optional.go @@ -0,0 +1,75 @@ +package keeper + +import "github.com/sourcenetwork/sourcehub/x/orbis/types" + +func optionalCreateRingPSSInterval(msg *types.MsgCreateRing) *uint64 { + if msg.XPssInterval == nil { + return nil + } + value := msg.GetPssInterval() + return &value +} + +func optionalUpdateRingNewThreshold(msg *types.MsgUpdateRingByAcp) *uint32 { + if msg.XNewThreshold == nil { + return nil + } + value := msg.GetNewThreshold() + return &value +} + +func optionalUpdateRingPSSInterval(msg *types.MsgUpdateRingByAcp) *uint64 { + if msg.XPssInterval == nil { + return nil + } + value := msg.GetPssInterval() + return &value +} + +func optionalStoreDocumentTier(msg *types.MsgStoreDocument) *string { + if msg.XTier == nil { + return nil + } + value := msg.GetTier() + return &value +} + +func optionalStoreDocumentTimestamp(msg *types.MsgStoreDocument) *uint64 { + if msg.XTimestamp == nil { + return nil + } + value := msg.GetTimestamp() + return &value +} + +func setRingNewThreshold(ring *types.Ring, value *uint32) { + if value == nil { + ring.XNewThreshold = nil + return + } + ring.XNewThreshold = &types.Ring_NewThreshold{NewThreshold: *value} +} + +func setRingPSSInterval(ring *types.Ring, value *uint64) { + if value == nil { + ring.XPssInterval = nil + return + } + ring.XPssInterval = &types.Ring_PssInterval{PssInterval: *value} +} + +func setDocumentTier(document *types.Document, value *string) { + if value == nil { + document.XTier = nil + return + } + document.XTier = &types.Document_Tier{Tier: *value} +} + +func setDocumentTimestamp(document *types.Document, value *uint64) { + if value == nil { + document.XTimestamp = nil + return + } + document.XTimestamp = &types.Document_Timestamp{Timestamp: *value} +} diff --git a/x/orbis/keeper/validation.go b/x/orbis/keeper/validation.go index 6f9f0ac9..57f90d00 100644 --- a/x/orbis/keeper/validation.go +++ b/x/orbis/keeper/validation.go @@ -28,15 +28,15 @@ func validateRing(ring *types.Ring) error { return err } } - if ring.HasNewThreshold && ring.NewThreshold == 0 { + if ring.XNewThreshold != nil && ring.GetNewThreshold() == 0 { return errorsmod.Wrap(types.ErrInvalidRing, "new_threshold must be at least 1") } - if len(ring.NewPeerIds) > 0 && ring.HasNewThreshold && uint32(len(ring.NewPeerIds)) < ring.NewThreshold { + if len(ring.NewPeerIds) > 0 && ring.XNewThreshold != nil && uint32(len(ring.NewPeerIds)) < ring.GetNewThreshold() { return errorsmod.Wrapf( types.ErrInvalidRing, "new_peer_ids count (%d) is less than new_threshold (%d)", len(ring.NewPeerIds), - ring.NewThreshold, + ring.GetNewThreshold(), ) } @@ -44,7 +44,7 @@ func validateRing(ring *types.Ring) error { } func validateRingUpdate(newPeerIDs []string, newThreshold *uint32, existing *types.Ring) error { - reshareInProgress := len(existing.NewPeerIds) > 0 || existing.HasNewThreshold + reshareInProgress := len(existing.NewPeerIds) > 0 || existing.XNewThreshold != nil touchingReshareFields := len(newPeerIDs) > 0 || newThreshold != nil if reshareInProgress && touchingReshareFields { return types.ErrReshareInProgress @@ -86,19 +86,18 @@ func validateUniquePeerIDs(peerIDs []string, fieldName string) error { func ringForReshareFinalization(currentRing *types.Ring) (*types.Ring, error) { finalized := *currentRing - if len(finalized.NewPeerIds) == 0 && !finalized.HasNewThreshold { + if len(finalized.NewPeerIds) == 0 && finalized.XNewThreshold == nil { return nil, errorsmod.Wrap(types.ErrInvalidRing, "missing new_peer_ids or new_threshold for reshare finalization") } if len(finalized.NewPeerIds) > 0 { finalized.PeerIds = append([]string(nil), finalized.NewPeerIds...) } - if finalized.HasNewThreshold { - finalized.Threshold = finalized.NewThreshold + if finalized.XNewThreshold != nil { + finalized.Threshold = finalized.GetNewThreshold() } finalized.NewPeerIds = nil - finalized.NewThreshold = 0 - finalized.HasNewThreshold = false + finalized.XNewThreshold = nil if err := validateRing(&finalized); err != nil { return nil, err diff --git a/x/orbis/types/document.pb.go b/x/orbis/types/document.pb.go index cf5fa6db..6599e818 100644 --- a/x/orbis/types/document.pb.go +++ b/x/orbis/types/document.pb.go @@ -24,19 +24,23 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Document stores an encrypted Orbis document and its policy binding metadata. type Document struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` - Tier string `protobuf:"bytes,10,opt,name=tier,proto3" json:"tier,omitempty"` - HasTier bool `protobuf:"varint,11,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` - Timestamp uint64 `protobuf:"varint,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - HasTimestamp bool `protobuf:"varint,13,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` + // Types that are valid to be assigned to XTier: + // + // *Document_Tier + XTier isDocument_XTier `protobuf_oneof:"_tier"` + // Types that are valid to be assigned to XTimestamp: + // + // *Document_Timestamp + XTimestamp isDocument_XTimestamp `protobuf_oneof:"_timestamp"` } func (m *Document) Reset() { *m = Document{} } @@ -72,6 +76,40 @@ func (m *Document) XXX_DiscardUnknown() { var xxx_messageInfo_Document proto.InternalMessageInfo +type isDocument_XTier interface { + isDocument_XTier() + MarshalTo([]byte) (int, error) + Size() int +} +type isDocument_XTimestamp interface { + isDocument_XTimestamp() + MarshalTo([]byte) (int, error) + Size() int +} + +type Document_Tier struct { + Tier string `protobuf:"bytes,10,opt,name=tier,proto3,oneof" json:"tier,omitempty"` +} +type Document_Timestamp struct { + Timestamp uint64 `protobuf:"varint,11,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` +} + +func (*Document_Tier) isDocument_XTier() {} +func (*Document_Timestamp) isDocument_XTimestamp() {} + +func (m *Document) GetXTier() isDocument_XTier { + if m != nil { + return m.XTier + } + return nil +} +func (m *Document) GetXTimestamp() isDocument_XTimestamp { + if m != nil { + return m.XTimestamp + } + return nil +} + func (m *Document) GetId() string { if m != nil { return m.Id @@ -136,31 +174,25 @@ func (m *Document) GetPermission() string { } func (m *Document) GetTier() string { - if m != nil { - return m.Tier + if x, ok := m.GetXTier().(*Document_Tier); ok { + return x.Tier } return "" } -func (m *Document) GetHasTier() bool { - if m != nil { - return m.HasTier - } - return false -} - func (m *Document) GetTimestamp() uint64 { - if m != nil { - return m.Timestamp + if x, ok := m.GetXTimestamp().(*Document_Timestamp); ok { + return x.Timestamp } return 0 } -func (m *Document) GetHasTimestamp() bool { - if m != nil { - return m.HasTimestamp +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Document) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Document_Tier)(nil), + (*Document_Timestamp)(nil), } - return false } func init() { @@ -170,29 +202,28 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/document.proto", fileDescriptor_c92869153d87ab26) } var fileDescriptor_c92869153d87ab26 = []byte{ - // 340 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0x4f, 0x4e, 0xe3, 0x30, - 0x14, 0xc6, 0xeb, 0x4c, 0xff, 0x24, 0xaf, 0xed, 0x8c, 0x64, 0x8d, 0x34, 0x1e, 0xa8, 0x4c, 0x05, - 0x9b, 0xae, 0x1a, 0x24, 0x6e, 0x80, 0xba, 0x81, 0x65, 0xc5, 0x8a, 0x4d, 0x95, 0xc6, 0xa6, 0x7d, - 0x82, 0xc4, 0x96, 0xed, 0x0a, 0x7a, 0x0b, 0x8e, 0xc5, 0xb2, 0x4b, 0x96, 0xa8, 0x3d, 0x00, 0x57, - 0x40, 0xb1, 0xd3, 0x66, 0x97, 0xf7, 0xfb, 0xf9, 0x7b, 0x7a, 0xd1, 0x07, 0xdc, 0xaa, 0x8d, 0xc9, - 0xe5, 0x7a, 0xb3, 0x4c, 0x95, 0x59, 0xa2, 0x4d, 0x85, 0xca, 0x37, 0x85, 0x2c, 0xdd, 0x54, 0x1b, - 0xe5, 0x14, 0xfd, 0x73, 0xf2, 0x53, 0xef, 0x2f, 0xbf, 0x23, 0x88, 0x67, 0xf5, 0x1b, 0xfa, 0x1b, - 0x22, 0x14, 0x8c, 0x8c, 0xc9, 0x24, 0x99, 0x47, 0x28, 0xe8, 0x08, 0x92, 0x32, 0x2b, 0xa4, 0xd5, - 0x59, 0x2e, 0x59, 0xe4, 0x71, 0x03, 0xe8, 0x05, 0xf4, 0x73, 0x23, 0x33, 0xa7, 0xcc, 0x42, 0xa0, - 0x60, 0xbf, 0xbc, 0x87, 0x1a, 0xcd, 0x50, 0xd0, 0x7f, 0xd0, 0x33, 0x58, 0xae, 0x16, 0x28, 0x58, - 0xdb, 0xcb, 0x6e, 0x35, 0xde, 0x09, 0x7a, 0x06, 0xf1, 0xf1, 0x2e, 0xd6, 0xf1, 0xe6, 0x34, 0xd3, - 0xbf, 0xd0, 0xd1, 0x46, 0xa9, 0x27, 0xd6, 0xf5, 0x22, 0x0c, 0xf4, 0x1c, 0x12, 0xad, 0x5e, 0x30, - 0xdf, 0x56, 0xcb, 0x7a, 0x21, 0x12, 0x40, 0x58, 0x67, 0x64, 0xf8, 0x31, 0x16, 0x07, 0x77, 0x9c, - 0x29, 0x07, 0xd0, 0xd2, 0x14, 0x68, 0x2d, 0xaa, 0x92, 0x25, 0xe1, 0xc6, 0x86, 0x50, 0x0a, 0x6d, - 0x87, 0xd2, 0x30, 0xf0, 0xc6, 0x7f, 0xd3, 0xff, 0x10, 0xaf, 0x33, 0xbb, 0xf0, 0xbc, 0x3f, 0x26, - 0x93, 0x78, 0xde, 0x5b, 0x67, 0xf6, 0xa1, 0x52, 0x23, 0x48, 0x1c, 0x16, 0xd2, 0xba, 0xac, 0xd0, - 0x6c, 0x30, 0x26, 0x93, 0xf6, 0xbc, 0x01, 0xf4, 0x0a, 0x86, 0x21, 0x78, 0x7c, 0x31, 0xf4, 0xe9, - 0x81, 0x4f, 0xd7, 0xec, 0xf6, 0xfe, 0x63, 0xcf, 0xc9, 0x6e, 0xcf, 0xc9, 0xd7, 0x9e, 0x93, 0xf7, - 0x03, 0x6f, 0xed, 0x0e, 0xbc, 0xf5, 0x79, 0xe0, 0xad, 0xc7, 0xeb, 0x15, 0xba, 0xaa, 0x99, 0x5c, - 0x15, 0x69, 0x38, 0xbf, 0x94, 0xee, 0x55, 0x99, 0xe7, 0xb4, 0x69, 0xf5, 0xad, 0xee, 0xd5, 0x6d, - 0xb5, 0xb4, 0xcb, 0xae, 0x6f, 0xf5, 0xe6, 0x27, 0x00, 0x00, 0xff, 0xff, 0x26, 0x7d, 0xce, 0xfa, - 0xf7, 0x01, 0x00, 0x00, + // 326 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0xbd, 0x4e, 0xf3, 0x30, + 0x14, 0x86, 0xe3, 0x7c, 0xfd, 0xcb, 0xe9, 0x27, 0x90, 0x2c, 0xa4, 0x5a, 0x80, 0x4c, 0x61, 0xea, + 0xd4, 0x20, 0x71, 0x07, 0x55, 0x87, 0xc2, 0xd8, 0x91, 0x25, 0x4a, 0x63, 0x53, 0x8e, 0x20, 0xb1, + 0x65, 0xbb, 0x82, 0xde, 0x41, 0x47, 0x2e, 0x8b, 0xb1, 0x23, 0x23, 0x6a, 0x6f, 0x04, 0xc5, 0x6e, + 0x9b, 0xf1, 0x7d, 0x9e, 0x93, 0xa3, 0x13, 0xbf, 0xc0, 0xad, 0x5a, 0x99, 0x42, 0xbe, 0xae, 0x16, + 0xa9, 0x32, 0x0b, 0xb4, 0xa9, 0x50, 0xc5, 0xaa, 0x94, 0x95, 0x1b, 0x6b, 0xa3, 0x9c, 0xa2, 0xe7, + 0x27, 0x3f, 0xf6, 0xfe, 0x6e, 0x1b, 0x43, 0x6f, 0x7a, 0x98, 0xa1, 0x67, 0x10, 0xa3, 0x60, 0x64, + 0x48, 0x46, 0xc9, 0x3c, 0x46, 0x41, 0xaf, 0x21, 0xa9, 0xf2, 0x52, 0x5a, 0x9d, 0x17, 0x92, 0xc5, + 0x1e, 0x37, 0x80, 0xde, 0x40, 0xbf, 0x30, 0x32, 0x77, 0xca, 0x64, 0x02, 0x05, 0xfb, 0xe7, 0x3d, + 0x1c, 0xd0, 0x14, 0x05, 0x1d, 0x40, 0xd7, 0x60, 0xb5, 0xcc, 0x50, 0xb0, 0x96, 0x97, 0x9d, 0x3a, + 0x3e, 0x0a, 0x7a, 0x09, 0xbd, 0xe3, 0x5d, 0xac, 0xed, 0xcd, 0x29, 0xd3, 0x0b, 0x68, 0x6b, 0xa3, + 0xd4, 0x0b, 0xeb, 0x78, 0x11, 0x02, 0xbd, 0x82, 0x44, 0xab, 0x77, 0x2c, 0xd6, 0xf5, 0xb2, 0x6e, + 0xf8, 0x24, 0x80, 0xb0, 0xce, 0xc8, 0xf0, 0x63, 0xac, 0x17, 0xdc, 0x31, 0x53, 0x0e, 0xa0, 0xa5, + 0x29, 0xd1, 0x5a, 0x54, 0x15, 0x4b, 0xc2, 0x8d, 0x0d, 0xa1, 0x03, 0x68, 0x39, 0x94, 0x86, 0x41, + 0x6d, 0x66, 0xd1, 0xdc, 0xa7, 0x0d, 0x21, 0xf4, 0x16, 0x12, 0x87, 0xa5, 0xb4, 0x2e, 0x2f, 0x35, + 0xeb, 0x0f, 0xc9, 0xa8, 0x35, 0x23, 0xf3, 0x06, 0x6d, 0x08, 0x99, 0x74, 0xa1, 0x9d, 0xd5, 0xe3, + 0x93, 0xff, 0x00, 0xd9, 0xc9, 0x4c, 0x9e, 0xbe, 0x77, 0x9c, 0x6c, 0x77, 0x9c, 0xfc, 0xee, 0x38, + 0xf9, 0xda, 0xf3, 0x68, 0xbb, 0xe7, 0xd1, 0xcf, 0x9e, 0x47, 0xcf, 0xf7, 0x4b, 0x74, 0xf5, 0xd3, + 0x17, 0xaa, 0x4c, 0xc3, 0x7d, 0x95, 0x74, 0x1f, 0xca, 0xbc, 0xa5, 0x4d, 0x6d, 0x9f, 0x87, 0xe2, + 0xdc, 0x5a, 0x4b, 0xbb, 0xe8, 0xf8, 0xda, 0x1e, 0xfe, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x47, + 0x6d, 0x5d, 0xd8, 0x01, 0x00, 0x00, } func (m *Document) Marshal() (dAtA []byte, err error) { @@ -215,37 +246,23 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.HasTimestamp { - i-- - if m.HasTimestamp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.XTimestamp != nil { + { + size := m.XTimestamp.Size() + i -= size + if _, err := m.XTimestamp.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i-- - dAtA[i] = 0x68 - } - if m.Timestamp != 0 { - i = encodeVarintDocument(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x60 } - if m.HasTier { - i-- - if m.HasTier { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.XTier != nil { + { + size := m.XTier.Size() + i -= size + if _, err := m.XTier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i-- - dAtA[i] = 0x58 - } - if len(m.Tier) > 0 { - i -= len(m.Tier) - copy(dAtA[i:], m.Tier) - i = encodeVarintDocument(dAtA, i, uint64(len(m.Tier))) - i-- - dAtA[i] = 0x52 } if len(m.Permission) > 0 { i -= len(m.Permission) @@ -313,6 +330,32 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Document_Tier) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Document_Tier) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Tier) + copy(dAtA[i:], m.Tier) + i = encodeVarintDocument(dAtA, i, uint64(len(m.Tier))) + i-- + dAtA[i] = 0x52 + return len(dAtA) - i, nil +} +func (m *Document_Timestamp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Document_Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintDocument(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x58 + return len(dAtA) - i, nil +} func encodeVarintDocument(dAtA []byte, offset int, v uint64) int { offset -= sovDocument(v) base := offset @@ -366,19 +409,32 @@ func (m *Document) Size() (n int) { if l > 0 { n += 1 + l + sovDocument(uint64(l)) } - l = len(m.Tier) - if l > 0 { - n += 1 + l + sovDocument(uint64(l)) + if m.XTier != nil { + n += m.XTier.Size() } - if m.HasTier { - n += 2 + if m.XTimestamp != nil { + n += m.XTimestamp.Size() } - if m.Timestamp != 0 { - n += 1 + sovDocument(uint64(m.Timestamp)) + return n +} + +func (m *Document_Tier) Size() (n int) { + if m == nil { + return 0 } - if m.HasTimestamp { - n += 2 + var l int + _ = l + l = len(m.Tier) + n += 1 + l + sovDocument(uint64(l)) + return n +} +func (m *Document_Timestamp) Size() (n int) { + if m == nil { + return 0 } + var l int + _ = l + n += 1 + sovDocument(uint64(m.Timestamp)) return n } @@ -735,52 +791,13 @@ func (m *Document) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Tier = string(dAtA[iNdEx:postIndex]) + m.XTier = &Document_Tier{string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasTier", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDocument - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasTier = bool(v != 0) - case 12: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDocument - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasTimestamp", wireType) - } - var v int + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDocument @@ -790,12 +807,12 @@ func (m *Document) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.HasTimestamp = bool(v != 0) + m.XTimestamp = &Document_Timestamp{v} default: iNdEx = preIndex skippy, err := skipDocument(dAtA[iNdEx:]) diff --git a/x/orbis/types/ring.pb.go b/x/orbis/types/ring.pb.go index a0055cc3..adc4088b 100644 --- a/x/orbis/types/ring.pb.go +++ b/x/orbis/types/ring.pb.go @@ -24,19 +24,21 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Ring stores the active and pending committee metadata for an Orbis ring. type Ring struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` - NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - NewThreshold uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` - HasNewThreshold bool `protobuf:"varint,9,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` - PssInterval uint64 `protobuf:"varint,10,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` - HasPssInterval bool `protobuf:"varint,11,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` - BlockNumberNonce uint64 `protobuf:"varint,12,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` - PolicyId string `protobuf:"bytes,13,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` + NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + // Types that are valid to be assigned to XNewThreshold: + // *Ring_NewThreshold + XNewThreshold isRing_XNewThreshold `protobuf_oneof:"_new_threshold"` + // Types that are valid to be assigned to XPssInterval: + // *Ring_PssInterval + XPssInterval isRing_XPssInterval `protobuf_oneof:"_pss_interval"` + BlockNumberNonce uint64 `protobuf:"varint,10,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + PolicyId string `protobuf:"bytes,11,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` } func (m *Ring) Reset() { *m = Ring{} } @@ -72,6 +74,40 @@ func (m *Ring) XXX_DiscardUnknown() { var xxx_messageInfo_Ring proto.InternalMessageInfo +type isRing_XNewThreshold interface { + isRing_XNewThreshold() + MarshalTo([]byte) (int, error) + Size() int +} +type isRing_XPssInterval interface { + isRing_XPssInterval() + MarshalTo([]byte) (int, error) + Size() int +} + +type Ring_NewThreshold struct { + NewThreshold uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` +} +type Ring_PssInterval struct { + PssInterval uint64 `protobuf:"varint,9,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` +} + +func (*Ring_NewThreshold) isRing_XNewThreshold() {} +func (*Ring_PssInterval) isRing_XPssInterval() {} + +func (m *Ring) GetXNewThreshold() isRing_XNewThreshold { + if m != nil { + return m.XNewThreshold + } + return nil +} +func (m *Ring) GetXPssInterval() isRing_XPssInterval { + if m != nil { + return m.XPssInterval + } + return nil +} + func (m *Ring) GetId() string { if m != nil { return m.Id @@ -122,33 +158,19 @@ func (m *Ring) GetNewPeerIds() []string { } func (m *Ring) GetNewThreshold() uint32 { - if m != nil { - return m.NewThreshold + if x, ok := m.GetXNewThreshold().(*Ring_NewThreshold); ok { + return x.NewThreshold } return 0 } -func (m *Ring) GetHasNewThreshold() bool { - if m != nil { - return m.HasNewThreshold - } - return false -} - func (m *Ring) GetPssInterval() uint64 { - if m != nil { - return m.PssInterval + if x, ok := m.GetXPssInterval().(*Ring_PssInterval); ok { + return x.PssInterval } return 0 } -func (m *Ring) GetHasPssInterval() bool { - if m != nil { - return m.HasPssInterval - } - return false -} - func (m *Ring) GetBlockNumberNonce() uint64 { if m != nil { return m.BlockNumberNonce @@ -163,6 +185,14 @@ func (m *Ring) GetPolicyId() string { return "" } +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Ring) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Ring_NewThreshold)(nil), + (*Ring_PssInterval)(nil), + } +} + func init() { proto.RegisterType((*Ring)(nil), "sourcehub.orbis.Ring") } @@ -170,32 +200,31 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/ring.proto", fileDescriptor_be6c219726da9c21) } var fileDescriptor_be6c219726da9c21 = []byte{ - // 388 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0x4d, 0x8e, 0xd3, 0x30, - 0x14, 0xc7, 0xeb, 0xb6, 0xb4, 0xc9, 0x6b, 0x3b, 0x33, 0x78, 0x83, 0xf9, 0x50, 0x08, 0xb0, 0x89, - 0x10, 0x9a, 0x20, 0x71, 0x03, 0xc4, 0xa6, 0x2c, 0xaa, 0x2a, 0x62, 0xc5, 0xc6, 0x4a, 0x62, 0xab, - 0xb1, 0x92, 0xda, 0x96, 0x9d, 0x52, 0xe6, 0x16, 0x9c, 0x85, 0x53, 0xb0, 0x9c, 0x25, 0x4b, 0xd4, - 0x5e, 0x04, 0xd9, 0x8d, 0x9a, 0x76, 0xe9, 0xdf, 0xff, 0xe3, 0x49, 0x7e, 0x0f, 0x5e, 0x58, 0xb5, - 0x33, 0x25, 0xaf, 0x76, 0x45, 0xaa, 0x4c, 0x21, 0x6c, 0x6a, 0x84, 0xdc, 0xdc, 0x6b, 0xa3, 0x5a, - 0x85, 0x6f, 0xcf, 0xda, 0xbd, 0xd7, 0xde, 0xfe, 0x1e, 0xc1, 0x38, 0x13, 0x72, 0x83, 0x6f, 0x60, - 0x28, 0x18, 0x41, 0x31, 0x4a, 0xc2, 0x6c, 0x28, 0x18, 0x7e, 0x05, 0xa1, 0xcc, 0xb7, 0xdc, 0xea, - 0xbc, 0xe4, 0x64, 0xe8, 0x71, 0x0f, 0xf0, 0x6b, 0x98, 0x95, 0x86, 0xe7, 0xad, 0x32, 0x94, 0x09, - 0x46, 0x46, 0x5e, 0x87, 0x0e, 0x7d, 0x11, 0x0c, 0x3f, 0x83, 0xa9, 0x1b, 0x4b, 0x75, 0x4d, 0xc6, - 0x5e, 0x9c, 0xb8, 0xe7, 0xba, 0xc6, 0xcf, 0x21, 0xd0, 0x9c, 0x1b, 0x2a, 0x98, 0x25, 0x4f, 0xe2, - 0x51, 0x12, 0x66, 0x53, 0xf7, 0x5e, 0x32, 0xeb, 0x46, 0xb6, 0x95, 0xe1, 0xb6, 0x52, 0x0d, 0x23, - 0x93, 0x18, 0x25, 0x8b, 0xac, 0x07, 0x38, 0x86, 0xb9, 0xe4, 0x7b, 0x7a, 0x0e, 0x4f, 0x7d, 0x18, - 0x24, 0xdf, 0xaf, 0xbb, 0xfc, 0x3b, 0x58, 0x38, 0x47, 0xdf, 0x11, 0xf8, 0x0e, 0x17, 0xfb, 0x76, - 0xae, 0x79, 0x0f, 0x4f, 0xab, 0xdc, 0xd2, 0x6b, 0x63, 0x18, 0xa3, 0x24, 0xc8, 0x6e, 0xab, 0xdc, - 0xae, 0x2e, 0xbd, 0x6f, 0x60, 0xae, 0xad, 0xa5, 0x42, 0xb6, 0xdc, 0xfc, 0xc8, 0x1b, 0x02, 0x31, - 0x4a, 0xc6, 0xd9, 0x4c, 0x5b, 0xbb, 0xec, 0x10, 0x4e, 0xe0, 0xce, 0xd5, 0x5d, 0xd9, 0x66, 0xbe, - 0xed, 0xa6, 0xca, 0xed, 0xfa, 0xc2, 0xf9, 0x01, 0x70, 0xd1, 0xa8, 0xb2, 0xa6, 0x72, 0xb7, 0x2d, - 0xb8, 0xa1, 0x52, 0xc9, 0x92, 0x93, 0xb9, 0xaf, 0xbc, 0xf3, 0xca, 0xca, 0x0b, 0x2b, 0xc7, 0xf1, - 0x4b, 0x08, 0xb5, 0x6a, 0x44, 0xf9, 0x40, 0x05, 0x23, 0x0b, 0xff, 0x83, 0xc1, 0x09, 0x2c, 0xd9, - 0xe7, 0xaf, 0x7f, 0x0e, 0x11, 0x7a, 0x3c, 0x44, 0xe8, 0xdf, 0x21, 0x42, 0xbf, 0x8e, 0xd1, 0xe0, - 0xf1, 0x18, 0x0d, 0xfe, 0x1e, 0xa3, 0xc1, 0xf7, 0x8f, 0x1b, 0xd1, 0xba, 0xe5, 0x96, 0x6a, 0x9b, - 0x9e, 0x56, 0x2d, 0x79, 0xbb, 0x57, 0xa6, 0x4e, 0xfb, 0xa3, 0xf8, 0xd9, 0x9d, 0x45, 0xfb, 0xa0, - 0xb9, 0x2d, 0x26, 0xfe, 0x30, 0x3e, 0xfd, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x82, 0xfc, 0x33, 0xfb, - 0x36, 0x02, 0x00, 0x00, + // 376 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xbf, 0xae, 0xd3, 0x30, + 0x14, 0xc6, 0xe3, 0xb6, 0xb4, 0xcd, 0xe9, 0xed, 0xbd, 0x57, 0x5e, 0x30, 0x7f, 0x14, 0x22, 0x06, + 0x94, 0x01, 0x35, 0x48, 0xbc, 0x41, 0xc5, 0xd0, 0x32, 0x54, 0x55, 0xc4, 0xc4, 0x62, 0x25, 0xb1, + 0xd5, 0x5a, 0x49, 0x6d, 0xcb, 0x4e, 0x29, 0x7d, 0x03, 0xd8, 0x78, 0x2c, 0xc6, 0x8e, 0x8c, 0xa8, + 0x7d, 0x11, 0x64, 0x37, 0x34, 0x30, 0xfa, 0xf7, 0x7d, 0xdf, 0x39, 0xc7, 0xfa, 0xe0, 0xb9, 0x55, + 0x7b, 0x53, 0xf2, 0xed, 0xbe, 0x48, 0x95, 0x29, 0x84, 0x4d, 0x8d, 0x90, 0x9b, 0x99, 0x36, 0xaa, + 0x51, 0xf8, 0xe1, 0xa6, 0xcd, 0xbc, 0xf6, 0xfa, 0x7b, 0x1f, 0x06, 0x99, 0x90, 0x1b, 0x7c, 0x0f, + 0x3d, 0xc1, 0x08, 0x8a, 0x51, 0x12, 0x66, 0x3d, 0xc1, 0xf0, 0x4b, 0x08, 0x65, 0xbe, 0xe3, 0x56, + 0xe7, 0x25, 0x27, 0x3d, 0x8f, 0x3b, 0x80, 0x5f, 0xc1, 0xa4, 0x34, 0x3c, 0x6f, 0x94, 0xa1, 0x4c, + 0x30, 0xd2, 0xf7, 0x3a, 0xb4, 0xe8, 0x83, 0x60, 0xf8, 0x29, 0x8c, 0xdc, 0x5a, 0xaa, 0x2b, 0x32, + 0xf0, 0xe2, 0xd0, 0x3d, 0xd7, 0x15, 0x7e, 0x06, 0x63, 0xcd, 0xb9, 0xa1, 0x82, 0x59, 0xf2, 0x24, + 0xee, 0x27, 0x61, 0x36, 0x72, 0xef, 0x25, 0xb3, 0x6e, 0x65, 0xb3, 0x35, 0xdc, 0x6e, 0x55, 0xcd, + 0xc8, 0x30, 0x46, 0xc9, 0x34, 0xeb, 0x00, 0x8e, 0xe1, 0x4e, 0xf2, 0x03, 0xbd, 0x85, 0x47, 0x3e, + 0x0c, 0x92, 0x1f, 0xd6, 0x6d, 0x3e, 0x81, 0xa9, 0x73, 0x74, 0x33, 0xc6, 0x6e, 0xc6, 0x22, 0xc8, + 0x5c, 0xf0, 0xd3, 0x5f, 0xfa, 0x0d, 0x21, 0xfc, 0x06, 0xee, 0xb4, 0xb5, 0x54, 0xc8, 0x86, 0x9b, + 0x2f, 0x79, 0x4d, 0xc2, 0x18, 0x25, 0x83, 0x05, 0xca, 0x26, 0xda, 0xda, 0x65, 0x0b, 0x9d, 0xef, + 0x2d, 0xe0, 0xa2, 0x56, 0x65, 0x45, 0xe5, 0x7e, 0x57, 0x70, 0x43, 0xa5, 0x92, 0x25, 0x27, 0xe0, + 0xdc, 0xd9, 0xa3, 0x57, 0x56, 0x5e, 0x58, 0x39, 0x8e, 0x5f, 0x40, 0xa8, 0x55, 0x2d, 0xca, 0x23, + 0x15, 0x8c, 0x4c, 0xfc, 0xaf, 0xc7, 0x57, 0xb0, 0x64, 0xf3, 0x47, 0xb8, 0xa7, 0xff, 0x5d, 0x37, + 0x7f, 0x80, 0x29, 0xfd, 0xf7, 0x8a, 0xf9, 0xc7, 0x9f, 0xe7, 0x08, 0x9d, 0xce, 0x11, 0xfa, 0x7d, + 0x8e, 0xd0, 0x8f, 0x4b, 0x14, 0x9c, 0x2e, 0x51, 0xf0, 0xeb, 0x12, 0x05, 0x9f, 0xdf, 0x6d, 0x44, + 0xe3, 0x3a, 0x2b, 0xd5, 0x2e, 0xbd, 0x36, 0x28, 0x79, 0x73, 0x50, 0xa6, 0x4a, 0xbb, 0xae, 0xbf, + 0xb6, 0x6d, 0x37, 0x47, 0xcd, 0x6d, 0x31, 0xf4, 0x7d, 0xbf, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, + 0xc3, 0x8c, 0xf7, 0x86, 0x0d, 0x02, 0x00, 0x00, } func (m *Ring) Marshal() (dAtA []byte, err error) { @@ -223,42 +252,30 @@ func (m *Ring) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.PolicyId) i = encodeVarintRing(dAtA, i, uint64(len(m.PolicyId))) i-- - dAtA[i] = 0x6a + dAtA[i] = 0x5a } if m.BlockNumberNonce != 0 { i = encodeVarintRing(dAtA, i, uint64(m.BlockNumberNonce)) i-- - dAtA[i] = 0x60 - } - if m.HasPssInterval { - i-- - if m.HasPssInterval { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.PssInterval != 0 { - i = encodeVarintRing(dAtA, i, uint64(m.PssInterval)) - i-- dAtA[i] = 0x50 } - if m.HasNewThreshold { - i-- - if m.HasNewThreshold { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.XPssInterval != nil { + { + size := m.XPssInterval.Size() + i -= size + if _, err := m.XPssInterval.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i-- - dAtA[i] = 0x48 } - if m.NewThreshold != 0 { - i = encodeVarintRing(dAtA, i, uint64(m.NewThreshold)) - i-- - dAtA[i] = 0x40 + if m.XNewThreshold != nil { + { + size := m.XNewThreshold.Size() + i -= size + if _, err := m.XNewThreshold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } } if len(m.NewPeerIds) > 0 { for iNdEx := len(m.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { @@ -314,6 +331,30 @@ func (m *Ring) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Ring_NewThreshold) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ring_NewThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintRing(dAtA, i, uint64(m.NewThreshold)) + i-- + dAtA[i] = 0x40 + return len(dAtA) - i, nil +} +func (m *Ring_PssInterval) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ring_PssInterval) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintRing(dAtA, i, uint64(m.PssInterval)) + i-- + dAtA[i] = 0x48 + return len(dAtA) - i, nil +} func encodeVarintRing(dAtA []byte, offset int, v uint64) int { offset -= sovRing(v) base := offset @@ -362,17 +403,11 @@ func (m *Ring) Size() (n int) { n += 1 + l + sovRing(uint64(l)) } } - if m.NewThreshold != 0 { - n += 1 + sovRing(uint64(m.NewThreshold)) - } - if m.HasNewThreshold { - n += 2 - } - if m.PssInterval != 0 { - n += 1 + sovRing(uint64(m.PssInterval)) + if m.XNewThreshold != nil { + n += m.XNewThreshold.Size() } - if m.HasPssInterval { - n += 2 + if m.XPssInterval != nil { + n += m.XPssInterval.Size() } if m.BlockNumberNonce != 0 { n += 1 + sovRing(uint64(m.BlockNumberNonce)) @@ -384,6 +419,25 @@ func (m *Ring) Size() (n int) { return n } +func (m *Ring_NewThreshold) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovRing(uint64(m.NewThreshold)) + return n +} +func (m *Ring_PssInterval) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovRing(uint64(m.PssInterval)) + return n +} + func sovRing(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -634,7 +688,7 @@ func (m *Ring) Unmarshal(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } - m.NewThreshold = 0 + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRing @@ -644,55 +698,17 @@ func (m *Ring) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NewThreshold |= uint32(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } + m.XNewThreshold = &Ring_NewThreshold{v} case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasNewThreshold", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRing - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasNewThreshold = bool(v != 0) - case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } - m.PssInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRing - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PssInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) - } - var v int + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRing @@ -702,13 +718,13 @@ func (m *Ring) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.HasPssInterval = bool(v != 0) - case 12: + m.XPssInterval = &Ring_PssInterval{v} + case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) } @@ -727,7 +743,7 @@ func (m *Ring) Unmarshal(dAtA []byte) error { break } } - case 13: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } diff --git a/x/orbis/types/tx.pb.go b/x/orbis/types/tx.pb.go index ab2ec2b8..d1aecd2d 100644 --- a/x/orbis/types/tx.pb.go +++ b/x/orbis/types/tx.pb.go @@ -122,15 +122,16 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo type MsgCreateRing struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` - PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` - HasPssInterval bool `protobuf:"varint,7,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` - PolicyId string `protobuf:"bytes,8,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Artifact string `protobuf:"bytes,9,opt,name=artifact,proto3" json:"artifact,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + // Types that are valid to be assigned to XPssInterval: + // *MsgCreateRing_PssInterval + XPssInterval isMsgCreateRing_XPssInterval `protobuf_oneof:"_pss_interval"` + PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (m *MsgCreateRing) Reset() { *m = MsgCreateRing{} } @@ -166,6 +167,25 @@ func (m *MsgCreateRing) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateRing proto.InternalMessageInfo +type isMsgCreateRing_XPssInterval interface { + isMsgCreateRing_XPssInterval() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgCreateRing_PssInterval struct { + PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` +} + +func (*MsgCreateRing_PssInterval) isMsgCreateRing_XPssInterval() {} + +func (m *MsgCreateRing) GetXPssInterval() isMsgCreateRing_XPssInterval { + if m != nil { + return m.XPssInterval + } + return nil +} + func (m *MsgCreateRing) GetCreator() string { if m != nil { return m.Creator @@ -202,19 +222,12 @@ func (m *MsgCreateRing) GetThreshold() uint32 { } func (m *MsgCreateRing) GetPssInterval() uint64 { - if m != nil { - return m.PssInterval + if x, ok := m.GetXPssInterval().(*MsgCreateRing_PssInterval); ok { + return x.PssInterval } return 0 } -func (m *MsgCreateRing) GetHasPssInterval() bool { - if m != nil { - return m.HasPssInterval - } - return false -} - func (m *MsgCreateRing) GetPolicyId() string { if m != nil { return m.PolicyId @@ -229,6 +242,13 @@ func (m *MsgCreateRing) GetArtifact() string { return "" } +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgCreateRing) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgCreateRing_PssInterval)(nil), + } +} + type MsgCreateRingResponse struct { RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` } @@ -274,13 +294,17 @@ func (m *MsgCreateRingResponse) GetRingId() string { } type MsgUpdateRingByAcp struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - NewThreshold uint32 `protobuf:"varint,4,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` - HasNewThreshold bool `protobuf:"varint,5,opt,name=has_new_threshold,json=hasNewThreshold,proto3" json:"has_new_threshold,omitempty"` - PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3" json:"pss_interval,omitempty"` - HasPssInterval bool `protobuf:"varint,7,opt,name=has_pss_interval,json=hasPssInterval,proto3" json:"has_pss_interval,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + // Types that are valid to be assigned to XNewThreshold: + // + // *MsgUpdateRingByAcp_NewThreshold + XNewThreshold isMsgUpdateRingByAcp_XNewThreshold `protobuf_oneof:"_new_threshold"` + // Types that are valid to be assigned to XPssInterval: + // + // *MsgUpdateRingByAcp_PssInterval + XPssInterval isMsgUpdateRingByAcp_XPssInterval `protobuf_oneof:"_pss_interval"` } func (m *MsgUpdateRingByAcp) Reset() { *m = MsgUpdateRingByAcp{} } @@ -316,6 +340,40 @@ func (m *MsgUpdateRingByAcp) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateRingByAcp proto.InternalMessageInfo +type isMsgUpdateRingByAcp_XNewThreshold interface { + isMsgUpdateRingByAcp_XNewThreshold() + MarshalTo([]byte) (int, error) + Size() int +} +type isMsgUpdateRingByAcp_XPssInterval interface { + isMsgUpdateRingByAcp_XPssInterval() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateRingByAcp_NewThreshold struct { + NewThreshold uint32 `protobuf:"varint,4,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` +} +type MsgUpdateRingByAcp_PssInterval struct { + PssInterval uint64 `protobuf:"varint,5,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` +} + +func (*MsgUpdateRingByAcp_NewThreshold) isMsgUpdateRingByAcp_XNewThreshold() {} +func (*MsgUpdateRingByAcp_PssInterval) isMsgUpdateRingByAcp_XPssInterval() {} + +func (m *MsgUpdateRingByAcp) GetXNewThreshold() isMsgUpdateRingByAcp_XNewThreshold { + if m != nil { + return m.XNewThreshold + } + return nil +} +func (m *MsgUpdateRingByAcp) GetXPssInterval() isMsgUpdateRingByAcp_XPssInterval { + if m != nil { + return m.XPssInterval + } + return nil +} + func (m *MsgUpdateRingByAcp) GetCreator() string { if m != nil { return m.Creator @@ -338,31 +396,25 @@ func (m *MsgUpdateRingByAcp) GetNewPeerIds() []string { } func (m *MsgUpdateRingByAcp) GetNewThreshold() uint32 { - if m != nil { - return m.NewThreshold + if x, ok := m.GetXNewThreshold().(*MsgUpdateRingByAcp_NewThreshold); ok { + return x.NewThreshold } return 0 } -func (m *MsgUpdateRingByAcp) GetHasNewThreshold() bool { - if m != nil { - return m.HasNewThreshold - } - return false -} - func (m *MsgUpdateRingByAcp) GetPssInterval() uint64 { - if m != nil { - return m.PssInterval + if x, ok := m.GetXPssInterval().(*MsgUpdateRingByAcp_PssInterval); ok { + return x.PssInterval } return 0 } -func (m *MsgUpdateRingByAcp) GetHasPssInterval() bool { - if m != nil { - return m.HasPssInterval +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateRingByAcp) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateRingByAcp_NewThreshold)(nil), + (*MsgUpdateRingByAcp_PssInterval)(nil), } - return false } type MsgUpdateRingByAcpResponse struct { @@ -614,18 +666,22 @@ func (m *RingReshareFinalizeSignDoc) GetBlockNumberNonce() uint64 { } type MsgStoreDocument struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` - Tier string `protobuf:"bytes,9,opt,name=tier,proto3" json:"tier,omitempty"` - HasTier bool `protobuf:"varint,10,opt,name=has_tier,json=hasTier,proto3" json:"has_tier,omitempty"` - Timestamp uint64 `protobuf:"varint,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - HasTimestamp bool `protobuf:"varint,12,opt,name=has_timestamp,json=hasTimestamp,proto3" json:"has_timestamp,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` + // Types that are valid to be assigned to XTier: + // + // *MsgStoreDocument_Tier + XTier isMsgStoreDocument_XTier `protobuf_oneof:"_tier"` + // Types that are valid to be assigned to XTimestamp: + // + // *MsgStoreDocument_Timestamp + XTimestamp isMsgStoreDocument_XTimestamp `protobuf_oneof:"_timestamp"` } func (m *MsgStoreDocument) Reset() { *m = MsgStoreDocument{} } @@ -661,6 +717,40 @@ func (m *MsgStoreDocument) XXX_DiscardUnknown() { var xxx_messageInfo_MsgStoreDocument proto.InternalMessageInfo +type isMsgStoreDocument_XTier interface { + isMsgStoreDocument_XTier() + MarshalTo([]byte) (int, error) + Size() int +} +type isMsgStoreDocument_XTimestamp interface { + isMsgStoreDocument_XTimestamp() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgStoreDocument_Tier struct { + Tier string `protobuf:"bytes,9,opt,name=tier,proto3,oneof" json:"tier,omitempty"` +} +type MsgStoreDocument_Timestamp struct { + Timestamp uint64 `protobuf:"varint,10,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` +} + +func (*MsgStoreDocument_Tier) isMsgStoreDocument_XTier() {} +func (*MsgStoreDocument_Timestamp) isMsgStoreDocument_XTimestamp() {} + +func (m *MsgStoreDocument) GetXTier() isMsgStoreDocument_XTier { + if m != nil { + return m.XTier + } + return nil +} +func (m *MsgStoreDocument) GetXTimestamp() isMsgStoreDocument_XTimestamp { + if m != nil { + return m.XTimestamp + } + return nil +} + func (m *MsgStoreDocument) GetCreator() string { if m != nil { return m.Creator @@ -718,31 +808,25 @@ func (m *MsgStoreDocument) GetPermission() string { } func (m *MsgStoreDocument) GetTier() string { - if m != nil { - return m.Tier + if x, ok := m.GetXTier().(*MsgStoreDocument_Tier); ok { + return x.Tier } return "" } -func (m *MsgStoreDocument) GetHasTier() bool { - if m != nil { - return m.HasTier - } - return false -} - func (m *MsgStoreDocument) GetTimestamp() uint64 { - if m != nil { - return m.Timestamp + if x, ok := m.GetXTimestamp().(*MsgStoreDocument_Timestamp); ok { + return x.Timestamp } return 0 } -func (m *MsgStoreDocument) GetHasTimestamp() bool { - if m != nil { - return m.HasTimestamp +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgStoreDocument) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgStoreDocument_Tier)(nil), + (*MsgStoreDocument_Timestamp)(nil), } - return false } type MsgStoreDocumentResponse struct { @@ -944,78 +1028,77 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/tx.proto", fileDescriptor_7711ae63507074e0) } var fileDescriptor_7711ae63507074e0 = []byte{ - // 1130 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0x3a, 0xb1, 0x1d, 0xbf, 0x38, 0x5f, 0x27, 0xdb, 0xf4, 0x9b, 0xcd, 0x12, 0x5c, 0xc7, - 0x95, 0x8a, 0x6b, 0xc0, 0x2e, 0xa1, 0xf4, 0x90, 0x9e, 0x9a, 0x46, 0x48, 0xa6, 0x4a, 0x14, 0x6d, - 0xc2, 0xa5, 0x12, 0x5a, 0x6d, 0x76, 0x27, 0xbb, 0x23, 0x7b, 0x77, 0x56, 0x33, 0xeb, 0xa4, 0xe6, - 0x84, 0x38, 0x72, 0xe2, 0xc2, 0x95, 0x33, 0x12, 0x42, 0x0a, 0x12, 0xe2, 0xc2, 0x3f, 0xd0, 0x63, - 0xc5, 0x89, 0x13, 0x42, 0xc9, 0x21, 0x37, 0xf8, 0x17, 0xd0, 0xcc, 0xfe, 0xde, 0xfc, 0x68, 0x44, - 0x7b, 0x49, 0xfc, 0x3e, 0xef, 0xf3, 0xde, 0xbc, 0xf7, 0x99, 0x99, 0xb7, 0x03, 0x0a, 0x23, 0x63, - 0x6a, 0x22, 0x67, 0x7c, 0xd0, 0x27, 0xf4, 0x00, 0xb3, 0x7e, 0xf0, 0xa2, 0xe7, 0x53, 0x12, 0x10, - 0xb9, 0x91, 0x78, 0x7a, 0xc2, 0xa3, 0x2e, 0x1a, 0x2e, 0xf6, 0x48, 0x5f, 0xfc, 0x0d, 0x39, 0xea, - 0xb2, 0x49, 0x98, 0x4b, 0x58, 0xdf, 0x65, 0x76, 0xff, 0xe8, 0x23, 0xfe, 0x2f, 0x72, 0xac, 0x84, - 0x0e, 0x5d, 0x58, 0xfd, 0xd0, 0x88, 0x5c, 0x4b, 0x36, 0xb1, 0x49, 0x88, 0xf3, 0x5f, 0x11, 0xba, - 0x5a, 0xac, 0xc3, 0x37, 0xa8, 0xe1, 0x46, 0x31, 0xed, 0xdf, 0x24, 0x68, 0x6c, 0x33, 0xfb, 0x73, - 0xdf, 0x32, 0x02, 0xb4, 0x2b, 0x3c, 0xf2, 0x23, 0xa8, 0x19, 0xe3, 0xc0, 0x21, 0x14, 0x07, 0x13, - 0x45, 0x6a, 0x49, 0x9d, 0xda, 0xa6, 0xf2, 0xfb, 0x2f, 0x1f, 0x2e, 0x45, 0x8b, 0x3d, 0xb1, 0x2c, - 0x8a, 0x18, 0xdb, 0x0b, 0x28, 0xf6, 0x6c, 0x2d, 0xa5, 0xca, 0x1b, 0x50, 0x09, 0x73, 0x2b, 0xa5, - 0x96, 0xd4, 0x99, 0x5b, 0x5f, 0xee, 0x15, 0x1a, 0xed, 0x85, 0x0b, 0x6c, 0xd6, 0x5e, 0xfe, 0x79, - 0x67, 0xea, 0x87, 0xf3, 0x93, 0xae, 0xa4, 0x45, 0x11, 0x1b, 0x0f, 0xbf, 0x3e, 0x3f, 0xe9, 0xa6, - 0xb9, 0xbe, 0x39, 0x3f, 0xe9, 0xae, 0xa5, 0x85, 0xbf, 0x88, 0x4a, 0x2f, 0x54, 0xda, 0x5e, 0x81, - 0xe5, 0x02, 0xa4, 0x21, 0xe6, 0x13, 0x8f, 0xa1, 0xf6, 0x4f, 0x25, 0x98, 0xdf, 0x66, 0xf6, 0x53, - 0x8a, 0x8c, 0x00, 0x69, 0xd8, 0xb3, 0x65, 0x05, 0xaa, 0x26, 0xb7, 0x08, 0x0d, 0x9b, 0xd2, 0x62, - 0x53, 0x5e, 0x85, 0x9a, 0x67, 0xb8, 0x88, 0xf9, 0x86, 0x89, 0x44, 0xed, 0x35, 0x2d, 0x05, 0xe4, - 0x65, 0xa8, 0xf2, 0x4e, 0x75, 0x7f, 0xa8, 0x4c, 0x0b, 0x5f, 0x85, 0x9b, 0xbb, 0x43, 0x79, 0x05, - 0x66, 0x7d, 0x84, 0xa8, 0x8e, 0x2d, 0xa6, 0xcc, 0xb4, 0xa6, 0x79, 0x46, 0x6e, 0x0f, 0x2c, 0xc6, - 0x33, 0x06, 0x0e, 0x45, 0xcc, 0x21, 0x23, 0x4b, 0x29, 0xb7, 0xa4, 0xce, 0xbc, 0x96, 0x02, 0xf2, - 0x1a, 0xd4, 0x7d, 0xc6, 0x74, 0xec, 0x05, 0x88, 0x1e, 0x19, 0x23, 0xa5, 0xd2, 0x92, 0x3a, 0x33, - 0xda, 0x9c, 0xcf, 0xd8, 0x20, 0x82, 0xe4, 0x0e, 0x2c, 0x38, 0x06, 0xd3, 0x73, 0xb4, 0x6a, 0x4b, - 0xea, 0xcc, 0x6a, 0xff, 0x73, 0x0c, 0xb6, 0x9b, 0x61, 0xbe, 0x03, 0x35, 0x9f, 0x8c, 0xb0, 0x39, - 0xd1, 0xb1, 0xa5, 0xcc, 0x8a, 0x02, 0x67, 0x43, 0x60, 0x60, 0xc9, 0x2a, 0xcc, 0x1a, 0x34, 0xc0, - 0x87, 0x86, 0x19, 0x28, 0xb5, 0xd0, 0x17, 0xdb, 0x1b, 0x75, 0x2e, 0x79, 0xac, 0x41, 0xfb, 0x01, - 0xdc, 0xce, 0xc9, 0x15, 0x0b, 0x99, 0xb4, 0x8f, 0xad, 0x48, 0x36, 0xd1, 0xfe, 0xc0, 0x6a, 0x7f, - 0x57, 0x02, 0x39, 0x51, 0x9f, 0x87, 0x6c, 0x4e, 0x9e, 0x98, 0xfe, 0x35, 0x32, 0x67, 0x32, 0x95, - 0xb2, 0x99, 0xe4, 0x16, 0xd4, 0x3d, 0x74, 0xac, 0x27, 0x62, 0x4e, 0x0b, 0x31, 0xc1, 0x43, 0xc7, - 0xbb, 0x91, 0x9e, 0x77, 0x61, 0x9e, 0x33, 0x52, 0x4d, 0x67, 0x84, 0xa6, 0x3c, 0x6c, 0x3f, 0x91, - 0xb5, 0x0b, 0x8b, 0x5c, 0xb3, 0x3c, 0xb1, 0x2c, 0x44, 0x6b, 0x38, 0x06, 0xdb, 0xc9, 0x72, 0xdf, - 0xe6, 0x16, 0x14, 0x94, 0x5c, 0x05, 0xf5, 0xa2, 0x2c, 0xc9, 0xb9, 0xfc, 0x55, 0x82, 0xee, 0x36, - 0xb3, 0x3f, 0xc5, 0x9e, 0x31, 0xc2, 0x5f, 0xc6, 0x52, 0x3b, 0x06, 0x45, 0x9b, 0x93, 0xa4, 0xbc, - 0x3d, 0x6c, 0x7b, 0x46, 0x30, 0xa6, 0xe8, 0xbf, 0xa8, 0x79, 0x1f, 0x16, 0x58, 0x1c, 0xaf, 0x33, - 0xd3, 0x41, 0x2e, 0x8a, 0x0e, 0x6e, 0x23, 0xc1, 0xf7, 0x04, 0xcc, 0x8f, 0x69, 0x02, 0x09, 0x49, - 0xeb, 0x5a, 0x0a, 0x14, 0xda, 0x7a, 0x08, 0xeb, 0x37, 0xaf, 0x3b, 0x69, 0xf7, 0xe7, 0x12, 0xa8, - 0x19, 0x6e, 0x1c, 0xce, 0x89, 0x5b, 0xc4, 0x94, 0xff, 0x0f, 0x15, 0x8b, 0xb8, 0x06, 0xf6, 0xe2, - 0xb3, 0x15, 0x5a, 0xfc, 0x6a, 0x99, 0x8e, 0x81, 0xbd, 0xb4, 0xbb, 0xaa, 0xb0, 0x07, 0x56, 0xfe, - 0xb2, 0x4e, 0x5f, 0x75, 0x59, 0x71, 0x78, 0x44, 0x52, 0x55, 0x32, 0xb7, 0xb8, 0x9c, 0xbb, 0xc5, - 0x3d, 0xb8, 0x65, 0x8e, 0x29, 0x45, 0x5e, 0xa0, 0x0b, 0x02, 0x73, 0x8c, 0xf5, 0x4f, 0x1e, 0x89, - 0x03, 0x51, 0xd7, 0x16, 0x23, 0x17, 0x6f, 0x61, 0x4f, 0x38, 0xe4, 0x75, 0xb8, 0x7d, 0x18, 0x75, - 0x61, 0xe5, 0x22, 0xaa, 0x22, 0xe2, 0x56, 0xe2, 0xcc, 0xc4, 0x7c, 0x00, 0xf2, 0xc1, 0x88, 0x98, - 0x43, 0xdd, 0x1b, 0xbb, 0x07, 0x88, 0xea, 0x1e, 0xf1, 0x4c, 0x24, 0x2e, 0xeb, 0x8c, 0xb6, 0x20, - 0x3c, 0x3b, 0xc2, 0xb1, 0xc3, 0xf1, 0xf6, 0xdf, 0x25, 0x58, 0xd8, 0x66, 0xf6, 0x5e, 0x40, 0x28, - 0xda, 0x22, 0xe6, 0xd8, 0x45, 0x5e, 0xf0, 0xc6, 0xd3, 0x0b, 0x5b, 0xd9, 0xe9, 0x15, 0x8e, 0x06, - 0x2b, 0x4a, 0x1e, 0x49, 0x95, 0xd8, 0xf2, 0x12, 0x94, 0x7d, 0x4a, 0xc8, 0x61, 0x24, 0x55, 0x68, - 0xe4, 0x27, 0x4d, 0xe5, 0xe2, 0xa4, 0xa1, 0x28, 0x9c, 0xd8, 0x42, 0x89, 0x9a, 0x96, 0xd8, 0x72, - 0x13, 0xc0, 0x47, 0xd4, 0xc5, 0x8c, 0x61, 0xe2, 0x45, 0x33, 0x2a, 0x83, 0xc8, 0x32, 0xcc, 0x04, - 0x18, 0xd1, 0x68, 0x42, 0x89, 0xdf, 0xfc, 0x04, 0xf0, 0xdb, 0x27, 0x70, 0x10, 0xb7, 0xae, 0xea, - 0x18, 0x6c, 0x9f, 0xbb, 0xf8, 0x70, 0xc5, 0x2e, 0x62, 0x81, 0xe1, 0xfa, 0xca, 0x9c, 0x10, 0x31, - 0x05, 0xf8, 0xa8, 0x08, 0x03, 0x63, 0x46, 0x5d, 0x44, 0xd7, 0x45, 0x74, 0x84, 0x15, 0x8e, 0xf6, - 0x63, 0x50, 0x8a, 0x7a, 0x27, 0xe3, 0xef, 0x0e, 0xcc, 0xc5, 0xb2, 0xa4, 0x23, 0x10, 0x62, 0x68, - 0x60, 0xb5, 0xff, 0x91, 0xc4, 0xe4, 0x14, 0xd1, 0xcf, 0xd0, 0x64, 0x0b, 0x51, 0x7c, 0x64, 0x04, - 0xbc, 0xad, 0xb7, 0xbe, 0x65, 0x4d, 0x00, 0x2b, 0x49, 0x1f, 0x6d, 0x5a, 0x06, 0xc9, 0x6f, 0x50, - 0xf9, 0x9a, 0x0d, 0xaa, 0x5c, 0xbb, 0x41, 0xd5, 0xe2, 0x06, 0x15, 0xe4, 0x7a, 0x06, 0xef, 0x5e, - 0xda, 0x70, 0xa2, 0x59, 0x17, 0x16, 0x87, 0x68, 0xa2, 0xa7, 0x95, 0xa5, 0xca, 0x35, 0x86, 0xd9, - 0x88, 0x81, 0xb5, 0xfe, 0x7d, 0x19, 0xa6, 0xb7, 0x99, 0x2d, 0x3f, 0x87, 0x7a, 0xee, 0x11, 0xd2, - 0xba, 0xf0, 0x78, 0x28, 0x7c, 0xe9, 0xd5, 0xce, 0xeb, 0x18, 0x49, 0x3d, 0xfb, 0x00, 0x99, 0x77, - 0x40, 0xf3, 0xb2, 0xb8, 0xd4, 0xaf, 0xde, 0xbb, 0xde, 0x9f, 0x64, 0x35, 0xa1, 0x51, 0xfc, 0xf6, - 0xdd, 0xbd, 0xba, 0xa4, 0x84, 0xa4, 0xbe, 0x7f, 0x03, 0x52, 0xb2, 0xc8, 0x8f, 0x12, 0xbc, 0x77, - 0xd3, 0x6f, 0xc5, 0xe3, 0xcb, 0x12, 0xdf, 0x30, 0x58, 0x7d, 0xfa, 0x06, 0xc1, 0x49, 0xb5, 0x5f, - 0xc0, 0x7c, 0x7e, 0x6a, 0xad, 0x5d, 0x96, 0x35, 0x47, 0x51, 0xef, 0xbf, 0x96, 0x92, 0xa4, 0x1f, - 0x81, 0x7c, 0xc9, 0x35, 0xbb, 0x77, 0x65, 0x82, 0x1c, 0x4f, 0xed, 0xdd, 0x8c, 0x17, 0xaf, 0xa6, - 0x96, 0xbf, 0xe2, 0x2f, 0xd4, 0xcd, 0xcf, 0x5e, 0x9e, 0x36, 0xa5, 0x57, 0xa7, 0x4d, 0xe9, 0xaf, - 0xd3, 0xa6, 0xf4, 0xed, 0x59, 0x73, 0xea, 0xd5, 0x59, 0x73, 0xea, 0x8f, 0xb3, 0xe6, 0xd4, 0xf3, - 0x07, 0x36, 0x0e, 0x78, 0x32, 0x93, 0xb8, 0xfd, 0x30, 0xb5, 0x87, 0x82, 0x63, 0x42, 0x87, 0xfd, - 0x8b, 0x2f, 0xd7, 0x60, 0xe2, 0x23, 0x76, 0x50, 0x11, 0x8f, 0xee, 0x8f, 0xff, 0x0d, 0x00, 0x00, - 0xff, 0xff, 0x62, 0x5b, 0xa7, 0xd5, 0x1c, 0x0c, 0x00, 0x00, + // 1115 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x26, 0xb1, 0x1d, 0xbf, 0x3a, 0x38, 0xdd, 0xb6, 0x64, 0xb3, 0x04, 0xd7, 0x31, 0x52, + 0x70, 0x03, 0xd8, 0x25, 0x94, 0x1e, 0xd2, 0x53, 0xdd, 0x08, 0xc5, 0x54, 0xa9, 0xa2, 0x4d, 0xb9, + 0x54, 0x42, 0xab, 0xcd, 0xee, 0x64, 0x3d, 0xb2, 0x77, 0x67, 0x35, 0x33, 0x4e, 0x6a, 0x4e, 0x88, + 0x13, 0xe2, 0xc4, 0x95, 0x0b, 0x67, 0x24, 0x2e, 0x41, 0x42, 0x5c, 0xf8, 0x07, 0x7a, 0xa3, 0xe2, + 0xc4, 0x09, 0xa1, 0xe4, 0x90, 0x0b, 0x12, 0xff, 0x02, 0x9a, 0xd9, 0x5f, 0xde, 0x75, 0x92, 0x46, + 0x94, 0x4b, 0xe2, 0xf7, 0x7d, 0xef, 0xbd, 0x79, 0xef, 0x9b, 0x7d, 0x6f, 0x17, 0x34, 0x46, 0x46, + 0xd4, 0x46, 0xfd, 0xd1, 0x7e, 0x87, 0xd0, 0x7d, 0xcc, 0x3a, 0xfc, 0x79, 0x3b, 0xa0, 0x84, 0x13, + 0xb5, 0x96, 0x30, 0x6d, 0xc9, 0xe8, 0xd7, 0x2d, 0x0f, 0xfb, 0xa4, 0x23, 0xff, 0x86, 0x3e, 0xfa, + 0x92, 0x4d, 0x98, 0x47, 0x58, 0xc7, 0x63, 0x6e, 0xe7, 0xf0, 0x43, 0xf1, 0x2f, 0x22, 0x96, 0x43, + 0xc2, 0x94, 0x56, 0x27, 0x34, 0x22, 0xea, 0xa6, 0x4b, 0x5c, 0x12, 0xe2, 0xe2, 0x57, 0x84, 0xae, + 0xe4, 0xeb, 0x08, 0x2c, 0x6a, 0x79, 0x51, 0x4c, 0xf3, 0x57, 0x05, 0x6a, 0x3b, 0xcc, 0xfd, 0x2c, + 0x70, 0x2c, 0x8e, 0x76, 0x25, 0xa3, 0xde, 0x87, 0x8a, 0x35, 0xe2, 0x7d, 0x42, 0x31, 0x1f, 0x6b, + 0x4a, 0x43, 0x69, 0x55, 0xba, 0xda, 0xef, 0x3f, 0x7f, 0x70, 0x33, 0x3a, 0xec, 0xa1, 0xe3, 0x50, + 0xc4, 0xd8, 0x1e, 0xa7, 0xd8, 0x77, 0x8d, 0xd4, 0x55, 0xdd, 0x84, 0x52, 0x98, 0x5b, 0x9b, 0x69, + 0x28, 0xad, 0x6b, 0x1b, 0x4b, 0xed, 0x5c, 0xa3, 0xed, 0xf0, 0x80, 0x6e, 0xe5, 0xc5, 0x9f, 0xb7, + 0x0b, 0x3f, 0x9c, 0x1d, 0xaf, 0x2b, 0x46, 0x14, 0xb1, 0x79, 0xef, 0xab, 0xb3, 0xe3, 0xf5, 0x34, + 0xd7, 0x37, 0x67, 0xc7, 0xeb, 0xab, 0x69, 0xe1, 0xcf, 0xa3, 0xd2, 0x73, 0x95, 0x36, 0x97, 0x61, + 0x29, 0x07, 0x19, 0x88, 0x05, 0xc4, 0x67, 0xa8, 0xf9, 0xdd, 0x0c, 0x2c, 0xec, 0x30, 0xf7, 0x11, + 0x45, 0x16, 0x47, 0x06, 0xf6, 0x5d, 0x55, 0x83, 0xb2, 0x2d, 0x2c, 0x42, 0xc3, 0xa6, 0x8c, 0xd8, + 0x54, 0x57, 0xa0, 0xe2, 0x5b, 0x1e, 0x62, 0x81, 0x65, 0x23, 0x59, 0x7b, 0xc5, 0x48, 0x01, 0x75, + 0x09, 0xca, 0xa2, 0x53, 0x33, 0x18, 0x68, 0xb3, 0x92, 0x2b, 0x09, 0x73, 0x77, 0xa0, 0x2e, 0xc3, + 0x7c, 0x80, 0x10, 0x35, 0xb1, 0xc3, 0xb4, 0xb9, 0xc6, 0xac, 0xc8, 0x28, 0xec, 0x9e, 0xc3, 0x44, + 0x46, 0xde, 0xa7, 0x88, 0xf5, 0xc9, 0xd0, 0xd1, 0x8a, 0x0d, 0xa5, 0xb5, 0x60, 0xa4, 0x80, 0xba, + 0x06, 0xd5, 0x80, 0x31, 0x13, 0xfb, 0x1c, 0xd1, 0x43, 0x6b, 0xa8, 0x95, 0x1a, 0x4a, 0x6b, 0x6e, + 0xbb, 0x60, 0x5c, 0x0b, 0x18, 0xeb, 0x45, 0xe0, 0xd7, 0x8a, 0xa2, 0xbe, 0x05, 0x95, 0x80, 0x0c, + 0xb1, 0x3d, 0x36, 0xb1, 0xa3, 0x95, 0xe5, 0xd9, 0xf3, 0x21, 0xd0, 0x73, 0x54, 0x1d, 0xe6, 0x2d, + 0xca, 0xf1, 0x81, 0x65, 0x73, 0x6d, 0x3e, 0xe4, 0x62, 0x7b, 0xb3, 0x2a, 0xd4, 0x8c, 0xdb, 0xeb, + 0xd6, 0x60, 0xc1, 0x9c, 0x3c, 0xaf, 0x79, 0x17, 0x6e, 0x65, 0xa4, 0x89, 0x45, 0x4b, 0x5a, 0xc5, + 0x4e, 0x24, 0x91, 0x6c, 0xb5, 0xe7, 0x34, 0xff, 0x56, 0x40, 0x4d, 0x94, 0x16, 0x21, 0xdd, 0xf1, + 0x43, 0x3b, 0xb8, 0x44, 0xd2, 0x89, 0x4c, 0x33, 0x93, 0x99, 0xd4, 0x06, 0x54, 0x7d, 0x74, 0x64, + 0x26, 0xc2, 0xcd, 0x4a, 0xe1, 0xc0, 0x47, 0x47, 0xbb, 0x91, 0x76, 0x2d, 0x58, 0x10, 0x1e, 0xa9, + 0x7e, 0x73, 0x42, 0xbf, 0xed, 0x82, 0x21, 0x02, 0x9f, 0xc6, 0xa8, 0xd0, 0x27, 0xaf, 0x63, 0x51, + 0xea, 0xa8, 0xe4, 0x75, 0xcc, 0xc9, 0xb1, 0x08, 0x6f, 0x98, 0x99, 0x03, 0xa6, 0x05, 0x5a, 0x01, + 0x7d, 0xba, 0xdb, 0xe4, 0xd1, 0xfa, 0x45, 0x81, 0xf5, 0x1d, 0xe6, 0x7e, 0x82, 0x7d, 0x6b, 0x88, + 0xbf, 0x88, 0x15, 0xec, 0x5b, 0x14, 0x75, 0xc7, 0x49, 0x7d, 0x7b, 0xd8, 0xf5, 0x2d, 0x3e, 0xa2, + 0xe8, 0xbf, 0x88, 0x74, 0x07, 0x16, 0x59, 0x1c, 0x6f, 0x32, 0xbb, 0x8f, 0x3c, 0x14, 0x3d, 0x7b, + 0xb5, 0x04, 0xdf, 0x93, 0xb0, 0x78, 0xd2, 0x12, 0x48, 0x2a, 0x55, 0x35, 0x52, 0x20, 0xdb, 0x79, + 0xf3, 0x1e, 0x6c, 0x5c, 0xbd, 0xee, 0xa4, 0xdd, 0x9f, 0x66, 0x40, 0x9f, 0xf0, 0x8d, 0xc3, 0x85, + 0xe3, 0x16, 0xb1, 0xd5, 0x37, 0xa1, 0xe4, 0x10, 0xcf, 0xc2, 0x7e, 0xfc, 0xc8, 0x84, 0x96, 0x98, + 0x0e, 0xbb, 0x6f, 0x61, 0x3f, 0xed, 0xae, 0x2c, 0xed, 0x9e, 0x93, 0x9d, 0xb7, 0xd9, 0x8b, 0xe6, + 0x0d, 0x87, 0x37, 0x9f, 0xaa, 0x32, 0x31, 0x88, 0xc5, 0xcc, 0x20, 0xb6, 0xe1, 0x86, 0x3d, 0xa2, + 0x14, 0xf9, 0xdc, 0x94, 0x0e, 0xac, 0x6f, 0x6d, 0x7c, 0x7c, 0x5f, 0x8e, 0x55, 0xd5, 0xb8, 0x1e, + 0x51, 0xa2, 0x85, 0x3d, 0x49, 0xa8, 0x1b, 0x70, 0xeb, 0x20, 0xea, 0xc2, 0xc9, 0x44, 0x94, 0x65, + 0xc4, 0x8d, 0x84, 0x9c, 0x88, 0x79, 0x1f, 0xd4, 0xfd, 0x21, 0xb1, 0x07, 0xa6, 0x3f, 0xf2, 0xf6, + 0x11, 0x35, 0x7d, 0xe2, 0xdb, 0x48, 0x0e, 0xde, 0x9c, 0xb1, 0x28, 0x99, 0x27, 0x92, 0x78, 0x22, + 0xf0, 0xe6, 0x6f, 0x33, 0xb0, 0xb8, 0xc3, 0xdc, 0x3d, 0x4e, 0x28, 0xda, 0x22, 0xf6, 0xc8, 0x43, + 0x3e, 0x7f, 0xed, 0x05, 0x84, 0x9d, 0xc9, 0x05, 0x14, 0xae, 0x00, 0x27, 0x4a, 0x1e, 0x49, 0x95, + 0xd8, 0xea, 0x4d, 0x28, 0x06, 0x94, 0x90, 0x83, 0x48, 0xaa, 0xd0, 0xc8, 0x6e, 0x94, 0xd2, 0xf4, + 0x46, 0xa1, 0x28, 0x5c, 0xba, 0xf1, 0xb6, 0x89, 0x6d, 0xb5, 0x0e, 0x10, 0x20, 0xea, 0x61, 0xc6, + 0x30, 0xf1, 0xa3, 0x7d, 0x33, 0x81, 0xa8, 0x4b, 0x30, 0xc7, 0x31, 0xa2, 0x5a, 0x45, 0x30, 0xdb, + 0x05, 0x43, 0x5a, 0x62, 0x46, 0x57, 0xa1, 0xc2, 0xb1, 0x87, 0x18, 0xb7, 0xbc, 0x40, 0x83, 0x68, + 0x40, 0x53, 0x68, 0x7a, 0x3c, 0xcb, 0x50, 0x34, 0x45, 0x70, 0xb7, 0x0a, 0x60, 0x26, 0x7e, 0xcd, + 0x07, 0xa0, 0xe5, 0x05, 0x4d, 0xd6, 0xd6, 0x6d, 0xb8, 0x16, 0xf7, 0x9d, 0xae, 0x2e, 0x88, 0xa1, + 0x9e, 0xd3, 0xfc, 0x47, 0x91, 0x1b, 0x4f, 0x46, 0x3f, 0x46, 0xe3, 0x2d, 0x44, 0xf1, 0xa1, 0xc5, + 0x45, 0xdd, 0xff, 0xfb, 0x9d, 0xd4, 0x01, 0x9c, 0x24, 0x7d, 0x74, 0x2b, 0x13, 0x48, 0xf6, 0x06, + 0x8a, 0x97, 0xdc, 0x40, 0xe9, 0xd2, 0x1b, 0x28, 0xe7, 0x6f, 0x20, 0x37, 0xea, 0x8f, 0xe1, 0xed, + 0x73, 0x1b, 0x4e, 0x34, 0x5b, 0x87, 0xeb, 0x03, 0x34, 0x36, 0xd3, 0xca, 0x52, 0xe5, 0x6a, 0x83, + 0xc9, 0x88, 0x9e, 0xb3, 0xf1, 0x7d, 0x11, 0x66, 0x77, 0x98, 0xab, 0x3e, 0x83, 0x6a, 0xe6, 0x43, + 0xa1, 0x31, 0xf5, 0x82, 0xcf, 0xbd, 0x8d, 0xf5, 0xd6, 0xab, 0x3c, 0x92, 0x7a, 0x9e, 0x02, 0x4c, + 0xbc, 0xab, 0xeb, 0xe7, 0xc5, 0xa5, 0xbc, 0xbe, 0x76, 0x39, 0x9f, 0x64, 0xb5, 0xa1, 0x96, 0x7f, + 0x67, 0xbd, 0x73, 0x71, 0x49, 0x89, 0x93, 0xfe, 0xde, 0x15, 0x9c, 0x92, 0x43, 0x7e, 0x54, 0xe0, + 0xdd, 0xab, 0xbe, 0x0c, 0x1e, 0x9c, 0x97, 0xf8, 0x8a, 0xc1, 0xfa, 0xa3, 0xd7, 0x08, 0x4e, 0xaa, + 0xfd, 0x1c, 0x16, 0xb2, 0x6b, 0x69, 0xf5, 0xbc, 0xac, 0x19, 0x17, 0xfd, 0xce, 0x2b, 0x5d, 0x92, + 0xf4, 0x43, 0x50, 0xcf, 0x19, 0xb3, 0xb5, 0x0b, 0x13, 0x64, 0xfc, 0xf4, 0xf6, 0xd5, 0xfc, 0xe2, + 0xd3, 0xf4, 0xe2, 0x97, 0xe2, 0x2b, 0xb2, 0xfb, 0xe9, 0x8b, 0x93, 0xba, 0xf2, 0xf2, 0xa4, 0xae, + 0xfc, 0x75, 0x52, 0x57, 0xbe, 0x3d, 0xad, 0x17, 0x5e, 0x9e, 0xd6, 0x0b, 0x7f, 0x9c, 0xd6, 0x0b, + 0xcf, 0xee, 0xba, 0x98, 0x8b, 0x64, 0x36, 0xf1, 0x3a, 0x61, 0x6a, 0x1f, 0xf1, 0x23, 0x42, 0x07, + 0x9d, 0xe9, 0xaf, 0x4b, 0x3e, 0x0e, 0x10, 0xdb, 0x2f, 0xc9, 0x0f, 0xe3, 0x8f, 0xfe, 0x0d, 0x00, + 0x00, 0xff, 0xff, 0xc6, 0x2e, 0x0e, 0xcb, 0xc0, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1369,29 +1452,23 @@ func (m *MsgCreateRing) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Artifact) i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } - if m.HasPssInterval { - i-- - if m.HasPssInterval { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.XPssInterval != nil { + { + size := m.XPssInterval.Size() + i -= size + if _, err := m.XPssInterval.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i-- - dAtA[i] = 0x38 - } - if m.PssInterval != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) - i-- - dAtA[i] = 0x30 } if m.Threshold != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Threshold)) @@ -1431,6 +1508,18 @@ func (m *MsgCreateRing) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgCreateRing_PssInterval) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateRing_PssInterval) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} func (m *MsgCreateRingResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1481,35 +1570,23 @@ func (m *MsgUpdateRingByAcp) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.HasPssInterval { - i-- - if m.HasPssInterval { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.XPssInterval != nil { + { + size := m.XPssInterval.Size() + i -= size + if _, err := m.XPssInterval.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i-- - dAtA[i] = 0x38 - } - if m.PssInterval != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) - i-- - dAtA[i] = 0x30 } - if m.HasNewThreshold { - i-- - if m.HasNewThreshold { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.XNewThreshold != nil { + { + size := m.XNewThreshold.Size() + i -= size + if _, err := m.XNewThreshold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i-- - dAtA[i] = 0x28 - } - if m.NewThreshold != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.NewThreshold)) - i-- - dAtA[i] = 0x20 } if len(m.NewPeerIds) > 0 { for iNdEx := len(m.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { @@ -1537,6 +1614,30 @@ func (m *MsgUpdateRingByAcp) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgUpdateRingByAcp_NewThreshold) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRingByAcp_NewThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.NewThreshold)) + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *MsgUpdateRingByAcp_PssInterval) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRingByAcp_PssInterval) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) + i-- + dAtA[i] = 0x28 + return len(dAtA) - i, nil +} func (m *MsgUpdateRingByAcpResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1731,37 +1832,23 @@ func (m *MsgStoreDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.HasTimestamp { - i-- - if m.HasTimestamp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.XTimestamp != nil { + { + size := m.XTimestamp.Size() + i -= size + if _, err := m.XTimestamp.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i-- - dAtA[i] = 0x60 - } - if m.Timestamp != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x58 } - if m.HasTier { - i-- - if m.HasTier { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.XTier != nil { + { + size := m.XTier.Size() + i -= size + if _, err := m.XTier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i-- - dAtA[i] = 0x50 - } - if len(m.Tier) > 0 { - i -= len(m.Tier) - copy(dAtA[i:], m.Tier) - i = encodeVarintTx(dAtA, i, uint64(len(m.Tier))) - i-- - dAtA[i] = 0x4a } if len(m.Permission) > 0 { i -= len(m.Permission) @@ -1822,6 +1909,32 @@ func (m *MsgStoreDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgStoreDocument_Tier) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStoreDocument_Tier) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Tier) + copy(dAtA[i:], m.Tier) + i = encodeVarintTx(dAtA, i, uint64(len(m.Tier))) + i-- + dAtA[i] = 0x4a + return len(dAtA) - i, nil +} +func (m *MsgStoreDocument_Timestamp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStoreDocument_Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x50 + return len(dAtA) - i, nil +} func (m *MsgStoreDocumentResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2016,11 +2129,8 @@ func (m *MsgCreateRing) Size() (n int) { if m.Threshold != 0 { n += 1 + sovTx(uint64(m.Threshold)) } - if m.PssInterval != 0 { - n += 1 + sovTx(uint64(m.PssInterval)) - } - if m.HasPssInterval { - n += 2 + if m.XPssInterval != nil { + n += m.XPssInterval.Size() } l = len(m.PolicyId) if l > 0 { @@ -2033,6 +2143,15 @@ func (m *MsgCreateRing) Size() (n int) { return n } +func (m *MsgCreateRing_PssInterval) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovTx(uint64(m.PssInterval)) + return n +} func (m *MsgCreateRingResponse) Size() (n int) { if m == nil { return 0 @@ -2066,21 +2185,33 @@ func (m *MsgUpdateRingByAcp) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } - if m.NewThreshold != 0 { - n += 1 + sovTx(uint64(m.NewThreshold)) + if m.XNewThreshold != nil { + n += m.XNewThreshold.Size() } - if m.HasNewThreshold { - n += 2 + if m.XPssInterval != nil { + n += m.XPssInterval.Size() } - if m.PssInterval != 0 { - n += 1 + sovTx(uint64(m.PssInterval)) + return n +} + +func (m *MsgUpdateRingByAcp_NewThreshold) Size() (n int) { + if m == nil { + return 0 } - if m.HasPssInterval { - n += 2 + var l int + _ = l + n += 1 + sovTx(uint64(m.NewThreshold)) + return n +} +func (m *MsgUpdateRingByAcp_PssInterval) Size() (n int) { + if m == nil { + return 0 } + var l int + _ = l + n += 1 + sovTx(uint64(m.PssInterval)) return n } - func (m *MsgUpdateRingByAcpResponse) Size() (n int) { if m == nil { return 0 @@ -2202,22 +2333,34 @@ func (m *MsgStoreDocument) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Tier) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if m.XTier != nil { + n += m.XTier.Size() } - if m.HasTier { - n += 2 + if m.XTimestamp != nil { + n += m.XTimestamp.Size() } - if m.Timestamp != 0 { - n += 1 + sovTx(uint64(m.Timestamp)) + return n +} + +func (m *MsgStoreDocument_Tier) Size() (n int) { + if m == nil { + return 0 } - if m.HasTimestamp { - n += 2 + var l int + _ = l + l = len(m.Tier) + n += 1 + l + sovTx(uint64(l)) + return n +} +func (m *MsgStoreDocument_Timestamp) Size() (n int) { + if m == nil { + return 0 } + var l int + _ = l + n += 1 + sovTx(uint64(m.Timestamp)) return n } - func (m *MsgStoreDocumentResponse) Size() (n int) { if m == nil { return 0 @@ -2632,7 +2775,7 @@ func (m *MsgCreateRing) Unmarshal(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } - m.PssInterval = 0 + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2642,32 +2785,13 @@ func (m *MsgCreateRing) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PssInterval |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } + m.XPssInterval = &MsgCreateRing_PssInterval{v} case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasPssInterval = bool(v != 0) - case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -2699,7 +2823,7 @@ func (m *MsgCreateRing) Unmarshal(dAtA []byte) error { } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) } @@ -2963,7 +3087,7 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } - m.NewThreshold = 0 + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2973,36 +3097,17 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NewThreshold |= uint32(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } + m.XNewThreshold = &MsgUpdateRingByAcp_NewThreshold{v} case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasNewThreshold", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasNewThreshold = bool(v != 0) - case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } - m.PssInterval = 0 + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3012,31 +3117,12 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PssInterval |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasPssInterval", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasPssInterval = bool(v != 0) + m.XPssInterval = &MsgUpdateRingByAcp_PssInterval{v} default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3950,52 +4036,13 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Tier = string(dAtA[iNdEx:postIndex]) + m.XTier = &MsgStoreDocument_Tier{string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasTier", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasTier = bool(v != 0) - case 11: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasTimestamp", wireType) - } - var v int + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4005,12 +4052,12 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.HasTimestamp = bool(v != 0) + m.XTimestamp = &MsgStoreDocument_Timestamp{v} default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From 11347719a53c9a73be3848dfb67990040a1a85bb Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Thu, 21 May 2026 10:55:57 -0400 Subject: [PATCH 5/8] update make file for proto3 --- Makefile | 11 +- api/sourcehub/orbis/document.pb.go | 224 + api/sourcehub/orbis/document.pulsar.go | 1357 ---- api/sourcehub/orbis/ring.pb.go | 222 + api/sourcehub/orbis/ring.pulsar.go | 1430 ---- api/sourcehub/orbis/tx.pb.go | 1045 +++ api/sourcehub/orbis/tx.pulsar.go | 9035 ------------------------ proto/buf.gen.orbis.optional.yaml | 22 + proto/buf.gen.pulsar.yaml | 14 +- 9 files changed, 1529 insertions(+), 11831 deletions(-) create mode 100644 api/sourcehub/orbis/document.pb.go delete mode 100644 api/sourcehub/orbis/document.pulsar.go create mode 100644 api/sourcehub/orbis/ring.pb.go delete mode 100644 api/sourcehub/orbis/ring.pulsar.go create mode 100644 api/sourcehub/orbis/tx.pb.go delete mode 100644 api/sourcehub/orbis/tx.pulsar.go create mode 100644 proto/buf.gen.orbis.optional.yaml diff --git a/Makefile b/Makefile index 6505c33f..25ac2152 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,15 @@ install: .PHONY: proto proto: - ignite generate proto-go - PATH="$$(go env GOPATH)/bin:$$PATH" buf generate proto --template proto/buf.gen.pulsar.yaml + ignite generate proto-go --yes + PATH="$$(go env GOPATH)/bin:$$PATH" buf generate proto --template proto/buf.gen.pulsar.yaml \ + --exclude-path proto/sourcehub/orbis/document.proto \ + --exclude-path proto/sourcehub/orbis/ring.proto \ + --exclude-path proto/sourcehub/orbis/tx.proto + PATH="$$(go env GOPATH)/bin:$$PATH" buf generate proto --template proto/buf.gen.orbis.optional.yaml \ + --path proto/sourcehub/orbis/document.proto \ + --path proto/sourcehub/orbis/ring.proto \ + --path proto/sourcehub/orbis/tx.proto .PHONY: test test: diff --git a/api/sourcehub/orbis/document.pb.go b/api/sourcehub/orbis/document.pb.go new file mode 100644 index 00000000..30055c01 --- /dev/null +++ b/api/sourcehub/orbis/document.pb.go @@ -0,0 +1,224 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: sourcehub/orbis/document.proto + +package orbis + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +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) +) + +// Document stores an encrypted Orbis document and its policy binding metadata. +type Document struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` + // Absent means no tier. + Tier *string `protobuf:"bytes,10,opt,name=tier,proto3,oneof" json:"tier,omitempty"` + // Absent means no timestamp. + Timestamp *uint64 `protobuf:"varint,11,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Document) Reset() { + *x = Document{} + mi := &file_sourcehub_orbis_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Document) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Document) ProtoMessage() {} + +func (x *Document) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_document_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Document.ProtoReflect.Descriptor instead. +func (*Document) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_document_proto_rawDescGZIP(), []int{0} +} + +func (x *Document) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Document) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Document) GetCreatorDid() string { + if x != nil { + return x.CreatorDid + } + return "" +} + +func (x *Document) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *Document) GetDocument() string { + if x != nil { + return x.Document + } + return "" +} + +func (x *Document) GetProof() string { + if x != nil { + return x.Proof + } + return "" +} + +func (x *Document) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *Document) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *Document) GetPermission() string { + if x != nil { + return x.Permission + } + return "" +} + +func (x *Document) GetTier() string { + if x != nil && x.Tier != nil { + return *x.Tier + } + return "" +} + +func (x *Document) GetTimestamp() uint64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp + } + return 0 +} + +var File_sourcehub_orbis_document_proto protoreflect.FileDescriptor + +const file_sourcehub_orbis_document_proto_rawDesc = "" + + "\n" + + "\x1esourcehub/orbis/document.proto\x12\x0fsourcehub.orbis\"\xd0\x02\n" + + "\bDocument\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x1f\n" + + "\vcreator_did\x18\x03 \x01(\tR\n" + + "creatorDid\x12\x17\n" + + "\aring_id\x18\x04 \x01(\tR\x06ringId\x12\x1a\n" + + "\bdocument\x18\x05 \x01(\tR\bdocument\x12\x14\n" + + "\x05proof\x18\x06 \x01(\tR\x05proof\x12\x1b\n" + + "\tpolicy_id\x18\a \x01(\tR\bpolicyId\x12\x1a\n" + + "\bresource\x18\b \x01(\tR\bresource\x12\x1e\n" + + "\n" + + "permission\x18\t \x01(\tR\n" + + "permission\x12\x17\n" + + "\x04tier\x18\n" + + " \x01(\tH\x00R\x04tier\x88\x01\x01\x12!\n" + + "\ttimestamp\x18\v \x01(\x04H\x01R\ttimestamp\x88\x01\x01B\a\n" + + "\x05_tierB\f\n" + + "\n" + + "_timestampB\xa3\x01\n" + + "\x13com.sourcehub.orbisB\rDocumentProtoP\x01Z cosmossdk.io/api/sourcehub/orbis\xa2\x02\x03SOX\xaa\x02\x0fSourcehub.Orbis\xca\x02\x0fSourcehub\\Orbis\xe2\x02\x1bSourcehub\\Orbis\\GPBMetadata\xea\x02\x10Sourcehub::Orbisb\x06proto3" + +var ( + file_sourcehub_orbis_document_proto_rawDescOnce sync.Once + file_sourcehub_orbis_document_proto_rawDescData []byte +) + +func file_sourcehub_orbis_document_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_document_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_document_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_sourcehub_orbis_document_proto_rawDesc), len(file_sourcehub_orbis_document_proto_rawDesc))) + }) + return file_sourcehub_orbis_document_proto_rawDescData +} + +var file_sourcehub_orbis_document_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sourcehub_orbis_document_proto_goTypes = []any{ + (*Document)(nil), // 0: sourcehub.orbis.Document +} +var file_sourcehub_orbis_document_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_sourcehub_orbis_document_proto_init() } +func file_sourcehub_orbis_document_proto_init() { + if File_sourcehub_orbis_document_proto != nil { + return + } + file_sourcehub_orbis_document_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_sourcehub_orbis_document_proto_rawDesc), len(file_sourcehub_orbis_document_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_document_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_document_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_document_proto_msgTypes, + }.Build() + File_sourcehub_orbis_document_proto = out.File + file_sourcehub_orbis_document_proto_goTypes = nil + file_sourcehub_orbis_document_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/document.pulsar.go b/api/sourcehub/orbis/document.pulsar.go deleted file mode 100644 index 800a1025..00000000 --- a/api/sourcehub/orbis/document.pulsar.go +++ /dev/null @@ -1,1357 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package orbis - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Document protoreflect.MessageDescriptor - fd_Document_id protoreflect.FieldDescriptor - fd_Document_namespace protoreflect.FieldDescriptor - fd_Document_creator_did protoreflect.FieldDescriptor - fd_Document_ring_id protoreflect.FieldDescriptor - fd_Document_document protoreflect.FieldDescriptor - fd_Document_proof protoreflect.FieldDescriptor - fd_Document_policy_id protoreflect.FieldDescriptor - fd_Document_resource protoreflect.FieldDescriptor - fd_Document_permission protoreflect.FieldDescriptor - fd_Document_tier protoreflect.FieldDescriptor - fd_Document_timestamp protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_document_proto_init() - md_Document = File_sourcehub_orbis_document_proto.Messages().ByName("Document") - fd_Document_id = md_Document.Fields().ByName("id") - fd_Document_namespace = md_Document.Fields().ByName("namespace") - fd_Document_creator_did = md_Document.Fields().ByName("creator_did") - fd_Document_ring_id = md_Document.Fields().ByName("ring_id") - fd_Document_document = md_Document.Fields().ByName("document") - fd_Document_proof = md_Document.Fields().ByName("proof") - fd_Document_policy_id = md_Document.Fields().ByName("policy_id") - fd_Document_resource = md_Document.Fields().ByName("resource") - fd_Document_permission = md_Document.Fields().ByName("permission") - fd_Document_tier = md_Document.Fields().ByName("tier") - fd_Document_timestamp = md_Document.Fields().ByName("timestamp") -} - -var _ protoreflect.Message = (*fastReflection_Document)(nil) - -type fastReflection_Document Document - -func (x *Document) ProtoReflect() protoreflect.Message { - return (*fastReflection_Document)(x) -} - -func (x *Document) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_document_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_Document_messageType fastReflection_Document_messageType -var _ protoreflect.MessageType = fastReflection_Document_messageType{} - -type fastReflection_Document_messageType struct{} - -func (x fastReflection_Document_messageType) Zero() protoreflect.Message { - return (*fastReflection_Document)(nil) -} -func (x fastReflection_Document_messageType) New() protoreflect.Message { - return new(fastReflection_Document) -} -func (x fastReflection_Document_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Document -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Document) Descriptor() protoreflect.MessageDescriptor { - return md_Document -} - -// 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_Document) Type() protoreflect.MessageType { - return _fastReflection_Document_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Document) New() protoreflect.Message { - return new(fastReflection_Document) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Document) Interface() protoreflect.ProtoMessage { - return (*Document)(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_Document) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Document_id, value) { - return - } - } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_Document_namespace, value) { - return - } - } - if x.CreatorDid != "" { - value := protoreflect.ValueOfString(x.CreatorDid) - if !f(fd_Document_creator_did, value) { - return - } - } - if x.RingId != "" { - value := protoreflect.ValueOfString(x.RingId) - if !f(fd_Document_ring_id, value) { - return - } - } - if x.Document != "" { - value := protoreflect.ValueOfString(x.Document) - if !f(fd_Document_document, value) { - return - } - } - if x.Proof != "" { - value := protoreflect.ValueOfString(x.Proof) - if !f(fd_Document_proof, value) { - return - } - } - if x.PolicyId != "" { - value := protoreflect.ValueOfString(x.PolicyId) - if !f(fd_Document_policy_id, value) { - return - } - } - if x.Resource != "" { - value := protoreflect.ValueOfString(x.Resource) - if !f(fd_Document_resource, value) { - return - } - } - if x.Permission != "" { - value := protoreflect.ValueOfString(x.Permission) - if !f(fd_Document_permission, value) { - return - } - } - if x.XTier != nil { - switch o := x.XTier.(type) { - case *Document_Tier: - v := o.Tier - value := protoreflect.ValueOfString(v) - if !f(fd_Document_tier, value) { - return - } - } - } - if x.XTimestamp != nil { - switch o := x.XTimestamp.(type) { - case *Document_Timestamp: - v := o.Timestamp - value := protoreflect.ValueOfUint64(v) - if !f(fd_Document_timestamp, 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_Document) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.Document.id": - return x.Id != "" - case "sourcehub.orbis.Document.namespace": - return x.Namespace != "" - case "sourcehub.orbis.Document.creator_did": - return x.CreatorDid != "" - case "sourcehub.orbis.Document.ring_id": - return x.RingId != "" - case "sourcehub.orbis.Document.document": - return x.Document != "" - case "sourcehub.orbis.Document.proof": - return x.Proof != "" - case "sourcehub.orbis.Document.policy_id": - return x.PolicyId != "" - case "sourcehub.orbis.Document.resource": - return x.Resource != "" - case "sourcehub.orbis.Document.permission": - return x.Permission != "" - case "sourcehub.orbis.Document.tier": - if x.XTier == nil { - return false - } else if _, ok := x.XTier.(*Document_Tier); ok { - return true - } else { - return false - } - case "sourcehub.orbis.Document.timestamp": - if x.XTimestamp == nil { - return false - } else if _, ok := x.XTimestamp.(*Document_Timestamp); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) - } - panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.Document.id": - x.Id = "" - case "sourcehub.orbis.Document.namespace": - x.Namespace = "" - case "sourcehub.orbis.Document.creator_did": - x.CreatorDid = "" - case "sourcehub.orbis.Document.ring_id": - x.RingId = "" - case "sourcehub.orbis.Document.document": - x.Document = "" - case "sourcehub.orbis.Document.proof": - x.Proof = "" - case "sourcehub.orbis.Document.policy_id": - x.PolicyId = "" - case "sourcehub.orbis.Document.resource": - x.Resource = "" - case "sourcehub.orbis.Document.permission": - x.Permission = "" - case "sourcehub.orbis.Document.tier": - x.XTier = nil - case "sourcehub.orbis.Document.timestamp": - x.XTimestamp = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) - } - panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.Document.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.creator_did": - value := x.CreatorDid - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.ring_id": - value := x.RingId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.document": - value := x.Document - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.proof": - value := x.Proof - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.policy_id": - value := x.PolicyId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.resource": - value := x.Resource - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.permission": - value := x.Permission - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Document.tier": - if x.XTier == nil { - return protoreflect.ValueOfString("") - } else if v, ok := x.XTier.(*Document_Tier); ok { - return protoreflect.ValueOfString(v.Tier) - } else { - return protoreflect.ValueOfString("") - } - case "sourcehub.orbis.Document.timestamp": - if x.XTimestamp == nil { - return protoreflect.ValueOfUint64(uint64(0)) - } else if v, ok := x.XTimestamp.(*Document_Timestamp); ok { - return protoreflect.ValueOfUint64(v.Timestamp) - } else { - return protoreflect.ValueOfUint64(uint64(0)) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) - } - panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.Document.id": - x.Id = value.Interface().(string) - case "sourcehub.orbis.Document.namespace": - x.Namespace = value.Interface().(string) - case "sourcehub.orbis.Document.creator_did": - x.CreatorDid = value.Interface().(string) - case "sourcehub.orbis.Document.ring_id": - x.RingId = value.Interface().(string) - case "sourcehub.orbis.Document.document": - x.Document = value.Interface().(string) - case "sourcehub.orbis.Document.proof": - x.Proof = value.Interface().(string) - case "sourcehub.orbis.Document.policy_id": - x.PolicyId = value.Interface().(string) - case "sourcehub.orbis.Document.resource": - x.Resource = value.Interface().(string) - case "sourcehub.orbis.Document.permission": - x.Permission = value.Interface().(string) - case "sourcehub.orbis.Document.tier": - cv := value.Interface().(string) - x.XTier = &Document_Tier{Tier: cv} - case "sourcehub.orbis.Document.timestamp": - cv := value.Uint() - x.XTimestamp = &Document_Timestamp{Timestamp: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) - } - panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.Document.id": - panic(fmt.Errorf("field id of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.creator_did": - panic(fmt.Errorf("field creator_did of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.ring_id": - panic(fmt.Errorf("field ring_id of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.document": - panic(fmt.Errorf("field document of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.proof": - panic(fmt.Errorf("field proof of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.policy_id": - panic(fmt.Errorf("field policy_id of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.resource": - panic(fmt.Errorf("field resource of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.permission": - panic(fmt.Errorf("field permission of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.tier": - panic(fmt.Errorf("field tier of message sourcehub.orbis.Document is not mutable")) - case "sourcehub.orbis.Document.timestamp": - panic(fmt.Errorf("field timestamp of message sourcehub.orbis.Document is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) - } - panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.Document.id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.namespace": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.creator_did": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.ring_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.document": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.proof": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.policy_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.resource": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.permission": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.tier": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Document.timestamp": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Document")) - } - panic(fmt.Errorf("message sourcehub.orbis.Document 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_Document) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "sourcehub.orbis.Document._tier": - if x.XTier == nil { - return nil - } - switch x.XTier.(type) { - case *Document_Tier: - return x.Descriptor().Fields().ByName("tier") - } - case "sourcehub.orbis.Document._timestamp": - if x.XTimestamp == nil { - return nil - } - switch x.XTimestamp.(type) { - case *Document_Timestamp: - return x.Descriptor().Fields().ByName("timestamp") - } - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.Document", 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_Document) 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_Document) 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_Document) 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_Document) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Document) - 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.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CreatorDid) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Document) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Proof) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PolicyId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Resource) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Permission) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Tier != nil { - l = len(*x.Tier) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Timestamp != nil { - n += 1 + runtime.Sov(uint64(*x.Timestamp)) - } - 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().(*Document) - 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) - } - switch x := x.XTimestamp.(type) { - case *Document_Timestamp: - i = runtime.EncodeVarint(dAtA, i, uint64(*x.Timestamp)) - i-- - dAtA[i] = 0x58 - } - switch x := x.XTier.(type) { - case *Document_Tier: - i -= len(*x.Tier) - copy(dAtA[i:], *x.Tier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(*x.Tier))) - i-- - dAtA[i] = 0x52 - } - if x.Timestamp != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.Timestamp)) - i-- - dAtA[i] = 0x58 - } - if x.Tier != nil { - i -= len(*x.Tier) - copy(dAtA[i:], *x.Tier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(*x.Tier))) - i-- - dAtA[i] = 0x52 - } - if len(x.Permission) > 0 { - i -= len(x.Permission) - copy(dAtA[i:], x.Permission) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permission))) - i-- - dAtA[i] = 0x4a - } - if len(x.Resource) > 0 { - i -= len(x.Resource) - copy(dAtA[i:], x.Resource) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resource))) - i-- - dAtA[i] = 0x42 - } - if len(x.PolicyId) > 0 { - i -= len(x.PolicyId) - copy(dAtA[i:], x.PolicyId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) - i-- - dAtA[i] = 0x3a - } - if len(x.Proof) > 0 { - i -= len(x.Proof) - copy(dAtA[i:], x.Proof) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) - i-- - dAtA[i] = 0x32 - } - if len(x.Document) > 0 { - i -= len(x.Document) - copy(dAtA[i:], x.Document) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Document))) - i-- - dAtA[i] = 0x2a - } - if len(x.RingId) > 0 { - i -= len(x.RingId) - copy(dAtA[i:], x.RingId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) - i-- - dAtA[i] = 0x22 - } - if len(x.CreatorDid) > 0 { - i -= len(x.CreatorDid) - copy(dAtA[i:], x.CreatorDid) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) - i-- - dAtA[i] = 0x1a - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - 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 { - 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().(*Document) - 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: Document: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: 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 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 Namespace", 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.Namespace = 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 CreatorDid", 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.CreatorDid = 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 RingId", 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.RingId = 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 Document", 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.Document = 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 Proof", 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.Proof = 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 PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resource", 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.Resource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permission", 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.Permission = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tier", 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 - } - s := string(dAtA[iNdEx:postIndex]) - x.Tier = &s - iNdEx = postIndex - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Timestamp = &v - 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: sourcehub/orbis/document.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) -) - -// Document stores an encrypted Orbis document and its policy binding metadata. -type Document struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` - // Absent means no tier. - Tier *string `protobuf:"bytes,10,opt,name=tier,proto3,oneof" json:"tier,omitempty"` - // Absent means no timestamp. - Timestamp *uint64 `protobuf:"varint,11,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` -} - -func (x *Document) Reset() { - *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_document_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Document) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Document) ProtoMessage() {} - -// Deprecated: Use Document.ProtoReflect.Descriptor instead. -func (*Document) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_document_proto_rawDescGZIP(), []int{0} -} - -func (x *Document) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Document) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *Document) GetCreatorDid() string { - if x != nil { - return x.CreatorDid - } - return "" -} - -func (x *Document) GetRingId() string { - if x != nil { - return x.RingId - } - return "" -} - -func (x *Document) GetDocument() string { - if x != nil { - return x.Document - } - return "" -} - -func (x *Document) GetProof() string { - if x != nil { - return x.Proof - } - return "" -} - -func (x *Document) GetPolicyId() string { - if x != nil { - return x.PolicyId - } - return "" -} - -func (x *Document) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *Document) GetPermission() string { - if x != nil { - return x.Permission - } - return "" -} - -func (x *Document) GetTier() string { - if x != nil && x.Tier != nil { - return *x.Tier - } - return "" -} - -func (x *Document) GetTimestamp() uint64 { - if x != nil && x.Timestamp != nil { - return *x.Timestamp - } - return 0 -} - -var File_sourcehub_orbis_document_proto protoreflect.FileDescriptor - -var file_sourcehub_orbis_document_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x17, 0x0a, - 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x04, 0x74, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0xa3, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0d, 0x44, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, - 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_sourcehub_orbis_document_proto_rawDescOnce sync.Once - file_sourcehub_orbis_document_proto_rawDescData = file_sourcehub_orbis_document_proto_rawDesc -) - -func file_sourcehub_orbis_document_proto_rawDescGZIP() []byte { - file_sourcehub_orbis_document_proto_rawDescOnce.Do(func() { - file_sourcehub_orbis_document_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_document_proto_rawDescData) - }) - return file_sourcehub_orbis_document_proto_rawDescData -} - -var file_sourcehub_orbis_document_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_sourcehub_orbis_document_proto_goTypes = []interface{}{ - (*Document)(nil), // 0: sourcehub.orbis.Document -} -var file_sourcehub_orbis_document_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_sourcehub_orbis_document_proto_init() } -func file_sourcehub_orbis_document_proto_init() { - if File_sourcehub_orbis_document_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sourcehub_orbis_document_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_sourcehub_orbis_document_proto_msgTypes[0].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sourcehub_orbis_document_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_sourcehub_orbis_document_proto_goTypes, - DependencyIndexes: file_sourcehub_orbis_document_proto_depIdxs, - MessageInfos: file_sourcehub_orbis_document_proto_msgTypes, - }.Build() - File_sourcehub_orbis_document_proto = out.File - file_sourcehub_orbis_document_proto_rawDesc = nil - file_sourcehub_orbis_document_proto_goTypes = nil - file_sourcehub_orbis_document_proto_depIdxs = nil -} diff --git a/api/sourcehub/orbis/ring.pb.go b/api/sourcehub/orbis/ring.pb.go new file mode 100644 index 00000000..78230ed5 --- /dev/null +++ b/api/sourcehub/orbis/ring.pb.go @@ -0,0 +1,222 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: sourcehub/orbis/ring.proto + +package orbis + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +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) +) + +// Ring stores the active and pending committee metadata for an Orbis ring. +type Ring struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` + NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + // Absent means no pending threshold update. + NewThreshold *uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` + // Absent means automatic PSS refresh is disabled. + PssInterval *uint64 `protobuf:"varint,9,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,10,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + PolicyId string `protobuf:"bytes,11,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Ring) Reset() { + *x = Ring{} + mi := &file_sourcehub_orbis_ring_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Ring) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ring) ProtoMessage() {} + +func (x *Ring) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_ring_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ring.ProtoReflect.Descriptor instead. +func (*Ring) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_ring_proto_rawDescGZIP(), []int{0} +} + +func (x *Ring) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Ring) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Ring) GetCreatorDid() string { + if x != nil { + return x.CreatorDid + } + return "" +} + +func (x *Ring) GetRingPk() string { + if x != nil { + return x.RingPk + } + return "" +} + +func (x *Ring) GetPeerIds() []string { + if x != nil { + return x.PeerIds + } + return nil +} + +func (x *Ring) GetThreshold() uint32 { + if x != nil { + return x.Threshold + } + return 0 +} + +func (x *Ring) GetNewPeerIds() []string { + if x != nil { + return x.NewPeerIds + } + return nil +} + +func (x *Ring) GetNewThreshold() uint32 { + if x != nil && x.NewThreshold != nil { + return *x.NewThreshold + } + return 0 +} + +func (x *Ring) GetPssInterval() uint64 { + if x != nil && x.PssInterval != nil { + return *x.PssInterval + } + return 0 +} + +func (x *Ring) GetBlockNumberNonce() uint64 { + if x != nil { + return x.BlockNumberNonce + } + return 0 +} + +func (x *Ring) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +var File_sourcehub_orbis_ring_proto protoreflect.FileDescriptor + +const file_sourcehub_orbis_ring_proto_rawDesc = "" + + "\n" + + "\x1asourcehub/orbis/ring.proto\x12\x0fsourcehub.orbis\"\x89\x03\n" + + "\x04Ring\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x1f\n" + + "\vcreator_did\x18\x03 \x01(\tR\n" + + "creatorDid\x12\x17\n" + + "\aring_pk\x18\x04 \x01(\tR\x06ringPk\x12\x19\n" + + "\bpeer_ids\x18\x05 \x03(\tR\apeerIds\x12\x1c\n" + + "\tthreshold\x18\x06 \x01(\rR\tthreshold\x12 \n" + + "\fnew_peer_ids\x18\a \x03(\tR\n" + + "newPeerIds\x12(\n" + + "\rnew_threshold\x18\b \x01(\rH\x00R\fnewThreshold\x88\x01\x01\x12&\n" + + "\fpss_interval\x18\t \x01(\x04H\x01R\vpssInterval\x88\x01\x01\x12,\n" + + "\x12block_number_nonce\x18\n" + + " \x01(\x04R\x10blockNumberNonce\x12\x1b\n" + + "\tpolicy_id\x18\v \x01(\tR\bpolicyIdB\x10\n" + + "\x0e_new_thresholdB\x0f\n" + + "\r_pss_intervalB\x9f\x01\n" + + "\x13com.sourcehub.orbisB\tRingProtoP\x01Z cosmossdk.io/api/sourcehub/orbis\xa2\x02\x03SOX\xaa\x02\x0fSourcehub.Orbis\xca\x02\x0fSourcehub\\Orbis\xe2\x02\x1bSourcehub\\Orbis\\GPBMetadata\xea\x02\x10Sourcehub::Orbisb\x06proto3" + +var ( + file_sourcehub_orbis_ring_proto_rawDescOnce sync.Once + file_sourcehub_orbis_ring_proto_rawDescData []byte +) + +func file_sourcehub_orbis_ring_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_ring_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_ring_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_sourcehub_orbis_ring_proto_rawDesc), len(file_sourcehub_orbis_ring_proto_rawDesc))) + }) + return file_sourcehub_orbis_ring_proto_rawDescData +} + +var file_sourcehub_orbis_ring_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sourcehub_orbis_ring_proto_goTypes = []any{ + (*Ring)(nil), // 0: sourcehub.orbis.Ring +} +var file_sourcehub_orbis_ring_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_sourcehub_orbis_ring_proto_init() } +func file_sourcehub_orbis_ring_proto_init() { + if File_sourcehub_orbis_ring_proto != nil { + return + } + file_sourcehub_orbis_ring_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_sourcehub_orbis_ring_proto_rawDesc), len(file_sourcehub_orbis_ring_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_ring_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_ring_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_ring_proto_msgTypes, + }.Build() + File_sourcehub_orbis_ring_proto = out.File + file_sourcehub_orbis_ring_proto_goTypes = nil + file_sourcehub_orbis_ring_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/ring.pulsar.go b/api/sourcehub/orbis/ring.pulsar.go deleted file mode 100644 index b1e03151..00000000 --- a/api/sourcehub/orbis/ring.pulsar.go +++ /dev/null @@ -1,1430 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package orbis - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_Ring_5_list)(nil) - -type _Ring_5_list struct { - list *[]string -} - -func (x *_Ring_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Ring_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Ring_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Ring_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Ring_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Ring at list field PeerIds as it is not of Message kind")) -} - -func (x *_Ring_5_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Ring_5_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Ring_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Ring_7_list)(nil) - -type _Ring_7_list struct { - list *[]string -} - -func (x *_Ring_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Ring_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Ring_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Ring_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Ring_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Ring at list field NewPeerIds as it is not of Message kind")) -} - -func (x *_Ring_7_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Ring_7_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Ring_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Ring protoreflect.MessageDescriptor - fd_Ring_id protoreflect.FieldDescriptor - fd_Ring_namespace protoreflect.FieldDescriptor - fd_Ring_creator_did protoreflect.FieldDescriptor - fd_Ring_ring_pk protoreflect.FieldDescriptor - fd_Ring_peer_ids protoreflect.FieldDescriptor - fd_Ring_threshold protoreflect.FieldDescriptor - fd_Ring_new_peer_ids protoreflect.FieldDescriptor - fd_Ring_new_threshold protoreflect.FieldDescriptor - fd_Ring_pss_interval protoreflect.FieldDescriptor - fd_Ring_block_number_nonce protoreflect.FieldDescriptor - fd_Ring_policy_id protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_ring_proto_init() - md_Ring = File_sourcehub_orbis_ring_proto.Messages().ByName("Ring") - fd_Ring_id = md_Ring.Fields().ByName("id") - fd_Ring_namespace = md_Ring.Fields().ByName("namespace") - fd_Ring_creator_did = md_Ring.Fields().ByName("creator_did") - fd_Ring_ring_pk = md_Ring.Fields().ByName("ring_pk") - fd_Ring_peer_ids = md_Ring.Fields().ByName("peer_ids") - fd_Ring_threshold = md_Ring.Fields().ByName("threshold") - fd_Ring_new_peer_ids = md_Ring.Fields().ByName("new_peer_ids") - fd_Ring_new_threshold = md_Ring.Fields().ByName("new_threshold") - fd_Ring_pss_interval = md_Ring.Fields().ByName("pss_interval") - fd_Ring_block_number_nonce = md_Ring.Fields().ByName("block_number_nonce") - fd_Ring_policy_id = md_Ring.Fields().ByName("policy_id") -} - -var _ protoreflect.Message = (*fastReflection_Ring)(nil) - -type fastReflection_Ring Ring - -func (x *Ring) ProtoReflect() protoreflect.Message { - return (*fastReflection_Ring)(x) -} - -func (x *Ring) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_ring_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_Ring_messageType fastReflection_Ring_messageType -var _ protoreflect.MessageType = fastReflection_Ring_messageType{} - -type fastReflection_Ring_messageType struct{} - -func (x fastReflection_Ring_messageType) Zero() protoreflect.Message { - return (*fastReflection_Ring)(nil) -} -func (x fastReflection_Ring_messageType) New() protoreflect.Message { - return new(fastReflection_Ring) -} -func (x fastReflection_Ring_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Ring -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Ring) Descriptor() protoreflect.MessageDescriptor { - return md_Ring -} - -// 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_Ring) Type() protoreflect.MessageType { - return _fastReflection_Ring_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Ring) New() protoreflect.Message { - return new(fastReflection_Ring) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Ring) Interface() protoreflect.ProtoMessage { - return (*Ring)(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_Ring) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Ring_id, value) { - return - } - } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_Ring_namespace, value) { - return - } - } - if x.CreatorDid != "" { - value := protoreflect.ValueOfString(x.CreatorDid) - if !f(fd_Ring_creator_did, value) { - return - } - } - if x.RingPk != "" { - value := protoreflect.ValueOfString(x.RingPk) - if !f(fd_Ring_ring_pk, value) { - return - } - } - if len(x.PeerIds) != 0 { - value := protoreflect.ValueOfList(&_Ring_5_list{list: &x.PeerIds}) - if !f(fd_Ring_peer_ids, value) { - return - } - } - if x.Threshold != uint32(0) { - value := protoreflect.ValueOfUint32(x.Threshold) - if !f(fd_Ring_threshold, value) { - return - } - } - if len(x.NewPeerIds) != 0 { - value := protoreflect.ValueOfList(&_Ring_7_list{list: &x.NewPeerIds}) - if !f(fd_Ring_new_peer_ids, value) { - return - } - } - if x.XNewThreshold != nil { - switch o := x.XNewThreshold.(type) { - case *Ring_NewThreshold: - v := o.NewThreshold - value := protoreflect.ValueOfUint32(v) - if !f(fd_Ring_new_threshold, value) { - return - } - } - } - if x.XPssInterval != nil { - switch o := x.XPssInterval.(type) { - case *Ring_PssInterval: - v := o.PssInterval - value := protoreflect.ValueOfUint64(v) - if !f(fd_Ring_pss_interval, value) { - return - } - } - } - if x.BlockNumberNonce != uint64(0) { - value := protoreflect.ValueOfUint64(x.BlockNumberNonce) - if !f(fd_Ring_block_number_nonce, value) { - return - } - } - if x.PolicyId != "" { - value := protoreflect.ValueOfString(x.PolicyId) - if !f(fd_Ring_policy_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_Ring) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.Ring.id": - return x.Id != "" - case "sourcehub.orbis.Ring.namespace": - return x.Namespace != "" - case "sourcehub.orbis.Ring.creator_did": - return x.CreatorDid != "" - case "sourcehub.orbis.Ring.ring_pk": - return x.RingPk != "" - case "sourcehub.orbis.Ring.peer_ids": - return len(x.PeerIds) != 0 - case "sourcehub.orbis.Ring.threshold": - return x.Threshold != uint32(0) - case "sourcehub.orbis.Ring.new_peer_ids": - return len(x.NewPeerIds) != 0 - case "sourcehub.orbis.Ring.new_threshold": - if x.XNewThreshold == nil { - return false - } else if _, ok := x.XNewThreshold.(*Ring_NewThreshold); ok { - return true - } else { - return false - } - case "sourcehub.orbis.Ring.pss_interval": - if x.XPssInterval == nil { - return false - } else if _, ok := x.XPssInterval.(*Ring_PssInterval); ok { - return true - } else { - return false - } - case "sourcehub.orbis.Ring.block_number_nonce": - return x.BlockNumberNonce != uint64(0) - case "sourcehub.orbis.Ring.policy_id": - return x.PolicyId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) - } - panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.Ring.id": - x.Id = "" - case "sourcehub.orbis.Ring.namespace": - x.Namespace = "" - case "sourcehub.orbis.Ring.creator_did": - x.CreatorDid = "" - case "sourcehub.orbis.Ring.ring_pk": - x.RingPk = "" - case "sourcehub.orbis.Ring.peer_ids": - x.PeerIds = nil - case "sourcehub.orbis.Ring.threshold": - x.Threshold = uint32(0) - case "sourcehub.orbis.Ring.new_peer_ids": - x.NewPeerIds = nil - case "sourcehub.orbis.Ring.new_threshold": - x.XNewThreshold = nil - case "sourcehub.orbis.Ring.pss_interval": - x.XPssInterval = nil - case "sourcehub.orbis.Ring.block_number_nonce": - x.BlockNumberNonce = uint64(0) - case "sourcehub.orbis.Ring.policy_id": - x.PolicyId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) - } - panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.Ring.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Ring.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Ring.creator_did": - value := x.CreatorDid - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Ring.ring_pk": - value := x.RingPk - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.Ring.peer_ids": - if len(x.PeerIds) == 0 { - return protoreflect.ValueOfList(&_Ring_5_list{}) - } - listValue := &_Ring_5_list{list: &x.PeerIds} - return protoreflect.ValueOfList(listValue) - case "sourcehub.orbis.Ring.threshold": - value := x.Threshold - return protoreflect.ValueOfUint32(value) - case "sourcehub.orbis.Ring.new_peer_ids": - if len(x.NewPeerIds) == 0 { - return protoreflect.ValueOfList(&_Ring_7_list{}) - } - listValue := &_Ring_7_list{list: &x.NewPeerIds} - return protoreflect.ValueOfList(listValue) - case "sourcehub.orbis.Ring.new_threshold": - if x.XNewThreshold == nil { - return protoreflect.ValueOfUint32(uint32(0)) - } else if v, ok := x.XNewThreshold.(*Ring_NewThreshold); ok { - return protoreflect.ValueOfUint32(v.NewThreshold) - } else { - return protoreflect.ValueOfUint32(uint32(0)) - } - case "sourcehub.orbis.Ring.pss_interval": - if x.XPssInterval == nil { - return protoreflect.ValueOfUint64(uint64(0)) - } else if v, ok := x.XPssInterval.(*Ring_PssInterval); ok { - return protoreflect.ValueOfUint64(v.PssInterval) - } else { - return protoreflect.ValueOfUint64(uint64(0)) - } - case "sourcehub.orbis.Ring.block_number_nonce": - value := x.BlockNumberNonce - return protoreflect.ValueOfUint64(value) - case "sourcehub.orbis.Ring.policy_id": - value := x.PolicyId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) - } - panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.Ring.id": - x.Id = value.Interface().(string) - case "sourcehub.orbis.Ring.namespace": - x.Namespace = value.Interface().(string) - case "sourcehub.orbis.Ring.creator_did": - x.CreatorDid = value.Interface().(string) - case "sourcehub.orbis.Ring.ring_pk": - x.RingPk = value.Interface().(string) - case "sourcehub.orbis.Ring.peer_ids": - lv := value.List() - clv := lv.(*_Ring_5_list) - x.PeerIds = *clv.list - case "sourcehub.orbis.Ring.threshold": - x.Threshold = uint32(value.Uint()) - case "sourcehub.orbis.Ring.new_peer_ids": - lv := value.List() - clv := lv.(*_Ring_7_list) - x.NewPeerIds = *clv.list - case "sourcehub.orbis.Ring.new_threshold": - cv := uint32(value.Uint()) - x.XNewThreshold = &Ring_NewThreshold{NewThreshold: cv} - case "sourcehub.orbis.Ring.pss_interval": - cv := value.Uint() - x.XPssInterval = &Ring_PssInterval{PssInterval: cv} - case "sourcehub.orbis.Ring.block_number_nonce": - x.BlockNumberNonce = value.Uint() - case "sourcehub.orbis.Ring.policy_id": - x.PolicyId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) - } - panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.Ring.peer_ids": - if x.PeerIds == nil { - x.PeerIds = []string{} - } - value := &_Ring_5_list{list: &x.PeerIds} - return protoreflect.ValueOfList(value) - case "sourcehub.orbis.Ring.new_peer_ids": - if x.NewPeerIds == nil { - x.NewPeerIds = []string{} - } - value := &_Ring_7_list{list: &x.NewPeerIds} - return protoreflect.ValueOfList(value) - case "sourcehub.orbis.Ring.id": - panic(fmt.Errorf("field id of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.creator_did": - panic(fmt.Errorf("field creator_did of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.ring_pk": - panic(fmt.Errorf("field ring_pk of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.threshold": - panic(fmt.Errorf("field threshold of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.new_threshold": - panic(fmt.Errorf("field new_threshold of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.pss_interval": - panic(fmt.Errorf("field pss_interval of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.block_number_nonce": - panic(fmt.Errorf("field block_number_nonce of message sourcehub.orbis.Ring is not mutable")) - case "sourcehub.orbis.Ring.policy_id": - panic(fmt.Errorf("field policy_id of message sourcehub.orbis.Ring is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) - } - panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.Ring.id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Ring.namespace": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Ring.creator_did": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Ring.ring_pk": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.Ring.peer_ids": - list := []string{} - return protoreflect.ValueOfList(&_Ring_5_list{list: &list}) - case "sourcehub.orbis.Ring.threshold": - return protoreflect.ValueOfUint32(uint32(0)) - case "sourcehub.orbis.Ring.new_peer_ids": - list := []string{} - return protoreflect.ValueOfList(&_Ring_7_list{list: &list}) - case "sourcehub.orbis.Ring.new_threshold": - return protoreflect.ValueOfUint32(uint32(0)) - case "sourcehub.orbis.Ring.pss_interval": - return protoreflect.ValueOfUint64(uint64(0)) - case "sourcehub.orbis.Ring.block_number_nonce": - return protoreflect.ValueOfUint64(uint64(0)) - case "sourcehub.orbis.Ring.policy_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.Ring")) - } - panic(fmt.Errorf("message sourcehub.orbis.Ring 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_Ring) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "sourcehub.orbis.Ring._new_threshold": - if x.XNewThreshold == nil { - return nil - } - switch x.XNewThreshold.(type) { - case *Ring_NewThreshold: - return x.Descriptor().Fields().ByName("new_threshold") - } - case "sourcehub.orbis.Ring._pss_interval": - if x.XPssInterval == nil { - return nil - } - switch x.XPssInterval.(type) { - case *Ring_PssInterval: - return x.Descriptor().Fields().ByName("pss_interval") - } - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.Ring", 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_Ring) 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_Ring) 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_Ring) 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_Ring) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Ring) - 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.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CreatorDid) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingPk) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.PeerIds) > 0 { - for _, s := range x.PeerIds { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Threshold != 0 { - n += 1 + runtime.Sov(uint64(x.Threshold)) - } - if len(x.NewPeerIds) > 0 { - for _, s := range x.NewPeerIds { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.NewThreshold != nil { - n += 1 + runtime.Sov(uint64(*x.NewThreshold)) - } - if x.PssInterval != nil { - n += 1 + runtime.Sov(uint64(*x.PssInterval)) - } - if x.BlockNumberNonce != 0 { - n += 1 + runtime.Sov(uint64(x.BlockNumberNonce)) - } - l = len(x.PolicyId) - 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().(*Ring) - 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) - } - switch x := x.XPssInterval.(type) { - case *Ring_PssInterval: - i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) - i-- - dAtA[i] = 0x48 - } - switch x := x.XNewThreshold.(type) { - case *Ring_NewThreshold: - i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) - i-- - dAtA[i] = 0x40 - } - if len(x.PolicyId) > 0 { - i -= len(x.PolicyId) - copy(dAtA[i:], x.PolicyId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) - i-- - dAtA[i] = 0x5a - } - if x.BlockNumberNonce != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockNumberNonce)) - i-- - dAtA[i] = 0x50 - } - if x.PssInterval != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) - i-- - dAtA[i] = 0x48 - } - if x.NewThreshold != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) - i-- - dAtA[i] = 0x40 - } - if len(x.NewPeerIds) > 0 { - for iNdEx := len(x.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.NewPeerIds[iNdEx]) - copy(dAtA[i:], x.NewPeerIds[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewPeerIds[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if x.Threshold != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Threshold)) - i-- - dAtA[i] = 0x30 - } - if len(x.PeerIds) > 0 { - for iNdEx := len(x.PeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.PeerIds[iNdEx]) - copy(dAtA[i:], x.PeerIds[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PeerIds[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.RingPk) > 0 { - i -= len(x.RingPk) - copy(dAtA[i:], x.RingPk) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingPk))) - i-- - dAtA[i] = 0x22 - } - if len(x.CreatorDid) > 0 { - i -= len(x.CreatorDid) - copy(dAtA[i:], x.CreatorDid) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) - i-- - dAtA[i] = 0x1a - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - 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 { - 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().(*Ring) - 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: Ring: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Ring: 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 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 Namespace", 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.Namespace = 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 CreatorDid", 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.CreatorDid = 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 RingPk", 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.RingPk = 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 PeerIds", 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.PeerIds = append(x.PeerIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) - } - x.Threshold = 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.Threshold |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", 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.NewPeerIds = append(x.NewPeerIds, 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 NewThreshold", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.NewThreshold = &v - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) - } - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.PssInterval = &v - case 10: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) - } - x.BlockNumberNonce = 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.BlockNumberNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: sourcehub/orbis/ring.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) -) - -// Ring stores the active and pending committee metadata for an Orbis ring. -type Ring struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` - NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - // Absent means no pending threshold update. - NewThreshold *uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` - // Absent means automatic PSS refresh is disabled. - PssInterval *uint64 `protobuf:"varint,9,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` - BlockNumberNonce uint64 `protobuf:"varint,10,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` - PolicyId string `protobuf:"bytes,11,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` -} - -func (x *Ring) Reset() { - *x = Ring{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_ring_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Ring) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Ring) ProtoMessage() {} - -// Deprecated: Use Ring.ProtoReflect.Descriptor instead. -func (*Ring) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_ring_proto_rawDescGZIP(), []int{0} -} - -func (x *Ring) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Ring) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *Ring) GetCreatorDid() string { - if x != nil { - return x.CreatorDid - } - return "" -} - -func (x *Ring) GetRingPk() string { - if x != nil { - return x.RingPk - } - return "" -} - -func (x *Ring) GetPeerIds() []string { - if x != nil { - return x.PeerIds - } - return nil -} - -func (x *Ring) GetThreshold() uint32 { - if x != nil { - return x.Threshold - } - return 0 -} - -func (x *Ring) GetNewPeerIds() []string { - if x != nil { - return x.NewPeerIds - } - return nil -} - -func (x *Ring) GetNewThreshold() uint32 { - if x != nil && x.NewThreshold != nil { - return *x.NewThreshold - } - return 0 -} - -func (x *Ring) GetPssInterval() uint64 { - if x != nil && x.PssInterval != nil { - return *x.PssInterval - } - return 0 -} - -func (x *Ring) GetBlockNumberNonce() uint64 { - if x != nil { - return x.BlockNumberNonce - } - return 0 -} - -func (x *Ring) GetPolicyId() string { - if x != nil { - return x.PolicyId - } - return "" -} - -var File_sourcehub_orbis_ring_proto protoreflect.FileDescriptor - -var file_sourcehub_orbis_ring_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x22, 0x89, 0x03, - 0x0a, 0x04, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6b, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x6b, 0x12, 0x19, - 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, - 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, - 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x6e, 0x65, 0x77, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0b, 0x70, 0x73, 0x73, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x12, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x73, 0x73, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x9f, 0x01, 0x0a, 0x13, 0x63, 0x6f, - 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x42, 0x09, 0x52, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, - 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_sourcehub_orbis_ring_proto_rawDescOnce sync.Once - file_sourcehub_orbis_ring_proto_rawDescData = file_sourcehub_orbis_ring_proto_rawDesc -) - -func file_sourcehub_orbis_ring_proto_rawDescGZIP() []byte { - file_sourcehub_orbis_ring_proto_rawDescOnce.Do(func() { - file_sourcehub_orbis_ring_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_ring_proto_rawDescData) - }) - return file_sourcehub_orbis_ring_proto_rawDescData -} - -var file_sourcehub_orbis_ring_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_sourcehub_orbis_ring_proto_goTypes = []interface{}{ - (*Ring)(nil), // 0: sourcehub.orbis.Ring -} -var file_sourcehub_orbis_ring_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_sourcehub_orbis_ring_proto_init() } -func file_sourcehub_orbis_ring_proto_init() { - if File_sourcehub_orbis_ring_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sourcehub_orbis_ring_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Ring); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_sourcehub_orbis_ring_proto_msgTypes[0].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sourcehub_orbis_ring_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_sourcehub_orbis_ring_proto_goTypes, - DependencyIndexes: file_sourcehub_orbis_ring_proto_depIdxs, - MessageInfos: file_sourcehub_orbis_ring_proto_msgTypes, - }.Build() - File_sourcehub_orbis_ring_proto = out.File - file_sourcehub_orbis_ring_proto_rawDesc = nil - file_sourcehub_orbis_ring_proto_goTypes = nil - file_sourcehub_orbis_ring_proto_depIdxs = nil -} diff --git a/api/sourcehub/orbis/tx.pb.go b/api/sourcehub/orbis/tx.pb.go new file mode 100644 index 00000000..9620bc7a --- /dev/null +++ b/api/sourcehub/orbis/tx.pb.go @@ -0,0 +1,1045 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: sourcehub/orbis/tx.proto + +package orbis + +import ( + _ "cosmossdk.io/api/amino" + _ "cosmossdk.io/api/cosmos/msg/v1" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +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. +type MsgUpdateParams struct { + state protoimpl.MessageState `protogen:"open.v1"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + mi := &file_sourcehub_orbis_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() {} + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_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 MsgUpdateParams. +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + mi := &file_sourcehub_orbis_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() {} + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{1} +} + +type MsgCreateRing struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` + Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + // Absent means automatic PSS refresh is disabled. + PssInterval *uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgCreateRing) Reset() { + *x = MsgCreateRing{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgCreateRing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateRing) ProtoMessage() {} + +func (x *MsgCreateRing) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgCreateRing.ProtoReflect.Descriptor instead. +func (*MsgCreateRing) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgCreateRing) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgCreateRing) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *MsgCreateRing) GetRingPk() string { + if x != nil { + return x.RingPk + } + return "" +} + +func (x *MsgCreateRing) GetPeerIds() []string { + if x != nil { + return x.PeerIds + } + return nil +} + +func (x *MsgCreateRing) GetThreshold() uint32 { + if x != nil { + return x.Threshold + } + return 0 +} + +func (x *MsgCreateRing) GetPssInterval() uint64 { + if x != nil && x.PssInterval != nil { + return *x.PssInterval + } + return 0 +} + +func (x *MsgCreateRing) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *MsgCreateRing) GetArtifact() string { + if x != nil { + return x.Artifact + } + return "" +} + +type MsgCreateRingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgCreateRingResponse) Reset() { + *x = MsgCreateRingResponse{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgCreateRingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateRingResponse) ProtoMessage() {} + +func (x *MsgCreateRingResponse) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgCreateRingResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateRingResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgCreateRingResponse) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +type MsgUpdateRingByAcp struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + // Absent means no pending threshold update. + NewThreshold *uint32 `protobuf:"varint,4,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` + // Absent means no PSS refresh interval update. + PssInterval *uint64 `protobuf:"varint,5,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgUpdateRingByAcp) Reset() { + *x = MsgUpdateRingByAcp{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgUpdateRingByAcp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateRingByAcp) ProtoMessage() {} + +func (x *MsgUpdateRingByAcp) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgUpdateRingByAcp.ProtoReflect.Descriptor instead. +func (*MsgUpdateRingByAcp) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgUpdateRingByAcp) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgUpdateRingByAcp) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *MsgUpdateRingByAcp) GetNewPeerIds() []string { + if x != nil { + return x.NewPeerIds + } + return nil +} + +func (x *MsgUpdateRingByAcp) GetNewThreshold() uint32 { + if x != nil && x.NewThreshold != nil { + return *x.NewThreshold + } + return 0 +} + +func (x *MsgUpdateRingByAcp) GetPssInterval() uint64 { + if x != nil && x.PssInterval != nil { + return *x.PssInterval + } + return 0 +} + +type MsgUpdateRingByAcpResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgUpdateRingByAcpResponse) Reset() { + *x = MsgUpdateRingByAcpResponse{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgUpdateRingByAcpResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateRingByAcpResponse) ProtoMessage() {} + +func (x *MsgUpdateRingByAcpResponse) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgUpdateRingByAcpResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateRingByAcpResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{5} +} + +type MsgFinalizeRingReshareByThresholdSignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + SignatureScheme string `protobuf:"bytes,3,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` + Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) Reset() { + *x = MsgFinalizeRingReshareByThresholdSignature{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFinalizeRingReshareByThresholdSignature) ProtoMessage() {} + +func (x *MsgFinalizeRingReshareByThresholdSignature) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgFinalizeRingReshareByThresholdSignature.ProtoReflect.Descriptor instead. +func (*MsgFinalizeRingReshareByThresholdSignature) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) GetSignatureScheme() string { + if x != nil { + return x.SignatureScheme + } + return "" +} + +func (x *MsgFinalizeRingReshareByThresholdSignature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type MsgFinalizeRingReshareByThresholdSignatureResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) Reset() { + *x = MsgFinalizeRingReshareByThresholdSignatureResponse{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoMessage() {} + +func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgFinalizeRingReshareByThresholdSignatureResponse.ProtoReflect.Descriptor instead. +func (*MsgFinalizeRingReshareByThresholdSignatureResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{7} +} + +type RingReshareFinalizeSignDoc struct { + state protoimpl.MessageState `protogen:"open.v1"` + Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + RingPk string `protobuf:"bytes,5,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + CurrentRingSha256 []byte `protobuf:"bytes,6,opt,name=current_ring_sha256,json=currentRingSha256,proto3" json:"current_ring_sha256,omitempty"` + FinalizedRingSha256 []byte `protobuf:"bytes,7,opt,name=finalized_ring_sha256,json=finalizedRingSha256,proto3" json:"finalized_ring_sha256,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,8,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RingReshareFinalizeSignDoc) Reset() { + *x = RingReshareFinalizeSignDoc{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RingReshareFinalizeSignDoc) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RingReshareFinalizeSignDoc) ProtoMessage() {} + +func (x *RingReshareFinalizeSignDoc) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RingReshareFinalizeSignDoc.ProtoReflect.Descriptor instead. +func (*RingReshareFinalizeSignDoc) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *RingReshareFinalizeSignDoc) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetRingPk() string { + if x != nil { + return x.RingPk + } + return "" +} + +func (x *RingReshareFinalizeSignDoc) GetCurrentRingSha256() []byte { + if x != nil { + return x.CurrentRingSha256 + } + return nil +} + +func (x *RingReshareFinalizeSignDoc) GetFinalizedRingSha256() []byte { + if x != nil { + return x.FinalizedRingSha256 + } + return nil +} + +func (x *RingReshareFinalizeSignDoc) GetBlockNumberNonce() uint64 { + if x != nil { + return x.BlockNumberNonce + } + return 0 +} + +type MsgStoreDocument struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` + // Absent means no tier. + Tier *string `protobuf:"bytes,9,opt,name=tier,proto3,oneof" json:"tier,omitempty"` + // Absent means no timestamp. + Timestamp *uint64 `protobuf:"varint,10,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgStoreDocument) Reset() { + *x = MsgStoreDocument{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgStoreDocument) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgStoreDocument) ProtoMessage() {} + +func (x *MsgStoreDocument) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgStoreDocument.ProtoReflect.Descriptor instead. +func (*MsgStoreDocument) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{9} +} + +func (x *MsgStoreDocument) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgStoreDocument) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *MsgStoreDocument) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *MsgStoreDocument) GetDocument() string { + if x != nil { + return x.Document + } + return "" +} + +func (x *MsgStoreDocument) GetProof() string { + if x != nil { + return x.Proof + } + return "" +} + +func (x *MsgStoreDocument) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *MsgStoreDocument) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *MsgStoreDocument) GetPermission() string { + if x != nil { + return x.Permission + } + return "" +} + +func (x *MsgStoreDocument) GetTier() string { + if x != nil && x.Tier != nil { + return *x.Tier + } + return "" +} + +func (x *MsgStoreDocument) GetTimestamp() uint64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp + } + return 0 +} + +type MsgStoreDocumentResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgStoreDocumentResponse) Reset() { + *x = MsgStoreDocumentResponse{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgStoreDocumentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgStoreDocumentResponse) ProtoMessage() {} + +func (x *MsgStoreDocumentResponse) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgStoreDocumentResponse.ProtoReflect.Descriptor instead. +func (*MsgStoreDocumentResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgStoreDocumentResponse) GetDocumentId() string { + if x != nil { + return x.DocumentId + } + return "" +} + +type MsgStoreKeyDerivation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Derivation string `protobuf:"bytes,4,opt,name=derivation,proto3" json:"derivation,omitempty"` + PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgStoreKeyDerivation) Reset() { + *x = MsgStoreKeyDerivation{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgStoreKeyDerivation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgStoreKeyDerivation) ProtoMessage() {} + +func (x *MsgStoreKeyDerivation) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgStoreKeyDerivation.ProtoReflect.Descriptor instead. +func (*MsgStoreKeyDerivation) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *MsgStoreKeyDerivation) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetDerivation() string { + if x != nil { + return x.Derivation + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *MsgStoreKeyDerivation) GetPermission() string { + if x != nil { + return x.Permission + } + return "" +} + +type MsgStoreKeyDerivationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyDerivationId string `protobuf:"bytes,1,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgStoreKeyDerivationResponse) Reset() { + *x = MsgStoreKeyDerivationResponse{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgStoreKeyDerivationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgStoreKeyDerivationResponse) ProtoMessage() {} + +func (x *MsgStoreKeyDerivationResponse) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgStoreKeyDerivationResponse.ProtoReflect.Descriptor instead. +func (*MsgStoreKeyDerivationResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{12} +} + +func (x *MsgStoreKeyDerivationResponse) GetKeyDerivationId() string { + if x != nil { + return x.KeyDerivationId + } + return "" +} + +var File_sourcehub_orbis_tx_proto protoreflect.FileDescriptor + +const file_sourcehub_orbis_tx_proto_rawDesc = "" + + "\n" + + "\x18sourcehub/orbis/tx.proto\x12\x0fsourcehub.orbis\x1a\x11amino/amino.proto\x1a\x17cosmos/msg/v1/msg.proto\x1a\x19cosmos_proto/cosmos.proto\x1a\x14gogoproto/gogo.proto\x1a\x1csourcehub/orbis/params.proto\"\xbb\x01\n" + + "\x0fMsgUpdateParams\x126\n" + + "\tauthority\x18\x01 \x01(\tB\x18Ò´-\x14cosmos.AddressStringR\tauthority\x12:\n" + + "\x06params\x18\x02 \x01(\v2\x17.sourcehub.orbis.ParamsB\t\xc8\xde\x1f\x00\xa8\xe7\xb0*\x01R\x06params:4\x82\xe7\xb0*\tauthority\x8a\xe7\xb0*!sourcehub/x/orbis/MsgUpdateParams\"\x19\n" + + "\x17MsgUpdateParamsResponse\"\x99\x02\n" + + "\rMsgCreateRing\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x17\n" + + "\aring_pk\x18\x03 \x01(\tR\x06ringPk\x12\x19\n" + + "\bpeer_ids\x18\x04 \x03(\tR\apeerIds\x12\x1c\n" + + "\tthreshold\x18\x05 \x01(\rR\tthreshold\x12&\n" + + "\fpss_interval\x18\x06 \x01(\x04H\x00R\vpssInterval\x88\x01\x01\x12\x1b\n" + + "\tpolicy_id\x18\a \x01(\tR\bpolicyId\x12\x1a\n" + + "\bartifact\x18\b \x01(\tR\bartifact:\f\x82\xe7\xb0*\acreatorB\x0f\n" + + "\r_pss_interval\"0\n" + + "\x15MsgCreateRingResponse\x12\x17\n" + + "\aring_id\x18\x01 \x01(\tR\x06ringId\"\xec\x01\n" + + "\x12MsgUpdateRingByAcp\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x17\n" + + "\aring_id\x18\x02 \x01(\tR\x06ringId\x12 \n" + + "\fnew_peer_ids\x18\x03 \x03(\tR\n" + + "newPeerIds\x12(\n" + + "\rnew_threshold\x18\x04 \x01(\rH\x00R\fnewThreshold\x88\x01\x01\x12&\n" + + "\fpss_interval\x18\x05 \x01(\x04H\x01R\vpssInterval\x88\x01\x01:\f\x82\xe7\xb0*\acreatorB\x10\n" + + "\x0e_new_thresholdB\x0f\n" + + "\r_pss_interval\"\x1c\n" + + "\x1aMsgUpdateRingByAcpResponse\"\xb6\x01\n" + + "*MsgFinalizeRingReshareByThresholdSignature\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x17\n" + + "\aring_id\x18\x02 \x01(\tR\x06ringId\x12)\n" + + "\x10signature_scheme\x18\x03 \x01(\tR\x0fsignatureScheme\x12\x1c\n" + + "\tsignature\x18\x04 \x01(\fR\tsignature:\f\x82\xe7\xb0*\acreator\"4\n" + + "2MsgFinalizeRingReshareByThresholdSignatureResponse\"\xb1\x02\n" + + "\x1aRingReshareFinalizeSignDoc\x12\x16\n" + + "\x06domain\x18\x01 \x01(\tR\x06domain\x12\x19\n" + + "\bchain_id\x18\x02 \x01(\tR\achainId\x12\x1c\n" + + "\tnamespace\x18\x03 \x01(\tR\tnamespace\x12\x17\n" + + "\aring_id\x18\x04 \x01(\tR\x06ringId\x12\x17\n" + + "\aring_pk\x18\x05 \x01(\tR\x06ringPk\x12.\n" + + "\x13current_ring_sha256\x18\x06 \x01(\fR\x11currentRingSha256\x122\n" + + "\x15finalized_ring_sha256\x18\a \x01(\fR\x13finalizedRingSha256\x12,\n" + + "\x12block_number_nonce\x18\b \x01(\x04R\x10blockNumberNonce\"\xcf\x02\n" + + "\x10MsgStoreDocument\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x17\n" + + "\aring_id\x18\x03 \x01(\tR\x06ringId\x12\x1a\n" + + "\bdocument\x18\x04 \x01(\tR\bdocument\x12\x14\n" + + "\x05proof\x18\x05 \x01(\tR\x05proof\x12\x1b\n" + + "\tpolicy_id\x18\x06 \x01(\tR\bpolicyId\x12\x1a\n" + + "\bresource\x18\a \x01(\tR\bresource\x12\x1e\n" + + "\n" + + "permission\x18\b \x01(\tR\n" + + "permission\x12\x17\n" + + "\x04tier\x18\t \x01(\tH\x00R\x04tier\x88\x01\x01\x12!\n" + + "\ttimestamp\x18\n" + + " \x01(\x04H\x01R\ttimestamp\x88\x01\x01:\f\x82\xe7\xb0*\acreatorB\a\n" + + "\x05_tierB\f\n" + + "\n" + + "_timestamp\";\n" + + "\x18MsgStoreDocumentResponse\x12\x1f\n" + + "\vdocument_id\x18\x01 \x01(\tR\n" + + "documentId\"\xef\x01\n" + + "\x15MsgStoreKeyDerivation\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x17\n" + + "\aring_id\x18\x03 \x01(\tR\x06ringId\x12\x1e\n" + + "\n" + + "derivation\x18\x04 \x01(\tR\n" + + "derivation\x12\x1b\n" + + "\tpolicy_id\x18\x05 \x01(\tR\bpolicyId\x12\x1a\n" + + "\bresource\x18\x06 \x01(\tR\bresource\x12\x1e\n" + + "\n" + + "permission\x18\a \x01(\tR\n" + + "permission:\f\x82\xe7\xb0*\acreator\"K\n" + + "\x1dMsgStoreKeyDerivationResponse\x12*\n" + + "\x11key_derivation_id\x18\x01 \x01(\tR\x0fkeyDerivationId2\x9e\x05\n" + + "\x03Msg\x12Z\n" + + "\fUpdateParams\x12 .sourcehub.orbis.MsgUpdateParams\x1a(.sourcehub.orbis.MsgUpdateParamsResponse\x12T\n" + + "\n" + + "CreateRing\x12\x1e.sourcehub.orbis.MsgCreateRing\x1a&.sourcehub.orbis.MsgCreateRingResponse\x12c\n" + + "\x0fUpdateRingByAcp\x12#.sourcehub.orbis.MsgUpdateRingByAcp\x1a+.sourcehub.orbis.MsgUpdateRingByAcpResponse\x12\xab\x01\n" + + "'FinalizeRingReshareByThresholdSignature\x12;.sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature\x1aC.sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse\x12]\n" + + "\rStoreDocument\x12!.sourcehub.orbis.MsgStoreDocument\x1a).sourcehub.orbis.MsgStoreDocumentResponse\x12l\n" + + "\x12StoreKeyDerivation\x12&.sourcehub.orbis.MsgStoreKeyDerivation\x1a..sourcehub.orbis.MsgStoreKeyDerivationResponse\x1a\x05\x80\xe7\xb0*\x01B\x9d\x01\n" + + "\x13com.sourcehub.orbisB\aTxProtoP\x01Z cosmossdk.io/api/sourcehub/orbis\xa2\x02\x03SOX\xaa\x02\x0fSourcehub.Orbis\xca\x02\x0fSourcehub\\Orbis\xe2\x02\x1bSourcehub\\Orbis\\GPBMetadata\xea\x02\x10Sourcehub::Orbisb\x06proto3" + +var ( + file_sourcehub_orbis_tx_proto_rawDescOnce sync.Once + file_sourcehub_orbis_tx_proto_rawDescData []byte +) + +func file_sourcehub_orbis_tx_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_tx_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_tx_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_sourcehub_orbis_tx_proto_rawDesc), len(file_sourcehub_orbis_tx_proto_rawDesc))) + }) + return file_sourcehub_orbis_tx_proto_rawDescData +} + +var file_sourcehub_orbis_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_sourcehub_orbis_tx_proto_goTypes = []any{ + (*MsgUpdateParams)(nil), // 0: sourcehub.orbis.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.orbis.MsgUpdateParamsResponse + (*MsgCreateRing)(nil), // 2: sourcehub.orbis.MsgCreateRing + (*MsgCreateRingResponse)(nil), // 3: sourcehub.orbis.MsgCreateRingResponse + (*MsgUpdateRingByAcp)(nil), // 4: sourcehub.orbis.MsgUpdateRingByAcp + (*MsgUpdateRingByAcpResponse)(nil), // 5: sourcehub.orbis.MsgUpdateRingByAcpResponse + (*MsgFinalizeRingReshareByThresholdSignature)(nil), // 6: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature + (*MsgFinalizeRingReshareByThresholdSignatureResponse)(nil), // 7: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse + (*RingReshareFinalizeSignDoc)(nil), // 8: sourcehub.orbis.RingReshareFinalizeSignDoc + (*MsgStoreDocument)(nil), // 9: sourcehub.orbis.MsgStoreDocument + (*MsgStoreDocumentResponse)(nil), // 10: sourcehub.orbis.MsgStoreDocumentResponse + (*MsgStoreKeyDerivation)(nil), // 11: sourcehub.orbis.MsgStoreKeyDerivation + (*MsgStoreKeyDerivationResponse)(nil), // 12: sourcehub.orbis.MsgStoreKeyDerivationResponse + (*Params)(nil), // 13: sourcehub.orbis.Params +} +var file_sourcehub_orbis_tx_proto_depIdxs = []int32{ + 13, // 0: sourcehub.orbis.MsgUpdateParams.params:type_name -> sourcehub.orbis.Params + 0, // 1: sourcehub.orbis.Msg.UpdateParams:input_type -> sourcehub.orbis.MsgUpdateParams + 2, // 2: sourcehub.orbis.Msg.CreateRing:input_type -> sourcehub.orbis.MsgCreateRing + 4, // 3: sourcehub.orbis.Msg.UpdateRingByAcp:input_type -> sourcehub.orbis.MsgUpdateRingByAcp + 6, // 4: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:input_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature + 9, // 5: sourcehub.orbis.Msg.StoreDocument:input_type -> sourcehub.orbis.MsgStoreDocument + 11, // 6: sourcehub.orbis.Msg.StoreKeyDerivation:input_type -> sourcehub.orbis.MsgStoreKeyDerivation + 1, // 7: sourcehub.orbis.Msg.UpdateParams:output_type -> sourcehub.orbis.MsgUpdateParamsResponse + 3, // 8: sourcehub.orbis.Msg.CreateRing:output_type -> sourcehub.orbis.MsgCreateRingResponse + 5, // 9: sourcehub.orbis.Msg.UpdateRingByAcp:output_type -> sourcehub.orbis.MsgUpdateRingByAcpResponse + 7, // 10: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:output_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse + 10, // 11: sourcehub.orbis.Msg.StoreDocument:output_type -> sourcehub.orbis.MsgStoreDocumentResponse + 12, // 12: sourcehub.orbis.Msg.StoreKeyDerivation:output_type -> sourcehub.orbis.MsgStoreKeyDerivationResponse + 7, // [7:13] is the sub-list for method output_type + 1, // [1:7] 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_sourcehub_orbis_tx_proto_init() } +func file_sourcehub_orbis_tx_proto_init() { + if File_sourcehub_orbis_tx_proto != nil { + return + } + file_sourcehub_orbis_params_proto_init() + file_sourcehub_orbis_tx_proto_msgTypes[2].OneofWrappers = []any{} + file_sourcehub_orbis_tx_proto_msgTypes[4].OneofWrappers = []any{} + file_sourcehub_orbis_tx_proto_msgTypes[9].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_sourcehub_orbis_tx_proto_rawDesc), len(file_sourcehub_orbis_tx_proto_rawDesc)), + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_sourcehub_orbis_tx_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_tx_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_tx_proto_msgTypes, + }.Build() + File_sourcehub_orbis_tx_proto = out.File + file_sourcehub_orbis_tx_proto_goTypes = nil + file_sourcehub_orbis_tx_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/tx.pulsar.go b/api/sourcehub/orbis/tx.pulsar.go deleted file mode 100644 index 4228790b..00000000 --- a/api/sourcehub/orbis/tx.pulsar.go +++ /dev/null @@ -1,9035 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package orbis - -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_sourcehub_orbis_tx_proto_init() - md_MsgUpdateParams = File_sourcehub_orbis_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_sourcehub_orbis_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 "sourcehub.orbis.MsgUpdateParams.authority": - return x.Authority != "" - case "sourcehub.orbis.MsgUpdateParams.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) - } - panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.authority": - x.Authority = "" - case "sourcehub.orbis.MsgUpdateParams.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) - } - panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgUpdateParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) - } - panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.authority": - x.Authority = value.Interface().(string) - case "sourcehub.orbis.MsgUpdateParams.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) - } - panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "sourcehub.orbis.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message sourcehub.orbis.MsgUpdateParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) - } - panic(fmt.Errorf("message sourcehub.orbis.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 "sourcehub.orbis.MsgUpdateParams.authority": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgUpdateParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateParams")) - } - panic(fmt.Errorf("message sourcehub.orbis.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 sourcehub.orbis.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_sourcehub_orbis_tx_proto_init() - md_MsgUpdateParamsResponse = File_sourcehub_orbis_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_sourcehub_orbis_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: sourcehub.orbis.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.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: sourcehub.orbis.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.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 sourcehub.orbis.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 _ protoreflect.List = (*_MsgCreateRing_4_list)(nil) - -type _MsgCreateRing_4_list struct { - list *[]string -} - -func (x *_MsgCreateRing_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgCreateRing_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_MsgCreateRing_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgCreateRing_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgCreateRing_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgCreateRing at list field PeerIds as it is not of Message kind")) -} - -func (x *_MsgCreateRing_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgCreateRing_4_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_MsgCreateRing_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgCreateRing protoreflect.MessageDescriptor - fd_MsgCreateRing_creator protoreflect.FieldDescriptor - fd_MsgCreateRing_namespace protoreflect.FieldDescriptor - fd_MsgCreateRing_ring_pk protoreflect.FieldDescriptor - fd_MsgCreateRing_peer_ids protoreflect.FieldDescriptor - fd_MsgCreateRing_threshold protoreflect.FieldDescriptor - fd_MsgCreateRing_pss_interval protoreflect.FieldDescriptor - fd_MsgCreateRing_policy_id protoreflect.FieldDescriptor - fd_MsgCreateRing_artifact protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgCreateRing = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgCreateRing") - fd_MsgCreateRing_creator = md_MsgCreateRing.Fields().ByName("creator") - fd_MsgCreateRing_namespace = md_MsgCreateRing.Fields().ByName("namespace") - fd_MsgCreateRing_ring_pk = md_MsgCreateRing.Fields().ByName("ring_pk") - fd_MsgCreateRing_peer_ids = md_MsgCreateRing.Fields().ByName("peer_ids") - fd_MsgCreateRing_threshold = md_MsgCreateRing.Fields().ByName("threshold") - fd_MsgCreateRing_pss_interval = md_MsgCreateRing.Fields().ByName("pss_interval") - fd_MsgCreateRing_policy_id = md_MsgCreateRing.Fields().ByName("policy_id") - fd_MsgCreateRing_artifact = md_MsgCreateRing.Fields().ByName("artifact") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateRing)(nil) - -type fastReflection_MsgCreateRing MsgCreateRing - -func (x *MsgCreateRing) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateRing)(x) -} - -func (x *MsgCreateRing) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_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_MsgCreateRing_messageType fastReflection_MsgCreateRing_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateRing_messageType{} - -type fastReflection_MsgCreateRing_messageType struct{} - -func (x fastReflection_MsgCreateRing_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateRing)(nil) -} -func (x fastReflection_MsgCreateRing_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateRing) -} -func (x fastReflection_MsgCreateRing_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateRing -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateRing) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateRing -} - -// 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_MsgCreateRing) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateRing_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateRing) New() protoreflect.Message { - return new(fastReflection_MsgCreateRing) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateRing) Interface() protoreflect.ProtoMessage { - return (*MsgCreateRing)(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_MsgCreateRing) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgCreateRing_creator, value) { - return - } - } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_MsgCreateRing_namespace, value) { - return - } - } - if x.RingPk != "" { - value := protoreflect.ValueOfString(x.RingPk) - if !f(fd_MsgCreateRing_ring_pk, value) { - return - } - } - if len(x.PeerIds) != 0 { - value := protoreflect.ValueOfList(&_MsgCreateRing_4_list{list: &x.PeerIds}) - if !f(fd_MsgCreateRing_peer_ids, value) { - return - } - } - if x.Threshold != uint32(0) { - value := protoreflect.ValueOfUint32(x.Threshold) - if !f(fd_MsgCreateRing_threshold, value) { - return - } - } - if x.XPssInterval != nil { - switch o := x.XPssInterval.(type) { - case *MsgCreateRing_PssInterval: - v := o.PssInterval - value := protoreflect.ValueOfUint64(v) - if !f(fd_MsgCreateRing_pss_interval, value) { - return - } - } - } - if x.PolicyId != "" { - value := protoreflect.ValueOfString(x.PolicyId) - if !f(fd_MsgCreateRing_policy_id, value) { - return - } - } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_MsgCreateRing_artifact, 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_MsgCreateRing) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRing.creator": - return x.Creator != "" - case "sourcehub.orbis.MsgCreateRing.namespace": - return x.Namespace != "" - case "sourcehub.orbis.MsgCreateRing.ring_pk": - return x.RingPk != "" - case "sourcehub.orbis.MsgCreateRing.peer_ids": - return len(x.PeerIds) != 0 - case "sourcehub.orbis.MsgCreateRing.threshold": - return x.Threshold != uint32(0) - case "sourcehub.orbis.MsgCreateRing.pss_interval": - if x.XPssInterval == nil { - return false - } else if _, ok := x.XPssInterval.(*MsgCreateRing_PssInterval); ok { - return true - } else { - return false - } - case "sourcehub.orbis.MsgCreateRing.policy_id": - return x.PolicyId != "" - case "sourcehub.orbis.MsgCreateRing.artifact": - return x.Artifact != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRing.creator": - x.Creator = "" - case "sourcehub.orbis.MsgCreateRing.namespace": - x.Namespace = "" - case "sourcehub.orbis.MsgCreateRing.ring_pk": - x.RingPk = "" - case "sourcehub.orbis.MsgCreateRing.peer_ids": - x.PeerIds = nil - case "sourcehub.orbis.MsgCreateRing.threshold": - x.Threshold = uint32(0) - case "sourcehub.orbis.MsgCreateRing.pss_interval": - x.XPssInterval = nil - case "sourcehub.orbis.MsgCreateRing.policy_id": - x.PolicyId = "" - case "sourcehub.orbis.MsgCreateRing.artifact": - x.Artifact = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.MsgCreateRing.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgCreateRing.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgCreateRing.ring_pk": - value := x.RingPk - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgCreateRing.peer_ids": - if len(x.PeerIds) == 0 { - return protoreflect.ValueOfList(&_MsgCreateRing_4_list{}) - } - listValue := &_MsgCreateRing_4_list{list: &x.PeerIds} - return protoreflect.ValueOfList(listValue) - case "sourcehub.orbis.MsgCreateRing.threshold": - value := x.Threshold - return protoreflect.ValueOfUint32(value) - case "sourcehub.orbis.MsgCreateRing.pss_interval": - if x.XPssInterval == nil { - return protoreflect.ValueOfUint64(uint64(0)) - } else if v, ok := x.XPssInterval.(*MsgCreateRing_PssInterval); ok { - return protoreflect.ValueOfUint64(v.PssInterval) - } else { - return protoreflect.ValueOfUint64(uint64(0)) - } - case "sourcehub.orbis.MsgCreateRing.policy_id": - value := x.PolicyId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgCreateRing.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRing.creator": - x.Creator = value.Interface().(string) - case "sourcehub.orbis.MsgCreateRing.namespace": - x.Namespace = value.Interface().(string) - case "sourcehub.orbis.MsgCreateRing.ring_pk": - x.RingPk = value.Interface().(string) - case "sourcehub.orbis.MsgCreateRing.peer_ids": - lv := value.List() - clv := lv.(*_MsgCreateRing_4_list) - x.PeerIds = *clv.list - case "sourcehub.orbis.MsgCreateRing.threshold": - x.Threshold = uint32(value.Uint()) - case "sourcehub.orbis.MsgCreateRing.pss_interval": - cv := value.Uint() - x.XPssInterval = &MsgCreateRing_PssInterval{PssInterval: cv} - case "sourcehub.orbis.MsgCreateRing.policy_id": - x.PolicyId = value.Interface().(string) - case "sourcehub.orbis.MsgCreateRing.artifact": - x.Artifact = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRing.peer_ids": - if x.PeerIds == nil { - x.PeerIds = []string{} - } - value := &_MsgCreateRing_4_list{list: &x.PeerIds} - return protoreflect.ValueOfList(value) - case "sourcehub.orbis.MsgCreateRing.creator": - panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgCreateRing is not mutable")) - case "sourcehub.orbis.MsgCreateRing.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.MsgCreateRing is not mutable")) - case "sourcehub.orbis.MsgCreateRing.ring_pk": - panic(fmt.Errorf("field ring_pk of message sourcehub.orbis.MsgCreateRing is not mutable")) - case "sourcehub.orbis.MsgCreateRing.threshold": - panic(fmt.Errorf("field threshold of message sourcehub.orbis.MsgCreateRing is not mutable")) - case "sourcehub.orbis.MsgCreateRing.pss_interval": - panic(fmt.Errorf("field pss_interval of message sourcehub.orbis.MsgCreateRing is not mutable")) - case "sourcehub.orbis.MsgCreateRing.policy_id": - panic(fmt.Errorf("field policy_id of message sourcehub.orbis.MsgCreateRing is not mutable")) - case "sourcehub.orbis.MsgCreateRing.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.orbis.MsgCreateRing is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRing.creator": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgCreateRing.namespace": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgCreateRing.ring_pk": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgCreateRing.peer_ids": - list := []string{} - return protoreflect.ValueOfList(&_MsgCreateRing_4_list{list: &list}) - case "sourcehub.orbis.MsgCreateRing.threshold": - return protoreflect.ValueOfUint32(uint32(0)) - case "sourcehub.orbis.MsgCreateRing.pss_interval": - return protoreflect.ValueOfUint64(uint64(0)) - case "sourcehub.orbis.MsgCreateRing.policy_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgCreateRing.artifact": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRing")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRing 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_MsgCreateRing) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "sourcehub.orbis.MsgCreateRing._pss_interval": - if x.XPssInterval == nil { - return nil - } - switch x.XPssInterval.(type) { - case *MsgCreateRing_PssInterval: - return x.Descriptor().Fields().ByName("pss_interval") - } - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgCreateRing", 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_MsgCreateRing) 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_MsgCreateRing) 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_MsgCreateRing) 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_MsgCreateRing) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateRing) - 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.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingPk) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.PeerIds) > 0 { - for _, s := range x.PeerIds { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Threshold != 0 { - n += 1 + runtime.Sov(uint64(x.Threshold)) - } - if x.PssInterval != nil { - n += 1 + runtime.Sov(uint64(*x.PssInterval)) - } - l = len(x.PolicyId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Artifact) - 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().(*MsgCreateRing) - 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) - } - switch x := x.XPssInterval.(type) { - case *MsgCreateRing_PssInterval: - i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) - i-- - dAtA[i] = 0x30 - } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x42 - } - if len(x.PolicyId) > 0 { - i -= len(x.PolicyId) - copy(dAtA[i:], x.PolicyId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) - i-- - dAtA[i] = 0x3a - } - if x.PssInterval != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) - i-- - dAtA[i] = 0x30 - } - if x.Threshold != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Threshold)) - i-- - dAtA[i] = 0x28 - } - if len(x.PeerIds) > 0 { - for iNdEx := len(x.PeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.PeerIds[iNdEx]) - copy(dAtA[i:], x.PeerIds[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PeerIds[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.RingPk) > 0 { - i -= len(x.RingPk) - copy(dAtA[i:], x.RingPk) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingPk))) - i-- - dAtA[i] = 0x1a - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - 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().(*MsgCreateRing) - 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: MsgCreateRing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateRing: 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 Creator", 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.Creator = 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 Namespace", 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.Namespace = 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 RingPk", 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.RingPk = 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 PeerIds", 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.PeerIds = append(x.PeerIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) - } - x.Threshold = 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.Threshold |= uint32(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 PssInterval", wireType) - } - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.PssInterval = &v - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = 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_MsgCreateRingResponse protoreflect.MessageDescriptor - fd_MsgCreateRingResponse_ring_id protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgCreateRingResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgCreateRingResponse") - fd_MsgCreateRingResponse_ring_id = md_MsgCreateRingResponse.Fields().ByName("ring_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateRingResponse)(nil) - -type fastReflection_MsgCreateRingResponse MsgCreateRingResponse - -func (x *MsgCreateRingResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateRingResponse)(x) -} - -func (x *MsgCreateRingResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_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_MsgCreateRingResponse_messageType fastReflection_MsgCreateRingResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateRingResponse_messageType{} - -type fastReflection_MsgCreateRingResponse_messageType struct{} - -func (x fastReflection_MsgCreateRingResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateRingResponse)(nil) -} -func (x fastReflection_MsgCreateRingResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateRingResponse) -} -func (x fastReflection_MsgCreateRingResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateRingResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateRingResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateRingResponse -} - -// 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_MsgCreateRingResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateRingResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateRingResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreateRingResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateRingResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreateRingResponse)(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_MsgCreateRingResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RingId != "" { - value := protoreflect.ValueOfString(x.RingId) - if !f(fd_MsgCreateRingResponse_ring_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_MsgCreateRingResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRingResponse.ring_id": - return x.RingId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRingResponse.ring_id": - x.RingId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.MsgCreateRingResponse.ring_id": - value := x.RingId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRingResponse.ring_id": - x.RingId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRingResponse.ring_id": - panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgCreateRingResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgCreateRingResponse.ring_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgCreateRingResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgCreateRingResponse 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_MsgCreateRingResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgCreateRingResponse", 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_MsgCreateRingResponse) 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_MsgCreateRingResponse) 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_MsgCreateRingResponse) 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_MsgCreateRingResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateRingResponse) - 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.RingId) - 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().(*MsgCreateRingResponse) - 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.RingId) > 0 { - i -= len(x.RingId) - copy(dAtA[i:], x.RingId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) - 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().(*MsgCreateRingResponse) - 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: MsgCreateRingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateRingResponse: 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 RingId", 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.RingId = 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 = (*_MsgUpdateRingByAcp_3_list)(nil) - -type _MsgUpdateRingByAcp_3_list struct { - list *[]string -} - -func (x *_MsgUpdateRingByAcp_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgUpdateRingByAcp_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_MsgUpdateRingByAcp_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgUpdateRingByAcp_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgUpdateRingByAcp_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgUpdateRingByAcp at list field NewPeerIds as it is not of Message kind")) -} - -func (x *_MsgUpdateRingByAcp_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgUpdateRingByAcp_3_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_MsgUpdateRingByAcp_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgUpdateRingByAcp protoreflect.MessageDescriptor - fd_MsgUpdateRingByAcp_creator protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_ring_id protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_new_peer_ids protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_new_threshold protoreflect.FieldDescriptor - fd_MsgUpdateRingByAcp_pss_interval protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgUpdateRingByAcp = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgUpdateRingByAcp") - fd_MsgUpdateRingByAcp_creator = md_MsgUpdateRingByAcp.Fields().ByName("creator") - fd_MsgUpdateRingByAcp_ring_id = md_MsgUpdateRingByAcp.Fields().ByName("ring_id") - fd_MsgUpdateRingByAcp_new_peer_ids = md_MsgUpdateRingByAcp.Fields().ByName("new_peer_ids") - fd_MsgUpdateRingByAcp_new_threshold = md_MsgUpdateRingByAcp.Fields().ByName("new_threshold") - fd_MsgUpdateRingByAcp_pss_interval = md_MsgUpdateRingByAcp.Fields().ByName("pss_interval") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateRingByAcp)(nil) - -type fastReflection_MsgUpdateRingByAcp MsgUpdateRingByAcp - -func (x *MsgUpdateRingByAcp) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateRingByAcp)(x) -} - -func (x *MsgUpdateRingByAcp) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_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_MsgUpdateRingByAcp_messageType fastReflection_MsgUpdateRingByAcp_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateRingByAcp_messageType{} - -type fastReflection_MsgUpdateRingByAcp_messageType struct{} - -func (x fastReflection_MsgUpdateRingByAcp_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateRingByAcp)(nil) -} -func (x fastReflection_MsgUpdateRingByAcp_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingByAcp) -} -func (x fastReflection_MsgUpdateRingByAcp_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingByAcp -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateRingByAcp) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingByAcp -} - -// 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_MsgUpdateRingByAcp) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateRingByAcp_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateRingByAcp) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingByAcp) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateRingByAcp) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateRingByAcp)(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_MsgUpdateRingByAcp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgUpdateRingByAcp_creator, value) { - return - } - } - if x.RingId != "" { - value := protoreflect.ValueOfString(x.RingId) - if !f(fd_MsgUpdateRingByAcp_ring_id, value) { - return - } - } - if len(x.NewPeerIds) != 0 { - value := protoreflect.ValueOfList(&_MsgUpdateRingByAcp_3_list{list: &x.NewPeerIds}) - if !f(fd_MsgUpdateRingByAcp_new_peer_ids, value) { - return - } - } - if x.XNewThreshold != nil { - switch o := x.XNewThreshold.(type) { - case *MsgUpdateRingByAcp_NewThreshold: - v := o.NewThreshold - value := protoreflect.ValueOfUint32(v) - if !f(fd_MsgUpdateRingByAcp_new_threshold, value) { - return - } - } - } - if x.XPssInterval != nil { - switch o := x.XPssInterval.(type) { - case *MsgUpdateRingByAcp_PssInterval: - v := o.PssInterval - value := protoreflect.ValueOfUint64(v) - if !f(fd_MsgUpdateRingByAcp_pss_interval, 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_MsgUpdateRingByAcp) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.MsgUpdateRingByAcp.creator": - return x.Creator != "" - case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": - return x.RingId != "" - case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": - return len(x.NewPeerIds) != 0 - case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - if x.XNewThreshold == nil { - return false - } else if _, ok := x.XNewThreshold.(*MsgUpdateRingByAcp_NewThreshold); ok { - return true - } else { - return false - } - case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - if x.XPssInterval == nil { - return false - } else if _, ok := x.XPssInterval.(*MsgUpdateRingByAcp_PssInterval); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.MsgUpdateRingByAcp.creator": - x.Creator = "" - case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": - x.RingId = "" - case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": - x.NewPeerIds = nil - case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - x.XNewThreshold = nil - case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - x.XPssInterval = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.MsgUpdateRingByAcp.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": - value := x.RingId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": - if len(x.NewPeerIds) == 0 { - return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_3_list{}) - } - listValue := &_MsgUpdateRingByAcp_3_list{list: &x.NewPeerIds} - return protoreflect.ValueOfList(listValue) - case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - if x.XNewThreshold == nil { - return protoreflect.ValueOfUint32(uint32(0)) - } else if v, ok := x.XNewThreshold.(*MsgUpdateRingByAcp_NewThreshold); ok { - return protoreflect.ValueOfUint32(v.NewThreshold) - } else { - return protoreflect.ValueOfUint32(uint32(0)) - } - case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - if x.XPssInterval == nil { - return protoreflect.ValueOfUint64(uint64(0)) - } else if v, ok := x.XPssInterval.(*MsgUpdateRingByAcp_PssInterval); ok { - return protoreflect.ValueOfUint64(v.PssInterval) - } else { - return protoreflect.ValueOfUint64(uint64(0)) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.MsgUpdateRingByAcp.creator": - x.Creator = value.Interface().(string) - case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": - x.RingId = value.Interface().(string) - case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": - lv := value.List() - clv := lv.(*_MsgUpdateRingByAcp_3_list) - x.NewPeerIds = *clv.list - case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - cv := uint32(value.Uint()) - x.XNewThreshold = &MsgUpdateRingByAcp_NewThreshold{NewThreshold: cv} - case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - cv := value.Uint() - x.XPssInterval = &MsgUpdateRingByAcp_PssInterval{PssInterval: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": - if x.NewPeerIds == nil { - x.NewPeerIds = []string{} - } - value := &_MsgUpdateRingByAcp_3_list{list: &x.NewPeerIds} - return protoreflect.ValueOfList(value) - case "sourcehub.orbis.MsgUpdateRingByAcp.creator": - panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) - case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": - panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) - case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - panic(fmt.Errorf("field new_threshold of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) - case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - panic(fmt.Errorf("field pss_interval of message sourcehub.orbis.MsgUpdateRingByAcp is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgUpdateRingByAcp.creator": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgUpdateRingByAcp.ring_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgUpdateRingByAcp.new_peer_ids": - list := []string{} - return protoreflect.ValueOfList(&_MsgUpdateRingByAcp_3_list{list: &list}) - case "sourcehub.orbis.MsgUpdateRingByAcp.new_threshold": - return protoreflect.ValueOfUint32(uint32(0)) - case "sourcehub.orbis.MsgUpdateRingByAcp.pss_interval": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcp")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcp 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_MsgUpdateRingByAcp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "sourcehub.orbis.MsgUpdateRingByAcp._new_threshold": - if x.XNewThreshold == nil { - return nil - } - switch x.XNewThreshold.(type) { - case *MsgUpdateRingByAcp_NewThreshold: - return x.Descriptor().Fields().ByName("new_threshold") - } - case "sourcehub.orbis.MsgUpdateRingByAcp._pss_interval": - if x.XPssInterval == nil { - return nil - } - switch x.XPssInterval.(type) { - case *MsgUpdateRingByAcp_PssInterval: - return x.Descriptor().Fields().ByName("pss_interval") - } - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgUpdateRingByAcp", 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_MsgUpdateRingByAcp) 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_MsgUpdateRingByAcp) 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_MsgUpdateRingByAcp) 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_MsgUpdateRingByAcp) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateRingByAcp) - 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.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.NewPeerIds) > 0 { - for _, s := range x.NewPeerIds { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.NewThreshold != nil { - n += 1 + runtime.Sov(uint64(*x.NewThreshold)) - } - if x.PssInterval != nil { - n += 1 + runtime.Sov(uint64(*x.PssInterval)) - } - 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().(*MsgUpdateRingByAcp) - 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) - } - switch x := x.XPssInterval.(type) { - case *MsgUpdateRingByAcp_PssInterval: - i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) - i-- - dAtA[i] = 0x28 - } - switch x := x.XNewThreshold.(type) { - case *MsgUpdateRingByAcp_NewThreshold: - i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) - i-- - dAtA[i] = 0x20 - } - if x.PssInterval != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.PssInterval)) - i-- - dAtA[i] = 0x28 - } - if x.NewThreshold != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) - i-- - dAtA[i] = 0x20 - } - if len(x.NewPeerIds) > 0 { - for iNdEx := len(x.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.NewPeerIds[iNdEx]) - copy(dAtA[i:], x.NewPeerIds[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewPeerIds[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.RingId) > 0 { - i -= len(x.RingId) - copy(dAtA[i:], x.RingId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - 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().(*MsgUpdateRingByAcp) - 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: MsgUpdateRingByAcp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRingByAcp: 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 Creator", 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.Creator = 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 RingId", 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.RingId = 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 NewPeerIds", 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.NewPeerIds = append(x.NewPeerIds, 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 NewThreshold", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.NewThreshold = &v - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) - } - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.PssInterval = &v - 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_MsgUpdateRingByAcpResponse protoreflect.MessageDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgUpdateRingByAcpResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgUpdateRingByAcpResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateRingByAcpResponse)(nil) - -type fastReflection_MsgUpdateRingByAcpResponse MsgUpdateRingByAcpResponse - -func (x *MsgUpdateRingByAcpResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateRingByAcpResponse)(x) -} - -func (x *MsgUpdateRingByAcpResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_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_MsgUpdateRingByAcpResponse_messageType fastReflection_MsgUpdateRingByAcpResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateRingByAcpResponse_messageType{} - -type fastReflection_MsgUpdateRingByAcpResponse_messageType struct{} - -func (x fastReflection_MsgUpdateRingByAcpResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateRingByAcpResponse)(nil) -} -func (x fastReflection_MsgUpdateRingByAcpResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingByAcpResponse) -} -func (x fastReflection_MsgUpdateRingByAcpResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingByAcpResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateRingByAcpResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateRingByAcpResponse -} - -// 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_MsgUpdateRingByAcpResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateRingByAcpResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateRingByAcpResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateRingByAcpResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateRingByAcpResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateRingByAcpResponse)(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_MsgUpdateRingByAcpResponse) 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_MsgUpdateRingByAcpResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgUpdateRingByAcpResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgUpdateRingByAcpResponse 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_MsgUpdateRingByAcpResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgUpdateRingByAcpResponse", 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_MsgUpdateRingByAcpResponse) 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_MsgUpdateRingByAcpResponse) 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_MsgUpdateRingByAcpResponse) 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_MsgUpdateRingByAcpResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateRingByAcpResponse) - 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().(*MsgUpdateRingByAcpResponse) - 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().(*MsgUpdateRingByAcpResponse) - 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: MsgUpdateRingByAcpResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateRingByAcpResponse: 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_MsgFinalizeRingReshareByThresholdSignature protoreflect.MessageDescriptor - fd_MsgFinalizeRingReshareByThresholdSignature_creator protoreflect.FieldDescriptor - fd_MsgFinalizeRingReshareByThresholdSignature_ring_id protoreflect.FieldDescriptor - fd_MsgFinalizeRingReshareByThresholdSignature_signature_scheme protoreflect.FieldDescriptor - fd_MsgFinalizeRingReshareByThresholdSignature_signature protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgFinalizeRingReshareByThresholdSignature = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgFinalizeRingReshareByThresholdSignature") - fd_MsgFinalizeRingReshareByThresholdSignature_creator = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("creator") - fd_MsgFinalizeRingReshareByThresholdSignature_ring_id = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("ring_id") - fd_MsgFinalizeRingReshareByThresholdSignature_signature_scheme = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("signature_scheme") - fd_MsgFinalizeRingReshareByThresholdSignature_signature = md_MsgFinalizeRingReshareByThresholdSignature.Fields().ByName("signature") -} - -var _ protoreflect.Message = (*fastReflection_MsgFinalizeRingReshareByThresholdSignature)(nil) - -type fastReflection_MsgFinalizeRingReshareByThresholdSignature MsgFinalizeRingReshareByThresholdSignature - -func (x *MsgFinalizeRingReshareByThresholdSignature) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgFinalizeRingReshareByThresholdSignature)(x) -} - -func (x *MsgFinalizeRingReshareByThresholdSignature) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_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_MsgFinalizeRingReshareByThresholdSignature_messageType fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType -var _ protoreflect.MessageType = fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType{} - -type fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType struct{} - -func (x fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgFinalizeRingReshareByThresholdSignature)(nil) -} -func (x fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType) New() protoreflect.Message { - return new(fastReflection_MsgFinalizeRingReshareByThresholdSignature) -} -func (x fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFinalizeRingReshareByThresholdSignature -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFinalizeRingReshareByThresholdSignature -} - -// 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_MsgFinalizeRingReshareByThresholdSignature) Type() protoreflect.MessageType { - return _fastReflection_MsgFinalizeRingReshareByThresholdSignature_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) New() protoreflect.Message { - return new(fastReflection_MsgFinalizeRingReshareByThresholdSignature) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignature) Interface() protoreflect.ProtoMessage { - return (*MsgFinalizeRingReshareByThresholdSignature)(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_MsgFinalizeRingReshareByThresholdSignature) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgFinalizeRingReshareByThresholdSignature_creator, value) { - return - } - } - if x.RingId != "" { - value := protoreflect.ValueOfString(x.RingId) - if !f(fd_MsgFinalizeRingReshareByThresholdSignature_ring_id, value) { - return - } - } - if x.SignatureScheme != "" { - value := protoreflect.ValueOfString(x.SignatureScheme) - if !f(fd_MsgFinalizeRingReshareByThresholdSignature_signature_scheme, value) { - return - } - } - if len(x.Signature) != 0 { - value := protoreflect.ValueOfBytes(x.Signature) - if !f(fd_MsgFinalizeRingReshareByThresholdSignature_signature, 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_MsgFinalizeRingReshareByThresholdSignature) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": - return x.Creator != "" - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": - return x.RingId != "" - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": - return x.SignatureScheme != "" - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": - return len(x.Signature) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": - x.Creator = "" - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": - x.RingId = "" - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": - x.SignatureScheme = "" - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": - x.Signature = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": - value := x.RingId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": - value := x.SignatureScheme - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": - value := x.Signature - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": - x.Creator = value.Interface().(string) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": - x.RingId = value.Interface().(string) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": - x.SignatureScheme = value.Interface().(string) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": - x.Signature = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": - panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": - panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": - panic(fmt.Errorf("field signature_scheme of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": - panic(fmt.Errorf("field signature of message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.creator": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.ring_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature_scheme": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature.signature": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 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_MsgFinalizeRingReshareByThresholdSignature) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature", 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_MsgFinalizeRingReshareByThresholdSignature) 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_MsgFinalizeRingReshareByThresholdSignature) 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_MsgFinalizeRingReshareByThresholdSignature) 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_MsgFinalizeRingReshareByThresholdSignature) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgFinalizeRingReshareByThresholdSignature) - 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.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SignatureScheme) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Signature) - 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().(*MsgFinalizeRingReshareByThresholdSignature) - 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.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x22 - } - if len(x.SignatureScheme) > 0 { - i -= len(x.SignatureScheme) - copy(dAtA[i:], x.SignatureScheme) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignatureScheme))) - i-- - dAtA[i] = 0x1a - } - if len(x.RingId) > 0 { - i -= len(x.RingId) - copy(dAtA[i:], x.RingId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - 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().(*MsgFinalizeRingReshareByThresholdSignature) - 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: MsgFinalizeRingReshareByThresholdSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignature: 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 Creator", 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.Creator = 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 RingId", 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.RingId = 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 SignatureScheme", 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.SignatureScheme = 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 Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) - if x.Signature == nil { - x.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgFinalizeRingReshareByThresholdSignatureResponse protoreflect.MessageDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgFinalizeRingReshareByThresholdSignatureResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgFinalizeRingReshareByThresholdSignatureResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse)(nil) - -type fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse MsgFinalizeRingReshareByThresholdSignatureResponse - -func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse)(x) -} - -func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_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_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType{} - -type fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType struct{} - -func (x fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse)(nil) -} -func (x fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) -} -func (x fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFinalizeRingReshareByThresholdSignatureResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFinalizeRingReshareByThresholdSignatureResponse -} - -// 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) New() protoreflect.Message { - return new(fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgFinalizeRingReshareByThresholdSignatureResponse) Interface() protoreflect.ProtoMessage { - return (*MsgFinalizeRingReshareByThresholdSignatureResponse)(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_MsgFinalizeRingReshareByThresholdSignatureResponse) 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse 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_MsgFinalizeRingReshareByThresholdSignatureResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse", 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_MsgFinalizeRingReshareByThresholdSignatureResponse) 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_MsgFinalizeRingReshareByThresholdSignatureResponse) 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_MsgFinalizeRingReshareByThresholdSignatureResponse) 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_MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgFinalizeRingReshareByThresholdSignatureResponse) - 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().(*MsgFinalizeRingReshareByThresholdSignatureResponse) - 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().(*MsgFinalizeRingReshareByThresholdSignatureResponse) - 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: MsgFinalizeRingReshareByThresholdSignatureResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignatureResponse: 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_RingReshareFinalizeSignDoc protoreflect.MessageDescriptor - fd_RingReshareFinalizeSignDoc_domain protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_chain_id protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_namespace protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_ring_id protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_ring_pk protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_current_ring_sha256 protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_finalized_ring_sha256 protoreflect.FieldDescriptor - fd_RingReshareFinalizeSignDoc_block_number_nonce protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_RingReshareFinalizeSignDoc = File_sourcehub_orbis_tx_proto.Messages().ByName("RingReshareFinalizeSignDoc") - fd_RingReshareFinalizeSignDoc_domain = md_RingReshareFinalizeSignDoc.Fields().ByName("domain") - fd_RingReshareFinalizeSignDoc_chain_id = md_RingReshareFinalizeSignDoc.Fields().ByName("chain_id") - fd_RingReshareFinalizeSignDoc_namespace = md_RingReshareFinalizeSignDoc.Fields().ByName("namespace") - fd_RingReshareFinalizeSignDoc_ring_id = md_RingReshareFinalizeSignDoc.Fields().ByName("ring_id") - fd_RingReshareFinalizeSignDoc_ring_pk = md_RingReshareFinalizeSignDoc.Fields().ByName("ring_pk") - fd_RingReshareFinalizeSignDoc_current_ring_sha256 = md_RingReshareFinalizeSignDoc.Fields().ByName("current_ring_sha256") - fd_RingReshareFinalizeSignDoc_finalized_ring_sha256 = md_RingReshareFinalizeSignDoc.Fields().ByName("finalized_ring_sha256") - fd_RingReshareFinalizeSignDoc_block_number_nonce = md_RingReshareFinalizeSignDoc.Fields().ByName("block_number_nonce") -} - -var _ protoreflect.Message = (*fastReflection_RingReshareFinalizeSignDoc)(nil) - -type fastReflection_RingReshareFinalizeSignDoc RingReshareFinalizeSignDoc - -func (x *RingReshareFinalizeSignDoc) ProtoReflect() protoreflect.Message { - return (*fastReflection_RingReshareFinalizeSignDoc)(x) -} - -func (x *RingReshareFinalizeSignDoc) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_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_RingReshareFinalizeSignDoc_messageType fastReflection_RingReshareFinalizeSignDoc_messageType -var _ protoreflect.MessageType = fastReflection_RingReshareFinalizeSignDoc_messageType{} - -type fastReflection_RingReshareFinalizeSignDoc_messageType struct{} - -func (x fastReflection_RingReshareFinalizeSignDoc_messageType) Zero() protoreflect.Message { - return (*fastReflection_RingReshareFinalizeSignDoc)(nil) -} -func (x fastReflection_RingReshareFinalizeSignDoc_messageType) New() protoreflect.Message { - return new(fastReflection_RingReshareFinalizeSignDoc) -} -func (x fastReflection_RingReshareFinalizeSignDoc_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RingReshareFinalizeSignDoc -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RingReshareFinalizeSignDoc) Descriptor() protoreflect.MessageDescriptor { - return md_RingReshareFinalizeSignDoc -} - -// 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_RingReshareFinalizeSignDoc) Type() protoreflect.MessageType { - return _fastReflection_RingReshareFinalizeSignDoc_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RingReshareFinalizeSignDoc) New() protoreflect.Message { - return new(fastReflection_RingReshareFinalizeSignDoc) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RingReshareFinalizeSignDoc) Interface() protoreflect.ProtoMessage { - return (*RingReshareFinalizeSignDoc)(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_RingReshareFinalizeSignDoc) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Domain != "" { - value := protoreflect.ValueOfString(x.Domain) - if !f(fd_RingReshareFinalizeSignDoc_domain, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_RingReshareFinalizeSignDoc_chain_id, value) { - return - } - } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_RingReshareFinalizeSignDoc_namespace, value) { - return - } - } - if x.RingId != "" { - value := protoreflect.ValueOfString(x.RingId) - if !f(fd_RingReshareFinalizeSignDoc_ring_id, value) { - return - } - } - if x.RingPk != "" { - value := protoreflect.ValueOfString(x.RingPk) - if !f(fd_RingReshareFinalizeSignDoc_ring_pk, value) { - return - } - } - if len(x.CurrentRingSha256) != 0 { - value := protoreflect.ValueOfBytes(x.CurrentRingSha256) - if !f(fd_RingReshareFinalizeSignDoc_current_ring_sha256, value) { - return - } - } - if len(x.FinalizedRingSha256) != 0 { - value := protoreflect.ValueOfBytes(x.FinalizedRingSha256) - if !f(fd_RingReshareFinalizeSignDoc_finalized_ring_sha256, value) { - return - } - } - if x.BlockNumberNonce != uint64(0) { - value := protoreflect.ValueOfUint64(x.BlockNumberNonce) - if !f(fd_RingReshareFinalizeSignDoc_block_number_nonce, 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_RingReshareFinalizeSignDoc) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": - return x.Domain != "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": - return x.ChainId != "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": - return x.Namespace != "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": - return x.RingId != "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": - return x.RingPk != "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": - return len(x.CurrentRingSha256) != 0 - case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": - return len(x.FinalizedRingSha256) != 0 - case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": - return x.BlockNumberNonce != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": - x.Domain = "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": - x.ChainId = "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": - x.Namespace = "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": - x.RingId = "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": - x.RingPk = "" - case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": - x.CurrentRingSha256 = nil - case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": - x.FinalizedRingSha256 = nil - case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": - x.BlockNumberNonce = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": - value := x.Domain - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": - value := x.RingId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": - value := x.RingPk - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": - value := x.CurrentRingSha256 - return protoreflect.ValueOfBytes(value) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": - value := x.FinalizedRingSha256 - return protoreflect.ValueOfBytes(value) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": - value := x.BlockNumberNonce - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": - x.Domain = value.Interface().(string) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": - x.ChainId = value.Interface().(string) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": - x.Namespace = value.Interface().(string) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": - x.RingId = value.Interface().(string) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": - x.RingPk = value.Interface().(string) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": - x.CurrentRingSha256 = value.Bytes() - case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": - x.FinalizedRingSha256 = value.Bytes() - case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": - x.BlockNumberNonce = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": - panic(fmt.Errorf("field domain of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": - panic(fmt.Errorf("field chain_id of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": - panic(fmt.Errorf("field ring_id of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": - panic(fmt.Errorf("field ring_pk of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": - panic(fmt.Errorf("field current_ring_sha256 of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": - panic(fmt.Errorf("field finalized_ring_sha256 of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": - panic(fmt.Errorf("field block_number_nonce of message sourcehub.orbis.RingReshareFinalizeSignDoc is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.RingReshareFinalizeSignDoc.domain": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.RingReshareFinalizeSignDoc.chain_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.RingReshareFinalizeSignDoc.namespace": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.RingReshareFinalizeSignDoc.ring_pk": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.RingReshareFinalizeSignDoc.current_ring_sha256": - return protoreflect.ValueOfBytes(nil) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.finalized_ring_sha256": - return protoreflect.ValueOfBytes(nil) - case "sourcehub.orbis.RingReshareFinalizeSignDoc.block_number_nonce": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.RingReshareFinalizeSignDoc")) - } - panic(fmt.Errorf("message sourcehub.orbis.RingReshareFinalizeSignDoc 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_RingReshareFinalizeSignDoc) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.RingReshareFinalizeSignDoc", 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_RingReshareFinalizeSignDoc) 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_RingReshareFinalizeSignDoc) 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_RingReshareFinalizeSignDoc) 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_RingReshareFinalizeSignDoc) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RingReshareFinalizeSignDoc) - 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.Domain) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingPk) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CurrentRingSha256) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.FinalizedRingSha256) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.BlockNumberNonce != 0 { - n += 1 + runtime.Sov(uint64(x.BlockNumberNonce)) - } - 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().(*RingReshareFinalizeSignDoc) - 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.BlockNumberNonce != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockNumberNonce)) - i-- - dAtA[i] = 0x40 - } - if len(x.FinalizedRingSha256) > 0 { - i -= len(x.FinalizedRingSha256) - copy(dAtA[i:], x.FinalizedRingSha256) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FinalizedRingSha256))) - i-- - dAtA[i] = 0x3a - } - if len(x.CurrentRingSha256) > 0 { - i -= len(x.CurrentRingSha256) - copy(dAtA[i:], x.CurrentRingSha256) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CurrentRingSha256))) - i-- - dAtA[i] = 0x32 - } - if len(x.RingPk) > 0 { - i -= len(x.RingPk) - copy(dAtA[i:], x.RingPk) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingPk))) - i-- - dAtA[i] = 0x2a - } - if len(x.RingId) > 0 { - i -= len(x.RingId) - copy(dAtA[i:], x.RingId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) - i-- - dAtA[i] = 0x22 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Domain) > 0 { - i -= len(x.Domain) - copy(dAtA[i:], x.Domain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Domain))) - 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().(*RingReshareFinalizeSignDoc) - 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: RingReshareFinalizeSignDoc: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RingReshareFinalizeSignDoc: 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 Domain", 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.Domain = 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 ChainId", 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.ChainId = 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 Namespace", 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.Namespace = 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 RingId", 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.RingId = 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 RingPk", 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.RingPk = 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 CurrentRingSha256", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CurrentRingSha256 = append(x.CurrentRingSha256[:0], dAtA[iNdEx:postIndex]...) - if x.CurrentRingSha256 == nil { - x.CurrentRingSha256 = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FinalizedRingSha256", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.FinalizedRingSha256 = append(x.FinalizedRingSha256[:0], dAtA[iNdEx:postIndex]...) - if x.FinalizedRingSha256 == nil { - x.FinalizedRingSha256 = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) - } - x.BlockNumberNonce = 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.BlockNumberNonce |= 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_MsgStoreDocument protoreflect.MessageDescriptor - fd_MsgStoreDocument_creator protoreflect.FieldDescriptor - fd_MsgStoreDocument_namespace protoreflect.FieldDescriptor - fd_MsgStoreDocument_ring_id protoreflect.FieldDescriptor - fd_MsgStoreDocument_document protoreflect.FieldDescriptor - fd_MsgStoreDocument_proof protoreflect.FieldDescriptor - fd_MsgStoreDocument_policy_id protoreflect.FieldDescriptor - fd_MsgStoreDocument_resource protoreflect.FieldDescriptor - fd_MsgStoreDocument_permission protoreflect.FieldDescriptor - fd_MsgStoreDocument_tier protoreflect.FieldDescriptor - fd_MsgStoreDocument_timestamp protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgStoreDocument = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgStoreDocument") - fd_MsgStoreDocument_creator = md_MsgStoreDocument.Fields().ByName("creator") - fd_MsgStoreDocument_namespace = md_MsgStoreDocument.Fields().ByName("namespace") - fd_MsgStoreDocument_ring_id = md_MsgStoreDocument.Fields().ByName("ring_id") - fd_MsgStoreDocument_document = md_MsgStoreDocument.Fields().ByName("document") - fd_MsgStoreDocument_proof = md_MsgStoreDocument.Fields().ByName("proof") - fd_MsgStoreDocument_policy_id = md_MsgStoreDocument.Fields().ByName("policy_id") - fd_MsgStoreDocument_resource = md_MsgStoreDocument.Fields().ByName("resource") - fd_MsgStoreDocument_permission = md_MsgStoreDocument.Fields().ByName("permission") - fd_MsgStoreDocument_tier = md_MsgStoreDocument.Fields().ByName("tier") - fd_MsgStoreDocument_timestamp = md_MsgStoreDocument.Fields().ByName("timestamp") -} - -var _ protoreflect.Message = (*fastReflection_MsgStoreDocument)(nil) - -type fastReflection_MsgStoreDocument MsgStoreDocument - -func (x *MsgStoreDocument) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgStoreDocument)(x) -} - -func (x *MsgStoreDocument) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_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_MsgStoreDocument_messageType fastReflection_MsgStoreDocument_messageType -var _ protoreflect.MessageType = fastReflection_MsgStoreDocument_messageType{} - -type fastReflection_MsgStoreDocument_messageType struct{} - -func (x fastReflection_MsgStoreDocument_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgStoreDocument)(nil) -} -func (x fastReflection_MsgStoreDocument_messageType) New() protoreflect.Message { - return new(fastReflection_MsgStoreDocument) -} -func (x fastReflection_MsgStoreDocument_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgStoreDocument -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgStoreDocument) Descriptor() protoreflect.MessageDescriptor { - return md_MsgStoreDocument -} - -// 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_MsgStoreDocument) Type() protoreflect.MessageType { - return _fastReflection_MsgStoreDocument_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgStoreDocument) New() protoreflect.Message { - return new(fastReflection_MsgStoreDocument) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgStoreDocument) Interface() protoreflect.ProtoMessage { - return (*MsgStoreDocument)(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_MsgStoreDocument) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgStoreDocument_creator, value) { - return - } - } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_MsgStoreDocument_namespace, value) { - return - } - } - if x.RingId != "" { - value := protoreflect.ValueOfString(x.RingId) - if !f(fd_MsgStoreDocument_ring_id, value) { - return - } - } - if x.Document != "" { - value := protoreflect.ValueOfString(x.Document) - if !f(fd_MsgStoreDocument_document, value) { - return - } - } - if x.Proof != "" { - value := protoreflect.ValueOfString(x.Proof) - if !f(fd_MsgStoreDocument_proof, value) { - return - } - } - if x.PolicyId != "" { - value := protoreflect.ValueOfString(x.PolicyId) - if !f(fd_MsgStoreDocument_policy_id, value) { - return - } - } - if x.Resource != "" { - value := protoreflect.ValueOfString(x.Resource) - if !f(fd_MsgStoreDocument_resource, value) { - return - } - } - if x.Permission != "" { - value := protoreflect.ValueOfString(x.Permission) - if !f(fd_MsgStoreDocument_permission, value) { - return - } - } - if x.XTier != nil { - switch o := x.XTier.(type) { - case *MsgStoreDocument_Tier: - v := o.Tier - value := protoreflect.ValueOfString(v) - if !f(fd_MsgStoreDocument_tier, value) { - return - } - } - } - if x.XTimestamp != nil { - switch o := x.XTimestamp.(type) { - case *MsgStoreDocument_Timestamp: - v := o.Timestamp - value := protoreflect.ValueOfUint64(v) - if !f(fd_MsgStoreDocument_timestamp, 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_MsgStoreDocument) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocument.creator": - return x.Creator != "" - case "sourcehub.orbis.MsgStoreDocument.namespace": - return x.Namespace != "" - case "sourcehub.orbis.MsgStoreDocument.ring_id": - return x.RingId != "" - case "sourcehub.orbis.MsgStoreDocument.document": - return x.Document != "" - case "sourcehub.orbis.MsgStoreDocument.proof": - return x.Proof != "" - case "sourcehub.orbis.MsgStoreDocument.policy_id": - return x.PolicyId != "" - case "sourcehub.orbis.MsgStoreDocument.resource": - return x.Resource != "" - case "sourcehub.orbis.MsgStoreDocument.permission": - return x.Permission != "" - case "sourcehub.orbis.MsgStoreDocument.tier": - if x.XTier == nil { - return false - } else if _, ok := x.XTier.(*MsgStoreDocument_Tier); ok { - return true - } else { - return false - } - case "sourcehub.orbis.MsgStoreDocument.timestamp": - if x.XTimestamp == nil { - return false - } else if _, ok := x.XTimestamp.(*MsgStoreDocument_Timestamp); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocument.creator": - x.Creator = "" - case "sourcehub.orbis.MsgStoreDocument.namespace": - x.Namespace = "" - case "sourcehub.orbis.MsgStoreDocument.ring_id": - x.RingId = "" - case "sourcehub.orbis.MsgStoreDocument.document": - x.Document = "" - case "sourcehub.orbis.MsgStoreDocument.proof": - x.Proof = "" - case "sourcehub.orbis.MsgStoreDocument.policy_id": - x.PolicyId = "" - case "sourcehub.orbis.MsgStoreDocument.resource": - x.Resource = "" - case "sourcehub.orbis.MsgStoreDocument.permission": - x.Permission = "" - case "sourcehub.orbis.MsgStoreDocument.tier": - x.XTier = nil - case "sourcehub.orbis.MsgStoreDocument.timestamp": - x.XTimestamp = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.MsgStoreDocument.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreDocument.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreDocument.ring_id": - value := x.RingId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreDocument.document": - value := x.Document - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreDocument.proof": - value := x.Proof - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreDocument.policy_id": - value := x.PolicyId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreDocument.resource": - value := x.Resource - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreDocument.permission": - value := x.Permission - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreDocument.tier": - if x.XTier == nil { - return protoreflect.ValueOfString("") - } else if v, ok := x.XTier.(*MsgStoreDocument_Tier); ok { - return protoreflect.ValueOfString(v.Tier) - } else { - return protoreflect.ValueOfString("") - } - case "sourcehub.orbis.MsgStoreDocument.timestamp": - if x.XTimestamp == nil { - return protoreflect.ValueOfUint64(uint64(0)) - } else if v, ok := x.XTimestamp.(*MsgStoreDocument_Timestamp); ok { - return protoreflect.ValueOfUint64(v.Timestamp) - } else { - return protoreflect.ValueOfUint64(uint64(0)) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocument.creator": - x.Creator = value.Interface().(string) - case "sourcehub.orbis.MsgStoreDocument.namespace": - x.Namespace = value.Interface().(string) - case "sourcehub.orbis.MsgStoreDocument.ring_id": - x.RingId = value.Interface().(string) - case "sourcehub.orbis.MsgStoreDocument.document": - x.Document = value.Interface().(string) - case "sourcehub.orbis.MsgStoreDocument.proof": - x.Proof = value.Interface().(string) - case "sourcehub.orbis.MsgStoreDocument.policy_id": - x.PolicyId = value.Interface().(string) - case "sourcehub.orbis.MsgStoreDocument.resource": - x.Resource = value.Interface().(string) - case "sourcehub.orbis.MsgStoreDocument.permission": - x.Permission = value.Interface().(string) - case "sourcehub.orbis.MsgStoreDocument.tier": - cv := value.Interface().(string) - x.XTier = &MsgStoreDocument_Tier{Tier: cv} - case "sourcehub.orbis.MsgStoreDocument.timestamp": - cv := value.Uint() - x.XTimestamp = &MsgStoreDocument_Timestamp{Timestamp: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocument.creator": - panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.ring_id": - panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.document": - panic(fmt.Errorf("field document of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.proof": - panic(fmt.Errorf("field proof of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.policy_id": - panic(fmt.Errorf("field policy_id of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.resource": - panic(fmt.Errorf("field resource of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.permission": - panic(fmt.Errorf("field permission of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.tier": - panic(fmt.Errorf("field tier of message sourcehub.orbis.MsgStoreDocument is not mutable")) - case "sourcehub.orbis.MsgStoreDocument.timestamp": - panic(fmt.Errorf("field timestamp of message sourcehub.orbis.MsgStoreDocument is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocument.creator": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.namespace": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.ring_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.document": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.proof": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.policy_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.resource": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.permission": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.tier": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreDocument.timestamp": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocument")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocument 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_MsgStoreDocument) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "sourcehub.orbis.MsgStoreDocument._tier": - if x.XTier == nil { - return nil - } - switch x.XTier.(type) { - case *MsgStoreDocument_Tier: - return x.Descriptor().Fields().ByName("tier") - } - case "sourcehub.orbis.MsgStoreDocument._timestamp": - if x.XTimestamp == nil { - return nil - } - switch x.XTimestamp.(type) { - case *MsgStoreDocument_Timestamp: - return x.Descriptor().Fields().ByName("timestamp") - } - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgStoreDocument", 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_MsgStoreDocument) 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_MsgStoreDocument) 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_MsgStoreDocument) 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_MsgStoreDocument) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgStoreDocument) - 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.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Document) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Proof) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PolicyId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Resource) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Permission) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Tier != nil { - l = len(*x.Tier) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Timestamp != nil { - n += 1 + runtime.Sov(uint64(*x.Timestamp)) - } - 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().(*MsgStoreDocument) - 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) - } - switch x := x.XTimestamp.(type) { - case *MsgStoreDocument_Timestamp: - i = runtime.EncodeVarint(dAtA, i, uint64(*x.Timestamp)) - i-- - dAtA[i] = 0x50 - } - switch x := x.XTier.(type) { - case *MsgStoreDocument_Tier: - i -= len(*x.Tier) - copy(dAtA[i:], *x.Tier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(*x.Tier))) - i-- - dAtA[i] = 0x4a - } - if x.Timestamp != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.Timestamp)) - i-- - dAtA[i] = 0x50 - } - if x.Tier != nil { - i -= len(*x.Tier) - copy(dAtA[i:], *x.Tier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(*x.Tier))) - i-- - dAtA[i] = 0x4a - } - if len(x.Permission) > 0 { - i -= len(x.Permission) - copy(dAtA[i:], x.Permission) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permission))) - i-- - dAtA[i] = 0x42 - } - if len(x.Resource) > 0 { - i -= len(x.Resource) - copy(dAtA[i:], x.Resource) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resource))) - i-- - dAtA[i] = 0x3a - } - if len(x.PolicyId) > 0 { - i -= len(x.PolicyId) - copy(dAtA[i:], x.PolicyId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) - i-- - dAtA[i] = 0x32 - } - if len(x.Proof) > 0 { - i -= len(x.Proof) - copy(dAtA[i:], x.Proof) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) - i-- - dAtA[i] = 0x2a - } - if len(x.Document) > 0 { - i -= len(x.Document) - copy(dAtA[i:], x.Document) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Document))) - i-- - dAtA[i] = 0x22 - } - if len(x.RingId) > 0 { - i -= len(x.RingId) - copy(dAtA[i:], x.RingId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) - i-- - dAtA[i] = 0x1a - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - 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().(*MsgStoreDocument) - 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: MsgStoreDocument: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgStoreDocument: 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 Creator", 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.Creator = 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 Namespace", 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.Namespace = 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 RingId", 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.RingId = 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 Document", 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.Document = 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 Proof", 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.Proof = 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 PolicyId", 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.PolicyId = 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 Resource", 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.Resource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permission", 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.Permission = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tier", 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 - } - s := string(dAtA[iNdEx:postIndex]) - x.Tier = &s - iNdEx = postIndex - case 10: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Timestamp = &v - 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_MsgStoreDocumentResponse protoreflect.MessageDescriptor - fd_MsgStoreDocumentResponse_document_id protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgStoreDocumentResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgStoreDocumentResponse") - fd_MsgStoreDocumentResponse_document_id = md_MsgStoreDocumentResponse.Fields().ByName("document_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgStoreDocumentResponse)(nil) - -type fastReflection_MsgStoreDocumentResponse MsgStoreDocumentResponse - -func (x *MsgStoreDocumentResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgStoreDocumentResponse)(x) -} - -func (x *MsgStoreDocumentResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_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_MsgStoreDocumentResponse_messageType fastReflection_MsgStoreDocumentResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgStoreDocumentResponse_messageType{} - -type fastReflection_MsgStoreDocumentResponse_messageType struct{} - -func (x fastReflection_MsgStoreDocumentResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgStoreDocumentResponse)(nil) -} -func (x fastReflection_MsgStoreDocumentResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgStoreDocumentResponse) -} -func (x fastReflection_MsgStoreDocumentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgStoreDocumentResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgStoreDocumentResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgStoreDocumentResponse -} - -// 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_MsgStoreDocumentResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgStoreDocumentResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgStoreDocumentResponse) New() protoreflect.Message { - return new(fastReflection_MsgStoreDocumentResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgStoreDocumentResponse) Interface() protoreflect.ProtoMessage { - return (*MsgStoreDocumentResponse)(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_MsgStoreDocumentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DocumentId != "" { - value := protoreflect.ValueOfString(x.DocumentId) - if !f(fd_MsgStoreDocumentResponse_document_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_MsgStoreDocumentResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": - return x.DocumentId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": - x.DocumentId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": - value := x.DocumentId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": - x.DocumentId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": - panic(fmt.Errorf("field document_id of message sourcehub.orbis.MsgStoreDocumentResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreDocumentResponse.document_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreDocumentResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreDocumentResponse 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_MsgStoreDocumentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgStoreDocumentResponse", 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_MsgStoreDocumentResponse) 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_MsgStoreDocumentResponse) 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_MsgStoreDocumentResponse) 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_MsgStoreDocumentResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgStoreDocumentResponse) - 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.DocumentId) - 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().(*MsgStoreDocumentResponse) - 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.DocumentId) > 0 { - i -= len(x.DocumentId) - copy(dAtA[i:], x.DocumentId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DocumentId))) - 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().(*MsgStoreDocumentResponse) - 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: MsgStoreDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgStoreDocumentResponse: 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 DocumentId", 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.DocumentId = 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_MsgStoreKeyDerivation protoreflect.MessageDescriptor - fd_MsgStoreKeyDerivation_creator protoreflect.FieldDescriptor - fd_MsgStoreKeyDerivation_namespace protoreflect.FieldDescriptor - fd_MsgStoreKeyDerivation_ring_id protoreflect.FieldDescriptor - fd_MsgStoreKeyDerivation_derivation protoreflect.FieldDescriptor - fd_MsgStoreKeyDerivation_policy_id protoreflect.FieldDescriptor - fd_MsgStoreKeyDerivation_resource protoreflect.FieldDescriptor - fd_MsgStoreKeyDerivation_permission protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgStoreKeyDerivation = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgStoreKeyDerivation") - fd_MsgStoreKeyDerivation_creator = md_MsgStoreKeyDerivation.Fields().ByName("creator") - fd_MsgStoreKeyDerivation_namespace = md_MsgStoreKeyDerivation.Fields().ByName("namespace") - fd_MsgStoreKeyDerivation_ring_id = md_MsgStoreKeyDerivation.Fields().ByName("ring_id") - fd_MsgStoreKeyDerivation_derivation = md_MsgStoreKeyDerivation.Fields().ByName("derivation") - fd_MsgStoreKeyDerivation_policy_id = md_MsgStoreKeyDerivation.Fields().ByName("policy_id") - fd_MsgStoreKeyDerivation_resource = md_MsgStoreKeyDerivation.Fields().ByName("resource") - fd_MsgStoreKeyDerivation_permission = md_MsgStoreKeyDerivation.Fields().ByName("permission") -} - -var _ protoreflect.Message = (*fastReflection_MsgStoreKeyDerivation)(nil) - -type fastReflection_MsgStoreKeyDerivation MsgStoreKeyDerivation - -func (x *MsgStoreKeyDerivation) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgStoreKeyDerivation)(x) -} - -func (x *MsgStoreKeyDerivation) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_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_MsgStoreKeyDerivation_messageType fastReflection_MsgStoreKeyDerivation_messageType -var _ protoreflect.MessageType = fastReflection_MsgStoreKeyDerivation_messageType{} - -type fastReflection_MsgStoreKeyDerivation_messageType struct{} - -func (x fastReflection_MsgStoreKeyDerivation_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgStoreKeyDerivation)(nil) -} -func (x fastReflection_MsgStoreKeyDerivation_messageType) New() protoreflect.Message { - return new(fastReflection_MsgStoreKeyDerivation) -} -func (x fastReflection_MsgStoreKeyDerivation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgStoreKeyDerivation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgStoreKeyDerivation) Descriptor() protoreflect.MessageDescriptor { - return md_MsgStoreKeyDerivation -} - -// 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_MsgStoreKeyDerivation) Type() protoreflect.MessageType { - return _fastReflection_MsgStoreKeyDerivation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgStoreKeyDerivation) New() protoreflect.Message { - return new(fastReflection_MsgStoreKeyDerivation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgStoreKeyDerivation) Interface() protoreflect.ProtoMessage { - return (*MsgStoreKeyDerivation)(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_MsgStoreKeyDerivation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgStoreKeyDerivation_creator, value) { - return - } - } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_MsgStoreKeyDerivation_namespace, value) { - return - } - } - if x.RingId != "" { - value := protoreflect.ValueOfString(x.RingId) - if !f(fd_MsgStoreKeyDerivation_ring_id, value) { - return - } - } - if x.Derivation != "" { - value := protoreflect.ValueOfString(x.Derivation) - if !f(fd_MsgStoreKeyDerivation_derivation, value) { - return - } - } - if x.PolicyId != "" { - value := protoreflect.ValueOfString(x.PolicyId) - if !f(fd_MsgStoreKeyDerivation_policy_id, value) { - return - } - } - if x.Resource != "" { - value := protoreflect.ValueOfString(x.Resource) - if !f(fd_MsgStoreKeyDerivation_resource, value) { - return - } - } - if x.Permission != "" { - value := protoreflect.ValueOfString(x.Permission) - if !f(fd_MsgStoreKeyDerivation_permission, 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_MsgStoreKeyDerivation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivation.creator": - return x.Creator != "" - case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": - return x.Namespace != "" - case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": - return x.RingId != "" - case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": - return x.Derivation != "" - case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": - return x.PolicyId != "" - case "sourcehub.orbis.MsgStoreKeyDerivation.resource": - return x.Resource != "" - case "sourcehub.orbis.MsgStoreKeyDerivation.permission": - return x.Permission != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivation.creator": - x.Creator = "" - case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": - x.Namespace = "" - case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": - x.RingId = "" - case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": - x.Derivation = "" - case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": - x.PolicyId = "" - case "sourcehub.orbis.MsgStoreKeyDerivation.resource": - x.Resource = "" - case "sourcehub.orbis.MsgStoreKeyDerivation.permission": - x.Permission = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivation.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": - value := x.RingId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": - value := x.Derivation - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": - value := x.PolicyId - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreKeyDerivation.resource": - value := x.Resource - return protoreflect.ValueOfString(value) - case "sourcehub.orbis.MsgStoreKeyDerivation.permission": - value := x.Permission - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivation.creator": - x.Creator = value.Interface().(string) - case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": - x.Namespace = value.Interface().(string) - case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": - x.RingId = value.Interface().(string) - case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": - x.Derivation = value.Interface().(string) - case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": - x.PolicyId = value.Interface().(string) - case "sourcehub.orbis.MsgStoreKeyDerivation.resource": - x.Resource = value.Interface().(string) - case "sourcehub.orbis.MsgStoreKeyDerivation.permission": - x.Permission = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivation.creator": - panic(fmt.Errorf("field creator of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) - case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) - case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": - panic(fmt.Errorf("field ring_id of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) - case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": - panic(fmt.Errorf("field derivation of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) - case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": - panic(fmt.Errorf("field policy_id of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) - case "sourcehub.orbis.MsgStoreKeyDerivation.resource": - panic(fmt.Errorf("field resource of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) - case "sourcehub.orbis.MsgStoreKeyDerivation.permission": - panic(fmt.Errorf("field permission of message sourcehub.orbis.MsgStoreKeyDerivation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivation.creator": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreKeyDerivation.namespace": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreKeyDerivation.ring_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreKeyDerivation.derivation": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreKeyDerivation.policy_id": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreKeyDerivation.resource": - return protoreflect.ValueOfString("") - case "sourcehub.orbis.MsgStoreKeyDerivation.permission": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivation")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivation 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_MsgStoreKeyDerivation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgStoreKeyDerivation", 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_MsgStoreKeyDerivation) 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_MsgStoreKeyDerivation) 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_MsgStoreKeyDerivation) 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_MsgStoreKeyDerivation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgStoreKeyDerivation) - 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.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RingId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Derivation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PolicyId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Resource) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Permission) - 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().(*MsgStoreKeyDerivation) - 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.Permission) > 0 { - i -= len(x.Permission) - copy(dAtA[i:], x.Permission) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permission))) - i-- - dAtA[i] = 0x3a - } - if len(x.Resource) > 0 { - i -= len(x.Resource) - copy(dAtA[i:], x.Resource) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resource))) - i-- - dAtA[i] = 0x32 - } - if len(x.PolicyId) > 0 { - i -= len(x.PolicyId) - copy(dAtA[i:], x.PolicyId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) - i-- - dAtA[i] = 0x2a - } - if len(x.Derivation) > 0 { - i -= len(x.Derivation) - copy(dAtA[i:], x.Derivation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Derivation))) - i-- - dAtA[i] = 0x22 - } - if len(x.RingId) > 0 { - i -= len(x.RingId) - copy(dAtA[i:], x.RingId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) - i-- - dAtA[i] = 0x1a - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - 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().(*MsgStoreKeyDerivation) - 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: MsgStoreKeyDerivation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgStoreKeyDerivation: 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 Creator", 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.Creator = 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 Namespace", 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.Namespace = 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 RingId", 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.RingId = 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 Derivation", 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.Derivation = 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 PolicyId", 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.PolicyId = 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 Resource", 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.Resource = 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 Permission", 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.Permission = 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_MsgStoreKeyDerivationResponse protoreflect.MessageDescriptor - fd_MsgStoreKeyDerivationResponse_key_derivation_id protoreflect.FieldDescriptor -) - -func init() { - file_sourcehub_orbis_tx_proto_init() - md_MsgStoreKeyDerivationResponse = File_sourcehub_orbis_tx_proto.Messages().ByName("MsgStoreKeyDerivationResponse") - fd_MsgStoreKeyDerivationResponse_key_derivation_id = md_MsgStoreKeyDerivationResponse.Fields().ByName("key_derivation_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgStoreKeyDerivationResponse)(nil) - -type fastReflection_MsgStoreKeyDerivationResponse MsgStoreKeyDerivationResponse - -func (x *MsgStoreKeyDerivationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgStoreKeyDerivationResponse)(x) -} - -func (x *MsgStoreKeyDerivationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_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_MsgStoreKeyDerivationResponse_messageType fastReflection_MsgStoreKeyDerivationResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgStoreKeyDerivationResponse_messageType{} - -type fastReflection_MsgStoreKeyDerivationResponse_messageType struct{} - -func (x fastReflection_MsgStoreKeyDerivationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgStoreKeyDerivationResponse)(nil) -} -func (x fastReflection_MsgStoreKeyDerivationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgStoreKeyDerivationResponse) -} -func (x fastReflection_MsgStoreKeyDerivationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgStoreKeyDerivationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgStoreKeyDerivationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgStoreKeyDerivationResponse -} - -// 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_MsgStoreKeyDerivationResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgStoreKeyDerivationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgStoreKeyDerivationResponse) New() protoreflect.Message { - return new(fastReflection_MsgStoreKeyDerivationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgStoreKeyDerivationResponse) Interface() protoreflect.ProtoMessage { - return (*MsgStoreKeyDerivationResponse)(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_MsgStoreKeyDerivationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.KeyDerivationId != "" { - value := protoreflect.ValueOfString(x.KeyDerivationId) - if !f(fd_MsgStoreKeyDerivationResponse_key_derivation_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_MsgStoreKeyDerivationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": - return x.KeyDerivationId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": - x.KeyDerivationId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": - value := x.KeyDerivationId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": - x.KeyDerivationId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": - panic(fmt.Errorf("field key_derivation_id of message sourcehub.orbis.MsgStoreKeyDerivationResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "sourcehub.orbis.MsgStoreKeyDerivationResponse.key_derivation_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.MsgStoreKeyDerivationResponse")) - } - panic(fmt.Errorf("message sourcehub.orbis.MsgStoreKeyDerivationResponse 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_MsgStoreKeyDerivationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.MsgStoreKeyDerivationResponse", 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_MsgStoreKeyDerivationResponse) 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_MsgStoreKeyDerivationResponse) 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_MsgStoreKeyDerivationResponse) 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_MsgStoreKeyDerivationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgStoreKeyDerivationResponse) - 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.KeyDerivationId) - 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().(*MsgStoreKeyDerivationResponse) - 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.KeyDerivationId) > 0 { - i -= len(x.KeyDerivationId) - copy(dAtA[i:], x.KeyDerivationId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyDerivationId))) - 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().(*MsgStoreKeyDerivationResponse) - 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: MsgStoreKeyDerivationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgStoreKeyDerivationResponse: 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 KeyDerivationId", 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.KeyDerivationId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: sourcehub/orbis/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. -type MsgUpdateParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_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_sourcehub_orbis_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 MsgUpdateParams. -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_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_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{1} -} - -type MsgCreateRing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` - // Absent means automatic PSS refresh is disabled. - PssInterval *uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` - PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` -} - -func (x *MsgCreateRing) Reset() { - *x = MsgCreateRing{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateRing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateRing) ProtoMessage() {} - -// Deprecated: Use MsgCreateRing.ProtoReflect.Descriptor instead. -func (*MsgCreateRing) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgCreateRing) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgCreateRing) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *MsgCreateRing) GetRingPk() string { - if x != nil { - return x.RingPk - } - return "" -} - -func (x *MsgCreateRing) GetPeerIds() []string { - if x != nil { - return x.PeerIds - } - return nil -} - -func (x *MsgCreateRing) GetThreshold() uint32 { - if x != nil { - return x.Threshold - } - return 0 -} - -func (x *MsgCreateRing) GetPssInterval() uint64 { - if x != nil && x.PssInterval != nil { - return *x.PssInterval - } - return 0 -} - -func (x *MsgCreateRing) GetPolicyId() string { - if x != nil { - return x.PolicyId - } - return "" -} - -func (x *MsgCreateRing) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - -type MsgCreateRingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` -} - -func (x *MsgCreateRingResponse) Reset() { - *x = MsgCreateRingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateRingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateRingResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreateRingResponse.ProtoReflect.Descriptor instead. -func (*MsgCreateRingResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgCreateRingResponse) GetRingId() string { - if x != nil { - return x.RingId - } - return "" -} - -type MsgUpdateRingByAcp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` - // Absent means no pending threshold update. - NewThreshold *uint32 `protobuf:"varint,4,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` - // Absent means no PSS refresh interval update. - PssInterval *uint64 `protobuf:"varint,5,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` -} - -func (x *MsgUpdateRingByAcp) Reset() { - *x = MsgUpdateRingByAcp{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateRingByAcp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateRingByAcp) ProtoMessage() {} - -// Deprecated: Use MsgUpdateRingByAcp.ProtoReflect.Descriptor instead. -func (*MsgUpdateRingByAcp) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgUpdateRingByAcp) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgUpdateRingByAcp) GetRingId() string { - if x != nil { - return x.RingId - } - return "" -} - -func (x *MsgUpdateRingByAcp) GetNewPeerIds() []string { - if x != nil { - return x.NewPeerIds - } - return nil -} - -func (x *MsgUpdateRingByAcp) GetNewThreshold() uint32 { - if x != nil && x.NewThreshold != nil { - return *x.NewThreshold - } - return 0 -} - -func (x *MsgUpdateRingByAcp) GetPssInterval() uint64 { - if x != nil && x.PssInterval != nil { - return *x.PssInterval - } - return 0 -} - -type MsgUpdateRingByAcpResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateRingByAcpResponse) Reset() { - *x = MsgUpdateRingByAcpResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateRingByAcpResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateRingByAcpResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateRingByAcpResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateRingByAcpResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{5} -} - -type MsgFinalizeRingReshareByThresholdSignature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - SignatureScheme string `protobuf:"bytes,3,opt,name=signature_scheme,json=signatureScheme,proto3" json:"signature_scheme,omitempty"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *MsgFinalizeRingReshareByThresholdSignature) Reset() { - *x = MsgFinalizeRingReshareByThresholdSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgFinalizeRingReshareByThresholdSignature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgFinalizeRingReshareByThresholdSignature) ProtoMessage() {} - -// Deprecated: Use MsgFinalizeRingReshareByThresholdSignature.ProtoReflect.Descriptor instead. -func (*MsgFinalizeRingReshareByThresholdSignature) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgFinalizeRingReshareByThresholdSignature) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgFinalizeRingReshareByThresholdSignature) GetRingId() string { - if x != nil { - return x.RingId - } - return "" -} - -func (x *MsgFinalizeRingReshareByThresholdSignature) GetSignatureScheme() string { - if x != nil { - return x.SignatureScheme - } - return "" -} - -func (x *MsgFinalizeRingReshareByThresholdSignature) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type MsgFinalizeRingReshareByThresholdSignatureResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) Reset() { - *x = MsgFinalizeRingReshareByThresholdSignatureResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoMessage() {} - -// Deprecated: Use MsgFinalizeRingReshareByThresholdSignatureResponse.ProtoReflect.Descriptor instead. -func (*MsgFinalizeRingReshareByThresholdSignatureResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{7} -} - -type RingReshareFinalizeSignDoc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - RingPk string `protobuf:"bytes,5,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - CurrentRingSha256 []byte `protobuf:"bytes,6,opt,name=current_ring_sha256,json=currentRingSha256,proto3" json:"current_ring_sha256,omitempty"` - FinalizedRingSha256 []byte `protobuf:"bytes,7,opt,name=finalized_ring_sha256,json=finalizedRingSha256,proto3" json:"finalized_ring_sha256,omitempty"` - BlockNumberNonce uint64 `protobuf:"varint,8,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` -} - -func (x *RingReshareFinalizeSignDoc) Reset() { - *x = RingReshareFinalizeSignDoc{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RingReshareFinalizeSignDoc) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RingReshareFinalizeSignDoc) ProtoMessage() {} - -// Deprecated: Use RingReshareFinalizeSignDoc.ProtoReflect.Descriptor instead. -func (*RingReshareFinalizeSignDoc) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *RingReshareFinalizeSignDoc) GetDomain() string { - if x != nil { - return x.Domain - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetRingId() string { - if x != nil { - return x.RingId - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetRingPk() string { - if x != nil { - return x.RingPk - } - return "" -} - -func (x *RingReshareFinalizeSignDoc) GetCurrentRingSha256() []byte { - if x != nil { - return x.CurrentRingSha256 - } - return nil -} - -func (x *RingReshareFinalizeSignDoc) GetFinalizedRingSha256() []byte { - if x != nil { - return x.FinalizedRingSha256 - } - return nil -} - -func (x *RingReshareFinalizeSignDoc) GetBlockNumberNonce() uint64 { - if x != nil { - return x.BlockNumberNonce - } - return 0 -} - -type MsgStoreDocument struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` - // Absent means no tier. - Tier *string `protobuf:"bytes,9,opt,name=tier,proto3,oneof" json:"tier,omitempty"` - // Absent means no timestamp. - Timestamp *uint64 `protobuf:"varint,10,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` -} - -func (x *MsgStoreDocument) Reset() { - *x = MsgStoreDocument{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgStoreDocument) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgStoreDocument) ProtoMessage() {} - -// Deprecated: Use MsgStoreDocument.ProtoReflect.Descriptor instead. -func (*MsgStoreDocument) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{9} -} - -func (x *MsgStoreDocument) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgStoreDocument) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *MsgStoreDocument) GetRingId() string { - if x != nil { - return x.RingId - } - return "" -} - -func (x *MsgStoreDocument) GetDocument() string { - if x != nil { - return x.Document - } - return "" -} - -func (x *MsgStoreDocument) GetProof() string { - if x != nil { - return x.Proof - } - return "" -} - -func (x *MsgStoreDocument) GetPolicyId() string { - if x != nil { - return x.PolicyId - } - return "" -} - -func (x *MsgStoreDocument) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *MsgStoreDocument) GetPermission() string { - if x != nil { - return x.Permission - } - return "" -} - -func (x *MsgStoreDocument) GetTier() string { - if x != nil && x.Tier != nil { - return *x.Tier - } - return "" -} - -func (x *MsgStoreDocument) GetTimestamp() uint64 { - if x != nil && x.Timestamp != nil { - return *x.Timestamp - } - return 0 -} - -type MsgStoreDocumentResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` -} - -func (x *MsgStoreDocumentResponse) Reset() { - *x = MsgStoreDocumentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgStoreDocumentResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgStoreDocumentResponse) ProtoMessage() {} - -// Deprecated: Use MsgStoreDocumentResponse.ProtoReflect.Descriptor instead. -func (*MsgStoreDocumentResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{10} -} - -func (x *MsgStoreDocumentResponse) GetDocumentId() string { - if x != nil { - return x.DocumentId - } - return "" -} - -type MsgStoreKeyDerivation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Derivation string `protobuf:"bytes,4,opt,name=derivation,proto3" json:"derivation,omitempty"` - PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` -} - -func (x *MsgStoreKeyDerivation) Reset() { - *x = MsgStoreKeyDerivation{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgStoreKeyDerivation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgStoreKeyDerivation) ProtoMessage() {} - -// Deprecated: Use MsgStoreKeyDerivation.ProtoReflect.Descriptor instead. -func (*MsgStoreKeyDerivation) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{11} -} - -func (x *MsgStoreKeyDerivation) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgStoreKeyDerivation) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *MsgStoreKeyDerivation) GetRingId() string { - if x != nil { - return x.RingId - } - return "" -} - -func (x *MsgStoreKeyDerivation) GetDerivation() string { - if x != nil { - return x.Derivation - } - return "" -} - -func (x *MsgStoreKeyDerivation) GetPolicyId() string { - if x != nil { - return x.PolicyId - } - return "" -} - -func (x *MsgStoreKeyDerivation) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *MsgStoreKeyDerivation) GetPermission() string { - if x != nil { - return x.Permission - } - return "" -} - -type MsgStoreKeyDerivationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - KeyDerivationId string `protobuf:"bytes,1,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` -} - -func (x *MsgStoreKeyDerivationResponse) Reset() { - *x = MsgStoreKeyDerivationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgStoreKeyDerivationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgStoreKeyDerivationResponse) ProtoMessage() {} - -// Deprecated: Use MsgStoreKeyDerivationResponse.ProtoReflect.Descriptor instead. -func (*MsgStoreKeyDerivationResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{12} -} - -func (x *MsgStoreKeyDerivationResponse) GetKeyDerivationId() string { - if x != nil { - return x.KeyDerivationId - } - return "" -} - -var File_sourcehub_orbis_tx_proto protoreflect.FileDescriptor - -var file_sourcehub_orbis_tx_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x1a, 0x11, 0x61, 0x6d, 0x69, - 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 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, 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 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, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, - 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x34, - 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, - 0xb0, 0x2a, 0x21, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 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, - 0x99, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, - 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, - 0x50, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x70, - 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x04, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x3a, 0x0c, 0x82, 0xe7, - 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, - 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x30, 0x0a, 0x15, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0xec, 0x01, - 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, - 0x79, 0x41, 0x63, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x17, - 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, - 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, - 0x65, 0x77, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x6e, 0x65, 0x77, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0b, 0x70, 0x73, 0x73, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, - 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, - 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x70, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, - 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x2a, 0x4d, - 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x22, 0x34, 0x0a, 0x32, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x1a, 0x52, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, - 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6b, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, 0x61, 0x32, - 0x35, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x32, 0x0a, 0x15, 0x66, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x68, - 0x61, 0x32, 0x35, 0x36, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, - 0x2c, 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0xcf, 0x02, - 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, - 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, - 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, - 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, - 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x74, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x69, 0x65, - 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, - 0x3b, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xef, 0x01, 0x0a, - 0x15, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, - 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4b, - 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2a, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x44, - 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0x9e, 0x05, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x12, 0x5a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, - 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 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, - 0x54, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x1a, 0x26, 0x2e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, 0x63, 0x70, 0x1a, 0x2b, 0x2e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x41, - 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xab, 0x01, 0x0a, 0x27, 0x46, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, - 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, - 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x1a, 0x43, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, - 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0x79, 0x54, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, - 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x29, 0x2e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, - 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9d, 0x01, 0x0a, - 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sourcehub_orbis_tx_proto_rawDescOnce sync.Once - file_sourcehub_orbis_tx_proto_rawDescData = file_sourcehub_orbis_tx_proto_rawDesc -) - -func file_sourcehub_orbis_tx_proto_rawDescGZIP() []byte { - file_sourcehub_orbis_tx_proto_rawDescOnce.Do(func() { - file_sourcehub_orbis_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_tx_proto_rawDescData) - }) - return file_sourcehub_orbis_tx_proto_rawDescData -} - -var file_sourcehub_orbis_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_sourcehub_orbis_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: sourcehub.orbis.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.orbis.MsgUpdateParamsResponse - (*MsgCreateRing)(nil), // 2: sourcehub.orbis.MsgCreateRing - (*MsgCreateRingResponse)(nil), // 3: sourcehub.orbis.MsgCreateRingResponse - (*MsgUpdateRingByAcp)(nil), // 4: sourcehub.orbis.MsgUpdateRingByAcp - (*MsgUpdateRingByAcpResponse)(nil), // 5: sourcehub.orbis.MsgUpdateRingByAcpResponse - (*MsgFinalizeRingReshareByThresholdSignature)(nil), // 6: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature - (*MsgFinalizeRingReshareByThresholdSignatureResponse)(nil), // 7: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse - (*RingReshareFinalizeSignDoc)(nil), // 8: sourcehub.orbis.RingReshareFinalizeSignDoc - (*MsgStoreDocument)(nil), // 9: sourcehub.orbis.MsgStoreDocument - (*MsgStoreDocumentResponse)(nil), // 10: sourcehub.orbis.MsgStoreDocumentResponse - (*MsgStoreKeyDerivation)(nil), // 11: sourcehub.orbis.MsgStoreKeyDerivation - (*MsgStoreKeyDerivationResponse)(nil), // 12: sourcehub.orbis.MsgStoreKeyDerivationResponse - (*Params)(nil), // 13: sourcehub.orbis.Params -} -var file_sourcehub_orbis_tx_proto_depIdxs = []int32{ - 13, // 0: sourcehub.orbis.MsgUpdateParams.params:type_name -> sourcehub.orbis.Params - 0, // 1: sourcehub.orbis.Msg.UpdateParams:input_type -> sourcehub.orbis.MsgUpdateParams - 2, // 2: sourcehub.orbis.Msg.CreateRing:input_type -> sourcehub.orbis.MsgCreateRing - 4, // 3: sourcehub.orbis.Msg.UpdateRingByAcp:input_type -> sourcehub.orbis.MsgUpdateRingByAcp - 6, // 4: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:input_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature - 9, // 5: sourcehub.orbis.Msg.StoreDocument:input_type -> sourcehub.orbis.MsgStoreDocument - 11, // 6: sourcehub.orbis.Msg.StoreKeyDerivation:input_type -> sourcehub.orbis.MsgStoreKeyDerivation - 1, // 7: sourcehub.orbis.Msg.UpdateParams:output_type -> sourcehub.orbis.MsgUpdateParamsResponse - 3, // 8: sourcehub.orbis.Msg.CreateRing:output_type -> sourcehub.orbis.MsgCreateRingResponse - 5, // 9: sourcehub.orbis.Msg.UpdateRingByAcp:output_type -> sourcehub.orbis.MsgUpdateRingByAcpResponse - 7, // 10: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:output_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse - 10, // 11: sourcehub.orbis.Msg.StoreDocument:output_type -> sourcehub.orbis.MsgStoreDocumentResponse - 12, // 12: sourcehub.orbis.Msg.StoreKeyDerivation:output_type -> sourcehub.orbis.MsgStoreKeyDerivationResponse - 7, // [7:13] is the sub-list for method output_type - 1, // [1:7] 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_sourcehub_orbis_tx_proto_init() } -func file_sourcehub_orbis_tx_proto_init() { - if File_sourcehub_orbis_tx_proto != nil { - return - } - file_sourcehub_orbis_params_proto_init() - if !protoimpl.UnsafeEnabled { - file_sourcehub_orbis_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_sourcehub_orbis_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_sourcehub_orbis_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateRing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateRingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateRingByAcp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateRingByAcpResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgFinalizeRingReshareByThresholdSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgFinalizeRingReshareByThresholdSignatureResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RingReshareFinalizeSignDoc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgStoreDocument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgStoreDocumentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgStoreKeyDerivation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sourcehub_orbis_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgStoreKeyDerivationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_sourcehub_orbis_tx_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_sourcehub_orbis_tx_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_sourcehub_orbis_tx_proto_msgTypes[9].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sourcehub_orbis_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_sourcehub_orbis_tx_proto_goTypes, - DependencyIndexes: file_sourcehub_orbis_tx_proto_depIdxs, - MessageInfos: file_sourcehub_orbis_tx_proto_msgTypes, - }.Build() - File_sourcehub_orbis_tx_proto = out.File - file_sourcehub_orbis_tx_proto_rawDesc = nil - file_sourcehub_orbis_tx_proto_goTypes = nil - file_sourcehub_orbis_tx_proto_depIdxs = nil -} diff --git a/proto/buf.gen.orbis.optional.yaml b/proto/buf.gen.orbis.optional.yaml new file mode 100644 index 00000000..2ec30a91 --- /dev/null +++ b/proto/buf.gen.orbis.optional.yaml @@ -0,0 +1,22 @@ +# Generates API Go types for Orbis protos that use proto3 optional scalars. +# protoc-gen-go-pulsar v1.0.0-beta.5 emits invalid fast-reflection code for +# these files, so make proto excludes them from Pulsar and runs this template. +version: v2 +managed: + enabled: true + override: + - file_option: go_package_prefix + value: cosmossdk.io/api + disable: + - module: buf.build/googleapis/googleapis + - module: buf.build/cosmos/gogo-proto + - module: buf.build/cosmos/cosmos-proto + - module: buf.build/sourcenetwork/acp-core +plugins: + - local: ["go", "run", "google.golang.org/protobuf/cmd/protoc-gen-go"] + out: ./api + opt: paths=source_relative + + - local: protoc-gen-go-grpc + out: ./api + opt: paths=source_relative diff --git a/proto/buf.gen.pulsar.yaml b/proto/buf.gen.pulsar.yaml index f1cf031e..36d3e86e 100644 --- a/proto/buf.gen.pulsar.yaml +++ b/proto/buf.gen.pulsar.yaml @@ -16,13 +16,13 @@ managed: plugins: - name: go-pulsar out: ./api - opt: - - paths=source_relative - - Msourcenetwork/acp_core/relationship.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - - Msourcenetwork/acp_core/policy_short.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - - Msourcenetwork/acp_core/policy.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - - Msourcenetwork/acp_core/relationship_selector.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - - Msourcenetwork/acp_core/request.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types + opt: + - paths=source_relative + - Msourcenetwork/acp_core/relationship.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types + - Msourcenetwork/acp_core/policy_short.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types + - Msourcenetwork/acp_core/policy.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types + - Msourcenetwork/acp_core/relationship_selector.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types + - Msourcenetwork/acp_core/request.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - name: go-grpc out: ./api From f6a59e22dfdc112e2697daf6289decd822cba7f9 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Thu, 21 May 2026 15:00:31 -0400 Subject: [PATCH 6/8] put bulletin and tests back --- x/bulletin/keeper/msg_server.go | 16 +- x/bulletin/keeper/msg_server_test.go | 703 +++++++++++++++++++++++++-- 2 files changed, 673 insertions(+), 46 deletions(-) diff --git a/x/bulletin/keeper/msg_server.go b/x/bulletin/keeper/msg_server.go index bf5fc522..2ae7f50c 100644 --- a/x/bulletin/keeper/msg_server.go +++ b/x/bulletin/keeper/msg_server.go @@ -71,10 +71,12 @@ func (k *Keeper) RegisterNamespace(goCtx context.Context, msg *types.MsgRegister } // CreatePost adds a new post to the specified (existing) namespace. -// Post creation is unrestricted: any valid signer may create a post in any -// registered namespace. Duplicate (namespace, payload) pairs are rejected -// because post_id is derived from them. +// The signer must have permission to create posts in that namespace. func (k *Keeper) CreatePost(goCtx context.Context, msg *types.MsgCreatePost) (*types.MsgCreatePostResponse, error) { + policyId := k.GetPolicyId(goCtx) + if policyId == "" { + return nil, types.ErrInvalidPolicyId + } ctx := sdk.UnwrapSDKContext(goCtx) namespaceId := getNamespaceId(msg.Namespace) @@ -87,6 +89,14 @@ func (k *Keeper) CreatePost(goCtx context.Context, msg *types.MsgCreatePost) (*t return nil, err } + hasPermission, err := hasPermission(goCtx, k, policyId, namespaceId, types.CreatePostPermission, creatorDID, msg.Creator) + if err != nil { + return nil, err + } + if !hasPermission { + return nil, types.ErrInvalidPostCreator + } + postId := types.GeneratePostId(namespaceId, msg.Payload) if existing := k.getPost(goCtx, namespaceId, postId); existing != nil { diff --git a/x/bulletin/keeper/msg_server_test.go b/x/bulletin/keeper/msg_server_test.go index 1dd02403..b1a4be73 100644 --- a/x/bulletin/keeper/msg_server_test.go +++ b/x/bulletin/keeper/msg_server_test.go @@ -11,69 +11,686 @@ import ( "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) -func TestMsgCreatePost_DoesNotValidatePayloadShape(t *testing.T) { +func TestMsgServer(t *testing.T) { k, ctx := setupKeeper(t) - require.NoError(t, k.SetParams(ctx, types.DefaultParams())) + require.NotNil(t, ctx) + require.NotEmpty(t, k) +} - ownerKey := secp256k1.GenPrivKey().PubKey() - owner := authtypes.NewBaseAccount(sdk.AccAddress(ownerKey.Address()), ownerKey, 1, 1) - k.accountKeeper.SetAccount(ctx, owner) +func TestMsgUpdateParams(t *testing.T) { + k, ctx := setupKeeper(t) + params := types.DefaultParams() + require.NoError(t, k.SetParams(ctx, params)) + wctx := sdk.UnwrapSDKContext(ctx) - namespace := "orbis/rings/ring1" + // default params + testCases := []struct { + name string + input *types.MsgUpdateParams + expErr bool + expErrMsg string + }{ + { + name: "invalid authority", + input: &types.MsgUpdateParams{ + Authority: "invalid", + Params: params, + }, + expErr: true, + expErrMsg: "invalid authority", + }, + { + name: "send enabled param", + input: &types.MsgUpdateParams{ + Authority: k.GetAuthority(), + Params: types.Params{}, + }, + expErr: false, + }, + { + name: "all good", + input: &types.MsgUpdateParams{ + Authority: k.GetAuthority(), + Params: params, + }, + expErr: false, + }, + } - _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ - Creator: owner.Address, - Namespace: namespace, - }) - require.NoError(t, err) + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, err := k.UpdateParams(wctx, tc.input) - _, err = k.CreatePost(ctx, &types.MsgCreatePost{ - Creator: owner.Address, - Namespace: namespace, - Payload: []byte(`{"anything":"goes"}`), - }) - require.NoError(t, err) + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestMsgRegisterNamespace(t *testing.T) { + k, ctx := setupKeeper(t) + + p := types.DefaultParams() + require.NoError(t, k.SetParams(ctx, p)) + + pubKey := secp256k1.GenPrivKey().PubKey() + addr := sdk.AccAddress(pubKey.Address()) + baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) + k.accountKeeper.SetAccount(ctx, baseAcc) + + namespace := "ns1" + + testCases := []struct { + name string + input *types.MsgRegisterNamespace + setup func() + expErr bool + expErrMsg string + }{ + { + name: "register namespace (error: invalid creator address)", + input: &types.MsgRegisterNamespace{}, + setup: func() {}, + expErr: true, + expErrMsg: "invalid creator address", + }, + { + name: "register namespace (error: invalid namespace id)", + input: &types.MsgRegisterNamespace{ + Creator: baseAcc.Address, + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid namespace id", + }, + { + name: "register namespace (error: fetching capability for policy)", + input: &types.MsgRegisterNamespace{ + Creator: baseAcc.Address, + Namespace: namespace, + }, + setup: func() { + k.SetPolicyId(ctx, "policy1") + }, + expErr: true, + expErrMsg: "fetching capability for policy", + }, + { + name: "register namespace (error: fetching capability for invalid policy)", + input: &types.MsgRegisterNamespace{ + Creator: baseAcc.Address, + Namespace: namespace, + }, + setup: func() { + k.SetPolicyId(ctx, "invalidPolicy1") + }, + expErr: true, + expErrMsg: "fetching capability for policy invalidPolicy1", + }, + { + name: "register namespace (no error)", + input: &types.MsgRegisterNamespace{ + Creator: baseAcc.Address, + Namespace: namespace, + }, + setup: func() { + setupTestPolicy(t, ctx, k) + }, + expErr: false, + }, + { + name: "register namespace (error: namespace exists)", + input: &types.MsgRegisterNamespace{ + Creator: baseAcc.Address, + Namespace: namespace, + }, + setup: func() {}, + expErr: true, + expErrMsg: "namespace already exists", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.input.ValidateBasic() + if err != nil { + if tc.expErr { + require.Contains(t, err.Error(), tc.expErrMsg) + return + } + t.Fatalf("unexpected error in ValidateBasic: %v", err) + } - postID := types.GeneratePostId(getNamespaceId(namespace), []byte(`{"anything":"goes"}`)) - post := k.getPost(ctx, getNamespaceId(namespace), postID) - require.NotNil(t, post) - require.Equal(t, []byte(`{"anything":"goes"}`), post.Payload) + tc.setup() + + _, err = k.RegisterNamespace(ctx, tc.input) + + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } } -func TestPolicy_CreatePostPermissionSurvives(t *testing.T) { +func TestMsgCreatePost(t *testing.T) { k, ctx := setupKeeper(t) - require.NoError(t, k.SetParams(ctx, types.DefaultParams())) - ownerKey := secp256k1.GenPrivKey().PubKey() - owner := authtypes.NewBaseAccount(sdk.AccAddress(ownerKey.Address()), ownerKey, 1, 1) - k.accountKeeper.SetAccount(ctx, owner) + p := types.DefaultParams() + require.NoError(t, k.SetParams(ctx, p)) - collabKey := secp256k1.GenPrivKey().PubKey() - collab := authtypes.NewBaseAccount(sdk.AccAddress(collabKey.Address()), collabKey, 2, 1) - k.accountKeeper.SetAccount(ctx, collab) + pubKey := secp256k1.GenPrivKey().PubKey() + addr := sdk.AccAddress(pubKey.Address()) + baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) + k.accountKeeper.SetAccount(ctx, baseAcc) - setupTestPolicy(t, ctx, k) + pubKey2 := secp256k1.GenPrivKey().PubKey() + addr2 := sdk.AccAddress(pubKey2.Address()) + baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) + k.accountKeeper.SetAccount(ctx, baseAcc2) + + namespace := "ns1" + + testCases := []struct { + name string + input *types.MsgCreatePost + setup func() + expErr bool + expErrMsg string + }{ + { + name: "create post (error: invalid creator address)", + input: &types.MsgCreatePost{}, + setup: func() {}, + expErr: true, + expErrMsg: "nvalid creator address", + }, + { + name: "create post (error: invalid namespace id)", + input: &types.MsgCreatePost{ + Creator: baseAcc.Address, + Payload: []byte("post123"), + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid namespace id", + }, + { + name: "create post (error: no payload)", + input: &types.MsgCreatePost{ + Creator: baseAcc.Address, + Namespace: namespace, + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid post payload", + }, + { + name: "create post (error: no policy)", + input: &types.MsgCreatePost{ + Creator: baseAcc.Address, + Namespace: namespace, + Payload: []byte("post123"), + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid policy id", + }, + { + name: "create post (error: no namespace)", + input: &types.MsgCreatePost{ + Creator: baseAcc.Address, + Namespace: namespace, + Payload: []byte("post123"), + }, + setup: func() { + k.SetPolicyId(ctx, "policy1") + }, + expErr: true, + expErrMsg: "namespace not found", + }, + { + name: "create post (no error)", + input: &types.MsgCreatePost{ + Creator: baseAcc.Address, + Namespace: namespace, + Payload: []byte("post123"), + }, + setup: func() { + setupTestPolicy(t, ctx, k) + + _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ + Creator: baseAcc.Address, + Namespace: namespace, + }) + require.NoError(t, err) + }, + expErr: false, + }, + { + name: "create post (error: post already exists)", + input: &types.MsgCreatePost{ + Creator: baseAcc.Address, + Namespace: namespace, + Payload: []byte("post123"), + }, + setup: func() {}, + expErr: true, + expErrMsg: "post already exists", + }, + { + name: "create post (error: unauthorized)", + input: &types.MsgCreatePost{ + Creator: baseAcc2.Address, + Namespace: namespace, + Payload: []byte("post1234"), + }, + setup: func() {}, + expErr: true, + expErrMsg: "expected authorized account as a post creator", + }, + { + name: "create post from collaborator (no error)", + input: &types.MsgCreatePost{ + Creator: baseAcc2.Address, + Namespace: namespace, + Payload: []byte("post1234"), + }, + setup: func() { + _, err := k.AddCollaborator(ctx, &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }) + require.NoError(t, err) + }, + expErr: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.input.ValidateBasic() + if err != nil { + if tc.expErr { + require.Contains(t, err.Error(), tc.expErrMsg) + return + } + t.Fatalf("unexpected error in ValidateBasic: %v", err) + } + + tc.setup() - namespace := "ns-create-perm" - namespaceId := getNamespaceId(namespace) + _, err = k.CreatePost(ctx, tc.input) + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestMsgCreatePost_EmitsArtifactInEvent(t *testing.T) { + k, ctx := setupKeeper(t) + // given test policy and namespace + pubKey := secp256k1.GenPrivKey().PubKey() + addr := sdk.AccAddress(pubKey.Address()) + baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) + k.accountKeeper.SetAccount(ctx, baseAcc) + setupTestPolicy(t, ctx, k) _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ - Creator: owner.Address, - Namespace: namespace, + Creator: baseAcc.Address, + Namespace: "ns1", }) require.NoError(t, err) - _, err = k.AddCollaborator(ctx, &types.MsgAddCollaborator{ - Creator: owner.Address, - Namespace: namespace, - Collaborator: collab.Address, - }) - require.NoError(t, err) + // reset event manager + ctx = ctx.WithEventManager(sdk.NewEventManager()) + + // when i create post + post := types.MsgCreatePost{ + Creator: baseAcc.Address, + Namespace: "ns1", + Payload: []byte("some payload"), + Artifact: "session-id", + } + _, err = k.CreatePost(ctx, &post) - collabDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, collab.Address) + // then post emit event with artifact require.NoError(t, err) - allowed, err := hasPermission(ctx, &k, k.GetPolicyId(ctx), namespaceId, types.CreatePostPermission, collabDID, collab.Address) + evs := ctx.EventManager().Events() + require.Len(t, evs, 1) + + creatorDid, err := k.acpKeeper.GetActorDID(ctx, baseAcc.Address) require.NoError(t, err) - require.True(t, allowed) + eventDid := "\"" + creatorDid + "\"" + ev := evs[0] + require.Equal(t, `"session-id"`, ev.Attributes[0].Value) + require.Equal(t, eventDid, ev.Attributes[1].Value) + require.Equal(t, `"bulletin/ns1"`, ev.Attributes[2].Value) +} + +func TestMsgAddCollaborator(t *testing.T) { + k, ctx := setupKeeper(t) + + p := types.DefaultParams() + require.NoError(t, k.SetParams(ctx, p)) + + pubKey := secp256k1.GenPrivKey().PubKey() + addr := sdk.AccAddress(pubKey.Address()) + baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) + k.accountKeeper.SetAccount(ctx, baseAcc) + + pubKey2 := secp256k1.GenPrivKey().PubKey() + addr2 := sdk.AccAddress(pubKey2.Address()) + baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) + k.accountKeeper.SetAccount(ctx, baseAcc2) + + pubKey3 := secp256k1.GenPrivKey().PubKey() + addr3 := sdk.AccAddress(pubKey3.Address()) + baseAcc3 := authtypes.NewBaseAccount(addr3, pubKey3, 3, 1) + k.accountKeeper.SetAccount(ctx, baseAcc3) + + namespace := "ns1" + + testCases := []struct { + name string + input *types.MsgAddCollaborator + setup func() + expErr bool + expErrMsg string + }{ + { + name: "add collaborator (error: invalid creator address)", + input: &types.MsgAddCollaborator{}, + setup: func() {}, + expErr: true, + expErrMsg: "invalid creator address", + }, + { + name: "add collaborator (error: invalid namespace id)", + input: &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid namespace id", + }, + { + name: "add collaborator (error: invalid collaborator address)", + input: &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + Namespace: namespace, + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid collaborator address", + }, + { + name: "add collaborator (error: invalid policy id)", + input: &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid policy id", + }, + { + name: "add collaborator (error: namespace not found)", + input: &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }, + setup: func() { + k.SetPolicyId(ctx, "policy1") + }, + expErr: true, + expErrMsg: "namespace not found", + }, + { + name: "add collaborator (no error)", + input: &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }, + setup: func() { + setupTestPolicy(t, ctx, k) + + _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ + Creator: baseAcc.Address, + Namespace: namespace, + }) + require.NoError(t, err) + }, + expErr: false, + }, + { + name: "add collaborator (error: collaborator already exists)", + input: &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }, + setup: func() {}, + expErr: true, + expErrMsg: "collaborator already exists", + }, + { + name: "add collaborator (error: unauthorized)", + input: &types.MsgAddCollaborator{ + Creator: baseAcc2.Address, + Collaborator: baseAcc3.Address, + Namespace: namespace, + }, + setup: func() {}, + expErr: true, + expErrMsg: "actor is not a manager of relation", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.input.ValidateBasic() + if err != nil { + if tc.expErr { + require.Contains(t, err.Error(), tc.expErrMsg) + return + } + t.Fatalf("unexpected error in ValidateBasic: %v", err) + } + + tc.setup() + + _, err = k.AddCollaborator(ctx, tc.input) + + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } } + +func TestMsgRemoveCollaborator(t *testing.T) { + k, ctx := setupKeeper(t) + + p := types.DefaultParams() + require.NoError(t, k.SetParams(ctx, p)) + + pubKey := secp256k1.GenPrivKey().PubKey() + addr := sdk.AccAddress(pubKey.Address()) + baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) + k.accountKeeper.SetAccount(ctx, baseAcc) + + pubKey2 := secp256k1.GenPrivKey().PubKey() + addr2 := sdk.AccAddress(pubKey2.Address()) + baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) + k.accountKeeper.SetAccount(ctx, baseAcc2) + + pubKey3 := secp256k1.GenPrivKey().PubKey() + addr3 := sdk.AccAddress(pubKey3.Address()) + baseAcc3 := authtypes.NewBaseAccount(addr3, pubKey3, 3, 1) + k.accountKeeper.SetAccount(ctx, baseAcc3) + + namespace := "ns1" + + testCases := []struct { + name string + input *types.MsgRemoveCollaborator + setup func() + expErr bool + expErrMsg string + }{ + { + name: "remove collaborator (error: invalid creator address)", + input: &types.MsgRemoveCollaborator{}, + setup: func() {}, + expErr: true, + expErrMsg: "invalid creator address", + }, + { + name: "remove collaborator (error: invalid namespace id)", + input: &types.MsgRemoveCollaborator{ + Creator: baseAcc.Address, + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid namespace id", + }, + { + name: "remove collaborator (error: invalid collaborator address)", + input: &types.MsgRemoveCollaborator{ + Creator: baseAcc.Address, + Namespace: namespace, + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid collaborator address", + }, + { + name: "remove collaborator (error: invalid policy id)", + input: &types.MsgRemoveCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }, + setup: func() {}, + expErr: true, + expErrMsg: "invalid policy id", + }, + { + name: "remove collaborator (error: namespace not found)", + input: &types.MsgRemoveCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }, + setup: func() { + k.SetPolicyId(ctx, "policy1") + }, + expErr: true, + expErrMsg: "namespace not found", + }, + { + name: "remove collaborator (no error)", + input: &types.MsgRemoveCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }, + setup: func() { + setupTestPolicy(t, ctx, k) + + _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ + Creator: baseAcc.Address, + Namespace: namespace, + }) + require.NoError(t, err) + + _, err = k.AddCollaborator(ctx, &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }) + require.NoError(t, err) + }, + expErr: false, + }, + { + name: "remove collaborator (error: collaborator not found)", + input: &types.MsgRemoveCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }, + setup: func() {}, + expErr: true, + expErrMsg: "collaborator not found", + }, + { + name: "remove collaborator (error: unauthorized)", + input: &types.MsgRemoveCollaborator{ + Creator: baseAcc2.Address, + Collaborator: baseAcc3.Address, + Namespace: namespace, + }, + setup: func() { + _, err := k.AddCollaborator(ctx, &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc2.Address, + Namespace: namespace, + }) + require.NoError(t, err) + + _, err = k.AddCollaborator(ctx, &types.MsgAddCollaborator{ + Creator: baseAcc.Address, + Collaborator: baseAcc3.Address, + Namespace: namespace, + }) + require.NoError(t, err) + }, + expErr: true, + expErrMsg: "actor is not a manager of relation", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.input.ValidateBasic() + if err != nil { + if tc.expErr { + require.Contains(t, err.Error(), tc.expErrMsg) + return + } + t.Fatalf("unexpected error in ValidateBasic: %v", err) + } + + tc.setup() + + _, err = k.RemoveCollaborator(ctx, tc.input) + + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} \ No newline at end of file From ad1a75aaa1480ae2d3b9f11df659ba5632c9633d Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Mon, 25 May 2026 11:08:57 -0400 Subject: [PATCH 7/8] Add node info to orbis module (#114) * Add node info to orbis module * tests * add grpc node info endpoint * coderabbit --- api/sourcehub/orbis/events.pulsar.go | 1099 ++++++++++++++- api/sourcehub/orbis/genesis.pulsar.go | 231 +++- api/sourcehub/orbis/node_info.pulsar.go | 1475 +++++++++++++++++++++ api/sourcehub/orbis/query.pulsar.go | 1380 ++++++++++++++++--- api/sourcehub/orbis/query_grpc.pb.go | 40 + api/sourcehub/orbis/tx.pb.go | 291 +++- api/sourcehub/orbis/tx_grpc.pb.go | 76 ++ proto/sourcehub/orbis/events.proto | 12 + proto/sourcehub/orbis/genesis.proto | 5 + proto/sourcehub/orbis/node_info.proto | 18 + proto/sourcehub/orbis/query.proto | 14 + proto/sourcehub/orbis/tx.proto | 27 + testutil/keeper/orbis.go | 9 +- x/orbis/keeper/grpc_query.go | 13 + x/orbis/keeper/msg_server.go | 97 ++ x/orbis/keeper/msg_server_test.go | 198 +++ x/orbis/keeper/store.go | 41 + x/orbis/keeper/validation.go | 21 + x/orbis/module/autocli.go | 18 + x/orbis/module/genesis.go | 6 + x/orbis/types/codec.go | 2 + x/orbis/types/errors.go | 4 + x/orbis/types/events.pb.go | 490 ++++++- x/orbis/types/genesis.pb.go | 109 +- x/orbis/types/keys.go | 1 + x/orbis/types/message_create_node_info.go | 22 + x/orbis/types/message_update_node_info.go | 19 + x/orbis/types/node_info.pb.go | 717 ++++++++++ x/orbis/types/query.pb.go | 497 ++++++- x/orbis/types/query.pb.gw.go | 101 ++ x/orbis/types/tx.pb.go | 1449 ++++++++++++++++++-- 31 files changed, 8022 insertions(+), 460 deletions(-) create mode 100644 api/sourcehub/orbis/node_info.pulsar.go create mode 100644 proto/sourcehub/orbis/node_info.proto create mode 100644 x/orbis/types/message_create_node_info.go create mode 100644 x/orbis/types/message_update_node_info.go create mode 100644 x/orbis/types/node_info.pb.go diff --git a/api/sourcehub/orbis/events.pulsar.go b/api/sourcehub/orbis/events.pulsar.go index 071e98ef..b4226fc0 100644 --- a/api/sourcehub/orbis/events.pulsar.go +++ b/api/sourcehub/orbis/events.pulsar.go @@ -2268,6 +2268,974 @@ func (x *fastReflection_EventKeyDerivationStored) ProtoMethods() *protoiface.Met } } +var ( + md_EventNodeInfoCreated protoreflect.MessageDescriptor + fd_EventNodeInfoCreated_peer_id protoreflect.FieldDescriptor + fd_EventNodeInfoCreated_controller_key protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_events_proto_init() + md_EventNodeInfoCreated = File_sourcehub_orbis_events_proto.Messages().ByName("EventNodeInfoCreated") + fd_EventNodeInfoCreated_peer_id = md_EventNodeInfoCreated.Fields().ByName("peer_id") + fd_EventNodeInfoCreated_controller_key = md_EventNodeInfoCreated.Fields().ByName("controller_key") +} + +var _ protoreflect.Message = (*fastReflection_EventNodeInfoCreated)(nil) + +type fastReflection_EventNodeInfoCreated EventNodeInfoCreated + +func (x *EventNodeInfoCreated) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventNodeInfoCreated)(x) +} + +func (x *EventNodeInfoCreated) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_events_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_EventNodeInfoCreated_messageType fastReflection_EventNodeInfoCreated_messageType +var _ protoreflect.MessageType = fastReflection_EventNodeInfoCreated_messageType{} + +type fastReflection_EventNodeInfoCreated_messageType struct{} + +func (x fastReflection_EventNodeInfoCreated_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventNodeInfoCreated)(nil) +} +func (x fastReflection_EventNodeInfoCreated_messageType) New() protoreflect.Message { + return new(fastReflection_EventNodeInfoCreated) +} +func (x fastReflection_EventNodeInfoCreated_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventNodeInfoCreated +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventNodeInfoCreated) Descriptor() protoreflect.MessageDescriptor { + return md_EventNodeInfoCreated +} + +// 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_EventNodeInfoCreated) Type() protoreflect.MessageType { + return _fastReflection_EventNodeInfoCreated_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventNodeInfoCreated) New() protoreflect.Message { + return new(fastReflection_EventNodeInfoCreated) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventNodeInfoCreated) Interface() protoreflect.ProtoMessage { + return (*EventNodeInfoCreated)(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_EventNodeInfoCreated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.PeerId != "" { + value := protoreflect.ValueOfString(x.PeerId) + if !f(fd_EventNodeInfoCreated_peer_id, value) { + return + } + } + if x.ControllerKey != "" { + value := protoreflect.ValueOfString(x.ControllerKey) + if !f(fd_EventNodeInfoCreated_controller_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_EventNodeInfoCreated) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoCreated.peer_id": + return x.PeerId != "" + case "sourcehub.orbis.EventNodeInfoCreated.controller_key": + return x.ControllerKey != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoCreated 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_EventNodeInfoCreated) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoCreated.peer_id": + x.PeerId = "" + case "sourcehub.orbis.EventNodeInfoCreated.controller_key": + x.ControllerKey = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoCreated 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_EventNodeInfoCreated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.EventNodeInfoCreated.peer_id": + value := x.PeerId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventNodeInfoCreated.controller_key": + value := x.ControllerKey + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoCreated 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_EventNodeInfoCreated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoCreated.peer_id": + x.PeerId = value.Interface().(string) + case "sourcehub.orbis.EventNodeInfoCreated.controller_key": + x.ControllerKey = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoCreated 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_EventNodeInfoCreated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoCreated.peer_id": + panic(fmt.Errorf("field peer_id of message sourcehub.orbis.EventNodeInfoCreated is not mutable")) + case "sourcehub.orbis.EventNodeInfoCreated.controller_key": + panic(fmt.Errorf("field controller_key of message sourcehub.orbis.EventNodeInfoCreated is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoCreated 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_EventNodeInfoCreated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoCreated.peer_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventNodeInfoCreated.controller_key": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoCreated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoCreated 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_EventNodeInfoCreated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.EventNodeInfoCreated", 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_EventNodeInfoCreated) 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_EventNodeInfoCreated) 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_EventNodeInfoCreated) 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_EventNodeInfoCreated) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventNodeInfoCreated) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.PeerId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ControllerKey) + 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().(*EventNodeInfoCreated) + 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.ControllerKey) > 0 { + i -= len(x.ControllerKey) + copy(dAtA[i:], x.ControllerKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerKey))) + i-- + dAtA[i] = 0x12 + } + if len(x.PeerId) > 0 { + i -= len(x.PeerId) + copy(dAtA[i:], x.PeerId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PeerId))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventNodeInfoCreated) + 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: EventNodeInfoCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventNodeInfoCreated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", 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.ControllerKey = 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_EventNodeInfoUpdated protoreflect.MessageDescriptor + fd_EventNodeInfoUpdated_peer_id protoreflect.FieldDescriptor + fd_EventNodeInfoUpdated_controller_key protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_events_proto_init() + md_EventNodeInfoUpdated = File_sourcehub_orbis_events_proto.Messages().ByName("EventNodeInfoUpdated") + fd_EventNodeInfoUpdated_peer_id = md_EventNodeInfoUpdated.Fields().ByName("peer_id") + fd_EventNodeInfoUpdated_controller_key = md_EventNodeInfoUpdated.Fields().ByName("controller_key") +} + +var _ protoreflect.Message = (*fastReflection_EventNodeInfoUpdated)(nil) + +type fastReflection_EventNodeInfoUpdated EventNodeInfoUpdated + +func (x *EventNodeInfoUpdated) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventNodeInfoUpdated)(x) +} + +func (x *EventNodeInfoUpdated) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_events_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_EventNodeInfoUpdated_messageType fastReflection_EventNodeInfoUpdated_messageType +var _ protoreflect.MessageType = fastReflection_EventNodeInfoUpdated_messageType{} + +type fastReflection_EventNodeInfoUpdated_messageType struct{} + +func (x fastReflection_EventNodeInfoUpdated_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventNodeInfoUpdated)(nil) +} +func (x fastReflection_EventNodeInfoUpdated_messageType) New() protoreflect.Message { + return new(fastReflection_EventNodeInfoUpdated) +} +func (x fastReflection_EventNodeInfoUpdated_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventNodeInfoUpdated +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventNodeInfoUpdated) Descriptor() protoreflect.MessageDescriptor { + return md_EventNodeInfoUpdated +} + +// 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_EventNodeInfoUpdated) Type() protoreflect.MessageType { + return _fastReflection_EventNodeInfoUpdated_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventNodeInfoUpdated) New() protoreflect.Message { + return new(fastReflection_EventNodeInfoUpdated) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventNodeInfoUpdated) Interface() protoreflect.ProtoMessage { + return (*EventNodeInfoUpdated)(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_EventNodeInfoUpdated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.PeerId != "" { + value := protoreflect.ValueOfString(x.PeerId) + if !f(fd_EventNodeInfoUpdated_peer_id, value) { + return + } + } + if x.ControllerKey != "" { + value := protoreflect.ValueOfString(x.ControllerKey) + if !f(fd_EventNodeInfoUpdated_controller_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_EventNodeInfoUpdated) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoUpdated.peer_id": + return x.PeerId != "" + case "sourcehub.orbis.EventNodeInfoUpdated.controller_key": + return x.ControllerKey != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoUpdated 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_EventNodeInfoUpdated) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoUpdated.peer_id": + x.PeerId = "" + case "sourcehub.orbis.EventNodeInfoUpdated.controller_key": + x.ControllerKey = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoUpdated 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_EventNodeInfoUpdated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.EventNodeInfoUpdated.peer_id": + value := x.PeerId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventNodeInfoUpdated.controller_key": + value := x.ControllerKey + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoUpdated 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_EventNodeInfoUpdated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoUpdated.peer_id": + x.PeerId = value.Interface().(string) + case "sourcehub.orbis.EventNodeInfoUpdated.controller_key": + x.ControllerKey = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoUpdated 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_EventNodeInfoUpdated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoUpdated.peer_id": + panic(fmt.Errorf("field peer_id of message sourcehub.orbis.EventNodeInfoUpdated is not mutable")) + case "sourcehub.orbis.EventNodeInfoUpdated.controller_key": + panic(fmt.Errorf("field controller_key of message sourcehub.orbis.EventNodeInfoUpdated is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoUpdated 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_EventNodeInfoUpdated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventNodeInfoUpdated.peer_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventNodeInfoUpdated.controller_key": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventNodeInfoUpdated")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventNodeInfoUpdated 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_EventNodeInfoUpdated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.EventNodeInfoUpdated", 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_EventNodeInfoUpdated) 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_EventNodeInfoUpdated) 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_EventNodeInfoUpdated) 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_EventNodeInfoUpdated) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventNodeInfoUpdated) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.PeerId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ControllerKey) + 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().(*EventNodeInfoUpdated) + 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.ControllerKey) > 0 { + i -= len(x.ControllerKey) + copy(dAtA[i:], x.ControllerKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerKey))) + i-- + dAtA[i] = 0x12 + } + if len(x.PeerId) > 0 { + i -= len(x.PeerId) + copy(dAtA[i:], x.PeerId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PeerId))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventNodeInfoUpdated) + 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: EventNodeInfoUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventNodeInfoUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", 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.ControllerKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -2497,6 +3465,94 @@ func (x *EventKeyDerivationStored) GetCreatorDid() string { return "" } +// EventNodeInfoCreated is emitted when a node info record is created. +type EventNodeInfoCreated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` +} + +func (x *EventNodeInfoCreated) Reset() { + *x = EventNodeInfoCreated{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_events_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventNodeInfoCreated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventNodeInfoCreated) ProtoMessage() {} + +// Deprecated: Use EventNodeInfoCreated.ProtoReflect.Descriptor instead. +func (*EventNodeInfoCreated) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{4} +} + +func (x *EventNodeInfoCreated) GetPeerId() string { + if x != nil { + return x.PeerId + } + return "" +} + +func (x *EventNodeInfoCreated) GetControllerKey() string { + if x != nil { + return x.ControllerKey + } + return "" +} + +// EventNodeInfoUpdated is emitted when a node info record is updated. +type EventNodeInfoUpdated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` +} + +func (x *EventNodeInfoUpdated) Reset() { + *x = EventNodeInfoUpdated{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_events_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventNodeInfoUpdated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventNodeInfoUpdated) ProtoMessage() {} + +// Deprecated: Use EventNodeInfoUpdated.ProtoReflect.Descriptor instead. +func (*EventNodeInfoUpdated) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{5} +} + +func (x *EventNodeInfoUpdated) GetPeerId() string { + if x != nil { + return x.PeerId + } + return "" +} + +func (x *EventNodeInfoUpdated) GetControllerKey() string { + if x != nil { + return x.ControllerKey + } + return "" +} + var File_sourcehub_orbis_events_proto protoreflect.FileDescriptor var file_sourcehub_orbis_events_proto_rawDesc = []byte{ @@ -2534,7 +3590,18 @@ var file_sourcehub_orbis_events_proto_rawDesc = []byte{ 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x44, 0x69, 0x64, 0x42, 0xa1, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x44, 0x69, 0x64, 0x22, 0x56, 0x0a, 0x14, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, + 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x56, 0x0a, 0x14, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x42, 0xa1, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, @@ -2559,12 +3626,14 @@ func file_sourcehub_orbis_events_proto_rawDescGZIP() []byte { return file_sourcehub_orbis_events_proto_rawDescData } -var file_sourcehub_orbis_events_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_sourcehub_orbis_events_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_sourcehub_orbis_events_proto_goTypes = []interface{}{ (*EventRingCreated)(nil), // 0: sourcehub.orbis.EventRingCreated (*EventRingUpdated)(nil), // 1: sourcehub.orbis.EventRingUpdated (*EventDocumentStored)(nil), // 2: sourcehub.orbis.EventDocumentStored (*EventKeyDerivationStored)(nil), // 3: sourcehub.orbis.EventKeyDerivationStored + (*EventNodeInfoCreated)(nil), // 4: sourcehub.orbis.EventNodeInfoCreated + (*EventNodeInfoUpdated)(nil), // 5: sourcehub.orbis.EventNodeInfoUpdated } var file_sourcehub_orbis_events_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -2628,6 +3697,30 @@ func file_sourcehub_orbis_events_proto_init() { return nil } } + file_sourcehub_orbis_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventNodeInfoCreated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventNodeInfoUpdated); 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{ @@ -2635,7 +3728,7 @@ func file_sourcehub_orbis_events_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_orbis_events_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/api/sourcehub/orbis/genesis.pulsar.go b/api/sourcehub/orbis/genesis.pulsar.go index fdabc5ed..02e0e378 100644 --- a/api/sourcehub/orbis/genesis.pulsar.go +++ b/api/sourcehub/orbis/genesis.pulsar.go @@ -167,12 +167,64 @@ func (x *_GenesisState_4_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_GenesisState_5_list)(nil) + +type _GenesisState_5_list struct { + list *[]*NodeInfoEntry +} + +func (x *_GenesisState_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*NodeInfoEntry) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*NodeInfoEntry) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { + v := new(NodeInfoEntry) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_5_list) NewElement() protoreflect.Value { + v := new(NodeInfoEntry) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) IsValid() bool { + return x.list != nil +} + var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_params protoreflect.FieldDescriptor fd_GenesisState_rings protoreflect.FieldDescriptor fd_GenesisState_documents protoreflect.FieldDescriptor fd_GenesisState_key_derivations protoreflect.FieldDescriptor + fd_GenesisState_node_infos protoreflect.FieldDescriptor ) func init() { @@ -182,6 +234,7 @@ func init() { fd_GenesisState_rings = md_GenesisState.Fields().ByName("rings") fd_GenesisState_documents = md_GenesisState.Fields().ByName("documents") fd_GenesisState_key_derivations = md_GenesisState.Fields().ByName("key_derivations") + fd_GenesisState_node_infos = md_GenesisState.Fields().ByName("node_infos") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -273,6 +326,12 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } + if len(x.NodeInfos) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.NodeInfos}) + if !f(fd_GenesisState_node_infos, value) { + return + } + } } // Has reports whether a field is populated. @@ -296,6 +355,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool return len(x.Documents) != 0 case "sourcehub.orbis.GenesisState.key_derivations": return len(x.KeyDerivations) != 0 + case "sourcehub.orbis.GenesisState.node_infos": + return len(x.NodeInfos) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) @@ -320,6 +381,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { x.Documents = nil case "sourcehub.orbis.GenesisState.key_derivations": x.KeyDerivations = nil + case "sourcehub.orbis.GenesisState.node_infos": + x.NodeInfos = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) @@ -357,6 +420,12 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto } listValue := &_GenesisState_4_list{list: &x.KeyDerivations} return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.GenesisState.node_infos": + if len(x.NodeInfos) == 0 { + return protoreflect.ValueOfList(&_GenesisState_5_list{}) + } + listValue := &_GenesisState_5_list{list: &x.NodeInfos} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) @@ -391,6 +460,10 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_GenesisState_4_list) x.KeyDerivations = *clv.list + case "sourcehub.orbis.GenesisState.node_infos": + lv := value.List() + clv := lv.(*_GenesisState_5_list) + x.NodeInfos = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) @@ -434,6 +507,12 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_4_list{list: &x.KeyDerivations} return protoreflect.ValueOfList(value) + case "sourcehub.orbis.GenesisState.node_infos": + if x.NodeInfos == nil { + x.NodeInfos = []*NodeInfoEntry{} + } + value := &_GenesisState_5_list{list: &x.NodeInfos} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) @@ -459,6 +538,9 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "sourcehub.orbis.GenesisState.key_derivations": list := []*KeyDerivation{} return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) + case "sourcehub.orbis.GenesisState.node_infos": + list := []*NodeInfoEntry{} + return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.GenesisState")) @@ -550,6 +632,12 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } + if len(x.NodeInfos) > 0 { + for _, e := range x.NodeInfos { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -579,6 +667,22 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.NodeInfos) > 0 { + for iNdEx := len(x.NodeInfos) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.NodeInfos[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + } if len(x.KeyDerivations) > 0 { for iNdEx := len(x.KeyDerivations) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.KeyDerivations[iNdEx]) @@ -828,6 +932,40 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NodeInfos", 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.NodeInfos = append(x.NodeInfos, &NodeInfoEntry{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NodeInfos[len(x.NodeInfos)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -886,6 +1024,7 @@ type GenesisState struct { Rings []*Ring `protobuf:"bytes,2,rep,name=rings,proto3" json:"rings,omitempty"` Documents []*Document `protobuf:"bytes,3,rep,name=documents,proto3" json:"documents,omitempty"` KeyDerivations []*KeyDerivation `protobuf:"bytes,4,rep,name=key_derivations,json=keyDerivations,proto3" json:"key_derivations,omitempty"` + NodeInfos []*NodeInfoEntry `protobuf:"bytes,5,rep,name=node_infos,json=nodeInfos,proto3" json:"node_infos,omitempty"` } func (x *GenesisState) Reset() { @@ -936,6 +1075,13 @@ func (x *GenesisState) GetKeyDerivations() []*KeyDerivation { return nil } +func (x *GenesisState) GetNodeInfos() []*NodeInfoEntry { + if x != nil { + return x.NodeInfos + } + return nil +} + var File_sourcehub_orbis_genesis_proto protoreflect.FileDescriptor var file_sourcehub_orbis_genesis_proto_rawDesc = []byte{ @@ -949,39 +1095,45 @@ var file_sourcehub_orbis_genesis_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, - 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x02, 0x0a, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x09, 0xc8, 0xde, - 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x42, - 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, - 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, - 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x52, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4b, 0x65, - 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, - 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xa2, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0c, - 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, - 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, + 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x02, 0x0a, 0x0c, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x42, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x52, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4b, + 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x73, 0x42, 0xa2, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, + 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, + 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, + 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, + 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1003,17 +1155,19 @@ var file_sourcehub_orbis_genesis_proto_goTypes = []interface{}{ (*Ring)(nil), // 2: sourcehub.orbis.Ring (*Document)(nil), // 3: sourcehub.orbis.Document (*KeyDerivation)(nil), // 4: sourcehub.orbis.KeyDerivation + (*NodeInfoEntry)(nil), // 5: sourcehub.orbis.NodeInfoEntry } var file_sourcehub_orbis_genesis_proto_depIdxs = []int32{ 1, // 0: sourcehub.orbis.GenesisState.params:type_name -> sourcehub.orbis.Params 2, // 1: sourcehub.orbis.GenesisState.rings:type_name -> sourcehub.orbis.Ring 3, // 2: sourcehub.orbis.GenesisState.documents:type_name -> sourcehub.orbis.Document 4, // 3: sourcehub.orbis.GenesisState.key_derivations:type_name -> sourcehub.orbis.KeyDerivation - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 5, // 4: sourcehub.orbis.GenesisState.node_infos:type_name -> sourcehub.orbis.NodeInfoEntry + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_sourcehub_orbis_genesis_proto_init() } @@ -1023,6 +1177,7 @@ func file_sourcehub_orbis_genesis_proto_init() { } file_sourcehub_orbis_document_proto_init() file_sourcehub_orbis_key_derivation_proto_init() + file_sourcehub_orbis_node_info_proto_init() file_sourcehub_orbis_params_proto_init() file_sourcehub_orbis_ring_proto_init() if !protoimpl.UnsafeEnabled { diff --git a/api/sourcehub/orbis/node_info.pulsar.go b/api/sourcehub/orbis/node_info.pulsar.go new file mode 100644 index 00000000..a1c2eca7 --- /dev/null +++ b/api/sourcehub/orbis/node_info.pulsar.go @@ -0,0 +1,1475 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package orbis + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_NodeInfo_3_list)(nil) + +type _NodeInfo_3_list struct { + list *[]string +} + +func (x *_NodeInfo_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_NodeInfo_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_NodeInfo_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_NodeInfo_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_NodeInfo_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message NodeInfo at list field WhitelistedNamespaces as it is not of Message kind")) +} + +func (x *_NodeInfo_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_NodeInfo_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_NodeInfo_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_NodeInfo_4_list)(nil) + +type _NodeInfo_4_list struct { + list *[]string +} + +func (x *_NodeInfo_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_NodeInfo_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_NodeInfo_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_NodeInfo_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_NodeInfo_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message NodeInfo at list field WhitelistedRingIds as it is not of Message kind")) +} + +func (x *_NodeInfo_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_NodeInfo_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_NodeInfo_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_NodeInfo protoreflect.MessageDescriptor + fd_NodeInfo_peer_id protoreflect.FieldDescriptor + fd_NodeInfo_controller_key protoreflect.FieldDescriptor + fd_NodeInfo_whitelisted_namespaces protoreflect.FieldDescriptor + fd_NodeInfo_whitelisted_ring_ids protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_node_info_proto_init() + md_NodeInfo = File_sourcehub_orbis_node_info_proto.Messages().ByName("NodeInfo") + fd_NodeInfo_peer_id = md_NodeInfo.Fields().ByName("peer_id") + fd_NodeInfo_controller_key = md_NodeInfo.Fields().ByName("controller_key") + fd_NodeInfo_whitelisted_namespaces = md_NodeInfo.Fields().ByName("whitelisted_namespaces") + fd_NodeInfo_whitelisted_ring_ids = md_NodeInfo.Fields().ByName("whitelisted_ring_ids") +} + +var _ protoreflect.Message = (*fastReflection_NodeInfo)(nil) + +type fastReflection_NodeInfo NodeInfo + +func (x *NodeInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_NodeInfo)(x) +} + +func (x *NodeInfo) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_node_info_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_NodeInfo_messageType fastReflection_NodeInfo_messageType +var _ protoreflect.MessageType = fastReflection_NodeInfo_messageType{} + +type fastReflection_NodeInfo_messageType struct{} + +func (x fastReflection_NodeInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_NodeInfo)(nil) +} +func (x fastReflection_NodeInfo_messageType) New() protoreflect.Message { + return new(fastReflection_NodeInfo) +} +func (x fastReflection_NodeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_NodeInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_NodeInfo) Descriptor() protoreflect.MessageDescriptor { + return md_NodeInfo +} + +// 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_NodeInfo) Type() protoreflect.MessageType { + return _fastReflection_NodeInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_NodeInfo) New() protoreflect.Message { + return new(fastReflection_NodeInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_NodeInfo) Interface() protoreflect.ProtoMessage { + return (*NodeInfo)(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_NodeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.PeerId != "" { + value := protoreflect.ValueOfString(x.PeerId) + if !f(fd_NodeInfo_peer_id, value) { + return + } + } + if x.ControllerKey != "" { + value := protoreflect.ValueOfString(x.ControllerKey) + if !f(fd_NodeInfo_controller_key, value) { + return + } + } + if len(x.WhitelistedNamespaces) != 0 { + value := protoreflect.ValueOfList(&_NodeInfo_3_list{list: &x.WhitelistedNamespaces}) + if !f(fd_NodeInfo_whitelisted_namespaces, value) { + return + } + } + if len(x.WhitelistedRingIds) != 0 { + value := protoreflect.ValueOfList(&_NodeInfo_4_list{list: &x.WhitelistedRingIds}) + if !f(fd_NodeInfo_whitelisted_ring_ids, 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_NodeInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfo.peer_id": + return x.PeerId != "" + case "sourcehub.orbis.NodeInfo.controller_key": + return x.ControllerKey != "" + case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": + return len(x.WhitelistedNamespaces) != 0 + case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": + return len(x.WhitelistedRingIds) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfo")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfo 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_NodeInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfo.peer_id": + x.PeerId = "" + case "sourcehub.orbis.NodeInfo.controller_key": + x.ControllerKey = "" + case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": + x.WhitelistedNamespaces = nil + case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": + x.WhitelistedRingIds = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfo")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfo 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_NodeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.NodeInfo.peer_id": + value := x.PeerId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.NodeInfo.controller_key": + value := x.ControllerKey + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": + if len(x.WhitelistedNamespaces) == 0 { + return protoreflect.ValueOfList(&_NodeInfo_3_list{}) + } + listValue := &_NodeInfo_3_list{list: &x.WhitelistedNamespaces} + return protoreflect.ValueOfList(listValue) + case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": + if len(x.WhitelistedRingIds) == 0 { + return protoreflect.ValueOfList(&_NodeInfo_4_list{}) + } + listValue := &_NodeInfo_4_list{list: &x.WhitelistedRingIds} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfo")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfo 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_NodeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfo.peer_id": + x.PeerId = value.Interface().(string) + case "sourcehub.orbis.NodeInfo.controller_key": + x.ControllerKey = value.Interface().(string) + case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": + lv := value.List() + clv := lv.(*_NodeInfo_3_list) + x.WhitelistedNamespaces = *clv.list + case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": + lv := value.List() + clv := lv.(*_NodeInfo_4_list) + x.WhitelistedRingIds = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfo")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfo 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_NodeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": + if x.WhitelistedNamespaces == nil { + x.WhitelistedNamespaces = []string{} + } + value := &_NodeInfo_3_list{list: &x.WhitelistedNamespaces} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": + if x.WhitelistedRingIds == nil { + x.WhitelistedRingIds = []string{} + } + value := &_NodeInfo_4_list{list: &x.WhitelistedRingIds} + return protoreflect.ValueOfList(value) + case "sourcehub.orbis.NodeInfo.peer_id": + panic(fmt.Errorf("field peer_id of message sourcehub.orbis.NodeInfo is not mutable")) + case "sourcehub.orbis.NodeInfo.controller_key": + panic(fmt.Errorf("field controller_key of message sourcehub.orbis.NodeInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfo")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfo 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_NodeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfo.peer_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.NodeInfo.controller_key": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": + list := []string{} + return protoreflect.ValueOfList(&_NodeInfo_3_list{list: &list}) + case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": + list := []string{} + return protoreflect.ValueOfList(&_NodeInfo_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfo")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfo 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_NodeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.NodeInfo", 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_NodeInfo) 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_NodeInfo) 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_NodeInfo) 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_NodeInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*NodeInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.PeerId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ControllerKey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.WhitelistedNamespaces) > 0 { + for _, s := range x.WhitelistedNamespaces { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.WhitelistedRingIds) > 0 { + for _, s := range x.WhitelistedRingIds { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*NodeInfo) + 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.WhitelistedRingIds) > 0 { + for iNdEx := len(x.WhitelistedRingIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.WhitelistedRingIds[iNdEx]) + copy(dAtA[i:], x.WhitelistedRingIds[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WhitelistedRingIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.WhitelistedNamespaces) > 0 { + for iNdEx := len(x.WhitelistedNamespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.WhitelistedNamespaces[iNdEx]) + copy(dAtA[i:], x.WhitelistedNamespaces[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WhitelistedNamespaces[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.ControllerKey) > 0 { + i -= len(x.ControllerKey) + copy(dAtA[i:], x.ControllerKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerKey))) + i-- + dAtA[i] = 0x12 + } + if len(x.PeerId) > 0 { + i -= len(x.PeerId) + copy(dAtA[i:], x.PeerId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PeerId))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*NodeInfo) + 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: NodeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", 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.ControllerKey = 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 WhitelistedNamespaces", 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.WhitelistedNamespaces = append(x.WhitelistedNamespaces, 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 WhitelistedRingIds", 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.WhitelistedRingIds = append(x.WhitelistedRingIds, 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_NodeInfoEntry protoreflect.MessageDescriptor + fd_NodeInfoEntry_node_key protoreflect.FieldDescriptor + fd_NodeInfoEntry_node_info protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_node_info_proto_init() + md_NodeInfoEntry = File_sourcehub_orbis_node_info_proto.Messages().ByName("NodeInfoEntry") + fd_NodeInfoEntry_node_key = md_NodeInfoEntry.Fields().ByName("node_key") + fd_NodeInfoEntry_node_info = md_NodeInfoEntry.Fields().ByName("node_info") +} + +var _ protoreflect.Message = (*fastReflection_NodeInfoEntry)(nil) + +type fastReflection_NodeInfoEntry NodeInfoEntry + +func (x *NodeInfoEntry) ProtoReflect() protoreflect.Message { + return (*fastReflection_NodeInfoEntry)(x) +} + +func (x *NodeInfoEntry) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_node_info_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_NodeInfoEntry_messageType fastReflection_NodeInfoEntry_messageType +var _ protoreflect.MessageType = fastReflection_NodeInfoEntry_messageType{} + +type fastReflection_NodeInfoEntry_messageType struct{} + +func (x fastReflection_NodeInfoEntry_messageType) Zero() protoreflect.Message { + return (*fastReflection_NodeInfoEntry)(nil) +} +func (x fastReflection_NodeInfoEntry_messageType) New() protoreflect.Message { + return new(fastReflection_NodeInfoEntry) +} +func (x fastReflection_NodeInfoEntry_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_NodeInfoEntry +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_NodeInfoEntry) Descriptor() protoreflect.MessageDescriptor { + return md_NodeInfoEntry +} + +// 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_NodeInfoEntry) Type() protoreflect.MessageType { + return _fastReflection_NodeInfoEntry_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_NodeInfoEntry) New() protoreflect.Message { + return new(fastReflection_NodeInfoEntry) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_NodeInfoEntry) Interface() protoreflect.ProtoMessage { + return (*NodeInfoEntry)(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_NodeInfoEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.NodeKey != "" { + value := protoreflect.ValueOfString(x.NodeKey) + if !f(fd_NodeInfoEntry_node_key, value) { + return + } + } + if x.NodeInfo != nil { + value := protoreflect.ValueOfMessage(x.NodeInfo.ProtoReflect()) + if !f(fd_NodeInfoEntry_node_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_NodeInfoEntry) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfoEntry.node_key": + return x.NodeKey != "" + case "sourcehub.orbis.NodeInfoEntry.node_info": + return x.NodeInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfoEntry")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfoEntry 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_NodeInfoEntry) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfoEntry.node_key": + x.NodeKey = "" + case "sourcehub.orbis.NodeInfoEntry.node_info": + x.NodeInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfoEntry")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfoEntry 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_NodeInfoEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.NodeInfoEntry.node_key": + value := x.NodeKey + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.NodeInfoEntry.node_info": + value := x.NodeInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfoEntry")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfoEntry 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_NodeInfoEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfoEntry.node_key": + x.NodeKey = value.Interface().(string) + case "sourcehub.orbis.NodeInfoEntry.node_info": + x.NodeInfo = value.Message().Interface().(*NodeInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfoEntry")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfoEntry 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_NodeInfoEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfoEntry.node_info": + if x.NodeInfo == nil { + x.NodeInfo = new(NodeInfo) + } + return protoreflect.ValueOfMessage(x.NodeInfo.ProtoReflect()) + case "sourcehub.orbis.NodeInfoEntry.node_key": + panic(fmt.Errorf("field node_key of message sourcehub.orbis.NodeInfoEntry is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfoEntry")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfoEntry 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_NodeInfoEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.NodeInfoEntry.node_key": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.NodeInfoEntry.node_info": + m := new(NodeInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.NodeInfoEntry")) + } + panic(fmt.Errorf("message sourcehub.orbis.NodeInfoEntry 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_NodeInfoEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.NodeInfoEntry", 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_NodeInfoEntry) 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_NodeInfoEntry) 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_NodeInfoEntry) 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_NodeInfoEntry) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*NodeInfoEntry) + 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.NodeKey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.NodeInfo != nil { + l = options.Size(x.NodeInfo) + 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().(*NodeInfoEntry) + 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.NodeInfo != nil { + encoded, err := options.Marshal(x.NodeInfo) + 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.NodeKey) > 0 { + i -= len(x.NodeKey) + copy(dAtA[i:], x.NodeKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NodeKey))) + 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().(*NodeInfoEntry) + 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: NodeInfoEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NodeInfoEntry: 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 NodeKey", 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.NodeKey = 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 NodeInfo", 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.NodeInfo == nil { + x.NodeInfo = &NodeInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NodeInfo); 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: sourcehub/orbis/node_info.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) +) + +// NodeInfo stores access-control metadata for a node participating in Orbis rings. +type NodeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` + WhitelistedNamespaces []string `protobuf:"bytes,3,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,4,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` +} + +func (x *NodeInfo) Reset() { + *x = NodeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_node_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeInfo) ProtoMessage() {} + +// Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead. +func (*NodeInfo) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_node_info_proto_rawDescGZIP(), []int{0} +} + +func (x *NodeInfo) GetPeerId() string { + if x != nil { + return x.PeerId + } + return "" +} + +func (x *NodeInfo) GetControllerKey() string { + if x != nil { + return x.ControllerKey + } + return "" +} + +func (x *NodeInfo) GetWhitelistedNamespaces() []string { + if x != nil { + return x.WhitelistedNamespaces + } + return nil +} + +func (x *NodeInfo) GetWhitelistedRingIds() []string { + if x != nil { + return x.WhitelistedRingIds + } + return nil +} + +// NodeInfoEntry pairs a node_key with its NodeInfo for genesis export/import. +type NodeInfoEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + NodeInfo *NodeInfo `protobuf:"bytes,2,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"` +} + +func (x *NodeInfoEntry) Reset() { + *x = NodeInfoEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_node_info_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeInfoEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeInfoEntry) ProtoMessage() {} + +// Deprecated: Use NodeInfoEntry.ProtoReflect.Descriptor instead. +func (*NodeInfoEntry) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_node_info_proto_rawDescGZIP(), []int{1} +} + +func (x *NodeInfoEntry) GetNodeKey() string { + if x != nil { + return x.NodeKey + } + return "" +} + +func (x *NodeInfoEntry) GetNodeInfo() *NodeInfo { + if x != nil { + return x.NodeInfo + } + return nil +} + +var File_sourcehub_orbis_node_info_proto protoreflect.FileDescriptor + +var file_sourcehub_orbis_node_info_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, + 0x35, 0x0a, 0x16, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x15, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x52, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x73, 0x22, 0x62, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, + 0x65, 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0xa3, 0x01, 0x0a, + 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x42, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, + 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, + 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, + 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, + 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sourcehub_orbis_node_info_proto_rawDescOnce sync.Once + file_sourcehub_orbis_node_info_proto_rawDescData = file_sourcehub_orbis_node_info_proto_rawDesc +) + +func file_sourcehub_orbis_node_info_proto_rawDescGZIP() []byte { + file_sourcehub_orbis_node_info_proto_rawDescOnce.Do(func() { + file_sourcehub_orbis_node_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_orbis_node_info_proto_rawDescData) + }) + return file_sourcehub_orbis_node_info_proto_rawDescData +} + +var file_sourcehub_orbis_node_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_sourcehub_orbis_node_info_proto_goTypes = []interface{}{ + (*NodeInfo)(nil), // 0: sourcehub.orbis.NodeInfo + (*NodeInfoEntry)(nil), // 1: sourcehub.orbis.NodeInfoEntry +} +var file_sourcehub_orbis_node_info_proto_depIdxs = []int32{ + 0, // 0: sourcehub.orbis.NodeInfoEntry.node_info:type_name -> sourcehub.orbis.NodeInfo + 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_sourcehub_orbis_node_info_proto_init() } +func file_sourcehub_orbis_node_info_proto_init() { + if File_sourcehub_orbis_node_info_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sourcehub_orbis_node_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_node_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeInfoEntry); 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_sourcehub_orbis_node_info_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sourcehub_orbis_node_info_proto_goTypes, + DependencyIndexes: file_sourcehub_orbis_node_info_proto_depIdxs, + MessageInfos: file_sourcehub_orbis_node_info_proto_msgTypes, + }.Build() + File_sourcehub_orbis_node_info_proto = out.File + file_sourcehub_orbis_node_info_proto_rawDesc = nil + file_sourcehub_orbis_node_info_proto_goTypes = nil + file_sourcehub_orbis_node_info_proto_depIdxs = nil +} diff --git a/api/sourcehub/orbis/query.pulsar.go b/api/sourcehub/orbis/query.pulsar.go index ea9eb217..3e0acd7f 100644 --- a/api/sourcehub/orbis/query.pulsar.go +++ b/api/sourcehub/orbis/query.pulsar.go @@ -6716,6 +6716,861 @@ func (x *fastReflection_QueryKeyDerivationsResponse) ProtoMethods() *protoiface. } } +var ( + md_QueryNodeInfoRequest protoreflect.MessageDescriptor + fd_QueryNodeInfoRequest_node_key protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryNodeInfoRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryNodeInfoRequest") + fd_QueryNodeInfoRequest_node_key = md_QueryNodeInfoRequest.Fields().ByName("node_key") +} + +var _ protoreflect.Message = (*fastReflection_QueryNodeInfoRequest)(nil) + +type fastReflection_QueryNodeInfoRequest QueryNodeInfoRequest + +func (x *QueryNodeInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryNodeInfoRequest)(x) +} + +func (x *QueryNodeInfoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_query_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryNodeInfoRequest_messageType fastReflection_QueryNodeInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryNodeInfoRequest_messageType{} + +type fastReflection_QueryNodeInfoRequest_messageType struct{} + +func (x fastReflection_QueryNodeInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryNodeInfoRequest)(nil) +} +func (x fastReflection_QueryNodeInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryNodeInfoRequest) +} +func (x fastReflection_QueryNodeInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryNodeInfoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryNodeInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryNodeInfoRequest +} + +// 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_QueryNodeInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryNodeInfoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryNodeInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryNodeInfoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryNodeInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryNodeInfoRequest)(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_QueryNodeInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.NodeKey != "" { + value := protoreflect.ValueOfString(x.NodeKey) + if !f(fd_QueryNodeInfoRequest_node_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_QueryNodeInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoRequest.node_key": + return x.NodeKey != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoRequest 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_QueryNodeInfoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoRequest.node_key": + x.NodeKey = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoRequest 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_QueryNodeInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryNodeInfoRequest.node_key": + value := x.NodeKey + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoRequest 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_QueryNodeInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoRequest.node_key": + x.NodeKey = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoRequest 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_QueryNodeInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoRequest.node_key": + panic(fmt.Errorf("field node_key of message sourcehub.orbis.QueryNodeInfoRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoRequest 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_QueryNodeInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoRequest.node_key": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoRequest")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoRequest 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_QueryNodeInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryNodeInfoRequest", 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_QueryNodeInfoRequest) 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_QueryNodeInfoRequest) 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_QueryNodeInfoRequest) 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_QueryNodeInfoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryNodeInfoRequest) + 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.NodeKey) + 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().(*QueryNodeInfoRequest) + 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.NodeKey) > 0 { + i -= len(x.NodeKey) + copy(dAtA[i:], x.NodeKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NodeKey))) + 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().(*QueryNodeInfoRequest) + 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: QueryNodeInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNodeInfoRequest: 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 NodeKey", 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.NodeKey = 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_QueryNodeInfoResponse protoreflect.MessageDescriptor + fd_QueryNodeInfoResponse_node_info protoreflect.FieldDescriptor +) + +func init() { + file_sourcehub_orbis_query_proto_init() + md_QueryNodeInfoResponse = File_sourcehub_orbis_query_proto.Messages().ByName("QueryNodeInfoResponse") + fd_QueryNodeInfoResponse_node_info = md_QueryNodeInfoResponse.Fields().ByName("node_info") +} + +var _ protoreflect.Message = (*fastReflection_QueryNodeInfoResponse)(nil) + +type fastReflection_QueryNodeInfoResponse QueryNodeInfoResponse + +func (x *QueryNodeInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryNodeInfoResponse)(x) +} + +func (x *QueryNodeInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_query_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryNodeInfoResponse_messageType fastReflection_QueryNodeInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryNodeInfoResponse_messageType{} + +type fastReflection_QueryNodeInfoResponse_messageType struct{} + +func (x fastReflection_QueryNodeInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryNodeInfoResponse)(nil) +} +func (x fastReflection_QueryNodeInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryNodeInfoResponse) +} +func (x fastReflection_QueryNodeInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryNodeInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryNodeInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryNodeInfoResponse +} + +// 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_QueryNodeInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryNodeInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryNodeInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryNodeInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryNodeInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryNodeInfoResponse)(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_QueryNodeInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.NodeInfo != nil { + value := protoreflect.ValueOfMessage(x.NodeInfo.ProtoReflect()) + if !f(fd_QueryNodeInfoResponse_node_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_QueryNodeInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoResponse.node_info": + return x.NodeInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoResponse 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_QueryNodeInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoResponse.node_info": + x.NodeInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoResponse 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_QueryNodeInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.QueryNodeInfoResponse.node_info": + value := x.NodeInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoResponse 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_QueryNodeInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoResponse.node_info": + x.NodeInfo = value.Message().Interface().(*NodeInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoResponse 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_QueryNodeInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoResponse.node_info": + if x.NodeInfo == nil { + x.NodeInfo = new(NodeInfo) + } + return protoreflect.ValueOfMessage(x.NodeInfo.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoResponse 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_QueryNodeInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.QueryNodeInfoResponse.node_info": + m := new(NodeInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryNodeInfoResponse")) + } + panic(fmt.Errorf("message sourcehub.orbis.QueryNodeInfoResponse 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_QueryNodeInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.QueryNodeInfoResponse", 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_QueryNodeInfoResponse) 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_QueryNodeInfoResponse) 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_QueryNodeInfoResponse) 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_QueryNodeInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryNodeInfoResponse) + 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.NodeInfo != nil { + l = options.Size(x.NodeInfo) + 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().(*QueryNodeInfoResponse) + 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.NodeInfo != nil { + encoded, err := options.Marshal(x.NodeInfo) + 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().(*QueryNodeInfoResponse) + 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: QueryNodeInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNodeInfoResponse: 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 NodeInfo", 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.NodeInfo == nil { + x.NodeInfo = &NodeInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NodeInfo); 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 @@ -7276,6 +8131,76 @@ func (x *QueryKeyDerivationsResponse) GetPagination() *v1beta1.PageResponse { return nil } +type QueryNodeInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` +} + +func (x *QueryNodeInfoRequest) Reset() { + *x = QueryNodeInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryNodeInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryNodeInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryNodeInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryNodeInfoRequest) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{14} +} + +func (x *QueryNodeInfoRequest) GetNodeKey() string { + if x != nil { + return x.NodeKey + } + return "" +} + +type QueryNodeInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"` +} + +func (x *QueryNodeInfoResponse) Reset() { + *x = QueryNodeInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_query_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryNodeInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryNodeInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryNodeInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryNodeInfoResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{15} +} + +func (x *QueryNodeInfoResponse) GetNodeInfo() *NodeInfo { + if x != nil { + return x.NodeInfo + } + return nil +} + var File_sourcehub_orbis_query_proto protoreflect.FileDescriptor var file_sourcehub_orbis_query_proto_rawDesc = []byte{ @@ -7293,177 +8218,197 @@ var file_sourcehub_orbis_query_proto_rawDesc = []byte{ 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 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, 0x51, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x22, 0x0a, 0x10, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3e, - 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, - 0x62, 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x79, - 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 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, 0x95, 0x01, 0x0a, 0x12, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x36, 0x0a, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, - 0x01, 0x52, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 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, 0x51, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x22, 0x0a, 0x10, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x3e, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x22, + 0x79, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 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, 0x95, 0x01, 0x0a, 0x12, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x05, 0x72, 0x69, 0x6e, 0x67, 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, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, + 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7d, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0xa5, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x49, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, 0x1a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, + 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0d, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x82, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0xba, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, + 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, + 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x35, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7d, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0xa5, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, - 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, - 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, 0x1a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, 0x64, - 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0d, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, - 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0xba, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, - 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4b, - 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, - 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0xad, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x82, 0x01, 0x0a, 0x06, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x6f, 0x75, + 0x6e, 0x22, 0x31, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, + 0x65, 0x4b, 0x65, 0x79, 0x22, 0x4f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x32, 0xc6, 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x82, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x7f, 0x0a, 0x04, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0x7e, 0x0a, 0x05, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x9b, 0x01, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9a, - 0x01, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x73, + 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7f, 0x0a, 0x04, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, - 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x12, 0xb0, 0x01, 0x0a, 0x0d, - 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x7e, 0x0a, 0x05, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, + 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, + 0x24, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, + 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x12, 0x9a, 0x01, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, + 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, - 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, - 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xaf, - 0x01, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, - 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, + 0x12, 0xb0, 0x01, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, - 0x42, 0xa0, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, - 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, - 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, - 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, - 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, - 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, - 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, + 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x12, 0xaf, 0x01, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, + 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, + 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x42, 0xa0, + 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, + 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, + 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, + 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, + 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -7478,7 +8423,7 @@ func file_sourcehub_orbis_query_proto_rawDescGZIP() []byte { return file_sourcehub_orbis_query_proto_rawDescData } -var file_sourcehub_orbis_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_sourcehub_orbis_query_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_sourcehub_orbis_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: sourcehub.orbis.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: sourcehub.orbis.QueryParamsResponse @@ -7494,46 +8439,52 @@ var file_sourcehub_orbis_query_proto_goTypes = []interface{}{ (*QueryKeyDerivationResponse)(nil), // 11: sourcehub.orbis.QueryKeyDerivationResponse (*QueryKeyDerivationsRequest)(nil), // 12: sourcehub.orbis.QueryKeyDerivationsRequest (*QueryKeyDerivationsResponse)(nil), // 13: sourcehub.orbis.QueryKeyDerivationsResponse - (*Params)(nil), // 14: sourcehub.orbis.Params - (*Ring)(nil), // 15: sourcehub.orbis.Ring - (*v1beta1.PageRequest)(nil), // 16: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 17: cosmos.base.query.v1beta1.PageResponse - (*Document)(nil), // 18: sourcehub.orbis.Document - (*KeyDerivation)(nil), // 19: sourcehub.orbis.KeyDerivation + (*QueryNodeInfoRequest)(nil), // 14: sourcehub.orbis.QueryNodeInfoRequest + (*QueryNodeInfoResponse)(nil), // 15: sourcehub.orbis.QueryNodeInfoResponse + (*Params)(nil), // 16: sourcehub.orbis.Params + (*Ring)(nil), // 17: sourcehub.orbis.Ring + (*v1beta1.PageRequest)(nil), // 18: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 19: cosmos.base.query.v1beta1.PageResponse + (*Document)(nil), // 20: sourcehub.orbis.Document + (*KeyDerivation)(nil), // 21: sourcehub.orbis.KeyDerivation + (*NodeInfo)(nil), // 22: sourcehub.orbis.NodeInfo } var file_sourcehub_orbis_query_proto_depIdxs = []int32{ - 14, // 0: sourcehub.orbis.QueryParamsResponse.params:type_name -> sourcehub.orbis.Params - 15, // 1: sourcehub.orbis.QueryRingResponse.ring:type_name -> sourcehub.orbis.Ring - 16, // 2: sourcehub.orbis.QueryRingsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 15, // 3: sourcehub.orbis.QueryRingsResponse.rings:type_name -> sourcehub.orbis.Ring - 17, // 4: sourcehub.orbis.QueryRingsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 18, // 5: sourcehub.orbis.QueryDocumentResponse.document:type_name -> sourcehub.orbis.Document - 16, // 6: sourcehub.orbis.QueryDocumentsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 18, // 7: sourcehub.orbis.QueryDocumentsResponse.documents:type_name -> sourcehub.orbis.Document - 17, // 8: sourcehub.orbis.QueryDocumentsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 19, // 9: sourcehub.orbis.QueryKeyDerivationResponse.key_derivation:type_name -> sourcehub.orbis.KeyDerivation - 16, // 10: sourcehub.orbis.QueryKeyDerivationsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 11: sourcehub.orbis.QueryKeyDerivationsResponse.key_derivations:type_name -> sourcehub.orbis.KeyDerivation - 17, // 12: sourcehub.orbis.QueryKeyDerivationsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 13: sourcehub.orbis.Query.Params:input_type -> sourcehub.orbis.QueryParamsRequest - 2, // 14: sourcehub.orbis.Query.Ring:input_type -> sourcehub.orbis.QueryRingRequest - 4, // 15: sourcehub.orbis.Query.Rings:input_type -> sourcehub.orbis.QueryRingsRequest - 6, // 16: sourcehub.orbis.Query.Document:input_type -> sourcehub.orbis.QueryDocumentRequest - 8, // 17: sourcehub.orbis.Query.Documents:input_type -> sourcehub.orbis.QueryDocumentsRequest - 10, // 18: sourcehub.orbis.Query.KeyDerivation:input_type -> sourcehub.orbis.QueryKeyDerivationRequest - 12, // 19: sourcehub.orbis.Query.KeyDerivations:input_type -> sourcehub.orbis.QueryKeyDerivationsRequest - 1, // 20: sourcehub.orbis.Query.Params:output_type -> sourcehub.orbis.QueryParamsResponse - 3, // 21: sourcehub.orbis.Query.Ring:output_type -> sourcehub.orbis.QueryRingResponse - 5, // 22: sourcehub.orbis.Query.Rings:output_type -> sourcehub.orbis.QueryRingsResponse - 7, // 23: sourcehub.orbis.Query.Document:output_type -> sourcehub.orbis.QueryDocumentResponse - 9, // 24: sourcehub.orbis.Query.Documents:output_type -> sourcehub.orbis.QueryDocumentsResponse - 11, // 25: sourcehub.orbis.Query.KeyDerivation:output_type -> sourcehub.orbis.QueryKeyDerivationResponse - 13, // 26: sourcehub.orbis.Query.KeyDerivations:output_type -> sourcehub.orbis.QueryKeyDerivationsResponse - 20, // [20:27] is the sub-list for method output_type - 13, // [13:20] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 16, // 0: sourcehub.orbis.QueryParamsResponse.params:type_name -> sourcehub.orbis.Params + 17, // 1: sourcehub.orbis.QueryRingResponse.ring:type_name -> sourcehub.orbis.Ring + 18, // 2: sourcehub.orbis.QueryRingsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 17, // 3: sourcehub.orbis.QueryRingsResponse.rings:type_name -> sourcehub.orbis.Ring + 19, // 4: sourcehub.orbis.QueryRingsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 20, // 5: sourcehub.orbis.QueryDocumentResponse.document:type_name -> sourcehub.orbis.Document + 18, // 6: sourcehub.orbis.QueryDocumentsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 20, // 7: sourcehub.orbis.QueryDocumentsResponse.documents:type_name -> sourcehub.orbis.Document + 19, // 8: sourcehub.orbis.QueryDocumentsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 21, // 9: sourcehub.orbis.QueryKeyDerivationResponse.key_derivation:type_name -> sourcehub.orbis.KeyDerivation + 18, // 10: sourcehub.orbis.QueryKeyDerivationsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 21, // 11: sourcehub.orbis.QueryKeyDerivationsResponse.key_derivations:type_name -> sourcehub.orbis.KeyDerivation + 19, // 12: sourcehub.orbis.QueryKeyDerivationsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 22, // 13: sourcehub.orbis.QueryNodeInfoResponse.node_info:type_name -> sourcehub.orbis.NodeInfo + 0, // 14: sourcehub.orbis.Query.Params:input_type -> sourcehub.orbis.QueryParamsRequest + 2, // 15: sourcehub.orbis.Query.Ring:input_type -> sourcehub.orbis.QueryRingRequest + 4, // 16: sourcehub.orbis.Query.Rings:input_type -> sourcehub.orbis.QueryRingsRequest + 6, // 17: sourcehub.orbis.Query.Document:input_type -> sourcehub.orbis.QueryDocumentRequest + 8, // 18: sourcehub.orbis.Query.Documents:input_type -> sourcehub.orbis.QueryDocumentsRequest + 10, // 19: sourcehub.orbis.Query.KeyDerivation:input_type -> sourcehub.orbis.QueryKeyDerivationRequest + 12, // 20: sourcehub.orbis.Query.KeyDerivations:input_type -> sourcehub.orbis.QueryKeyDerivationsRequest + 14, // 21: sourcehub.orbis.Query.NodeInfo:input_type -> sourcehub.orbis.QueryNodeInfoRequest + 1, // 22: sourcehub.orbis.Query.Params:output_type -> sourcehub.orbis.QueryParamsResponse + 3, // 23: sourcehub.orbis.Query.Ring:output_type -> sourcehub.orbis.QueryRingResponse + 5, // 24: sourcehub.orbis.Query.Rings:output_type -> sourcehub.orbis.QueryRingsResponse + 7, // 25: sourcehub.orbis.Query.Document:output_type -> sourcehub.orbis.QueryDocumentResponse + 9, // 26: sourcehub.orbis.Query.Documents:output_type -> sourcehub.orbis.QueryDocumentsResponse + 11, // 27: sourcehub.orbis.Query.KeyDerivation:output_type -> sourcehub.orbis.QueryKeyDerivationResponse + 13, // 28: sourcehub.orbis.Query.KeyDerivations:output_type -> sourcehub.orbis.QueryKeyDerivationsResponse + 15, // 29: sourcehub.orbis.Query.NodeInfo:output_type -> sourcehub.orbis.QueryNodeInfoResponse + 22, // [22:30] is the sub-list for method output_type + 14, // [14:22] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_sourcehub_orbis_query_proto_init() } @@ -7543,6 +8494,7 @@ func file_sourcehub_orbis_query_proto_init() { } file_sourcehub_orbis_document_proto_init() file_sourcehub_orbis_key_derivation_proto_init() + file_sourcehub_orbis_node_info_proto_init() file_sourcehub_orbis_params_proto_init() file_sourcehub_orbis_ring_proto_init() if !protoimpl.UnsafeEnabled { @@ -7714,6 +8666,30 @@ func file_sourcehub_orbis_query_proto_init() { return nil } } + file_sourcehub_orbis_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryNodeInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sourcehub_orbis_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryNodeInfoResponse); 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{ @@ -7721,7 +8697,7 @@ func file_sourcehub_orbis_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_orbis_query_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/api/sourcehub/orbis/query_grpc.pb.go b/api/sourcehub/orbis/query_grpc.pb.go index 9a256e1e..44114fca 100644 --- a/api/sourcehub/orbis/query_grpc.pb.go +++ b/api/sourcehub/orbis/query_grpc.pb.go @@ -26,6 +26,7 @@ const ( Query_Documents_FullMethodName = "/sourcehub.orbis.Query/Documents" Query_KeyDerivation_FullMethodName = "/sourcehub.orbis.Query/KeyDerivation" Query_KeyDerivations_FullMethodName = "/sourcehub.orbis.Query/KeyDerivations" + Query_NodeInfo_FullMethodName = "/sourcehub.orbis.Query/NodeInfo" ) // QueryClient is the client API for Query service. @@ -48,6 +49,8 @@ type QueryClient interface { KeyDerivation(ctx context.Context, in *QueryKeyDerivationRequest, opts ...grpc.CallOption) (*QueryKeyDerivationResponse, error) // KeyDerivations queries key derivations within a namespace. KeyDerivations(ctx context.Context, in *QueryKeyDerivationsRequest, opts ...grpc.CallOption) (*QueryKeyDerivationsResponse, error) + // NodeInfo queries node info by node key. + NodeInfo(ctx context.Context, in *QueryNodeInfoRequest, opts ...grpc.CallOption) (*QueryNodeInfoResponse, error) } type queryClient struct { @@ -128,6 +131,16 @@ func (c *queryClient) KeyDerivations(ctx context.Context, in *QueryKeyDerivation return out, nil } +func (c *queryClient) NodeInfo(ctx context.Context, in *QueryNodeInfoRequest, opts ...grpc.CallOption) (*QueryNodeInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryNodeInfoResponse) + err := c.cc.Invoke(ctx, Query_NodeInfo_FullMethodName, in, out, cOpts...) + 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. @@ -148,6 +161,8 @@ type QueryServer interface { KeyDerivation(context.Context, *QueryKeyDerivationRequest) (*QueryKeyDerivationResponse, error) // KeyDerivations queries key derivations within a namespace. KeyDerivations(context.Context, *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, error) + // NodeInfo queries node info by node key. + NodeInfo(context.Context, *QueryNodeInfoRequest) (*QueryNodeInfoResponse, error) mustEmbedUnimplementedQueryServer() } @@ -179,6 +194,9 @@ func (UnimplementedQueryServer) KeyDerivation(context.Context, *QueryKeyDerivati func (UnimplementedQueryServer) KeyDerivations(context.Context, *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method KeyDerivations not implemented") } +func (UnimplementedQueryServer) NodeInfo(context.Context, *QueryNodeInfoRequest) (*QueryNodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NodeInfo not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) testEmbeddedByValue() {} @@ -326,6 +344,24 @@ func _Query_KeyDerivations_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNodeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_NodeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NodeInfo(ctx, req.(*QueryNodeInfoRequest)) + } + 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) @@ -361,6 +397,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "KeyDerivations", Handler: _Query_KeyDerivations_Handler, }, + { + MethodName: "NodeInfo", + Handler: _Query_NodeInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/orbis/query.proto", diff --git a/api/sourcehub/orbis/tx.pb.go b/api/sourcehub/orbis/tx.pb.go index 9620bc7a..9cc3eefb 100644 --- a/api/sourcehub/orbis/tx.pb.go +++ b/api/sourcehub/orbis/tx.pb.go @@ -876,6 +876,240 @@ func (x *MsgStoreKeyDerivationResponse) GetKeyDerivationId() string { return "" } +type MsgCreateNodeInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,3,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` + WhitelistedNamespaces []string `protobuf:"bytes,4,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgCreateNodeInfo) Reset() { + *x = MsgCreateNodeInfo{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgCreateNodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateNodeInfo) ProtoMessage() {} + +func (x *MsgCreateNodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgCreateNodeInfo.ProtoReflect.Descriptor instead. +func (*MsgCreateNodeInfo) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{13} +} + +func (x *MsgCreateNodeInfo) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgCreateNodeInfo) GetPeerId() string { + if x != nil { + return x.PeerId + } + return "" +} + +func (x *MsgCreateNodeInfo) GetControllerKey() string { + if x != nil { + return x.ControllerKey + } + return "" +} + +func (x *MsgCreateNodeInfo) GetWhitelistedNamespaces() []string { + if x != nil { + return x.WhitelistedNamespaces + } + return nil +} + +func (x *MsgCreateNodeInfo) GetWhitelistedRingIds() []string { + if x != nil { + return x.WhitelistedRingIds + } + return nil +} + +type MsgCreateNodeInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgCreateNodeInfoResponse) Reset() { + *x = MsgCreateNodeInfoResponse{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgCreateNodeInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateNodeInfoResponse) ProtoMessage() {} + +func (x *MsgCreateNodeInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgCreateNodeInfoResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateNodeInfoResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{14} +} + +type MsgUpdateNodeInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + NodeKey string `protobuf:"bytes,2,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + // Absent means no peer_id update. + PeerId *string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3,oneof" json:"peer_id,omitempty"` + WhitelistedNamespaces []string `protobuf:"bytes,4,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` + // Absent means no controller_key update. + ControllerKey *string `protobuf:"bytes,6,opt,name=controller_key,json=controllerKey,proto3,oneof" json:"controller_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgUpdateNodeInfo) Reset() { + *x = MsgUpdateNodeInfo{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgUpdateNodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateNodeInfo) ProtoMessage() {} + +func (x *MsgUpdateNodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgUpdateNodeInfo.ProtoReflect.Descriptor instead. +func (*MsgUpdateNodeInfo) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{15} +} + +func (x *MsgUpdateNodeInfo) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgUpdateNodeInfo) GetNodeKey() string { + if x != nil { + return x.NodeKey + } + return "" +} + +func (x *MsgUpdateNodeInfo) GetPeerId() string { + if x != nil && x.PeerId != nil { + return *x.PeerId + } + return "" +} + +func (x *MsgUpdateNodeInfo) GetWhitelistedNamespaces() []string { + if x != nil { + return x.WhitelistedNamespaces + } + return nil +} + +func (x *MsgUpdateNodeInfo) GetWhitelistedRingIds() []string { + if x != nil { + return x.WhitelistedRingIds + } + return nil +} + +func (x *MsgUpdateNodeInfo) GetControllerKey() string { + if x != nil && x.ControllerKey != nil { + return *x.ControllerKey + } + return "" +} + +type MsgUpdateNodeInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgUpdateNodeInfoResponse) Reset() { + *x = MsgUpdateNodeInfoResponse{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgUpdateNodeInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateNodeInfoResponse) ProtoMessage() {} + +func (x *MsgUpdateNodeInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgUpdateNodeInfoResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateNodeInfoResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{16} +} + var File_sourcehub_orbis_tx_proto protoreflect.FileDescriptor const file_sourcehub_orbis_tx_proto_rawDesc = "" + @@ -955,7 +1189,25 @@ const file_sourcehub_orbis_tx_proto_rawDesc = "" + "permission\x18\a \x01(\tR\n" + "permission:\f\x82\xe7\xb0*\acreator\"K\n" + "\x1dMsgStoreKeyDerivationResponse\x12*\n" + - "\x11key_derivation_id\x18\x01 \x01(\tR\x0fkeyDerivationId2\x9e\x05\n" + + "\x11key_derivation_id\x18\x01 \x01(\tR\x0fkeyDerivationId\"\xe4\x01\n" + + "\x11MsgCreateNodeInfo\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x17\n" + + "\apeer_id\x18\x02 \x01(\tR\x06peerId\x12%\n" + + "\x0econtroller_key\x18\x03 \x01(\tR\rcontrollerKey\x125\n" + + "\x16whitelisted_namespaces\x18\x04 \x03(\tR\x15whitelistedNamespaces\x120\n" + + "\x14whitelisted_ring_ids\x18\x05 \x03(\tR\x12whitelistedRingIds:\f\x82\xe7\xb0*\acreator\"\x1b\n" + + "\x19MsgCreateNodeInfoResponse\"\xa8\x02\n" + + "\x11MsgUpdateNodeInfo\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x19\n" + + "\bnode_key\x18\x02 \x01(\tR\anodeKey\x12\x1c\n" + + "\apeer_id\x18\x03 \x01(\tH\x00R\x06peerId\x88\x01\x01\x125\n" + + "\x16whitelisted_namespaces\x18\x04 \x03(\tR\x15whitelistedNamespaces\x120\n" + + "\x14whitelisted_ring_ids\x18\x05 \x03(\tR\x12whitelistedRingIds\x12*\n" + + "\x0econtroller_key\x18\x06 \x01(\tH\x01R\rcontrollerKey\x88\x01\x01:\f\x82\xe7\xb0*\acreatorB\n" + + "\n" + + "\b_peer_idB\x11\n" + + "\x0f_controller_key\"\x1b\n" + + "\x19MsgUpdateNodeInfoResponse2\xe2\x06\n" + "\x03Msg\x12Z\n" + "\fUpdateParams\x12 .sourcehub.orbis.MsgUpdateParams\x1a(.sourcehub.orbis.MsgUpdateParamsResponse\x12T\n" + "\n" + @@ -963,7 +1215,9 @@ const file_sourcehub_orbis_tx_proto_rawDesc = "" + "\x0fUpdateRingByAcp\x12#.sourcehub.orbis.MsgUpdateRingByAcp\x1a+.sourcehub.orbis.MsgUpdateRingByAcpResponse\x12\xab\x01\n" + "'FinalizeRingReshareByThresholdSignature\x12;.sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature\x1aC.sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse\x12]\n" + "\rStoreDocument\x12!.sourcehub.orbis.MsgStoreDocument\x1a).sourcehub.orbis.MsgStoreDocumentResponse\x12l\n" + - "\x12StoreKeyDerivation\x12&.sourcehub.orbis.MsgStoreKeyDerivation\x1a..sourcehub.orbis.MsgStoreKeyDerivationResponse\x1a\x05\x80\xe7\xb0*\x01B\x9d\x01\n" + + "\x12StoreKeyDerivation\x12&.sourcehub.orbis.MsgStoreKeyDerivation\x1a..sourcehub.orbis.MsgStoreKeyDerivationResponse\x12`\n" + + "\x0eCreateNodeInfo\x12\".sourcehub.orbis.MsgCreateNodeInfo\x1a*.sourcehub.orbis.MsgCreateNodeInfoResponse\x12`\n" + + "\x0eUpdateNodeInfo\x12\".sourcehub.orbis.MsgUpdateNodeInfo\x1a*.sourcehub.orbis.MsgUpdateNodeInfoResponse\x1a\x05\x80\xe7\xb0*\x01B\x9d\x01\n" + "\x13com.sourcehub.orbisB\aTxProtoP\x01Z cosmossdk.io/api/sourcehub/orbis\xa2\x02\x03SOX\xaa\x02\x0fSourcehub.Orbis\xca\x02\x0fSourcehub\\Orbis\xe2\x02\x1bSourcehub\\Orbis\\GPBMetadata\xea\x02\x10Sourcehub::Orbisb\x06proto3" var ( @@ -978,7 +1232,7 @@ func file_sourcehub_orbis_tx_proto_rawDescGZIP() []byte { return file_sourcehub_orbis_tx_proto_rawDescData } -var file_sourcehub_orbis_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_sourcehub_orbis_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_sourcehub_orbis_tx_proto_goTypes = []any{ (*MsgUpdateParams)(nil), // 0: sourcehub.orbis.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.orbis.MsgUpdateParamsResponse @@ -993,24 +1247,32 @@ var file_sourcehub_orbis_tx_proto_goTypes = []any{ (*MsgStoreDocumentResponse)(nil), // 10: sourcehub.orbis.MsgStoreDocumentResponse (*MsgStoreKeyDerivation)(nil), // 11: sourcehub.orbis.MsgStoreKeyDerivation (*MsgStoreKeyDerivationResponse)(nil), // 12: sourcehub.orbis.MsgStoreKeyDerivationResponse - (*Params)(nil), // 13: sourcehub.orbis.Params + (*MsgCreateNodeInfo)(nil), // 13: sourcehub.orbis.MsgCreateNodeInfo + (*MsgCreateNodeInfoResponse)(nil), // 14: sourcehub.orbis.MsgCreateNodeInfoResponse + (*MsgUpdateNodeInfo)(nil), // 15: sourcehub.orbis.MsgUpdateNodeInfo + (*MsgUpdateNodeInfoResponse)(nil), // 16: sourcehub.orbis.MsgUpdateNodeInfoResponse + (*Params)(nil), // 17: sourcehub.orbis.Params } var file_sourcehub_orbis_tx_proto_depIdxs = []int32{ - 13, // 0: sourcehub.orbis.MsgUpdateParams.params:type_name -> sourcehub.orbis.Params + 17, // 0: sourcehub.orbis.MsgUpdateParams.params:type_name -> sourcehub.orbis.Params 0, // 1: sourcehub.orbis.Msg.UpdateParams:input_type -> sourcehub.orbis.MsgUpdateParams 2, // 2: sourcehub.orbis.Msg.CreateRing:input_type -> sourcehub.orbis.MsgCreateRing 4, // 3: sourcehub.orbis.Msg.UpdateRingByAcp:input_type -> sourcehub.orbis.MsgUpdateRingByAcp 6, // 4: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:input_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature 9, // 5: sourcehub.orbis.Msg.StoreDocument:input_type -> sourcehub.orbis.MsgStoreDocument 11, // 6: sourcehub.orbis.Msg.StoreKeyDerivation:input_type -> sourcehub.orbis.MsgStoreKeyDerivation - 1, // 7: sourcehub.orbis.Msg.UpdateParams:output_type -> sourcehub.orbis.MsgUpdateParamsResponse - 3, // 8: sourcehub.orbis.Msg.CreateRing:output_type -> sourcehub.orbis.MsgCreateRingResponse - 5, // 9: sourcehub.orbis.Msg.UpdateRingByAcp:output_type -> sourcehub.orbis.MsgUpdateRingByAcpResponse - 7, // 10: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:output_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse - 10, // 11: sourcehub.orbis.Msg.StoreDocument:output_type -> sourcehub.orbis.MsgStoreDocumentResponse - 12, // 12: sourcehub.orbis.Msg.StoreKeyDerivation:output_type -> sourcehub.orbis.MsgStoreKeyDerivationResponse - 7, // [7:13] is the sub-list for method output_type - 1, // [1:7] is the sub-list for method input_type + 13, // 7: sourcehub.orbis.Msg.CreateNodeInfo:input_type -> sourcehub.orbis.MsgCreateNodeInfo + 15, // 8: sourcehub.orbis.Msg.UpdateNodeInfo:input_type -> sourcehub.orbis.MsgUpdateNodeInfo + 1, // 9: sourcehub.orbis.Msg.UpdateParams:output_type -> sourcehub.orbis.MsgUpdateParamsResponse + 3, // 10: sourcehub.orbis.Msg.CreateRing:output_type -> sourcehub.orbis.MsgCreateRingResponse + 5, // 11: sourcehub.orbis.Msg.UpdateRingByAcp:output_type -> sourcehub.orbis.MsgUpdateRingByAcpResponse + 7, // 12: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:output_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse + 10, // 13: sourcehub.orbis.Msg.StoreDocument:output_type -> sourcehub.orbis.MsgStoreDocumentResponse + 12, // 14: sourcehub.orbis.Msg.StoreKeyDerivation:output_type -> sourcehub.orbis.MsgStoreKeyDerivationResponse + 14, // 15: sourcehub.orbis.Msg.CreateNodeInfo:output_type -> sourcehub.orbis.MsgCreateNodeInfoResponse + 16, // 16: sourcehub.orbis.Msg.UpdateNodeInfo:output_type -> sourcehub.orbis.MsgUpdateNodeInfoResponse + 9, // [9:17] is the sub-list for method output_type + 1, // [1:9] 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 @@ -1025,13 +1287,14 @@ func file_sourcehub_orbis_tx_proto_init() { file_sourcehub_orbis_tx_proto_msgTypes[2].OneofWrappers = []any{} file_sourcehub_orbis_tx_proto_msgTypes[4].OneofWrappers = []any{} file_sourcehub_orbis_tx_proto_msgTypes[9].OneofWrappers = []any{} + file_sourcehub_orbis_tx_proto_msgTypes[15].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_sourcehub_orbis_tx_proto_rawDesc), len(file_sourcehub_orbis_tx_proto_rawDesc)), NumEnums: 0, - NumMessages: 13, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, diff --git a/api/sourcehub/orbis/tx_grpc.pb.go b/api/sourcehub/orbis/tx_grpc.pb.go index 3b65762a..d848424e 100644 --- a/api/sourcehub/orbis/tx_grpc.pb.go +++ b/api/sourcehub/orbis/tx_grpc.pb.go @@ -25,6 +25,8 @@ const ( Msg_FinalizeRingReshareByThresholdSignature_FullMethodName = "/sourcehub.orbis.Msg/FinalizeRingReshareByThresholdSignature" Msg_StoreDocument_FullMethodName = "/sourcehub.orbis.Msg/StoreDocument" Msg_StoreKeyDerivation_FullMethodName = "/sourcehub.orbis.Msg/StoreKeyDerivation" + Msg_CreateNodeInfo_FullMethodName = "/sourcehub.orbis.Msg/CreateNodeInfo" + Msg_UpdateNodeInfo_FullMethodName = "/sourcehub.orbis.Msg/UpdateNodeInfo" ) // MsgClient is the client API for Msg service. @@ -40,6 +42,8 @@ type MsgClient interface { FinalizeRingReshareByThresholdSignature(ctx context.Context, in *MsgFinalizeRingReshareByThresholdSignature, opts ...grpc.CallOption) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) StoreDocument(ctx context.Context, in *MsgStoreDocument, opts ...grpc.CallOption) (*MsgStoreDocumentResponse, error) StoreKeyDerivation(ctx context.Context, in *MsgStoreKeyDerivation, opts ...grpc.CallOption) (*MsgStoreKeyDerivationResponse, error) + CreateNodeInfo(ctx context.Context, in *MsgCreateNodeInfo, opts ...grpc.CallOption) (*MsgCreateNodeInfoResponse, error) + UpdateNodeInfo(ctx context.Context, in *MsgUpdateNodeInfo, opts ...grpc.CallOption) (*MsgUpdateNodeInfoResponse, error) } type msgClient struct { @@ -110,6 +114,26 @@ func (c *msgClient) StoreKeyDerivation(ctx context.Context, in *MsgStoreKeyDeriv return out, nil } +func (c *msgClient) CreateNodeInfo(ctx context.Context, in *MsgCreateNodeInfo, opts ...grpc.CallOption) (*MsgCreateNodeInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCreateNodeInfoResponse) + err := c.cc.Invoke(ctx, Msg_CreateNodeInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateNodeInfo(ctx context.Context, in *MsgUpdateNodeInfo, opts ...grpc.CallOption) (*MsgUpdateNodeInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateNodeInfoResponse) + err := c.cc.Invoke(ctx, Msg_UpdateNodeInfo_FullMethodName, in, out, cOpts...) + 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. @@ -123,6 +147,8 @@ type MsgServer interface { FinalizeRingReshareByThresholdSignature(context.Context, *MsgFinalizeRingReshareByThresholdSignature) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) StoreDocument(context.Context, *MsgStoreDocument) (*MsgStoreDocumentResponse, error) StoreKeyDerivation(context.Context, *MsgStoreKeyDerivation) (*MsgStoreKeyDerivationResponse, error) + CreateNodeInfo(context.Context, *MsgCreateNodeInfo) (*MsgCreateNodeInfoResponse, error) + UpdateNodeInfo(context.Context, *MsgUpdateNodeInfo) (*MsgUpdateNodeInfoResponse, error) mustEmbedUnimplementedMsgServer() } @@ -151,6 +177,12 @@ func (UnimplementedMsgServer) StoreDocument(context.Context, *MsgStoreDocument) func (UnimplementedMsgServer) StoreKeyDerivation(context.Context, *MsgStoreKeyDerivation) (*MsgStoreKeyDerivationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StoreKeyDerivation not implemented") } +func (UnimplementedMsgServer) CreateNodeInfo(context.Context, *MsgCreateNodeInfo) (*MsgCreateNodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNodeInfo not implemented") +} +func (UnimplementedMsgServer) UpdateNodeInfo(context.Context, *MsgUpdateNodeInfo) (*MsgUpdateNodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNodeInfo not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) testEmbeddedByValue() {} @@ -280,6 +312,42 @@ func _Msg_StoreKeyDerivation_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Msg_CreateNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateNodeInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateNodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateNodeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateNodeInfo(ctx, req.(*MsgCreateNodeInfo)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateNodeInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateNodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateNodeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateNodeInfo(ctx, req.(*MsgUpdateNodeInfo)) + } + 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) @@ -311,6 +379,14 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "StoreKeyDerivation", Handler: _Msg_StoreKeyDerivation_Handler, }, + { + MethodName: "CreateNodeInfo", + Handler: _Msg_CreateNodeInfo_Handler, + }, + { + MethodName: "UpdateNodeInfo", + Handler: _Msg_UpdateNodeInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/orbis/tx.proto", diff --git a/proto/sourcehub/orbis/events.proto b/proto/sourcehub/orbis/events.proto index 2b6e164f..6fac4956 100644 --- a/proto/sourcehub/orbis/events.proto +++ b/proto/sourcehub/orbis/events.proto @@ -32,3 +32,15 @@ message EventKeyDerivationStored { string key_derivation_id = 2; string creator_did = 3; } + +// EventNodeInfoCreated is emitted when a node info record is created. +message EventNodeInfoCreated { + string peer_id = 1; + string controller_key = 2; +} + +// EventNodeInfoUpdated is emitted when a node info record is updated. +message EventNodeInfoUpdated { + string peer_id = 1; + string controller_key = 2; +} diff --git a/proto/sourcehub/orbis/genesis.proto b/proto/sourcehub/orbis/genesis.proto index b8fa4e71..77553e0a 100644 --- a/proto/sourcehub/orbis/genesis.proto +++ b/proto/sourcehub/orbis/genesis.proto @@ -5,6 +5,7 @@ import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "sourcehub/orbis/document.proto"; import "sourcehub/orbis/key_derivation.proto"; +import "sourcehub/orbis/node_info.proto"; import "sourcehub/orbis/params.proto"; import "sourcehub/orbis/ring.proto"; @@ -28,4 +29,8 @@ message GenesisState { (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + repeated NodeInfoEntry node_infos = 5 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; } diff --git a/proto/sourcehub/orbis/node_info.proto b/proto/sourcehub/orbis/node_info.proto new file mode 100644 index 00000000..8746380a --- /dev/null +++ b/proto/sourcehub/orbis/node_info.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package sourcehub.orbis; + +option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; + +// NodeInfo stores access-control metadata for a node participating in Orbis rings. +message NodeInfo { + string peer_id = 1; + string controller_key = 2; + repeated string whitelisted_namespaces = 3; + repeated string whitelisted_ring_ids = 4; +} + +// NodeInfoEntry pairs a node_key with its NodeInfo for genesis export/import. +message NodeInfoEntry { + string node_key = 1; + NodeInfo node_info = 2; +} diff --git a/proto/sourcehub/orbis/query.proto b/proto/sourcehub/orbis/query.proto index e864e572..6e9d8182 100644 --- a/proto/sourcehub/orbis/query.proto +++ b/proto/sourcehub/orbis/query.proto @@ -8,6 +8,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "sourcehub/orbis/document.proto"; import "sourcehub/orbis/key_derivation.proto"; +import "sourcehub/orbis/node_info.proto"; import "sourcehub/orbis/params.proto"; import "sourcehub/orbis/ring.proto"; @@ -49,6 +50,11 @@ service Query { rpc KeyDerivations(QueryKeyDerivationsRequest) returns (QueryKeyDerivationsResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/key_derivations/{namespace}"; } + + // NodeInfo queries node info by node key. + rpc NodeInfo(QueryNodeInfoRequest) returns (QueryNodeInfoResponse) { + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/node_info/{node_key}"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -126,3 +132,11 @@ message QueryKeyDerivationsResponse { ]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } + +message QueryNodeInfoRequest { + string node_key = 1; +} + +message QueryNodeInfoResponse { + NodeInfo node_info = 1; +} diff --git a/proto/sourcehub/orbis/tx.proto b/proto/sourcehub/orbis/tx.proto index db02c097..5c6d4b8a 100644 --- a/proto/sourcehub/orbis/tx.proto +++ b/proto/sourcehub/orbis/tx.proto @@ -21,6 +21,8 @@ service Msg { rpc FinalizeRingReshareByThresholdSignature(MsgFinalizeRingReshareByThresholdSignature) returns (MsgFinalizeRingReshareByThresholdSignatureResponse); rpc StoreDocument(MsgStoreDocument) returns (MsgStoreDocumentResponse); rpc StoreKeyDerivation(MsgStoreKeyDerivation) returns (MsgStoreKeyDerivationResponse); + rpc CreateNodeInfo(MsgCreateNodeInfo) returns (MsgCreateNodeInfoResponse); + rpc UpdateNodeInfo(MsgUpdateNodeInfo) returns (MsgUpdateNodeInfoResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -124,3 +126,28 @@ message MsgStoreKeyDerivation { message MsgStoreKeyDerivationResponse { string key_derivation_id = 1; } + +message MsgCreateNodeInfo { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string peer_id = 2; + string controller_key = 3; + repeated string whitelisted_namespaces = 4; + repeated string whitelisted_ring_ids = 5; +} + +message MsgCreateNodeInfoResponse {} + +message MsgUpdateNodeInfo { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string node_key = 2; + // Absent means no peer_id update. + optional string peer_id = 3; + repeated string whitelisted_namespaces = 4; + repeated string whitelisted_ring_ids = 5; + // Absent means no controller_key update. + optional string controller_key = 6; +} + +message MsgUpdateNodeInfoResponse {} diff --git a/testutil/keeper/orbis.go b/testutil/keeper/orbis.go index 20b4ecaf..296cc80c 100644 --- a/testutil/keeper/orbis.go +++ b/testutil/keeper/orbis.go @@ -29,6 +29,13 @@ import ( ) func OrbisKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { + k, _, ctx := OrbisKeeperFull(t) + return k, ctx +} + +// OrbisKeeperFull returns the keeper, the auth account keeper, and the context. +// Use this when tests need to register accounts with known public keys. +func OrbisKeeperFull(t testing.TB) (keeper.Keeper, authkeeper.AccountKeeper, sdk.Context) { orbisStoreKey := storetypes.NewKVStoreKey(types.StoreKey) acpStoreKey := storetypes.NewKVStoreKey(acptypes.StoreKey) authStoreKey := storetypes.NewKVStoreKey(authtypes.StoreKey) @@ -92,5 +99,5 @@ func OrbisKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) k.SetParams(ctx, types.DefaultParams()) - return k, ctx + return k, accountKeeper, ctx } diff --git a/x/orbis/keeper/grpc_query.go b/x/orbis/keeper/grpc_query.go index bfc99e7f..e00e920c 100644 --- a/x/orbis/keeper/grpc_query.go +++ b/x/orbis/keeper/grpc_query.go @@ -130,6 +130,19 @@ func (k *Keeper) KeyDerivation(ctx context.Context, req *types.QueryKeyDerivatio return &types.QueryKeyDerivationResponse{KeyDerivation: keyDerivation}, nil } +func (k *Keeper) NodeInfo(ctx context.Context, req *types.QueryNodeInfoRequest) (*types.QueryNodeInfoResponse, error) { + if req == nil || req.NodeKey == "" { + return nil, status.Error(codes.InvalidArgument, "node_key is required") + } + + nodeInfo := k.GetNodeInfo(ctx, req.NodeKey) + if nodeInfo == nil { + return nil, status.Error(codes.NotFound, types.ErrNodeInfoNotFound.Error()) + } + + return &types.QueryNodeInfoResponse{NodeInfo: nodeInfo}, nil +} + func (k *Keeper) KeyDerivations(ctx context.Context, req *types.QueryKeyDerivationsRequest) (*types.QueryKeyDerivationsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") diff --git a/x/orbis/keeper/msg_server.go b/x/orbis/keeper/msg_server.go index 22cdb063..4cd79742 100644 --- a/x/orbis/keeper/msg_server.go +++ b/x/orbis/keeper/msg_server.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "encoding/hex" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -228,6 +229,102 @@ func (k *Keeper) StoreDocument(goCtx context.Context, msg *types.MsgStoreDocumen return &types.MsgStoreDocumentResponse{DocumentId: documentID}, nil } +func (k *Keeper) CreateNodeInfo(goCtx context.Context, msg *types.MsgCreateNodeInfo) (*types.MsgCreateNodeInfoResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + nodeKey, err := signerPublicKeyHex(ctx, k, msg.Creator) + if err != nil { + return nil, err + } + + if existing := k.GetNodeInfo(goCtx, nodeKey); existing != nil { + return nil, types.ErrNodeInfoAlreadyExists + } + + nodeInfo := types.NodeInfo{ + PeerId: msg.PeerId, + ControllerKey: msg.ControllerKey, + WhitelistedNamespaces: append([]string(nil), msg.WhitelistedNamespaces...), + WhitelistedRingIds: append([]string(nil), msg.WhitelistedRingIds...), + } + if err := validateNodeInfo(&nodeInfo); err != nil { + return nil, err + } + + k.SetNodeInfo(goCtx, nodeKey, nodeInfo) + + if err := ctx.EventManager().EmitTypedEvent(&types.EventNodeInfoCreated{ + PeerId: nodeInfo.PeerId, + ControllerKey: nodeInfo.ControllerKey, + }); err != nil { + return nil, err + } + + return &types.MsgCreateNodeInfoResponse{}, nil +} + +func (k *Keeper) UpdateNodeInfo(goCtx context.Context, msg *types.MsgUpdateNodeInfo) (*types.MsgUpdateNodeInfoResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + nodeInfo := k.GetNodeInfo(goCtx, msg.NodeKey) + if nodeInfo == nil { + return nil, types.ErrNodeInfoNotFound + } + + signerKey, err := signerPublicKeyHex(ctx, k, msg.Creator) + if err != nil { + return nil, err + } + if signerKey != nodeInfo.ControllerKey { + return nil, types.ErrUnauthorizedNodeInfoUpdate + } + + if msg.XPeerId != nil { + nodeInfo.PeerId = msg.GetPeerId() + } + if msg.XControllerKey != nil { + nodeInfo.ControllerKey = msg.GetControllerKey() + } + nodeInfo.WhitelistedNamespaces = append([]string(nil), msg.WhitelistedNamespaces...) + nodeInfo.WhitelistedRingIds = append([]string(nil), msg.WhitelistedRingIds...) + if err := validateNodeInfo(nodeInfo); err != nil { + return nil, err + } + + k.SetNodeInfo(goCtx, msg.NodeKey, *nodeInfo) + + if err := ctx.EventManager().EmitTypedEvent(&types.EventNodeInfoUpdated{ + PeerId: nodeInfo.PeerId, + ControllerKey: nodeInfo.ControllerKey, + }); err != nil { + return nil, err + } + + return &types.MsgUpdateNodeInfoResponse{}, nil +} + +// signerPublicKeyHex returns the hex-encoded compressed public key for a bech32 address. +// The ante handler populates the account's public key before message handlers run, +// so it is guaranteed non-nil for the transaction signer. +func signerPublicKeyHex(ctx sdk.Context, k *Keeper, address string) (string, error) { + addr, err := sdk.AccAddressFromBech32(address) + if err != nil { + return "", errorsmod.Wrapf(types.ErrInvalidNodeInfo, "invalid signer address: %s", err) + } + + account := k.accountKeeper.GetAccount(ctx, addr) + if account == nil { + return "", errorsmod.Wrapf(types.ErrInvalidNodeInfo, "account not found for address %s", address) + } + + pubKey := account.GetPubKey() + if pubKey == nil { + return "", errorsmod.Wrapf(types.ErrInvalidNodeInfo, "public key not set for account %s", address) + } + + return hex.EncodeToString(pubKey.Bytes()), nil +} + func (k *Keeper) StoreKeyDerivation(goCtx context.Context, msg *types.MsgStoreKeyDerivation) (*types.MsgStoreKeyDerivationResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/x/orbis/keeper/msg_server_test.go b/x/orbis/keeper/msg_server_test.go index 08f8f2ee..fc242fd3 100644 --- a/x/orbis/keeper/msg_server_test.go +++ b/x/orbis/keeper/msg_server_test.go @@ -1,10 +1,12 @@ package keeper_test import ( + "encoding/hex" "testing" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/stretchr/testify/require" appparams "github.com/sourcenetwork/sourcehub/app/params" @@ -242,6 +244,202 @@ func TestMsgServer_FinalizeRingReshareRequiresPendingUpdate(t *testing.T) { require.ErrorContains(t, err, "missing new_peer_ids or new_threshold") } +func TestMsgServer_CreateNodeInfo(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + nodeAddr, nodePubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + controllerAddr, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + _ = controllerAddr + + _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ + Creator: nodeAddr, + PeerId: "12D3KooWExamplePeerID", + ControllerKey: controllerPubKeyHex, + }) + require.NoError(t, err) + + nodeInfo := k.GetNodeInfo(ctx, nodePubKeyHex) + require.NotNil(t, nodeInfo) + require.Equal(t, "12D3KooWExamplePeerID", nodeInfo.PeerId) + require.Equal(t, controllerPubKeyHex, nodeInfo.ControllerKey) + require.Empty(t, nodeInfo.WhitelistedNamespaces) + require.Empty(t, nodeInfo.WhitelistedRingIds) +} + +func TestMsgServer_CreateNodeInfo_WithWhitelists(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + nodeAddr, nodePubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + _, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + + _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ + Creator: nodeAddr, + PeerId: "peer-1", + ControllerKey: controllerPubKeyHex, + WhitelistedNamespaces: []string{"orbis/ns-a", "orbis/ns-b"}, + WhitelistedRingIds: []string{"ring-1"}, + }) + require.NoError(t, err) + + nodeInfo := k.GetNodeInfo(ctx, nodePubKeyHex) + require.NotNil(t, nodeInfo) + require.Equal(t, []string{"orbis/ns-a", "orbis/ns-b"}, nodeInfo.WhitelistedNamespaces) + require.Equal(t, []string{"ring-1"}, nodeInfo.WhitelistedRingIds) +} + +func TestMsgServer_CreateNodeInfo_AlreadyExists(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + nodeAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + _, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + + msg := &types.MsgCreateNodeInfo{ + Creator: nodeAddr, + PeerId: "peer-1", + ControllerKey: controllerPubKeyHex, + } + + _, err := k.CreateNodeInfo(ctx, msg) + require.NoError(t, err) + + _, err = k.CreateNodeInfo(ctx, msg) + require.ErrorIs(t, err, types.ErrNodeInfoAlreadyExists) +} + +func TestMsgServer_UpdateNodeInfo(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + nodeAddr, nodePubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + controllerAddr, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + + _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ + Creator: nodeAddr, + PeerId: "peer-original", + ControllerKey: controllerPubKeyHex, + WhitelistedNamespaces: []string{"orbis/ns-a"}, + }) + require.NoError(t, err) + + _, err = k.UpdateNodeInfo(ctx, &types.MsgUpdateNodeInfo{ + Creator: controllerAddr, + NodeKey: nodePubKeyHex, + WhitelistedNamespaces: []string{"orbis/ns-b", "orbis/ns-c"}, + WhitelistedRingIds: []string{"ring-1", "ring-2"}, + }) + require.NoError(t, err) + + nodeInfo := k.GetNodeInfo(ctx, nodePubKeyHex) + require.NotNil(t, nodeInfo) + require.Equal(t, "peer-original", nodeInfo.PeerId) + require.Equal(t, []string{"orbis/ns-b", "orbis/ns-c"}, nodeInfo.WhitelistedNamespaces) + require.Equal(t, []string{"ring-1", "ring-2"}, nodeInfo.WhitelistedRingIds) +} + +func TestMsgServer_UpdateNodeInfo_UpdatePeerId(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + nodeAddr, nodePubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + controllerAddr, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + + _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ + Creator: nodeAddr, + PeerId: "peer-original", + ControllerKey: controllerPubKeyHex, + }) + require.NoError(t, err) + + _, err = k.UpdateNodeInfo(ctx, &types.MsgUpdateNodeInfo{ + Creator: controllerAddr, + NodeKey: nodePubKeyHex, + XPeerId: &types.MsgUpdateNodeInfo_PeerId{PeerId: "peer-updated"}, + }) + require.NoError(t, err) + + nodeInfo := k.GetNodeInfo(ctx, nodePubKeyHex) + require.NotNil(t, nodeInfo) + require.Equal(t, "peer-updated", nodeInfo.PeerId) +} + +func TestMsgServer_UpdateNodeInfo_AbsentPeerIdIsNotCleared(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + nodeAddr, nodePubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + controllerAddr, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + + _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ + Creator: nodeAddr, + PeerId: "peer-original", + ControllerKey: controllerPubKeyHex, + }) + require.NoError(t, err) + + _, err = k.UpdateNodeInfo(ctx, &types.MsgUpdateNodeInfo{ + Creator: controllerAddr, + NodeKey: nodePubKeyHex, + WhitelistedRingIds: []string{"ring-1"}, + }) + require.NoError(t, err) + + nodeInfo := k.GetNodeInfo(ctx, nodePubKeyHex) + require.Equal(t, "peer-original", nodeInfo.PeerId) +} + +func TestMsgServer_UpdateNodeInfo_NotFound(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + controllerAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + _, err := k.UpdateNodeInfo(ctx, &types.MsgUpdateNodeInfo{ + Creator: controllerAddr, + NodeKey: "nonexistent-key", + }) + require.ErrorIs(t, err, types.ErrNodeInfoNotFound) +} + +func TestMsgServer_UpdateNodeInfo_Unauthorized(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + nodeAddr, nodePubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + _, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) + wrongAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ + Creator: nodeAddr, + PeerId: "peer-1", + ControllerKey: controllerPubKeyHex, + }) + require.NoError(t, err) + + _, err = k.UpdateNodeInfo(ctx, &types.MsgUpdateNodeInfo{ + Creator: wrongAddr, + NodeKey: nodePubKeyHex, + }) + require.ErrorIs(t, err, types.ErrUnauthorizedNodeInfoUpdate) +} + func testAddress() string { return sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() } + +// testAccountWithPubKey creates a secp256k1 keypair, registers the account in the auth keeper, +// and returns the bech32 address and hex-encoded public key bytes. +func testAccountWithPubKey(t *testing.T, ctx sdk.Context, ak authkeeper.AccountKeeper) (addr string, pubKeyHex string) { + t.Helper() + privKey := secp256k1.GenPrivKey() + pubKey := privKey.PubKey() + accAddr := sdk.AccAddress(pubKey.Address()) + account := ak.NewAccountWithAddress(ctx, accAddr) + if err := account.SetPubKey(pubKey); err != nil { + t.Fatal(err) + } + ak.SetAccount(ctx, account) + return accAddr.String(), hex.EncodeToString(pubKey.Bytes()) +} diff --git a/x/orbis/keeper/store.go b/x/orbis/keeper/store.go index 299e22c8..624f99a6 100644 --- a/x/orbis/keeper/store.go +++ b/x/orbis/keeper/store.go @@ -133,3 +133,44 @@ func (k *Keeper) mustIterateKeyDerivations(ctx context.Context, cb func(keyDeriv cb(keyDerivation) } } + +func (k *Keeper) SetNodeInfo(ctx context.Context, nodeKey string, nodeInfo types.NodeInfo) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.NodeInfoKeyPrefix)) + bz := k.cdc.MustMarshal(&nodeInfo) + store.Set([]byte(nodeKey), bz) +} + +func (k *Keeper) GetNodeInfo(ctx context.Context, nodeKey string) *types.NodeInfo { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.NodeInfoKeyPrefix)) + bz := store.Get([]byte(nodeKey)) + if bz == nil { + return nil + } + + var nodeInfo types.NodeInfo + k.cdc.MustUnmarshal(bz, &nodeInfo) + return &nodeInfo +} + +func (k *Keeper) GetAllNodeInfos(ctx context.Context) []types.NodeInfoEntry { + var entries []types.NodeInfoEntry + k.mustIterateNodeInfos(ctx, func(nodeKey string, nodeInfo types.NodeInfo) { + entries = append(entries, types.NodeInfoEntry{NodeKey: nodeKey, NodeInfo: &nodeInfo}) + }) + return entries +} + +func (k *Keeper) mustIterateNodeInfos(ctx context.Context, cb func(nodeKey string, nodeInfo types.NodeInfo)) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.NodeInfoKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var nodeInfo types.NodeInfo + k.cdc.MustUnmarshal(iterator.Value(), &nodeInfo) + cb(string(iterator.Key()), nodeInfo) + } +} diff --git a/x/orbis/keeper/validation.go b/x/orbis/keeper/validation.go index 57f90d00..e880dee3 100644 --- a/x/orbis/keeper/validation.go +++ b/x/orbis/keeper/validation.go @@ -1,6 +1,9 @@ package keeper import ( + "encoding/hex" + "strings" + errorsmod "cosmossdk.io/errors" "github.com/sourcenetwork/sourcehub/x/orbis/types" @@ -139,3 +142,21 @@ func validateKeyDerivation(keyDerivation *types.KeyDerivation) error { } return nil } + +// secp256k1 compressed public key length in bytes +const compressedPubKeyLen = 33 + +func validateNodeInfo(nodeInfo *types.NodeInfo) error { + switch { + case nodeInfo.PeerId == "": + return errorsmod.Wrap(types.ErrInvalidNodeInfo, "missing peer_id") + case nodeInfo.ControllerKey == "": + return errorsmod.Wrap(types.ErrInvalidNodeInfo, "missing controller_key") + } + keyHex := strings.TrimPrefix(nodeInfo.ControllerKey, "0x") + decoded, err := hex.DecodeString(keyHex) + if err != nil || len(decoded) != compressedPubKeyLen { + return errorsmod.Wrap(types.ErrInvalidNodeInfo, "invalid controller_key encoding") + } + return nil +} diff --git a/x/orbis/module/autocli.go b/x/orbis/module/autocli.go index 8dbaed66..1c783b42 100644 --- a/x/orbis/module/autocli.go +++ b/x/orbis/module/autocli.go @@ -44,6 +44,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Query key derivations within a namespace", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}}, }, + { + RpcMethod: "NodeInfo", + Use: "node-info [node_key]", + Short: "Query node info by node key", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "node_key"}}, + }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ @@ -82,6 +88,18 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Store an Orbis key derivation", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "ring_id"}, {ProtoField: "derivation"}, {ProtoField: "policy_id"}, {ProtoField: "resource"}, {ProtoField: "permission"}}, }, + { + RpcMethod: "CreateNodeInfo", + Use: "create-node-info [peer_id] [controller_key]", + Short: "Create a node info record (store key derived from signing key)", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "peer_id"}, {ProtoField: "controller_key"}}, + }, + { + RpcMethod: "UpdateNodeInfo", + Use: "update-node-info [node_key]", + Short: "Update a node info record (signer must match stored controller key)", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "node_key"}}, + }, }, }, } diff --git a/x/orbis/module/genesis.go b/x/orbis/module/genesis.go index 0bce0f30..bfb45bc7 100644 --- a/x/orbis/module/genesis.go +++ b/x/orbis/module/genesis.go @@ -22,6 +22,11 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, genState types.GenesisState) for _, keyDerivation := range genState.KeyDerivations { k.SetKeyDerivation(ctx, keyDerivation) } + for _, entry := range genState.NodeInfos { + if entry.NodeInfo != nil { + k.SetNodeInfo(ctx, entry.NodeKey, *entry.NodeInfo) + } + } } // ExportGenesis returns the module's exported genesis. @@ -31,5 +36,6 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { genesis.Rings = k.GetAllRings(ctx) genesis.Documents = k.GetAllDocuments(ctx) genesis.KeyDerivations = k.GetAllKeyDerivations(ctx) + genesis.NodeInfos = k.GetAllNodeInfos(ctx) return genesis } diff --git a/x/orbis/types/codec.go b/x/orbis/types/codec.go index d5b1171a..d0a6c96a 100644 --- a/x/orbis/types/codec.go +++ b/x/orbis/types/codec.go @@ -14,6 +14,8 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgFinalizeRingReshareByThresholdSignature{}, &MsgStoreDocument{}, &MsgStoreKeyDerivation{}, + &MsgCreateNodeInfo{}, + &MsgUpdateNodeInfo{}, &MsgUpdateParams{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/orbis/types/errors.go b/x/orbis/types/errors.go index 86293cb2..b031f32c 100644 --- a/x/orbis/types/errors.go +++ b/x/orbis/types/errors.go @@ -24,4 +24,8 @@ var ( ErrInvalidThresholdSignature = sdkerrors.Register(ModuleName, 1217, "invalid threshold signature") ErrInvalidSignatureScheme = sdkerrors.Register(ModuleName, 1218, "invalid signature scheme") ErrInvalidSignaturePayload = sdkerrors.Register(ModuleName, 1219, "invalid signature payload") + ErrNodeInfoAlreadyExists = sdkerrors.Register(ModuleName, 1220, "node info already exists") + ErrNodeInfoNotFound = sdkerrors.Register(ModuleName, 1221, "node info not found") + ErrInvalidNodeInfo = sdkerrors.Register(ModuleName, 1222, "invalid node info") + ErrUnauthorizedNodeInfoUpdate = sdkerrors.Register(ModuleName, 1223, "tx signer does not match controller key") ) diff --git a/x/orbis/types/events.pb.go b/x/orbis/types/events.pb.go index 4b487f1b..77c16b47 100644 --- a/x/orbis/types/events.pb.go +++ b/x/orbis/types/events.pb.go @@ -274,37 +274,149 @@ func (m *EventKeyDerivationStored) GetCreatorDid() string { return "" } +// EventNodeInfoCreated is emitted when a node info record is created. +type EventNodeInfoCreated struct { + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` +} + +func (m *EventNodeInfoCreated) Reset() { *m = EventNodeInfoCreated{} } +func (m *EventNodeInfoCreated) String() string { return proto.CompactTextString(m) } +func (*EventNodeInfoCreated) ProtoMessage() {} +func (*EventNodeInfoCreated) Descriptor() ([]byte, []int) { + return fileDescriptor_cb68216cf0ba47d2, []int{4} +} +func (m *EventNodeInfoCreated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventNodeInfoCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventNodeInfoCreated.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 *EventNodeInfoCreated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventNodeInfoCreated.Merge(m, src) +} +func (m *EventNodeInfoCreated) XXX_Size() int { + return m.Size() +} +func (m *EventNodeInfoCreated) XXX_DiscardUnknown() { + xxx_messageInfo_EventNodeInfoCreated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventNodeInfoCreated proto.InternalMessageInfo + +func (m *EventNodeInfoCreated) GetPeerId() string { + if m != nil { + return m.PeerId + } + return "" +} + +func (m *EventNodeInfoCreated) GetControllerKey() string { + if m != nil { + return m.ControllerKey + } + return "" +} + +// EventNodeInfoUpdated is emitted when a node info record is updated. +type EventNodeInfoUpdated struct { + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` +} + +func (m *EventNodeInfoUpdated) Reset() { *m = EventNodeInfoUpdated{} } +func (m *EventNodeInfoUpdated) String() string { return proto.CompactTextString(m) } +func (*EventNodeInfoUpdated) ProtoMessage() {} +func (*EventNodeInfoUpdated) Descriptor() ([]byte, []int) { + return fileDescriptor_cb68216cf0ba47d2, []int{5} +} +func (m *EventNodeInfoUpdated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventNodeInfoUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventNodeInfoUpdated.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 *EventNodeInfoUpdated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventNodeInfoUpdated.Merge(m, src) +} +func (m *EventNodeInfoUpdated) XXX_Size() int { + return m.Size() +} +func (m *EventNodeInfoUpdated) XXX_DiscardUnknown() { + xxx_messageInfo_EventNodeInfoUpdated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventNodeInfoUpdated proto.InternalMessageInfo + +func (m *EventNodeInfoUpdated) GetPeerId() string { + if m != nil { + return m.PeerId + } + return "" +} + +func (m *EventNodeInfoUpdated) GetControllerKey() string { + if m != nil { + return m.ControllerKey + } + return "" +} + func init() { proto.RegisterType((*EventRingCreated)(nil), "sourcehub.orbis.EventRingCreated") proto.RegisterType((*EventRingUpdated)(nil), "sourcehub.orbis.EventRingUpdated") proto.RegisterType((*EventDocumentStored)(nil), "sourcehub.orbis.EventDocumentStored") proto.RegisterType((*EventKeyDerivationStored)(nil), "sourcehub.orbis.EventKeyDerivationStored") + proto.RegisterType((*EventNodeInfoCreated)(nil), "sourcehub.orbis.EventNodeInfoCreated") + proto.RegisterType((*EventNodeInfoUpdated)(nil), "sourcehub.orbis.EventNodeInfoUpdated") } func init() { proto.RegisterFile("sourcehub/orbis/events.proto", fileDescriptor_cb68216cf0ba47d2) } var fileDescriptor_cb68216cf0ba47d2 = []byte{ - // 318 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xb1, 0x4e, 0xf3, 0x30, - 0x14, 0x85, 0xeb, 0xff, 0x47, 0x85, 0xde, 0x0e, 0x85, 0x30, 0x10, 0xa1, 0xca, 0x45, 0x99, 0x10, - 0x43, 0x83, 0xc4, 0x1b, 0x40, 0x18, 0x80, 0xad, 0x88, 0x85, 0xa5, 0x72, 0xed, 0x4b, 0x31, 0x55, - 0xed, 0xc8, 0x71, 0x0a, 0x7d, 0x00, 0x98, 0x79, 0x2c, 0xc6, 0x8e, 0x8c, 0x28, 0x79, 0x11, 0x14, - 0x13, 0x92, 0x32, 0x11, 0x89, 0xf1, 0x9e, 0x73, 0x7d, 0xcf, 0xb1, 0xf4, 0x41, 0x3f, 0xd1, 0xa9, - 0xe1, 0x78, 0x9f, 0x4e, 0x42, 0x6d, 0x26, 0x32, 0x09, 0x71, 0x81, 0xca, 0x26, 0xc3, 0xd8, 0x68, - 0xab, 0xbd, 0x5e, 0xe5, 0x0e, 0x9d, 0x1b, 0xbc, 0x10, 0xd8, 0x3e, 0x2f, 0x36, 0x46, 0x52, 0x4d, - 0xcf, 0x0c, 0x32, 0x8b, 0xc2, 0xeb, 0x43, 0x47, 0xb1, 0x39, 0x26, 0x31, 0xe3, 0xe8, 0x93, 0x03, - 0x72, 0xd8, 0x19, 0xd5, 0x82, 0xb7, 0x07, 0x9b, 0x46, 0xaa, 0xe9, 0x58, 0x0a, 0xff, 0x9f, 0xf3, - 0xda, 0xc5, 0x78, 0x21, 0xbc, 0x01, 0x74, 0x79, 0x71, 0x41, 0x9b, 0xb1, 0x90, 0xc2, 0xff, 0xef, - 0x4c, 0x28, 0xa5, 0x48, 0x0a, 0x6f, 0x1f, 0xb6, 0x98, 0xb1, 0xf2, 0x8e, 0x71, 0xeb, 0x6f, 0x38, - 0xb7, 0x9a, 0x83, 0x87, 0xb5, 0x1e, 0x37, 0xb1, 0xf8, 0x63, 0x8f, 0xd4, 0x5d, 0xf8, 0xd1, 0xa3, - 0x94, 0x22, 0x29, 0x82, 0x14, 0x76, 0x5d, 0x56, 0xa4, 0x79, 0x3a, 0x47, 0x65, 0xaf, 0xad, 0x36, - 0xbf, 0xc6, 0x0d, 0xa0, 0x2b, 0xca, 0xfd, 0x3a, 0x12, 0xbe, 0xa5, 0x06, 0xdf, 0x0f, 0x9e, 0x09, - 0xf8, 0x2e, 0xf7, 0x0a, 0x97, 0x11, 0x1a, 0xb9, 0x60, 0x56, 0x6a, 0xd5, 0x28, 0xfc, 0x08, 0x76, - 0x66, 0xb8, 0x1c, 0x8b, 0xea, 0x55, 0x5d, 0xa1, 0x37, 0x5b, 0xbf, 0xd6, 0xa0, 0xc7, 0xe9, 0xe5, - 0x5b, 0x46, 0xc9, 0x2a, 0xa3, 0xe4, 0x23, 0xa3, 0xe4, 0x35, 0xa7, 0xad, 0x55, 0x4e, 0x5b, 0xef, - 0x39, 0x6d, 0xdd, 0x1e, 0x4f, 0xa5, 0x2d, 0xd8, 0xe0, 0x7a, 0x1e, 0x7e, 0x91, 0xa2, 0xd0, 0x3e, - 0x6a, 0x33, 0x0b, 0x6b, 0xaa, 0x9e, 0x4a, 0xae, 0xec, 0x32, 0xc6, 0x64, 0xd2, 0x76, 0x5c, 0x9d, - 0x7c, 0x06, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x71, 0x72, 0xb9, 0x77, 0x02, 0x00, 0x00, + // 373 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xc1, 0x4e, 0xc2, 0x40, + 0x10, 0xa5, 0x6a, 0x40, 0x86, 0x28, 0x5a, 0x4d, 0x68, 0x0c, 0x29, 0xa6, 0x89, 0x89, 0xf1, 0x40, + 0x4d, 0xfc, 0x03, 0xad, 0x07, 0x24, 0xf1, 0x80, 0xd1, 0x83, 0x97, 0xa6, 0x74, 0x07, 0x5c, 0x0b, + 0xbb, 0xcd, 0x76, 0x8b, 0xf6, 0x03, 0xf4, 0xec, 0x67, 0x79, 0xe4, 0xe8, 0xd1, 0xc0, 0x8f, 0x98, + 0x2e, 0x85, 0x62, 0x3c, 0x48, 0xc2, 0x71, 0xde, 0x9b, 0x7d, 0xef, 0x6d, 0x66, 0x06, 0xea, 0x11, + 0x8f, 0x85, 0x8f, 0x4f, 0x71, 0xd7, 0xe6, 0xa2, 0x4b, 0x23, 0x1b, 0x47, 0xc8, 0x64, 0xd4, 0x0c, + 0x05, 0x97, 0x5c, 0xaf, 0x2e, 0xd8, 0xa6, 0x62, 0xad, 0x77, 0x0d, 0xf6, 0xae, 0xd3, 0x8e, 0x0e, + 0x65, 0xfd, 0x2b, 0x81, 0x9e, 0x44, 0xa2, 0xd7, 0xa1, 0xcc, 0xbc, 0x21, 0x46, 0xa1, 0xe7, 0xa3, + 0xa1, 0x1d, 0x6b, 0xa7, 0xe5, 0x4e, 0x0e, 0xe8, 0x35, 0x28, 0x09, 0xca, 0xfa, 0x2e, 0x25, 0xc6, + 0x86, 0xe2, 0x8a, 0x69, 0xd9, 0x22, 0x7a, 0x03, 0x2a, 0x7e, 0xaa, 0xc0, 0x85, 0x4b, 0x28, 0x31, + 0x36, 0x15, 0x09, 0x19, 0xe4, 0x50, 0xa2, 0x1f, 0xc1, 0xb6, 0x27, 0x24, 0xed, 0x79, 0xbe, 0x34, + 0xb6, 0x14, 0xbb, 0xa8, 0xad, 0xe7, 0xa5, 0x1c, 0xf7, 0x21, 0x59, 0x33, 0x47, 0xac, 0x14, 0x7e, + 0xe5, 0xc8, 0x20, 0x87, 0x12, 0x2b, 0x86, 0x03, 0xe5, 0xe5, 0x70, 0x3f, 0x1e, 0x22, 0x93, 0x77, + 0x92, 0x8b, 0x7f, 0xed, 0x1a, 0x50, 0x21, 0x59, 0x7f, 0x6e, 0x09, 0x73, 0x68, 0x85, 0xef, 0x5b, + 0x6f, 0x1a, 0x18, 0xca, 0xb7, 0x8d, 0x89, 0x83, 0x82, 0x8e, 0x3c, 0x49, 0x39, 0x5b, 0xc9, 0xfc, + 0x0c, 0xf6, 0x03, 0x4c, 0x5c, 0xb2, 0x78, 0x95, 0x47, 0xa8, 0x06, 0xcb, 0x6a, 0xab, 0xe4, 0x78, + 0x80, 0x43, 0x15, 0xe3, 0x96, 0x13, 0x6c, 0xb1, 0x1e, 0x9f, 0x8f, 0xbd, 0x06, 0xa5, 0x10, 0x51, + 0xa4, 0xd2, 0xb3, 0x00, 0xc5, 0xb4, 0x6c, 0x11, 0xfd, 0x04, 0x76, 0x7d, 0xce, 0xa4, 0xe0, 0x83, + 0x01, 0x0a, 0x37, 0xc0, 0x24, 0xb3, 0xde, 0xc9, 0xd1, 0x36, 0x26, 0x7f, 0x74, 0xe7, 0x63, 0x5c, + 0x53, 0xf7, 0xf2, 0xe6, 0x73, 0x62, 0x6a, 0xe3, 0x89, 0xa9, 0x7d, 0x4f, 0x4c, 0xed, 0x63, 0x6a, + 0x16, 0xc6, 0x53, 0xb3, 0xf0, 0x35, 0x35, 0x0b, 0x8f, 0xe7, 0x7d, 0x2a, 0xd3, 0x5d, 0xf6, 0xf9, + 0xd0, 0x9e, 0x6d, 0x36, 0x43, 0xf9, 0xc2, 0x45, 0x60, 0xe7, 0x57, 0xf0, 0x9a, 0xdd, 0x81, 0x4c, + 0x42, 0x8c, 0xba, 0x45, 0x75, 0x07, 0x17, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x67, 0xf5, 0xdf, + 0x31, 0x27, 0x03, 0x00, 0x00, } func (m *EventRingCreated) Marshal() (dAtA []byte, err error) { @@ -490,6 +602,80 @@ func (m *EventKeyDerivationStored) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *EventNodeInfoCreated) 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 *EventNodeInfoCreated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventNodeInfoCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ControllerKey) > 0 { + i -= len(m.ControllerKey) + copy(dAtA[i:], m.ControllerKey) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ControllerKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventNodeInfoUpdated) 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 *EventNodeInfoUpdated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventNodeInfoUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ControllerKey) > 0 { + i -= len(m.ControllerKey) + copy(dAtA[i:], m.ControllerKey) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ControllerKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { offset -= sovEvents(v) base := offset @@ -589,6 +775,40 @@ func (m *EventKeyDerivationStored) Size() (n int) { return n } +func (m *EventNodeInfoCreated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PeerId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.ControllerKey) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventNodeInfoUpdated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PeerId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.ControllerKey) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + func sovEvents(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1211,6 +1431,234 @@ func (m *EventKeyDerivationStored) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventNodeInfoCreated) 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 ErrIntOverflowEvents + } + 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: EventNodeInfoCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventNodeInfoCreated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ControllerKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventNodeInfoUpdated) 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 ErrIntOverflowEvents + } + 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: EventNodeInfoUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventNodeInfoUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ControllerKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/orbis/types/genesis.pb.go b/x/orbis/types/genesis.pb.go index 53871e43..7b6be5b6 100644 --- a/x/orbis/types/genesis.pb.go +++ b/x/orbis/types/genesis.pb.go @@ -30,6 +30,7 @@ type GenesisState struct { Rings []Ring `protobuf:"bytes,2,rep,name=rings,proto3" json:"rings"` Documents []Document `protobuf:"bytes,3,rep,name=documents,proto3" json:"documents"` KeyDerivations []KeyDerivation `protobuf:"bytes,4,rep,name=key_derivations,json=keyDerivations,proto3" json:"key_derivations"` + NodeInfos []NodeInfoEntry `protobuf:"bytes,5,rep,name=node_infos,json=nodeInfos,proto3" json:"node_infos"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -93,6 +94,13 @@ func (m *GenesisState) GetKeyDerivations() []KeyDerivation { return nil } +func (m *GenesisState) GetNodeInfos() []NodeInfoEntry { + if m != nil { + return m.NodeInfos + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "sourcehub.orbis.GenesisState") } @@ -100,28 +108,31 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/genesis.proto", fileDescriptor_b5064b91df2d6b77) } var fileDescriptor_b5064b91df2d6b77 = []byte{ - // 327 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0xce, 0x2f, 0x2d, - 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0xcf, 0x2f, 0x4a, 0xca, 0x2c, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, - 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0x4b, 0xeb, 0x81, 0xa5, - 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x8d, 0x94, 0x48, 0x7a, 0x7e, - 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0xe5, 0xd0, 0x0d, 0x4e, 0xc9, 0x4f, 0x2e, 0xcd, - 0x4d, 0xcd, 0x2b, 0x81, 0xca, 0xab, 0xa0, 0xcb, 0x67, 0xa7, 0x56, 0xc6, 0xa7, 0xa4, 0x16, 0x65, - 0x96, 0x25, 0x96, 0x64, 0xe6, 0xe7, 0x41, 0x55, 0xc9, 0xa0, 0xab, 0x2a, 0x48, 0x2c, 0x4a, 0xcc, - 0x85, 0xba, 0x4e, 0x4a, 0x0a, 0x5d, 0xb6, 0x28, 0x33, 0x2f, 0x1d, 0x22, 0xa7, 0x34, 0x8b, 0x89, - 0x8b, 0xc7, 0x1d, 0xe2, 0x97, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0x21, 0x2b, 0x2e, 0x36, 0x88, 0x66, - 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x71, 0x3d, 0x34, 0xbf, 0xe9, 0x05, 0x80, 0xa5, 0x9d, - 0x38, 0x4f, 0xdc, 0x93, 0x67, 0x58, 0xf1, 0x7c, 0x83, 0x16, 0x63, 0x10, 0x54, 0x87, 0x90, 0x19, - 0x17, 0x2b, 0xc8, 0xe8, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x51, 0x0c, 0xad, 0x41, - 0x99, 0x79, 0xe9, 0xc8, 0x1a, 0x21, 0xca, 0x85, 0x9c, 0xb8, 0x38, 0x61, 0xde, 0x2e, 0x96, 0x60, - 0x06, 0xeb, 0x95, 0xc4, 0xd0, 0xeb, 0x02, 0x55, 0x81, 0xac, 0x1f, 0xa1, 0x4d, 0x28, 0x88, 0x8b, - 0x1f, 0x35, 0x68, 0x8a, 0x25, 0x58, 0xc0, 0x26, 0xc9, 0x61, 0x98, 0xe4, 0x9d, 0x5a, 0xe9, 0x02, - 0x57, 0x86, 0x6c, 0x1c, 0x5f, 0x36, 0xb2, 0x4c, 0xb1, 0x93, 0xd7, 0x89, 0x47, 0x72, 0x8c, 0x17, - 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, - 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa4, 0x67, 0x96, 0x80, 0x0c, 0x4c, 0xce, 0xcf, 0xd5, 0x87, - 0x18, 0x9f, 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0xad, 0x8f, 0x08, 0xeb, 0x0a, 0x68, 0x68, 0x97, - 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xc3, 0xdb, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x9c, - 0x24, 0x57, 0x8a, 0x4a, 0x02, 0x00, 0x00, + // 370 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcf, 0x4e, 0xea, 0x40, + 0x14, 0xc6, 0x5b, 0xb8, 0x90, 0x30, 0xdc, 0x5c, 0x72, 0x9b, 0x7b, 0x63, 0x6d, 0x74, 0x20, 0xc6, + 0x05, 0x71, 0xd1, 0x1a, 0x4c, 0x5c, 0xb8, 0x24, 0x18, 0xff, 0x25, 0xc6, 0xe0, 0xce, 0x0d, 0x29, + 0x74, 0xa8, 0x13, 0xd2, 0x39, 0x64, 0x66, 0x50, 0xfb, 0x16, 0x3e, 0x86, 0x4b, 0x1f, 0x83, 0x25, + 0x4b, 0x57, 0xc6, 0x80, 0x89, 0xaf, 0x61, 0x98, 0x0e, 0x50, 0x4a, 0xdc, 0x34, 0x27, 0xfd, 0x7d, + 0xdf, 0x37, 0xe7, 0x0f, 0xda, 0x15, 0x30, 0xe2, 0x3d, 0x72, 0x3f, 0xea, 0x7a, 0xc0, 0xbb, 0x54, + 0x78, 0x21, 0x61, 0x44, 0x50, 0xe1, 0x0e, 0x39, 0x48, 0xb0, 0x2a, 0x4b, 0xec, 0x2a, 0xec, 0xfc, + 0xf5, 0x23, 0xca, 0xc0, 0x53, 0xdf, 0x44, 0xe3, 0xfc, 0x0b, 0x21, 0x04, 0x55, 0x7a, 0xf3, 0x4a, + 0xff, 0xc5, 0xd9, 0xe0, 0x00, 0x7a, 0xa3, 0x88, 0x30, 0xa9, 0xf9, 0x7e, 0x96, 0x0f, 0x48, 0xdc, + 0x09, 0x08, 0xa7, 0x0f, 0xbe, 0xa4, 0xc0, 0xb4, 0xaa, 0x9a, 0x55, 0x31, 0x08, 0x48, 0x87, 0xb2, + 0xfe, 0xe2, 0x99, 0x9d, 0xac, 0x60, 0xe8, 0x73, 0x3f, 0xd2, 0xed, 0x3b, 0x4e, 0x96, 0x72, 0xca, + 0xc2, 0x84, 0xed, 0x7d, 0xe6, 0xd0, 0xef, 0xb3, 0x64, 0xd8, 0x5b, 0xe9, 0x4b, 0x62, 0x9d, 0xa0, + 0x62, 0x62, 0xb6, 0xcd, 0x9a, 0x59, 0x2f, 0x37, 0xb6, 0xdc, 0xcc, 0xf0, 0xee, 0x8d, 0xc2, 0xcd, + 0xd2, 0xf8, 0xbd, 0x6a, 0xbc, 0x7c, 0xbd, 0x1e, 0x98, 0x6d, 0xed, 0xb0, 0x8e, 0x51, 0x61, 0x1e, + 0x2d, 0xec, 0x5c, 0x2d, 0x5f, 0x2f, 0x37, 0xfe, 0x6f, 0x58, 0xdb, 0x94, 0x85, 0x69, 0x63, 0x22, + 0xb7, 0x9a, 0xa8, 0xb4, 0xd8, 0x8b, 0xb0, 0xf3, 0xca, 0xbb, 0xbd, 0xe1, 0x6d, 0x69, 0x45, 0xda, + 0xbf, 0xb2, 0x59, 0x6d, 0x54, 0x59, 0xdf, 0x9d, 0xb0, 0x7f, 0xa9, 0x24, 0xbc, 0x91, 0x74, 0x45, + 0xe2, 0xd6, 0x52, 0x96, 0x8e, 0xfb, 0x33, 0x48, 0x13, 0x61, 0x9d, 0x23, 0xb4, 0xdc, 0xb4, 0xb0, + 0x0b, 0x3f, 0xc4, 0x5d, 0x43, 0x40, 0x2e, 0x58, 0x1f, 0x4e, 0x99, 0xe4, 0xf1, 0x5a, 0x77, 0x4c, + 0x13, 0xd1, 0xbc, 0x1c, 0x4f, 0xb1, 0x39, 0x99, 0x62, 0xf3, 0x63, 0x8a, 0xcd, 0xe7, 0x19, 0x36, + 0x26, 0x33, 0x6c, 0xbc, 0xcd, 0xb0, 0x71, 0x77, 0x18, 0x52, 0x39, 0xcf, 0xea, 0x41, 0xe4, 0x25, + 0xc9, 0x8c, 0xc8, 0x47, 0xe0, 0x03, 0x6f, 0x75, 0xb5, 0x27, 0x7d, 0x37, 0x19, 0x0f, 0x89, 0xe8, + 0x16, 0xd5, 0xe5, 0x8e, 0xbe, 0x03, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xef, 0x17, 0xbd, 0xb5, 0x02, + 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -144,6 +155,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.NodeInfos) > 0 { + for iNdEx := len(m.NodeInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.NodeInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } if len(m.KeyDerivations) > 0 { for iNdEx := len(m.KeyDerivations) - 1; iNdEx >= 0; iNdEx-- { { @@ -236,6 +261,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.NodeInfos) > 0 { + for _, e := range m.NodeInfos { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -409,6 +440,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeInfos", 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 + } + m.NodeInfos = append(m.NodeInfos, NodeInfoEntry{}) + if err := m.NodeInfos[len(m.NodeInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/orbis/types/keys.go b/x/orbis/types/keys.go index 3a7c5c34..0f67f6b0 100644 --- a/x/orbis/types/keys.go +++ b/x/orbis/types/keys.go @@ -17,6 +17,7 @@ const ( RingKeyPrefix = "ring/" DocumentKeyPrefix = "document/" KeyDerivationKeyPrefix = "key_derivation/" + NodeInfoKeyPrefix = "node_info/" NamespaceIDPrefix = "orbis/" diff --git a/x/orbis/types/message_create_node_info.go b/x/orbis/types/message_create_node_info.go new file mode 100644 index 00000000..9a81da4e --- /dev/null +++ b/x/orbis/types/message_create_node_info.go @@ -0,0 +1,22 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgCreateNodeInfo{} + +func (msg *MsgCreateNodeInfo) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + if msg.PeerId == "" { + return errorsmod.Wrap(ErrInvalidNodeInfo, "missing peer_id") + } + if msg.ControllerKey == "" { + return errorsmod.Wrap(ErrInvalidNodeInfo, "missing controller_key") + } + return nil +} diff --git a/x/orbis/types/message_update_node_info.go b/x/orbis/types/message_update_node_info.go new file mode 100644 index 00000000..70d1ee23 --- /dev/null +++ b/x/orbis/types/message_update_node_info.go @@ -0,0 +1,19 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgUpdateNodeInfo{} + +func (msg *MsgUpdateNodeInfo) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + if msg.NodeKey == "" { + return errorsmod.Wrap(ErrInvalidNodeInfo, "missing node_key") + } + return nil +} diff --git a/x/orbis/types/node_info.pb.go b/x/orbis/types/node_info.pb.go new file mode 100644 index 00000000..96666a62 --- /dev/null +++ b/x/orbis/types/node_info.pb.go @@ -0,0 +1,717 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/orbis/node_info.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// NodeInfo stores access-control metadata for a node participating in Orbis rings. +type NodeInfo struct { + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` + WhitelistedNamespaces []string `protobuf:"bytes,3,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,4,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` +} + +func (m *NodeInfo) Reset() { *m = NodeInfo{} } +func (m *NodeInfo) String() string { return proto.CompactTextString(m) } +func (*NodeInfo) ProtoMessage() {} +func (*NodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_06aa462c7d79cc8e, []int{0} +} +func (m *NodeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NodeInfo.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 *NodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeInfo.Merge(m, src) +} +func (m *NodeInfo) XXX_Size() int { + return m.Size() +} +func (m *NodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_NodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeInfo proto.InternalMessageInfo + +func (m *NodeInfo) GetPeerId() string { + if m != nil { + return m.PeerId + } + return "" +} + +func (m *NodeInfo) GetControllerKey() string { + if m != nil { + return m.ControllerKey + } + return "" +} + +func (m *NodeInfo) GetWhitelistedNamespaces() []string { + if m != nil { + return m.WhitelistedNamespaces + } + return nil +} + +func (m *NodeInfo) GetWhitelistedRingIds() []string { + if m != nil { + return m.WhitelistedRingIds + } + return nil +} + +// NodeInfoEntry pairs a node_key with its NodeInfo for genesis export/import. +type NodeInfoEntry struct { + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + NodeInfo *NodeInfo `protobuf:"bytes,2,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"` +} + +func (m *NodeInfoEntry) Reset() { *m = NodeInfoEntry{} } +func (m *NodeInfoEntry) String() string { return proto.CompactTextString(m) } +func (*NodeInfoEntry) ProtoMessage() {} +func (*NodeInfoEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_06aa462c7d79cc8e, []int{1} +} +func (m *NodeInfoEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeInfoEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NodeInfoEntry.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 *NodeInfoEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeInfoEntry.Merge(m, src) +} +func (m *NodeInfoEntry) XXX_Size() int { + return m.Size() +} +func (m *NodeInfoEntry) XXX_DiscardUnknown() { + xxx_messageInfo_NodeInfoEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeInfoEntry proto.InternalMessageInfo + +func (m *NodeInfoEntry) GetNodeKey() string { + if m != nil { + return m.NodeKey + } + return "" +} + +func (m *NodeInfoEntry) GetNodeInfo() *NodeInfo { + if m != nil { + return m.NodeInfo + } + return nil +} + +func init() { + proto.RegisterType((*NodeInfo)(nil), "sourcehub.orbis.NodeInfo") + proto.RegisterType((*NodeInfoEntry)(nil), "sourcehub.orbis.NodeInfoEntry") +} + +func init() { proto.RegisterFile("sourcehub/orbis/node_info.proto", fileDescriptor_06aa462c7d79cc8e) } + +var fileDescriptor_06aa462c7d79cc8e = []byte{ + // 306 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xcd, 0x4e, 0x3a, 0x31, + 0x14, 0xc5, 0xe9, 0x9f, 0x7f, 0xf8, 0xa8, 0x41, 0x93, 0xc6, 0x8f, 0x61, 0x53, 0x09, 0x89, 0x09, + 0xab, 0x19, 0xa2, 0xd1, 0x07, 0x30, 0x71, 0x81, 0x26, 0x2c, 0x66, 0xe9, 0x66, 0xc2, 0x4c, 0x2f, + 0xd0, 0x00, 0xbd, 0x93, 0xb6, 0x04, 0xe7, 0x2d, 0x7c, 0x17, 0x5f, 0xc2, 0x25, 0x4b, 0x97, 0x06, + 0x5e, 0xc4, 0xb4, 0x08, 0x4c, 0xdc, 0xf5, 0xf6, 0xdc, 0x73, 0xf2, 0xeb, 0x29, 0xbd, 0x36, 0xb8, + 0xd4, 0x19, 0x4c, 0x97, 0x69, 0x84, 0x3a, 0x95, 0x26, 0x52, 0x28, 0x20, 0x91, 0x6a, 0x8c, 0x61, + 0xae, 0xd1, 0x22, 0x3b, 0x3b, 0x2c, 0x84, 0x7e, 0xa1, 0xfb, 0x41, 0x68, 0x63, 0x88, 0x02, 0x06, + 0x6a, 0x8c, 0xec, 0x8a, 0xd6, 0x73, 0x00, 0x9d, 0x48, 0x11, 0x90, 0x0e, 0xe9, 0x35, 0xe3, 0x9a, + 0x1b, 0x07, 0x82, 0xdd, 0xd0, 0xd3, 0x0c, 0x95, 0xd5, 0x38, 0x9f, 0x83, 0x4e, 0x66, 0x50, 0x04, + 0xff, 0xbc, 0xde, 0x3a, 0xde, 0xbe, 0x40, 0xc1, 0xee, 0xe9, 0xe5, 0x6a, 0x2a, 0x2d, 0xcc, 0xa5, + 0xb1, 0x20, 0x12, 0x35, 0x5a, 0x80, 0xc9, 0x47, 0x19, 0x98, 0xa0, 0xda, 0xa9, 0xf6, 0x9a, 0xf1, + 0x45, 0x49, 0x1d, 0x1e, 0x44, 0xd6, 0xa7, 0xe7, 0x65, 0x9b, 0x96, 0x6a, 0x92, 0x48, 0x61, 0x82, + 0xff, 0xde, 0xc4, 0x4a, 0x5a, 0x2c, 0xd5, 0x64, 0x20, 0x4c, 0x37, 0xa5, 0xad, 0x3d, 0xf4, 0x93, + 0xb2, 0xba, 0x60, 0x6d, 0xda, 0xf0, 0x4f, 0x75, 0x68, 0x3b, 0xf4, 0xba, 0x9b, 0x1d, 0xd4, 0x03, + 0x6d, 0x1e, 0x5a, 0xf0, 0xd8, 0x27, 0xb7, 0xed, 0xf0, 0x4f, 0x0d, 0xe1, 0x3e, 0x2d, 0xf6, 0x31, + 0xee, 0xf4, 0xf8, 0xfc, 0xb9, 0xe1, 0x64, 0xbd, 0xe1, 0xe4, 0x7b, 0xc3, 0xc9, 0xfb, 0x96, 0x57, + 0xd6, 0x5b, 0x5e, 0xf9, 0xda, 0xf2, 0xca, 0x6b, 0x7f, 0x22, 0xad, 0xb3, 0x66, 0xb8, 0x88, 0x76, + 0x41, 0x0a, 0xec, 0x0a, 0xf5, 0x2c, 0x3a, 0xd6, 0xff, 0xf6, 0xfb, 0x01, 0xb6, 0xc8, 0xc1, 0xa4, + 0x35, 0xdf, 0xfe, 0xdd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x43, 0x28, 0x2c, 0x52, 0xa0, 0x01, + 0x00, 0x00, +} + +func (m *NodeInfo) 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 *NodeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.WhitelistedRingIds) > 0 { + for iNdEx := len(m.WhitelistedRingIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedRingIds[iNdEx]) + copy(dAtA[i:], m.WhitelistedRingIds[iNdEx]) + i = encodeVarintNodeInfo(dAtA, i, uint64(len(m.WhitelistedRingIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.WhitelistedNamespaces) > 0 { + for iNdEx := len(m.WhitelistedNamespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedNamespaces[iNdEx]) + copy(dAtA[i:], m.WhitelistedNamespaces[iNdEx]) + i = encodeVarintNodeInfo(dAtA, i, uint64(len(m.WhitelistedNamespaces[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.ControllerKey) > 0 { + i -= len(m.ControllerKey) + copy(dAtA[i:], m.ControllerKey) + i = encodeVarintNodeInfo(dAtA, i, uint64(len(m.ControllerKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = encodeVarintNodeInfo(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NodeInfoEntry) 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 *NodeInfoEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeInfoEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NodeInfo != nil { + { + size, err := m.NodeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNodeInfo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.NodeKey) > 0 { + i -= len(m.NodeKey) + copy(dAtA[i:], m.NodeKey) + i = encodeVarintNodeInfo(dAtA, i, uint64(len(m.NodeKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintNodeInfo(dAtA []byte, offset int, v uint64) int { + offset -= sovNodeInfo(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *NodeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PeerId) + if l > 0 { + n += 1 + l + sovNodeInfo(uint64(l)) + } + l = len(m.ControllerKey) + if l > 0 { + n += 1 + l + sovNodeInfo(uint64(l)) + } + if len(m.WhitelistedNamespaces) > 0 { + for _, s := range m.WhitelistedNamespaces { + l = len(s) + n += 1 + l + sovNodeInfo(uint64(l)) + } + } + if len(m.WhitelistedRingIds) > 0 { + for _, s := range m.WhitelistedRingIds { + l = len(s) + n += 1 + l + sovNodeInfo(uint64(l)) + } + } + return n +} + +func (m *NodeInfoEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NodeKey) + if l > 0 { + n += 1 + l + sovNodeInfo(uint64(l)) + } + if m.NodeInfo != nil { + l = m.NodeInfo.Size() + n += 1 + l + sovNodeInfo(uint64(l)) + } + return n +} + +func sovNodeInfo(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozNodeInfo(x uint64) (n int) { + return sovNodeInfo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *NodeInfo) 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 ErrIntOverflowNodeInfo + } + 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: NodeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNodeInfo + } + 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 ErrInvalidLengthNodeInfo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNodeInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNodeInfo + } + 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 ErrInvalidLengthNodeInfo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNodeInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ControllerKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedNamespaces", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNodeInfo + } + 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 ErrInvalidLengthNodeInfo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNodeInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WhitelistedNamespaces = append(m.WhitelistedNamespaces, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedRingIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNodeInfo + } + 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 ErrInvalidLengthNodeInfo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNodeInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WhitelistedRingIds = append(m.WhitelistedRingIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNodeInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNodeInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeInfoEntry) 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 ErrIntOverflowNodeInfo + } + 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: NodeInfoEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeInfoEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNodeInfo + } + 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 ErrInvalidLengthNodeInfo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNodeInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNodeInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNodeInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNodeInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NodeInfo == nil { + m.NodeInfo = &NodeInfo{} + } + if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNodeInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNodeInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipNodeInfo(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, ErrIntOverflowNodeInfo + } + 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, ErrIntOverflowNodeInfo + } + 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, ErrIntOverflowNodeInfo + } + 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, ErrInvalidLengthNodeInfo + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNodeInfo + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthNodeInfo + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthNodeInfo = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNodeInfo = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNodeInfo = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/orbis/types/query.pb.go b/x/orbis/types/query.pb.go index cd2e3dc2..dddb93eb 100644 --- a/x/orbis/types/query.pb.go +++ b/x/orbis/types/query.pb.go @@ -705,6 +705,94 @@ func (m *QueryKeyDerivationsResponse) GetPagination() *query.PageResponse { return nil } +type QueryNodeInfoRequest struct { + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` +} + +func (m *QueryNodeInfoRequest) Reset() { *m = QueryNodeInfoRequest{} } +func (m *QueryNodeInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNodeInfoRequest) ProtoMessage() {} +func (*QueryNodeInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{14} +} +func (m *QueryNodeInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodeInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodeInfoRequest.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 *QueryNodeInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodeInfoRequest.Merge(m, src) +} +func (m *QueryNodeInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNodeInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodeInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodeInfoRequest proto.InternalMessageInfo + +func (m *QueryNodeInfoRequest) GetNodeKey() string { + if m != nil { + return m.NodeKey + } + return "" +} + +type QueryNodeInfoResponse struct { + NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"` +} + +func (m *QueryNodeInfoResponse) Reset() { *m = QueryNodeInfoResponse{} } +func (m *QueryNodeInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNodeInfoResponse) ProtoMessage() {} +func (*QueryNodeInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_349198995878e248, []int{15} +} +func (m *QueryNodeInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodeInfoResponse.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 *QueryNodeInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodeInfoResponse.Merge(m, src) +} +func (m *QueryNodeInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNodeInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodeInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodeInfoResponse proto.InternalMessageInfo + +func (m *QueryNodeInfoResponse) GetNodeInfo() *NodeInfo { + if m != nil { + return m.NodeInfo + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "sourcehub.orbis.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "sourcehub.orbis.QueryParamsResponse") @@ -720,63 +808,71 @@ func init() { proto.RegisterType((*QueryKeyDerivationResponse)(nil), "sourcehub.orbis.QueryKeyDerivationResponse") proto.RegisterType((*QueryKeyDerivationsRequest)(nil), "sourcehub.orbis.QueryKeyDerivationsRequest") proto.RegisterType((*QueryKeyDerivationsResponse)(nil), "sourcehub.orbis.QueryKeyDerivationsResponse") + proto.RegisterType((*QueryNodeInfoRequest)(nil), "sourcehub.orbis.QueryNodeInfoRequest") + proto.RegisterType((*QueryNodeInfoResponse)(nil), "sourcehub.orbis.QueryNodeInfoResponse") } func init() { proto.RegisterFile("sourcehub/orbis/query.proto", fileDescriptor_349198995878e248) } var fileDescriptor_349198995878e248 = []byte{ - // 814 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcf, 0x4f, 0xd4, 0x5a, - 0x14, 0xc7, 0xe7, 0xce, 0x03, 0xc2, 0x9c, 0x17, 0x86, 0xc7, 0x7d, 0xf0, 0x1e, 0x14, 0x52, 0xb5, - 0xfc, 0x74, 0xc4, 0x16, 0x50, 0x89, 0x21, 0x84, 0x90, 0x09, 0x62, 0xd4, 0xc4, 0xc0, 0x2c, 0xdd, - 0x98, 0xce, 0xcc, 0x4d, 0x6d, 0x70, 0x7a, 0x87, 0xb6, 0x83, 0x4e, 0x08, 0x9a, 0xf0, 0x17, 0x98, - 0x18, 0x37, 0xba, 0x36, 0x71, 0x63, 0x64, 0xed, 0x5f, 0xc0, 0x92, 0xc4, 0x8d, 0x2b, 0x63, 0xc0, - 0xc4, 0x7f, 0xc3, 0xf4, 0xde, 0xdb, 0xd2, 0x76, 0xca, 0x74, 0x34, 0x84, 0x0d, 0x29, 0xbd, 0xe7, - 0x9c, 0xef, 0xe7, 0x9c, 0x6f, 0xef, 0x01, 0x18, 0x75, 0x68, 0xc3, 0xae, 0x90, 0x27, 0x8d, 0xb2, - 0x46, 0xed, 0xb2, 0xe9, 0x68, 0xdb, 0x0d, 0x62, 0x37, 0xd5, 0xba, 0x4d, 0x5d, 0x8a, 0xfb, 0x83, - 0x43, 0x95, 0x1d, 0x4a, 0x03, 0x7a, 0xcd, 0xb4, 0xa8, 0xc6, 0x7e, 0xf2, 0x18, 0xa9, 0x50, 0xa1, - 0x4e, 0x8d, 0x3a, 0x5a, 0x59, 0x77, 0x08, 0x4f, 0xd6, 0x76, 0xe6, 0xcb, 0xc4, 0xd5, 0xe7, 0xb5, - 0xba, 0x6e, 0x98, 0x96, 0xee, 0x9a, 0xd4, 0x12, 0xb1, 0x83, 0x06, 0x35, 0x28, 0x7b, 0xd4, 0xbc, - 0x27, 0xf1, 0x76, 0xcc, 0xa0, 0xd4, 0x78, 0x4a, 0x34, 0xbd, 0x6e, 0x6a, 0xba, 0x65, 0x51, 0x97, - 0xa5, 0x38, 0xe2, 0x54, 0x8e, 0x03, 0x56, 0x69, 0xa5, 0x51, 0x23, 0x96, 0x2b, 0xce, 0x27, 0xe2, - 0xe7, 0x5b, 0xa4, 0xf9, 0xb8, 0x4a, 0x6c, 0x73, 0x27, 0xac, 0x3c, 0x16, 0x8f, 0xaa, 0xeb, 0xb6, - 0x5e, 0xf3, 0x35, 0xa4, 0xf8, 0xa9, 0x6d, 0x5a, 0x06, 0x3f, 0x53, 0x06, 0x01, 0x6f, 0x7a, 0x5d, - 0x6d, 0xb0, 0x84, 0x12, 0xd9, 0x6e, 0x10, 0xc7, 0x55, 0x36, 0xe1, 0xdf, 0xc8, 0x5b, 0xa7, 0x4e, - 0x2d, 0x87, 0xe0, 0x25, 0xe8, 0xe1, 0x85, 0x87, 0xd1, 0x65, 0x34, 0xf3, 0xf7, 0xc2, 0xff, 0x6a, - 0x6c, 0x82, 0x2a, 0x4f, 0x28, 0xe6, 0x0e, 0xbf, 0x5d, 0xca, 0x7c, 0xf8, 0x79, 0x50, 0x40, 0x25, - 0x91, 0xa1, 0x28, 0xf0, 0x0f, 0x2b, 0x59, 0x32, 0x2d, 0x43, 0xc8, 0xe0, 0x3c, 0x64, 0xcd, 0x2a, - 0xab, 0x95, 0x2b, 0x65, 0xcd, 0xaa, 0xb2, 0x02, 0x03, 0xa1, 0x18, 0x21, 0x7a, 0x15, 0xba, 0x3c, - 0x5e, 0x21, 0x39, 0xd4, 0x22, 0xc9, 0x82, 0x59, 0x88, 0xd2, 0x0c, 0xe5, 0xfb, 0xbd, 0xe0, 0x31, - 0xc8, 0x59, 0x7a, 0x8d, 0x38, 0x75, 0xbd, 0x42, 0x84, 0xd6, 0xe9, 0x0b, 0xbc, 0x0e, 0x70, 0xea, - 0xe3, 0x70, 0x96, 0x69, 0x4c, 0xa9, 0xdc, 0x74, 0xd5, 0x33, 0x5d, 0xe5, 0x5f, 0x8c, 0x30, 0x5d, - 0xdd, 0xd0, 0x0d, 0x22, 0x2a, 0x97, 0x42, 0x99, 0xca, 0x1b, 0x24, 0x06, 0x29, 0xb4, 0x05, 0xfc, - 0x22, 0x74, 0x7b, 0x64, 0xde, 0xc0, 0xfe, 0x3a, 0x93, 0x3e, 0x3c, 0x2e, 0x1e, 0x8e, 0xef, 0x26, - 0x60, 0x4d, 0xa7, 0x62, 0x71, 0xd1, 0x08, 0xd7, 0x1a, 0x0c, 0x32, 0xac, 0x35, 0xf1, 0x59, 0x75, - 0x36, 0x15, 0x6e, 0x4c, 0x36, 0x30, 0xe6, 0x21, 0x0c, 0xc5, 0xaa, 0x88, 0xfe, 0x6e, 0x41, 0xaf, - 0xff, 0xc1, 0x0a, 0x83, 0x46, 0x5a, 0x5a, 0x0c, 0x92, 0x82, 0x50, 0x65, 0x2f, 0x56, 0xef, 0x82, - 0xcd, 0x7a, 0x8f, 0xe0, 0xbf, 0xb8, 0xbe, 0x68, 0xa8, 0x08, 0x39, 0x9f, 0xd2, 0x37, 0xed, 0xec, - 0x8e, 0xc2, 0xc6, 0x9d, 0xa6, 0x9d, 0x9f, 0x79, 0xf7, 0x60, 0x84, 0x61, 0x3e, 0x20, 0xcd, 0xb5, - 0xe0, 0xca, 0xff, 0x99, 0x83, 0x15, 0x90, 0x92, 0x4a, 0x89, 0xae, 0xef, 0x40, 0x3e, 0xba, 0x57, - 0x84, 0x99, 0x72, 0x4b, 0xeb, 0xd1, 0xfc, 0xbe, 0xad, 0xf0, 0xaf, 0xca, 0x3e, 0x4a, 0x52, 0xb9, - 0x60, 0x73, 0x3f, 0x23, 0x18, 0x4d, 0x84, 0x10, 0xbd, 0x96, 0xa0, 0x3f, 0xda, 0xab, 0xef, 0x73, - 0x4a, 0xb3, 0x61, 0xb3, 0xf3, 0x91, 0xbe, 0xcf, 0xcf, 0xf1, 0x85, 0x8f, 0xbd, 0xd0, 0xcd, 0xe0, - 0xf1, 0x3e, 0x82, 0x1e, 0xbe, 0x4d, 0xf1, 0x78, 0x0b, 0x58, 0xeb, 0xca, 0x96, 0x26, 0xda, 0x07, - 0x71, 0x2d, 0xe5, 0xfa, 0xfe, 0x97, 0x1f, 0xaf, 0xb3, 0xd3, 0x78, 0x52, 0xe3, 0xd1, 0x16, 0x71, - 0x9f, 0x51, 0x7b, 0x4b, 0x4b, 0xfe, 0xfb, 0x81, 0x5f, 0x42, 0x97, 0xb7, 0xa0, 0xf0, 0x95, 0xe4, - 0xe2, 0xa1, 0x5d, 0x2e, 0x29, 0xed, 0x42, 0x84, 0xfa, 0x1c, 0x53, 0x2f, 0xe0, 0x99, 0x14, 0x75, - 0x6f, 0x07, 0x6a, 0xbb, 0x66, 0x75, 0x0f, 0xbf, 0x80, 0x6e, 0xb6, 0x50, 0x71, 0x9b, 0xf2, 0xc1, - 0x08, 0xc6, 0xdb, 0xc6, 0x08, 0x86, 0x59, 0xc6, 0x30, 0x85, 0x27, 0x3a, 0x60, 0x70, 0xf0, 0x3b, - 0x04, 0xbd, 0xfe, 0x6d, 0xc7, 0x93, 0xc9, 0xf5, 0x63, 0xab, 0x55, 0x9a, 0x4a, 0x0b, 0x13, 0x24, - 0xab, 0x8c, 0x64, 0x09, 0xdf, 0x4e, 0x21, 0xf1, 0x17, 0x8b, 0xb6, 0x1b, 0x5c, 0x96, 0x3d, 0x3e, - 0x9d, 0xb7, 0x08, 0x72, 0xc1, 0x0a, 0xc3, 0x29, 0xba, 0xc1, 0x98, 0xa6, 0x53, 0xe3, 0x04, 0xe0, - 0x32, 0x03, 0x5c, 0xc4, 0x37, 0x3b, 0x04, 0x74, 0xc2, 0x84, 0xf8, 0x00, 0x41, 0x5f, 0xe4, 0x02, - 0xe1, 0x42, 0xb2, 0x70, 0xd2, 0x76, 0x93, 0xae, 0x75, 0x14, 0x2b, 0x40, 0xd7, 0x19, 0xe8, 0x2a, - 0x5e, 0x49, 0x01, 0x8d, 0xde, 0xfb, 0xd6, 0x79, 0x7e, 0x42, 0x90, 0x8f, 0x6e, 0x0d, 0xdc, 0x09, - 0x47, 0x30, 0xd9, 0xd9, 0xce, 0x82, 0x05, 0x75, 0x91, 0x51, 0x2f, 0xe3, 0xa5, 0xdf, 0xa2, 0x8e, - 0x0c, 0xb9, 0x78, 0xff, 0xf0, 0x58, 0x46, 0x47, 0xc7, 0x32, 0xfa, 0x7e, 0x2c, 0xa3, 0x57, 0x27, - 0x72, 0xe6, 0xe8, 0x44, 0xce, 0x7c, 0x3d, 0x91, 0x33, 0x8f, 0xe6, 0x0c, 0xd3, 0xf5, 0x38, 0x2a, - 0xb4, 0x76, 0x66, 0xfd, 0xe7, 0x42, 0xc1, 0x6d, 0xd6, 0x89, 0x53, 0xee, 0x61, 0xff, 0x11, 0xde, - 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff, 0x56, 0x52, 0x53, 0x60, 0x34, 0x0b, 0x00, 0x00, + // 907 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x4f, 0xe3, 0x46, + 0x18, 0xc7, 0x33, 0x29, 0xd0, 0xe4, 0xa9, 0x08, 0x65, 0x0a, 0x2d, 0x18, 0x64, 0x5a, 0xf3, 0xda, + 0x94, 0xda, 0xbc, 0x14, 0x54, 0x51, 0x84, 0x50, 0x44, 0xa9, 0x28, 0x12, 0x85, 0x1c, 0x7b, 0x41, + 0x4e, 0x32, 0xb8, 0x56, 0x1a, 0x4f, 0xb0, 0x1d, 0xda, 0x08, 0xa5, 0x95, 0xf8, 0x04, 0x95, 0xaa, + 0xf6, 0xd0, 0x9e, 0x2b, 0xf5, 0x56, 0xce, 0xfd, 0x00, 0x2b, 0x8e, 0x48, 0x7b, 0xd9, 0xd3, 0x6a, + 0x05, 0x2b, 0xed, 0xd7, 0x58, 0x79, 0x3c, 0x76, 0x6c, 0xc7, 0x89, 0xb3, 0x2b, 0xc4, 0x05, 0x39, + 0x9e, 0xe7, 0xe5, 0xf7, 0xbc, 0xcc, 0xdf, 0xc0, 0x94, 0x45, 0x1b, 0x66, 0x99, 0xfc, 0xd0, 0x28, + 0x29, 0xd4, 0x2c, 0xe9, 0x96, 0x72, 0xde, 0x20, 0x66, 0x53, 0xae, 0x9b, 0xd4, 0xa6, 0x78, 0xc4, + 0x3f, 0x94, 0xd9, 0xa1, 0x30, 0xaa, 0xd6, 0x74, 0x83, 0x2a, 0xec, 0xaf, 0x6b, 0x23, 0xe4, 0xcb, + 0xd4, 0xaa, 0x51, 0x4b, 0x29, 0xa9, 0x16, 0x71, 0x9d, 0x95, 0x8b, 0xd5, 0x12, 0xb1, 0xd5, 0x55, + 0xa5, 0xae, 0x6a, 0xba, 0xa1, 0xda, 0x3a, 0x35, 0xb8, 0xed, 0x98, 0x46, 0x35, 0xca, 0x1e, 0x15, + 0xe7, 0x89, 0xbf, 0x9d, 0xd6, 0x28, 0xd5, 0x7e, 0x24, 0x8a, 0x5a, 0xd7, 0x15, 0xd5, 0x30, 0xa8, + 0xcd, 0x5c, 0x2c, 0x7e, 0x2a, 0x46, 0x01, 0x2b, 0xb4, 0xdc, 0xa8, 0x11, 0xc3, 0xe6, 0xe7, 0x73, + 0xd1, 0xf3, 0x2a, 0x69, 0x9e, 0x56, 0x88, 0xa9, 0x5f, 0x04, 0x33, 0xcf, 0x44, 0xad, 0x0c, 0x5a, + 0x21, 0xa7, 0xba, 0x71, 0xe6, 0x43, 0x44, 0x0d, 0xea, 0xaa, 0xa9, 0xd6, 0x3c, 0x08, 0x21, 0x7a, + 0x6a, 0xea, 0x86, 0xe6, 0x9e, 0x49, 0x63, 0x80, 0x4f, 0x9c, 0xb2, 0x8f, 0x99, 0x43, 0x91, 0x9c, + 0x37, 0x88, 0x65, 0x4b, 0x27, 0xf0, 0x41, 0xe8, 0xad, 0x55, 0xa7, 0x86, 0x45, 0xf0, 0x16, 0x0c, + 0xb9, 0x81, 0x27, 0xd0, 0xc7, 0x68, 0xe9, 0xbd, 0xb5, 0x8f, 0xe4, 0x48, 0x8b, 0x65, 0xd7, 0xa1, + 0x90, 0xbd, 0x79, 0x3e, 0x93, 0xfa, 0xf7, 0xd5, 0x75, 0x1e, 0x15, 0xb9, 0x87, 0x24, 0xc1, 0xfb, + 0x2c, 0x64, 0x51, 0x37, 0x34, 0x9e, 0x06, 0xe7, 0x20, 0xad, 0x57, 0x58, 0xac, 0x6c, 0x31, 0xad, + 0x57, 0xa4, 0x1d, 0x18, 0x0d, 0xd8, 0xf0, 0xa4, 0x9f, 0xc2, 0x80, 0xc3, 0xcb, 0x53, 0x8e, 0x77, + 0xa4, 0x64, 0xc6, 0xcc, 0x44, 0x6a, 0x06, 0xfc, 0xbd, 0x5a, 0xf0, 0x34, 0x64, 0x0d, 0xb5, 0x46, + 0xac, 0xba, 0x5a, 0x26, 0x3c, 0x57, 0xfb, 0x05, 0xde, 0x07, 0x68, 0x0f, 0x7a, 0x22, 0xcd, 0x72, + 0x2c, 0xc8, 0xee, 0x56, 0xc8, 0xce, 0x56, 0xc8, 0xee, 0x4a, 0xf1, 0xad, 0x90, 0x8f, 0x55, 0x8d, + 0xf0, 0xc8, 0xc5, 0x80, 0xa7, 0xf4, 0x07, 0xe2, 0x8d, 0xe4, 0xb9, 0x39, 0xfc, 0x26, 0x0c, 0x3a, + 0x64, 0x4e, 0xc3, 0xde, 0xe9, 0x4a, 0x1f, 0x6c, 0x97, 0x6b, 0x8e, 0xbf, 0x89, 0xc1, 0x5a, 0x4c, + 0xc4, 0x72, 0x93, 0x86, 0xb8, 0xf6, 0x60, 0x8c, 0x61, 0xed, 0xf1, 0xbd, 0xeb, 0xaf, 0x2b, 0xee, + 0x60, 0xd2, 0xfe, 0x60, 0x8e, 0x60, 0x3c, 0x12, 0x85, 0xd7, 0xb7, 0x01, 0x19, 0x6f, 0xa3, 0xf9, + 0x80, 0x26, 0x3b, 0x4a, 0xf4, 0x9d, 0x7c, 0x53, 0xa9, 0x15, 0x89, 0xf7, 0xc8, 0xc3, 0xfa, 0x07, + 0xc1, 0x87, 0xd1, 0xfc, 0xbc, 0xa0, 0x02, 0x64, 0x3d, 0x4a, 0x6f, 0x68, 0xdd, 0x2b, 0x0a, 0x0e, + 0xae, 0xed, 0xf6, 0x70, 0xc3, 0x3b, 0x80, 0x49, 0x86, 0x79, 0x48, 0x9a, 0x7b, 0xbe, 0x26, 0xbc, + 0xdd, 0x04, 0xcb, 0x20, 0xc4, 0x85, 0xe2, 0x55, 0x7f, 0x0d, 0xb9, 0xb0, 0xf0, 0xf0, 0x61, 0x8a, + 0x1d, 0xa5, 0x87, 0xfd, 0x87, 0xab, 0xc1, 0x9f, 0xd2, 0x15, 0x8a, 0xcb, 0xf2, 0xc8, 0xc3, 0xfd, + 0x1f, 0xc1, 0x54, 0x2c, 0x04, 0xaf, 0xb5, 0x08, 0x23, 0xe1, 0x5a, 0xbd, 0x39, 0x27, 0x14, 0x1b, + 0x1c, 0x76, 0x2e, 0x54, 0xf7, 0x03, 0x4e, 0x7c, 0x95, 0x5f, 0xd7, 0x23, 0x5a, 0x21, 0x07, 0xc6, + 0x19, 0xf5, 0x5a, 0x37, 0x09, 0x19, 0xa6, 0xf9, 0x55, 0xd2, 0xe4, 0x9d, 0x7b, 0xd7, 0xf9, 0x7d, + 0x48, 0x9a, 0xd2, 0x77, 0xfc, 0x2e, 0xb5, 0x5d, 0x7c, 0xed, 0xc9, 0xfa, 0xdf, 0x89, 0xae, 0x97, + 0xd3, 0xf7, 0x62, 0xf1, 0x9d, 0xa7, 0xb5, 0x27, 0x59, 0x18, 0x64, 0x11, 0xf1, 0x15, 0x82, 0x21, + 0x57, 0xd1, 0xf1, 0x6c, 0x87, 0x67, 0xe7, 0x67, 0x43, 0x98, 0xeb, 0x6d, 0xe4, 0x72, 0x49, 0x9f, + 0x5f, 0x3d, 0x7d, 0xf9, 0x7b, 0x7a, 0x11, 0xcf, 0x2b, 0xae, 0xb5, 0x41, 0xec, 0x9f, 0xa8, 0x59, + 0x55, 0xe2, 0xbf, 0x61, 0xf8, 0x57, 0x18, 0x70, 0x44, 0x12, 0x7f, 0x12, 0x1f, 0x3c, 0xf0, 0x3d, + 0x11, 0xa4, 0x5e, 0x26, 0x3c, 0xfb, 0x0a, 0xcb, 0x9e, 0xc7, 0x4b, 0x09, 0xd9, 0x1d, 0x1d, 0x56, + 0x2e, 0xf5, 0x4a, 0x0b, 0xff, 0x02, 0x83, 0x4c, 0xd4, 0x71, 0x8f, 0xf0, 0x7e, 0x0b, 0x66, 0x7b, + 0xda, 0x70, 0x86, 0x65, 0xc6, 0xb0, 0x80, 0xe7, 0xfa, 0x60, 0xb0, 0xf0, 0xdf, 0x08, 0x32, 0x9e, + 0xe2, 0xe0, 0xf9, 0xf8, 0xf8, 0x11, 0x79, 0x17, 0x16, 0x92, 0xcc, 0x38, 0xc9, 0x2e, 0x23, 0xd9, + 0xc2, 0x5f, 0x26, 0x90, 0x78, 0xe2, 0xa6, 0x5c, 0xfa, 0x17, 0xb6, 0xe5, 0x76, 0xe7, 0x2f, 0x04, + 0x59, 0x5f, 0x46, 0x71, 0x42, 0x5e, 0xbf, 0x4d, 0x8b, 0x89, 0x76, 0x1c, 0x70, 0x9b, 0x01, 0x6e, + 0xe2, 0x2f, 0xfa, 0x04, 0xb4, 0x82, 0x84, 0xf8, 0x1a, 0xc1, 0x70, 0xe8, 0x12, 0xe3, 0x7c, 0x7c, + 0xe2, 0x38, 0x85, 0x15, 0x3e, 0xeb, 0xcb, 0x96, 0x83, 0xee, 0x33, 0xd0, 0x5d, 0xbc, 0x93, 0x00, + 0x1a, 0xd6, 0x9e, 0xce, 0x7e, 0xfe, 0x87, 0x20, 0x17, 0x56, 0x2e, 0xdc, 0x0f, 0x87, 0xdf, 0xd9, + 0xe5, 0xfe, 0x8c, 0x39, 0x75, 0x81, 0x51, 0x6f, 0xe3, 0xad, 0x37, 0xa2, 0x0e, 0x37, 0xf9, 0x4f, + 0x04, 0x19, 0x4f, 0x46, 0xba, 0xed, 0x67, 0x44, 0xcf, 0xba, 0xed, 0x67, 0x54, 0xc3, 0xa4, 0xaf, + 0x18, 0xdf, 0x06, 0x5e, 0x4f, 0xe0, 0xf3, 0x85, 0x4e, 0xb9, 0xf4, 0x74, 0xb2, 0x55, 0xf8, 0xf6, + 0xe6, 0x4e, 0x44, 0xb7, 0x77, 0x22, 0x7a, 0x71, 0x27, 0xa2, 0xdf, 0xee, 0xc5, 0xd4, 0xed, 0xbd, + 0x98, 0x7a, 0x76, 0x2f, 0xa6, 0xbe, 0x5f, 0xd1, 0x74, 0xdb, 0x49, 0x5d, 0xa6, 0xb5, 0xae, 0x81, + 0x7f, 0xe6, 0xa1, 0xed, 0x66, 0x9d, 0x58, 0xa5, 0x21, 0xf6, 0xef, 0xf2, 0xfa, 0xeb, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xf4, 0x2e, 0xa4, 0xbd, 0x72, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -805,6 +901,8 @@ type QueryClient interface { KeyDerivation(ctx context.Context, in *QueryKeyDerivationRequest, opts ...grpc.CallOption) (*QueryKeyDerivationResponse, error) // KeyDerivations queries key derivations within a namespace. KeyDerivations(ctx context.Context, in *QueryKeyDerivationsRequest, opts ...grpc.CallOption) (*QueryKeyDerivationsResponse, error) + // NodeInfo queries node info by node key. + NodeInfo(ctx context.Context, in *QueryNodeInfoRequest, opts ...grpc.CallOption) (*QueryNodeInfoResponse, error) } type queryClient struct { @@ -878,6 +976,15 @@ func (c *queryClient) KeyDerivations(ctx context.Context, in *QueryKeyDerivation return out, nil } +func (c *queryClient) NodeInfo(ctx context.Context, in *QueryNodeInfoRequest, opts ...grpc.CallOption) (*QueryNodeInfoResponse, error) { + out := new(QueryNodeInfoResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Query/NodeInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -894,6 +1001,8 @@ type QueryServer interface { KeyDerivation(context.Context, *QueryKeyDerivationRequest) (*QueryKeyDerivationResponse, error) // KeyDerivations queries key derivations within a namespace. KeyDerivations(context.Context, *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, error) + // NodeInfo queries node info by node key. + NodeInfo(context.Context, *QueryNodeInfoRequest) (*QueryNodeInfoResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -921,6 +1030,9 @@ func (*UnimplementedQueryServer) KeyDerivation(ctx context.Context, req *QueryKe func (*UnimplementedQueryServer) KeyDerivations(ctx context.Context, req *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method KeyDerivations not implemented") } +func (*UnimplementedQueryServer) NodeInfo(ctx context.Context, req *QueryNodeInfoRequest) (*QueryNodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NodeInfo not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1052,6 +1164,24 @@ func _Query_KeyDerivations_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNodeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Query/NodeInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NodeInfo(ctx, req.(*QueryNodeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.orbis.Query", @@ -1085,6 +1215,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "KeyDerivations", Handler: _Query_KeyDerivations_Handler, }, + { + MethodName: "NodeInfo", + Handler: _Query_NodeInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/orbis/query.proto", @@ -1628,6 +1762,71 @@ func (m *QueryKeyDerivationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } +func (m *QueryNodeInfoRequest) 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 *QueryNodeInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodeInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NodeKey) > 0 { + i -= len(m.NodeKey) + copy(dAtA[i:], m.NodeKey) + i = encodeVarintQuery(dAtA, i, uint64(len(m.NodeKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryNodeInfoResponse) 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 *QueryNodeInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NodeInfo != nil { + { + size, err := m.NodeInfo.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 @@ -1853,6 +2052,32 @@ func (m *QueryKeyDerivationsResponse) Size() (n int) { return n } +func (m *QueryNodeInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NodeKey) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryNodeInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NodeInfo != nil { + l = m.NodeInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3274,6 +3499,174 @@ func (m *QueryKeyDerivationsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryNodeInfoRequest) 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: QueryNodeInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodeInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeKey", 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.NodeKey = 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 *QueryNodeInfoResponse) 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: QueryNodeInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodeInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", 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.NodeInfo == nil { + m.NodeInfo = &NodeInfo{} + } + if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/orbis/types/query.pb.gw.go b/x/orbis/types/query.pb.gw.go index 0336c617..db5ded60 100644 --- a/x/orbis/types/query.pb.gw.go +++ b/x/orbis/types/query.pb.gw.go @@ -437,6 +437,60 @@ func local_request_Query_KeyDerivations_0(ctx context.Context, marshaler runtime } +func request_Query_NodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodeInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["node_key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_key") + } + + protoReq.NodeKey, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_key", err) + } + + msg, err := client.NodeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_NodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodeInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["node_key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_key") + } + + protoReq.NodeKey, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_key", err) + } + + msg, err := server.NodeInfo(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. @@ -604,6 +658,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_NodeInfo_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_NodeInfo_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_NodeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -785,6 +862,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_NodeInfo_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_NodeInfo_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_NodeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -802,6 +899,8 @@ var ( pattern_Query_KeyDerivation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sourcenetwork", "sourcehub", "orbis", "key_derivation", "namespace", "id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_KeyDerivations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "key_derivations", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_NodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "node_info", "node_key"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -818,4 +917,6 @@ var ( forward_Query_KeyDerivation_0 = runtime.ForwardResponseMessage forward_Query_KeyDerivations_0 = runtime.ForwardResponseMessage + + forward_Query_NodeInfo_0 = runtime.ForwardResponseMessage ) diff --git a/x/orbis/types/tx.pb.go b/x/orbis/types/tx.pb.go index d1aecd2d..37424e66 100644 --- a/x/orbis/types/tx.pb.go +++ b/x/orbis/types/tx.pb.go @@ -1009,6 +1009,286 @@ func (m *MsgStoreKeyDerivationResponse) GetKeyDerivationId() string { return "" } +type MsgCreateNodeInfo struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,3,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` + WhitelistedNamespaces []string `protobuf:"bytes,4,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` +} + +func (m *MsgCreateNodeInfo) Reset() { *m = MsgCreateNodeInfo{} } +func (m *MsgCreateNodeInfo) String() string { return proto.CompactTextString(m) } +func (*MsgCreateNodeInfo) ProtoMessage() {} +func (*MsgCreateNodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{13} +} +func (m *MsgCreateNodeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateNodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateNodeInfo.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 *MsgCreateNodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateNodeInfo.Merge(m, src) +} +func (m *MsgCreateNodeInfo) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateNodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateNodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateNodeInfo proto.InternalMessageInfo + +func (m *MsgCreateNodeInfo) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgCreateNodeInfo) GetPeerId() string { + if m != nil { + return m.PeerId + } + return "" +} + +func (m *MsgCreateNodeInfo) GetControllerKey() string { + if m != nil { + return m.ControllerKey + } + return "" +} + +func (m *MsgCreateNodeInfo) GetWhitelistedNamespaces() []string { + if m != nil { + return m.WhitelistedNamespaces + } + return nil +} + +func (m *MsgCreateNodeInfo) GetWhitelistedRingIds() []string { + if m != nil { + return m.WhitelistedRingIds + } + return nil +} + +type MsgCreateNodeInfoResponse struct { +} + +func (m *MsgCreateNodeInfoResponse) Reset() { *m = MsgCreateNodeInfoResponse{} } +func (m *MsgCreateNodeInfoResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateNodeInfoResponse) ProtoMessage() {} +func (*MsgCreateNodeInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{14} +} +func (m *MsgCreateNodeInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateNodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateNodeInfoResponse.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 *MsgCreateNodeInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateNodeInfoResponse.Merge(m, src) +} +func (m *MsgCreateNodeInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateNodeInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateNodeInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateNodeInfoResponse proto.InternalMessageInfo + +type MsgUpdateNodeInfo struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + NodeKey string `protobuf:"bytes,2,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + // Types that are valid to be assigned to XPeerId: + // + // *MsgUpdateNodeInfo_PeerId + XPeerId isMsgUpdateNodeInfo_XPeerId `protobuf_oneof:"_peer_id"` + WhitelistedNamespaces []string `protobuf:"bytes,4,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` + // Types that are valid to be assigned to XControllerKey: + // + // *MsgUpdateNodeInfo_ControllerKey + XControllerKey isMsgUpdateNodeInfo_XControllerKey `protobuf_oneof:"_controller_key"` +} + +func (m *MsgUpdateNodeInfo) Reset() { *m = MsgUpdateNodeInfo{} } +func (m *MsgUpdateNodeInfo) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateNodeInfo) ProtoMessage() {} +func (*MsgUpdateNodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{15} +} +func (m *MsgUpdateNodeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateNodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateNodeInfo.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 *MsgUpdateNodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateNodeInfo.Merge(m, src) +} +func (m *MsgUpdateNodeInfo) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateNodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateNodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateNodeInfo proto.InternalMessageInfo + +type isMsgUpdateNodeInfo_XPeerId interface { + isMsgUpdateNodeInfo_XPeerId() + MarshalTo([]byte) (int, error) + Size() int +} +type isMsgUpdateNodeInfo_XControllerKey interface { + isMsgUpdateNodeInfo_XControllerKey() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateNodeInfo_PeerId struct { + PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3,oneof" json:"peer_id,omitempty"` +} +type MsgUpdateNodeInfo_ControllerKey struct { + ControllerKey string `protobuf:"bytes,6,opt,name=controller_key,json=controllerKey,proto3,oneof" json:"controller_key,omitempty"` +} + +func (*MsgUpdateNodeInfo_PeerId) isMsgUpdateNodeInfo_XPeerId() {} +func (*MsgUpdateNodeInfo_ControllerKey) isMsgUpdateNodeInfo_XControllerKey() {} + +func (m *MsgUpdateNodeInfo) GetXPeerId() isMsgUpdateNodeInfo_XPeerId { + if m != nil { + return m.XPeerId + } + return nil +} +func (m *MsgUpdateNodeInfo) GetXControllerKey() isMsgUpdateNodeInfo_XControllerKey { + if m != nil { + return m.XControllerKey + } + return nil +} + +func (m *MsgUpdateNodeInfo) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgUpdateNodeInfo) GetNodeKey() string { + if m != nil { + return m.NodeKey + } + return "" +} + +func (m *MsgUpdateNodeInfo) GetPeerId() string { + if x, ok := m.GetXPeerId().(*MsgUpdateNodeInfo_PeerId); ok { + return x.PeerId + } + return "" +} + +func (m *MsgUpdateNodeInfo) GetWhitelistedNamespaces() []string { + if m != nil { + return m.WhitelistedNamespaces + } + return nil +} + +func (m *MsgUpdateNodeInfo) GetWhitelistedRingIds() []string { + if m != nil { + return m.WhitelistedRingIds + } + return nil +} + +func (m *MsgUpdateNodeInfo) GetControllerKey() string { + if x, ok := m.GetXControllerKey().(*MsgUpdateNodeInfo_ControllerKey); ok { + return x.ControllerKey + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateNodeInfo) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateNodeInfo_PeerId)(nil), + (*MsgUpdateNodeInfo_ControllerKey)(nil), + } +} + +type MsgUpdateNodeInfoResponse struct { +} + +func (m *MsgUpdateNodeInfoResponse) Reset() { *m = MsgUpdateNodeInfoResponse{} } +func (m *MsgUpdateNodeInfoResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateNodeInfoResponse) ProtoMessage() {} +func (*MsgUpdateNodeInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{16} +} +func (m *MsgUpdateNodeInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateNodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateNodeInfoResponse.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 *MsgUpdateNodeInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateNodeInfoResponse.Merge(m, src) +} +func (m *MsgUpdateNodeInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateNodeInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateNodeInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateNodeInfoResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "sourcehub.orbis.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "sourcehub.orbis.MsgUpdateParamsResponse") @@ -1023,82 +1303,98 @@ func init() { proto.RegisterType((*MsgStoreDocumentResponse)(nil), "sourcehub.orbis.MsgStoreDocumentResponse") proto.RegisterType((*MsgStoreKeyDerivation)(nil), "sourcehub.orbis.MsgStoreKeyDerivation") proto.RegisterType((*MsgStoreKeyDerivationResponse)(nil), "sourcehub.orbis.MsgStoreKeyDerivationResponse") + proto.RegisterType((*MsgCreateNodeInfo)(nil), "sourcehub.orbis.MsgCreateNodeInfo") + proto.RegisterType((*MsgCreateNodeInfoResponse)(nil), "sourcehub.orbis.MsgCreateNodeInfoResponse") + proto.RegisterType((*MsgUpdateNodeInfo)(nil), "sourcehub.orbis.MsgUpdateNodeInfo") + proto.RegisterType((*MsgUpdateNodeInfoResponse)(nil), "sourcehub.orbis.MsgUpdateNodeInfoResponse") } func init() { proto.RegisterFile("sourcehub/orbis/tx.proto", fileDescriptor_7711ae63507074e0) } var fileDescriptor_7711ae63507074e0 = []byte{ - // 1115 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x26, 0xb1, 0x1d, 0xbf, 0x3a, 0x38, 0xdd, 0xb6, 0x64, 0xb3, 0x04, 0xd7, 0x31, 0x52, - 0x70, 0x03, 0xd8, 0x25, 0x94, 0x1e, 0xd2, 0x53, 0xdd, 0x08, 0xc5, 0x54, 0xa9, 0xa2, 0x4d, 0xb9, - 0x54, 0x42, 0xab, 0xcd, 0xee, 0x64, 0x3d, 0xb2, 0x77, 0x67, 0x35, 0x33, 0x4e, 0x6a, 0x4e, 0x88, - 0x13, 0xe2, 0xc4, 0x95, 0x0b, 0x67, 0x24, 0x2e, 0x41, 0x42, 0x5c, 0xf8, 0x07, 0x7a, 0xa3, 0xe2, - 0xc4, 0x09, 0xa1, 0xe4, 0x90, 0x0b, 0x12, 0xff, 0x02, 0x9a, 0xd9, 0x5f, 0xde, 0x75, 0x92, 0x46, - 0x94, 0x4b, 0xe2, 0xf7, 0x7d, 0xef, 0xbd, 0x79, 0xef, 0x9b, 0x7d, 0x6f, 0x17, 0x34, 0x46, 0x46, - 0xd4, 0x46, 0xfd, 0xd1, 0x7e, 0x87, 0xd0, 0x7d, 0xcc, 0x3a, 0xfc, 0x79, 0x3b, 0xa0, 0x84, 0x13, - 0xb5, 0x96, 0x30, 0x6d, 0xc9, 0xe8, 0xd7, 0x2d, 0x0f, 0xfb, 0xa4, 0x23, 0xff, 0x86, 0x3e, 0xfa, - 0x92, 0x4d, 0x98, 0x47, 0x58, 0xc7, 0x63, 0x6e, 0xe7, 0xf0, 0x43, 0xf1, 0x2f, 0x22, 0x96, 0x43, - 0xc2, 0x94, 0x56, 0x27, 0x34, 0x22, 0xea, 0xa6, 0x4b, 0x5c, 0x12, 0xe2, 0xe2, 0x57, 0x84, 0xae, - 0xe4, 0xeb, 0x08, 0x2c, 0x6a, 0x79, 0x51, 0x4c, 0xf3, 0x57, 0x05, 0x6a, 0x3b, 0xcc, 0xfd, 0x2c, - 0x70, 0x2c, 0x8e, 0x76, 0x25, 0xa3, 0xde, 0x87, 0x8a, 0x35, 0xe2, 0x7d, 0x42, 0x31, 0x1f, 0x6b, - 0x4a, 0x43, 0x69, 0x55, 0xba, 0xda, 0xef, 0x3f, 0x7f, 0x70, 0x33, 0x3a, 0xec, 0xa1, 0xe3, 0x50, - 0xc4, 0xd8, 0x1e, 0xa7, 0xd8, 0x77, 0x8d, 0xd4, 0x55, 0xdd, 0x84, 0x52, 0x98, 0x5b, 0x9b, 0x69, - 0x28, 0xad, 0x6b, 0x1b, 0x4b, 0xed, 0x5c, 0xa3, 0xed, 0xf0, 0x80, 0x6e, 0xe5, 0xc5, 0x9f, 0xb7, - 0x0b, 0x3f, 0x9c, 0x1d, 0xaf, 0x2b, 0x46, 0x14, 0xb1, 0x79, 0xef, 0xab, 0xb3, 0xe3, 0xf5, 0x34, - 0xd7, 0x37, 0x67, 0xc7, 0xeb, 0xab, 0x69, 0xe1, 0xcf, 0xa3, 0xd2, 0x73, 0x95, 0x36, 0x97, 0x61, - 0x29, 0x07, 0x19, 0x88, 0x05, 0xc4, 0x67, 0xa8, 0xf9, 0xdd, 0x0c, 0x2c, 0xec, 0x30, 0xf7, 0x11, - 0x45, 0x16, 0x47, 0x06, 0xf6, 0x5d, 0x55, 0x83, 0xb2, 0x2d, 0x2c, 0x42, 0xc3, 0xa6, 0x8c, 0xd8, - 0x54, 0x57, 0xa0, 0xe2, 0x5b, 0x1e, 0x62, 0x81, 0x65, 0x23, 0x59, 0x7b, 0xc5, 0x48, 0x01, 0x75, - 0x09, 0xca, 0xa2, 0x53, 0x33, 0x18, 0x68, 0xb3, 0x92, 0x2b, 0x09, 0x73, 0x77, 0xa0, 0x2e, 0xc3, - 0x7c, 0x80, 0x10, 0x35, 0xb1, 0xc3, 0xb4, 0xb9, 0xc6, 0xac, 0xc8, 0x28, 0xec, 0x9e, 0xc3, 0x44, - 0x46, 0xde, 0xa7, 0x88, 0xf5, 0xc9, 0xd0, 0xd1, 0x8a, 0x0d, 0xa5, 0xb5, 0x60, 0xa4, 0x80, 0xba, - 0x06, 0xd5, 0x80, 0x31, 0x13, 0xfb, 0x1c, 0xd1, 0x43, 0x6b, 0xa8, 0x95, 0x1a, 0x4a, 0x6b, 0x6e, - 0xbb, 0x60, 0x5c, 0x0b, 0x18, 0xeb, 0x45, 0xe0, 0xd7, 0x8a, 0xa2, 0xbe, 0x05, 0x95, 0x80, 0x0c, - 0xb1, 0x3d, 0x36, 0xb1, 0xa3, 0x95, 0xe5, 0xd9, 0xf3, 0x21, 0xd0, 0x73, 0x54, 0x1d, 0xe6, 0x2d, - 0xca, 0xf1, 0x81, 0x65, 0x73, 0x6d, 0x3e, 0xe4, 0x62, 0x7b, 0xb3, 0x2a, 0xd4, 0x8c, 0xdb, 0xeb, - 0xd6, 0x60, 0xc1, 0x9c, 0x3c, 0xaf, 0x79, 0x17, 0x6e, 0x65, 0xa4, 0x89, 0x45, 0x4b, 0x5a, 0xc5, - 0x4e, 0x24, 0x91, 0x6c, 0xb5, 0xe7, 0x34, 0xff, 0x56, 0x40, 0x4d, 0x94, 0x16, 0x21, 0xdd, 0xf1, - 0x43, 0x3b, 0xb8, 0x44, 0xd2, 0x89, 0x4c, 0x33, 0x93, 0x99, 0xd4, 0x06, 0x54, 0x7d, 0x74, 0x64, - 0x26, 0xc2, 0xcd, 0x4a, 0xe1, 0xc0, 0x47, 0x47, 0xbb, 0x91, 0x76, 0x2d, 0x58, 0x10, 0x1e, 0xa9, - 0x7e, 0x73, 0x42, 0xbf, 0xed, 0x82, 0x21, 0x02, 0x9f, 0xc6, 0xa8, 0xd0, 0x27, 0xaf, 0x63, 0x51, - 0xea, 0xa8, 0xe4, 0x75, 0xcc, 0xc9, 0xb1, 0x08, 0x6f, 0x98, 0x99, 0x03, 0xa6, 0x05, 0x5a, 0x01, - 0x7d, 0xba, 0xdb, 0xe4, 0xd1, 0xfa, 0x45, 0x81, 0xf5, 0x1d, 0xe6, 0x7e, 0x82, 0x7d, 0x6b, 0x88, - 0xbf, 0x88, 0x15, 0xec, 0x5b, 0x14, 0x75, 0xc7, 0x49, 0x7d, 0x7b, 0xd8, 0xf5, 0x2d, 0x3e, 0xa2, - 0xe8, 0xbf, 0x88, 0x74, 0x07, 0x16, 0x59, 0x1c, 0x6f, 0x32, 0xbb, 0x8f, 0x3c, 0x14, 0x3d, 0x7b, - 0xb5, 0x04, 0xdf, 0x93, 0xb0, 0x78, 0xd2, 0x12, 0x48, 0x2a, 0x55, 0x35, 0x52, 0x20, 0xdb, 0x79, - 0xf3, 0x1e, 0x6c, 0x5c, 0xbd, 0xee, 0xa4, 0xdd, 0x9f, 0x66, 0x40, 0x9f, 0xf0, 0x8d, 0xc3, 0x85, - 0xe3, 0x16, 0xb1, 0xd5, 0x37, 0xa1, 0xe4, 0x10, 0xcf, 0xc2, 0x7e, 0xfc, 0xc8, 0x84, 0x96, 0x98, - 0x0e, 0xbb, 0x6f, 0x61, 0x3f, 0xed, 0xae, 0x2c, 0xed, 0x9e, 0x93, 0x9d, 0xb7, 0xd9, 0x8b, 0xe6, - 0x0d, 0x87, 0x37, 0x9f, 0xaa, 0x32, 0x31, 0x88, 0xc5, 0xcc, 0x20, 0xb6, 0xe1, 0x86, 0x3d, 0xa2, - 0x14, 0xf9, 0xdc, 0x94, 0x0e, 0xac, 0x6f, 0x6d, 0x7c, 0x7c, 0x5f, 0x8e, 0x55, 0xd5, 0xb8, 0x1e, - 0x51, 0xa2, 0x85, 0x3d, 0x49, 0xa8, 0x1b, 0x70, 0xeb, 0x20, 0xea, 0xc2, 0xc9, 0x44, 0x94, 0x65, - 0xc4, 0x8d, 0x84, 0x9c, 0x88, 0x79, 0x1f, 0xd4, 0xfd, 0x21, 0xb1, 0x07, 0xa6, 0x3f, 0xf2, 0xf6, - 0x11, 0x35, 0x7d, 0xe2, 0xdb, 0x48, 0x0e, 0xde, 0x9c, 0xb1, 0x28, 0x99, 0x27, 0x92, 0x78, 0x22, - 0xf0, 0xe6, 0x6f, 0x33, 0xb0, 0xb8, 0xc3, 0xdc, 0x3d, 0x4e, 0x28, 0xda, 0x22, 0xf6, 0xc8, 0x43, - 0x3e, 0x7f, 0xed, 0x05, 0x84, 0x9d, 0xc9, 0x05, 0x14, 0xae, 0x00, 0x27, 0x4a, 0x1e, 0x49, 0x95, - 0xd8, 0xea, 0x4d, 0x28, 0x06, 0x94, 0x90, 0x83, 0x48, 0xaa, 0xd0, 0xc8, 0x6e, 0x94, 0xd2, 0xf4, - 0x46, 0xa1, 0x28, 0x5c, 0xba, 0xf1, 0xb6, 0x89, 0x6d, 0xb5, 0x0e, 0x10, 0x20, 0xea, 0x61, 0xc6, - 0x30, 0xf1, 0xa3, 0x7d, 0x33, 0x81, 0xa8, 0x4b, 0x30, 0xc7, 0x31, 0xa2, 0x5a, 0x45, 0x30, 0xdb, - 0x05, 0x43, 0x5a, 0x62, 0x46, 0x57, 0xa1, 0xc2, 0xb1, 0x87, 0x18, 0xb7, 0xbc, 0x40, 0x83, 0x68, - 0x40, 0x53, 0x68, 0x7a, 0x3c, 0xcb, 0x50, 0x34, 0x45, 0x70, 0xb7, 0x0a, 0x60, 0x26, 0x7e, 0xcd, - 0x07, 0xa0, 0xe5, 0x05, 0x4d, 0xd6, 0xd6, 0x6d, 0xb8, 0x16, 0xf7, 0x9d, 0xae, 0x2e, 0x88, 0xa1, - 0x9e, 0xd3, 0xfc, 0x47, 0x91, 0x1b, 0x4f, 0x46, 0x3f, 0x46, 0xe3, 0x2d, 0x44, 0xf1, 0xa1, 0xc5, - 0x45, 0xdd, 0xff, 0xfb, 0x9d, 0xd4, 0x01, 0x9c, 0x24, 0x7d, 0x74, 0x2b, 0x13, 0x48, 0xf6, 0x06, - 0x8a, 0x97, 0xdc, 0x40, 0xe9, 0xd2, 0x1b, 0x28, 0xe7, 0x6f, 0x20, 0x37, 0xea, 0x8f, 0xe1, 0xed, - 0x73, 0x1b, 0x4e, 0x34, 0x5b, 0x87, 0xeb, 0x03, 0x34, 0x36, 0xd3, 0xca, 0x52, 0xe5, 0x6a, 0x83, - 0xc9, 0x88, 0x9e, 0xb3, 0xf1, 0x7d, 0x11, 0x66, 0x77, 0x98, 0xab, 0x3e, 0x83, 0x6a, 0xe6, 0x43, - 0xa1, 0x31, 0xf5, 0x82, 0xcf, 0xbd, 0x8d, 0xf5, 0xd6, 0xab, 0x3c, 0x92, 0x7a, 0x9e, 0x02, 0x4c, - 0xbc, 0xab, 0xeb, 0xe7, 0xc5, 0xa5, 0xbc, 0xbe, 0x76, 0x39, 0x9f, 0x64, 0xb5, 0xa1, 0x96, 0x7f, - 0x67, 0xbd, 0x73, 0x71, 0x49, 0x89, 0x93, 0xfe, 0xde, 0x15, 0x9c, 0x92, 0x43, 0x7e, 0x54, 0xe0, - 0xdd, 0xab, 0xbe, 0x0c, 0x1e, 0x9c, 0x97, 0xf8, 0x8a, 0xc1, 0xfa, 0xa3, 0xd7, 0x08, 0x4e, 0xaa, - 0xfd, 0x1c, 0x16, 0xb2, 0x6b, 0x69, 0xf5, 0xbc, 0xac, 0x19, 0x17, 0xfd, 0xce, 0x2b, 0x5d, 0x92, - 0xf4, 0x43, 0x50, 0xcf, 0x19, 0xb3, 0xb5, 0x0b, 0x13, 0x64, 0xfc, 0xf4, 0xf6, 0xd5, 0xfc, 0xe2, - 0xd3, 0xf4, 0xe2, 0x97, 0xe2, 0x2b, 0xb2, 0xfb, 0xe9, 0x8b, 0x93, 0xba, 0xf2, 0xf2, 0xa4, 0xae, - 0xfc, 0x75, 0x52, 0x57, 0xbe, 0x3d, 0xad, 0x17, 0x5e, 0x9e, 0xd6, 0x0b, 0x7f, 0x9c, 0xd6, 0x0b, - 0xcf, 0xee, 0xba, 0x98, 0x8b, 0x64, 0x36, 0xf1, 0x3a, 0x61, 0x6a, 0x1f, 0xf1, 0x23, 0x42, 0x07, - 0x9d, 0xe9, 0xaf, 0x4b, 0x3e, 0x0e, 0x10, 0xdb, 0x2f, 0xc9, 0x0f, 0xe3, 0x8f, 0xfe, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0xc6, 0x2e, 0x0e, 0xcb, 0xc0, 0x0b, 0x00, 0x00, + // 1303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0x26, 0xb1, 0x1d, 0xbf, 0x3a, 0x75, 0xb2, 0x4d, 0x9b, 0x8d, 0x1b, 0x5c, 0xd7, 0x88, + 0x92, 0x1a, 0x88, 0x4b, 0x68, 0x7b, 0x68, 0x4f, 0x75, 0x2b, 0x14, 0x53, 0x25, 0xaa, 0x36, 0xe5, + 0x52, 0x09, 0x2d, 0x9b, 0xdd, 0x89, 0x3d, 0xb2, 0x77, 0x67, 0x35, 0xb3, 0x6e, 0x6a, 0x4e, 0x88, + 0x13, 0xe2, 0xc4, 0x95, 0x6f, 0x50, 0x89, 0x4b, 0x91, 0x10, 0x17, 0xbe, 0x40, 0x6f, 0x54, 0x9c, + 0x38, 0x21, 0x94, 0x22, 0xf5, 0x82, 0xc4, 0x57, 0x40, 0x33, 0x3b, 0x3b, 0xfb, 0xc7, 0x49, 0x1a, + 0x51, 0xc4, 0x25, 0xf1, 0xfb, 0xff, 0xde, 0xef, 0xcd, 0x7b, 0x33, 0x0b, 0x06, 0x23, 0x63, 0xea, + 0xa0, 0xc1, 0x78, 0xaf, 0x43, 0xe8, 0x1e, 0x66, 0x9d, 0xf0, 0xc9, 0x46, 0x40, 0x49, 0x48, 0xf4, + 0x9a, 0x92, 0x6c, 0x08, 0x49, 0x7d, 0xc9, 0xf6, 0xb0, 0x4f, 0x3a, 0xe2, 0x6f, 0xa4, 0x53, 0x5f, + 0x71, 0x08, 0xf3, 0x08, 0xeb, 0x78, 0xac, 0xdf, 0x79, 0xfc, 0x21, 0xff, 0x27, 0x05, 0xab, 0x91, + 0xc0, 0x12, 0x54, 0x27, 0x22, 0xa4, 0x68, 0xb9, 0x4f, 0xfa, 0x24, 0xe2, 0xf3, 0x5f, 0x92, 0xbb, + 0x96, 0xcf, 0x23, 0xb0, 0xa9, 0xed, 0x49, 0x9b, 0xd6, 0xcf, 0x1a, 0xd4, 0xb6, 0x59, 0xff, 0xd3, + 0xc0, 0xb5, 0x43, 0xf4, 0x40, 0x48, 0xf4, 0x9b, 0x50, 0xb1, 0xc7, 0xe1, 0x80, 0x50, 0x1c, 0x4e, + 0x0c, 0xad, 0xa9, 0xad, 0x57, 0xba, 0xc6, 0xaf, 0x3f, 0x7e, 0xb0, 0x2c, 0x83, 0xdd, 0x71, 0x5d, + 0x8a, 0x18, 0xdb, 0x0d, 0x29, 0xf6, 0xfb, 0x66, 0xa2, 0xaa, 0xdf, 0x82, 0x52, 0xe4, 0xdb, 0x98, + 0x69, 0x6a, 0xeb, 0x67, 0x36, 0x57, 0x36, 0x72, 0x85, 0x6e, 0x44, 0x01, 0xba, 0x95, 0xe7, 0xbf, + 0x5f, 0x2a, 0x3c, 0x7d, 0xf5, 0xac, 0xad, 0x99, 0xd2, 0xe2, 0xd6, 0xf5, 0xaf, 0x5e, 0x3d, 0x6b, + 0x27, 0xbe, 0xbe, 0x79, 0xf5, 0xac, 0x7d, 0x39, 0x49, 0xfc, 0x89, 0x4c, 0x3d, 0x97, 0x69, 0x6b, + 0x15, 0x56, 0x72, 0x2c, 0x13, 0xb1, 0x80, 0xf8, 0x0c, 0xb5, 0xbe, 0x9b, 0x81, 0x85, 0x6d, 0xd6, + 0xbf, 0x4b, 0x91, 0x1d, 0x22, 0x13, 0xfb, 0x7d, 0xdd, 0x80, 0xb2, 0xc3, 0x29, 0x42, 0xa3, 0xa2, + 0xcc, 0x98, 0xd4, 0xd7, 0xa0, 0xe2, 0xdb, 0x1e, 0x62, 0x81, 0xed, 0x20, 0x91, 0x7b, 0xc5, 0x4c, + 0x18, 0xfa, 0x0a, 0x94, 0x79, 0xa5, 0x56, 0x30, 0x34, 0x66, 0x85, 0xac, 0xc4, 0xc9, 0x07, 0x43, + 0x7d, 0x15, 0xe6, 0x03, 0x84, 0xa8, 0x85, 0x5d, 0x66, 0xcc, 0x35, 0x67, 0xb9, 0x47, 0x4e, 0xf7, + 0x5c, 0xc6, 0x3d, 0x86, 0x03, 0x8a, 0xd8, 0x80, 0x8c, 0x5c, 0xa3, 0xd8, 0xd4, 0xd6, 0x17, 0xcc, + 0x84, 0xa1, 0x5f, 0x81, 0x6a, 0xc0, 0x98, 0x85, 0xfd, 0x10, 0xd1, 0xc7, 0xf6, 0xc8, 0x28, 0x35, + 0xb5, 0xf5, 0xb9, 0xad, 0x82, 0x79, 0x26, 0x60, 0xac, 0x27, 0x99, 0x5f, 0x6b, 0x9a, 0x7e, 0x11, + 0x2a, 0x01, 0x19, 0x61, 0x67, 0x62, 0x61, 0xd7, 0x28, 0x8b, 0xd8, 0xf3, 0x11, 0xa3, 0xe7, 0xea, + 0x75, 0x98, 0xb7, 0x69, 0x88, 0xf7, 0x6d, 0x27, 0x34, 0xe6, 0x23, 0x59, 0x4c, 0xdf, 0xaa, 0x72, + 0x34, 0xe3, 0xf2, 0xba, 0x35, 0x58, 0xb0, 0xd2, 0xf1, 0x5a, 0xd7, 0xe0, 0x7c, 0x06, 0x9a, 0x18, + 0x34, 0x55, 0x2a, 0x76, 0x25, 0x44, 0xa2, 0xd4, 0x9e, 0xdb, 0xfa, 0x4b, 0x03, 0x5d, 0x21, 0xcd, + 0x4d, 0xba, 0x93, 0x3b, 0x4e, 0x70, 0x02, 0xa4, 0x29, 0x4f, 0x33, 0x69, 0x4f, 0x7a, 0x13, 0xaa, + 0x3e, 0x3a, 0xb0, 0x14, 0x70, 0xb3, 0x02, 0x38, 0xf0, 0xd1, 0xc1, 0x03, 0x89, 0xdd, 0x3a, 0x2c, + 0x70, 0x8d, 0x04, 0xbf, 0x39, 0x8e, 0xdf, 0x56, 0xc1, 0xe4, 0x86, 0x0f, 0x63, 0x2e, 0xc7, 0x27, + 0x8f, 0x63, 0x51, 0xe0, 0xa8, 0xe5, 0x71, 0xcc, 0xc1, 0xb1, 0x08, 0x67, 0xad, 0x4c, 0x80, 0x69, + 0x80, 0xd6, 0xa0, 0x3e, 0x5d, 0xad, 0x3a, 0x5a, 0x3f, 0x69, 0xd0, 0xde, 0x66, 0xfd, 0x8f, 0xb1, + 0x6f, 0x8f, 0xf0, 0x17, 0x31, 0x82, 0x03, 0x9b, 0xa2, 0xee, 0x44, 0xe5, 0xb7, 0x8b, 0xfb, 0xbe, + 0x1d, 0x8e, 0x29, 0xfa, 0x37, 0x20, 0x5d, 0x85, 0x45, 0x16, 0xdb, 0x5b, 0xcc, 0x19, 0x20, 0x0f, + 0xc9, 0xb3, 0x57, 0x53, 0xfc, 0x5d, 0xc1, 0xe6, 0x27, 0x4d, 0xb1, 0x04, 0x52, 0x55, 0x33, 0x61, + 0x64, 0x2b, 0x6f, 0x5d, 0x87, 0xcd, 0xd3, 0xe7, 0xad, 0xca, 0xfd, 0x61, 0x06, 0xea, 0x29, 0xdd, + 0xd8, 0x9c, 0x2b, 0xde, 0x23, 0x8e, 0x7e, 0x01, 0x4a, 0x2e, 0xf1, 0x6c, 0xec, 0xc7, 0x47, 0x26, + 0xa2, 0xf8, 0x74, 0x38, 0x03, 0x1b, 0xfb, 0x49, 0x75, 0x65, 0x41, 0xf7, 0xdc, 0xec, 0xbc, 0xcd, + 0x1e, 0x37, 0x6f, 0x38, 0xea, 0x7c, 0x82, 0x4a, 0x6a, 0x10, 0x8b, 0x99, 0x41, 0xdc, 0x80, 0x73, + 0xce, 0x98, 0x52, 0xe4, 0x87, 0x96, 0x50, 0x60, 0x03, 0x7b, 0xf3, 0xc6, 0x4d, 0x31, 0x56, 0x55, + 0x73, 0x49, 0x8a, 0x78, 0x09, 0xbb, 0x42, 0xa0, 0x6f, 0xc2, 0xf9, 0x7d, 0x59, 0x85, 0x9b, 0xb1, + 0x28, 0x0b, 0x8b, 0x73, 0x4a, 0x98, 0xb2, 0x79, 0x1f, 0xf4, 0xbd, 0x11, 0x71, 0x86, 0x96, 0x3f, + 0xf6, 0xf6, 0x10, 0xb5, 0x7c, 0xe2, 0x3b, 0x48, 0x0c, 0xde, 0x9c, 0xb9, 0x28, 0x24, 0x3b, 0x42, + 0xb0, 0xc3, 0xf9, 0xad, 0x5f, 0x66, 0x60, 0x71, 0x9b, 0xf5, 0x77, 0x43, 0x42, 0xd1, 0x3d, 0xe2, + 0x8c, 0x3d, 0xe4, 0x87, 0x6f, 0xbc, 0x80, 0xb0, 0x9b, 0x5e, 0x40, 0xd1, 0x0a, 0x70, 0xa5, 0x73, + 0x09, 0x95, 0xa2, 0xf5, 0x65, 0x28, 0x06, 0x94, 0x90, 0x7d, 0x09, 0x55, 0x44, 0x64, 0x37, 0x4a, + 0x69, 0x7a, 0xa3, 0x50, 0x14, 0x2d, 0xdd, 0x78, 0xdb, 0xc4, 0xb4, 0xde, 0x00, 0x08, 0x10, 0xf5, + 0x30, 0x63, 0x98, 0xf8, 0x72, 0xdf, 0xa4, 0x38, 0xfa, 0x0a, 0xcc, 0x85, 0x18, 0x51, 0xa3, 0xc2, + 0x25, 0x5b, 0x05, 0x53, 0x50, 0x7c, 0x46, 0x2f, 0x43, 0x25, 0xc4, 0x1e, 0x62, 0xa1, 0xed, 0x05, + 0x06, 0xc8, 0x01, 0x4d, 0x58, 0xd3, 0xe3, 0x59, 0x86, 0xa2, 0xc5, 0x8d, 0xbb, 0x55, 0x00, 0x4b, + 0xe9, 0xb5, 0x6e, 0x83, 0x91, 0x07, 0x54, 0xad, 0xad, 0x4b, 0x70, 0x26, 0xae, 0x3b, 0x59, 0x5d, + 0x10, 0xb3, 0x7a, 0x6e, 0xeb, 0x6f, 0x4d, 0x6c, 0x3c, 0x61, 0x7d, 0x1f, 0x4d, 0xee, 0x21, 0x8a, + 0x1f, 0xdb, 0x21, 0xcf, 0xfb, 0x3f, 0xef, 0x49, 0x03, 0xc0, 0x55, 0xee, 0x65, 0x57, 0x52, 0x9c, + 0x6c, 0x07, 0x8a, 0x27, 0x74, 0xa0, 0x74, 0x62, 0x07, 0xca, 0xf9, 0x0e, 0xe4, 0x46, 0xfd, 0x3e, + 0xbc, 0x75, 0x64, 0xc1, 0x0a, 0xb3, 0x36, 0x2c, 0x0d, 0xd1, 0xc4, 0x4a, 0x32, 0x4b, 0x90, 0xab, + 0x0d, 0xd3, 0x16, 0x3d, 0xb7, 0xf5, 0xa7, 0x06, 0x4b, 0xea, 0xc2, 0xd8, 0x21, 0x2e, 0xea, 0xf9, + 0xfb, 0xe4, 0xe4, 0xbd, 0x26, 0xf7, 0x7b, 0xbc, 0xd7, 0xa2, 0x7b, 0x51, 0x7f, 0x07, 0xce, 0x3a, + 0xc4, 0x0f, 0x29, 0x19, 0x8d, 0x10, 0xb5, 0x86, 0x68, 0x22, 0xc1, 0x5b, 0x48, 0xb8, 0xf7, 0xd1, + 0x44, 0xbf, 0x01, 0x17, 0x0e, 0x06, 0x38, 0x44, 0x23, 0xcc, 0x42, 0xe4, 0x5a, 0x0a, 0xf5, 0xf8, + 0x9a, 0x3d, 0x9f, 0x92, 0xee, 0x28, 0xa1, 0x7e, 0x0d, 0x96, 0xd3, 0x66, 0xb2, 0x3f, 0xcc, 0x28, + 0x0a, 0x23, 0x3d, 0x25, 0x33, 0x45, 0xaf, 0x58, 0x0e, 0xb3, 0x8b, 0xb0, 0x3a, 0x55, 0xa5, 0xda, + 0x82, 0x4f, 0x67, 0x04, 0x06, 0xd1, 0x9d, 0x70, 0x0a, 0x0c, 0x56, 0x61, 0xde, 0x27, 0x2e, 0x12, + 0x45, 0xca, 0xf5, 0xc7, 0x69, 0x5e, 0xde, 0x5a, 0x02, 0xcf, 0xac, 0x1c, 0x17, 0x09, 0x10, 0x1f, + 0x98, 0xff, 0xab, 0x78, 0xbd, 0x3d, 0xd5, 0x0c, 0x71, 0xe4, 0xb6, 0xb4, 0x5c, 0x3b, 0xa6, 0x47, + 0x14, 0x60, 0x3e, 0xbe, 0xc0, 0xbb, 0x4b, 0x50, 0xb3, 0xb2, 0x6e, 0x24, 0x8e, 0x59, 0xa4, 0x62, + 0x1c, 0x37, 0x0f, 0x4b, 0x30, 0xbb, 0xcd, 0xfa, 0xfa, 0x23, 0xa8, 0x66, 0x1e, 0x9d, 0xcd, 0xa9, + 0xc7, 0x62, 0xee, 0x65, 0x57, 0x5f, 0x7f, 0x9d, 0x86, 0x3a, 0xdb, 0x0f, 0x01, 0x52, 0xef, 0xbe, + 0xc6, 0x51, 0x76, 0x89, 0xbc, 0x7e, 0xe5, 0x64, 0xb9, 0xf2, 0xea, 0x40, 0x2d, 0xff, 0xfe, 0x79, + 0xfb, 0xf8, 0x94, 0x94, 0x52, 0xfd, 0xbd, 0x53, 0x28, 0xa9, 0x20, 0xdf, 0x6b, 0xf0, 0xee, 0x69, + 0x1f, 0x16, 0xb7, 0x8f, 0x72, 0x7c, 0x4a, 0xe3, 0xfa, 0xdd, 0x37, 0x30, 0x56, 0xd9, 0x7e, 0x06, + 0x0b, 0xd9, 0x2b, 0xee, 0xf2, 0x51, 0x5e, 0x33, 0x2a, 0xf5, 0xab, 0xaf, 0x55, 0x51, 0xee, 0x47, + 0xa0, 0x1f, 0xb1, 0xb2, 0xaf, 0x1c, 0xeb, 0x20, 0xa3, 0x57, 0xdf, 0x38, 0x9d, 0x9e, 0x8a, 0xf6, + 0x39, 0x9c, 0xcd, 0x6d, 0xb8, 0xd6, 0xf1, 0x27, 0x23, 0xd6, 0xa9, 0xb7, 0x5f, 0xaf, 0x93, 0x8e, + 0x90, 0xdb, 0x1f, 0xad, 0xe3, 0xcf, 0xc6, 0xc9, 0x11, 0x8e, 0x9e, 0xae, 0x7a, 0xf1, 0x4b, 0xfe, + 0x55, 0xd5, 0xfd, 0xe4, 0xf9, 0x61, 0x43, 0x7b, 0x71, 0xd8, 0xd0, 0xfe, 0x38, 0x6c, 0x68, 0xdf, + 0xbe, 0x6c, 0x14, 0x5e, 0xbc, 0x6c, 0x14, 0x7e, 0x7b, 0xd9, 0x28, 0x3c, 0xba, 0xd6, 0xc7, 0x21, + 0x77, 0xe4, 0x10, 0xaf, 0x13, 0xb9, 0xf5, 0x51, 0x78, 0x40, 0xe8, 0xb0, 0x33, 0xfd, 0xb5, 0x15, + 0x4e, 0x02, 0xc4, 0xf6, 0x4a, 0xe2, 0x43, 0xf1, 0xa3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x75, + 0xef, 0x0a, 0xa7, 0xd0, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1120,6 +1416,8 @@ type MsgClient interface { FinalizeRingReshareByThresholdSignature(ctx context.Context, in *MsgFinalizeRingReshareByThresholdSignature, opts ...grpc.CallOption) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) StoreDocument(ctx context.Context, in *MsgStoreDocument, opts ...grpc.CallOption) (*MsgStoreDocumentResponse, error) StoreKeyDerivation(ctx context.Context, in *MsgStoreKeyDerivation, opts ...grpc.CallOption) (*MsgStoreKeyDerivationResponse, error) + CreateNodeInfo(ctx context.Context, in *MsgCreateNodeInfo, opts ...grpc.CallOption) (*MsgCreateNodeInfoResponse, error) + UpdateNodeInfo(ctx context.Context, in *MsgUpdateNodeInfo, opts ...grpc.CallOption) (*MsgUpdateNodeInfoResponse, error) } type msgClient struct { @@ -1184,6 +1482,24 @@ func (c *msgClient) StoreKeyDerivation(ctx context.Context, in *MsgStoreKeyDeriv return out, nil } +func (c *msgClient) CreateNodeInfo(ctx context.Context, in *MsgCreateNodeInfo, opts ...grpc.CallOption) (*MsgCreateNodeInfoResponse, error) { + out := new(MsgCreateNodeInfoResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Msg/CreateNodeInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateNodeInfo(ctx context.Context, in *MsgUpdateNodeInfo, opts ...grpc.CallOption) (*MsgUpdateNodeInfoResponse, error) { + out := new(MsgUpdateNodeInfoResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Msg/UpdateNodeInfo", 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 module parameters. @@ -1193,6 +1509,8 @@ type MsgServer interface { FinalizeRingReshareByThresholdSignature(context.Context, *MsgFinalizeRingReshareByThresholdSignature) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) StoreDocument(context.Context, *MsgStoreDocument) (*MsgStoreDocumentResponse, error) StoreKeyDerivation(context.Context, *MsgStoreKeyDerivation) (*MsgStoreKeyDerivationResponse, error) + CreateNodeInfo(context.Context, *MsgCreateNodeInfo) (*MsgCreateNodeInfoResponse, error) + UpdateNodeInfo(context.Context, *MsgUpdateNodeInfo) (*MsgUpdateNodeInfoResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1217,6 +1535,12 @@ func (*UnimplementedMsgServer) StoreDocument(ctx context.Context, req *MsgStoreD func (*UnimplementedMsgServer) StoreKeyDerivation(ctx context.Context, req *MsgStoreKeyDerivation) (*MsgStoreKeyDerivationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StoreKeyDerivation not implemented") } +func (*UnimplementedMsgServer) CreateNodeInfo(ctx context.Context, req *MsgCreateNodeInfo) (*MsgCreateNodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNodeInfo not implemented") +} +func (*UnimplementedMsgServer) UpdateNodeInfo(ctx context.Context, req *MsgUpdateNodeInfo) (*MsgUpdateNodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNodeInfo not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1330,6 +1654,42 @@ func _Msg_StoreKeyDerivation_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Msg_CreateNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateNodeInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateNodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Msg/CreateNodeInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateNodeInfo(ctx, req.(*MsgCreateNodeInfo)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateNodeInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateNodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Msg/UpdateNodeInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateNodeInfo(ctx, req.(*MsgUpdateNodeInfo)) + } + return interceptor(ctx, in, info, handler) +} + var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.orbis.Msg", @@ -1359,6 +1719,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "StoreKeyDerivation", Handler: _Msg_StoreKeyDerivation_Handler, }, + { + MethodName: "CreateNodeInfo", + Handler: _Msg_CreateNodeInfo_Handler, + }, + { + MethodName: "UpdateNodeInfo", + Handler: _Msg_UpdateNodeInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/orbis/tx.proto", @@ -2067,49 +2435,258 @@ func (m *MsgStoreKeyDerivationResponse) MarshalToSizedBuffer(dAtA []byte) (int, 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)) +func (m *MsgCreateNodeInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return dAtA[:n], nil } -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n +func (m *MsgCreateNodeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCreateRing) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgCreateNodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Creator) - if l > 0 { + if len(m.WhitelistedRingIds) > 0 { + for iNdEx := len(m.WhitelistedRingIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedRingIds[iNdEx]) + copy(dAtA[i:], m.WhitelistedRingIds[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.WhitelistedRingIds[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.WhitelistedNamespaces) > 0 { + for iNdEx := len(m.WhitelistedNamespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedNamespaces[iNdEx]) + copy(dAtA[i:], m.WhitelistedNamespaces[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.WhitelistedNamespaces[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.ControllerKey) > 0 { + i -= len(m.ControllerKey) + copy(dAtA[i:], m.ControllerKey) + i = encodeVarintTx(dAtA, i, uint64(len(m.ControllerKey))) + i-- + dAtA[i] = 0x1a + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateNodeInfoResponse) 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 *MsgCreateNodeInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateNodeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateNodeInfo) 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 *MsgUpdateNodeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateNodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XControllerKey != nil { + { + size := m.XControllerKey.Size() + i -= size + if _, err := m.XControllerKey.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.WhitelistedRingIds) > 0 { + for iNdEx := len(m.WhitelistedRingIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedRingIds[iNdEx]) + copy(dAtA[i:], m.WhitelistedRingIds[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.WhitelistedRingIds[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.WhitelistedNamespaces) > 0 { + for iNdEx := len(m.WhitelistedNamespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedNamespaces[iNdEx]) + copy(dAtA[i:], m.WhitelistedNamespaces[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.WhitelistedNamespaces[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.XPeerId != nil { + { + size := m.XPeerId.Size() + i -= size + if _, err := m.XPeerId.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.NodeKey) > 0 { + i -= len(m.NodeKey) + copy(dAtA[i:], m.NodeKey) + i = encodeVarintTx(dAtA, i, uint64(len(m.NodeKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateNodeInfo_PeerId) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateNodeInfo_PeerId) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *MsgUpdateNodeInfo_ControllerKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateNodeInfo_ControllerKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.ControllerKey) + copy(dAtA[i:], m.ControllerKey) + i = encodeVarintTx(dAtA, i, uint64(len(m.ControllerKey))) + i-- + dAtA[i] = 0x32 + return len(dAtA) - i, nil +} +func (m *MsgUpdateNodeInfoResponse) 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 *MsgUpdateNodeInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateNodeInfoResponse) 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 *MsgCreateRing) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.Namespace) @@ -2424,6 +3001,112 @@ func (m *MsgStoreKeyDerivationResponse) Size() (n int) { return n } +func (m *MsgCreateNodeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.PeerId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ControllerKey) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.WhitelistedNamespaces) > 0 { + for _, s := range m.WhitelistedNamespaces { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.WhitelistedRingIds) > 0 { + for _, s := range m.WhitelistedRingIds { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgCreateNodeInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateNodeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NodeKey) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.XPeerId != nil { + n += m.XPeerId.Size() + } + if len(m.WhitelistedNamespaces) > 0 { + for _, s := range m.WhitelistedNamespaces { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.WhitelistedRingIds) > 0 { + for _, s := range m.WhitelistedRingIds { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if m.XControllerKey != nil { + n += m.XControllerKey.Size() + } + return n +} + +func (m *MsgUpdateNodeInfo_PeerId) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PeerId) + n += 1 + l + sovTx(uint64(l)) + return n +} +func (m *MsgUpdateNodeInfo_ControllerKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ControllerKey) + n += 1 + l + sovTx(uint64(l)) + return n +} +func (m *MsgUpdateNodeInfoResponse) 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 } @@ -4517,6 +5200,558 @@ func (m *MsgStoreKeyDerivationResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCreateNodeInfo) 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: MsgCreateNodeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateNodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", 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.ControllerKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedNamespaces", 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.WhitelistedNamespaces = append(m.WhitelistedNamespaces, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedRingIds", 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.WhitelistedRingIds = append(m.WhitelistedRingIds, 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 *MsgCreateNodeInfoResponse) 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: MsgCreateNodeInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateNodeInfoResponse: 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 *MsgUpdateNodeInfo) 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: MsgUpdateNodeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateNodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeKey", 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.NodeKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.XPeerId = &MsgUpdateNodeInfo_PeerId{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedNamespaces", 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.WhitelistedNamespaces = append(m.WhitelistedNamespaces, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedRingIds", 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.WhitelistedRingIds = append(m.WhitelistedRingIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", 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.XControllerKey = &MsgUpdateNodeInfo_ControllerKey{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 *MsgUpdateNodeInfoResponse) 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: MsgUpdateNodeInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateNodeInfoResponse: 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 From fd9a3a0f65c181151127b612b545e89d531a0654 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Mon, 1 Jun 2026 11:14:23 -0400 Subject: [PATCH 8/8] New DKG flow (#115) * New DKG flow * update peer id to node id * update update by acp for node_key * add finalize ring * require ring finalization * remove namespace * add acp policy and checks to module * make finalize require all nodes * add nonce to ring id creation * update ring reshare for orbis * remove artifact and other unused code * code rabbit suggestion * code rabbit comment * add node info and whitelist checks to acc by acp * more test --- api/sourcehub/orbis/document.pb.go | 51 +- api/sourcehub/orbis/events.pulsar.go | 1092 +++++----- api/sourcehub/orbis/key_derivation.pulsar.go | 154 +- api/sourcehub/orbis/node_info.pulsar.go | 120 +- api/sourcehub/orbis/query.pulsar.go | 698 ++----- api/sourcehub/orbis/query_grpc.pb.go | 20 +- api/sourcehub/orbis/ring.pb.go | 149 +- api/sourcehub/orbis/tx.pb.go | 614 ++++-- api/sourcehub/orbis/tx_grpc.pb.go | 38 + proto/sourcehub/orbis/document.proto | 19 +- proto/sourcehub/orbis/events.proto | 27 +- proto/sourcehub/orbis/key_derivation.proto | 13 +- proto/sourcehub/orbis/node_info.proto | 2 +- proto/sourcehub/orbis/query.proto | 33 +- proto/sourcehub/orbis/ring.proto | 26 +- proto/sourcehub/orbis/tx.proto | 89 +- x/orbis/keeper/acp.go | 64 +- x/orbis/keeper/grpc_query.go | 29 +- x/orbis/keeper/keeper.go | 4 - x/orbis/keeper/msg_server.go | 189 +- x/orbis/keeper/msg_server_test.go | 982 ++++++++- x/orbis/keeper/optional.go | 8 + x/orbis/keeper/reshare_sign_bytes.go | 59 +- x/orbis/keeper/reshare_sign_bytes_test.go | 89 + x/orbis/keeper/store.go | 21 +- x/orbis/keeper/validation.go | 101 +- x/orbis/module/autocli.go | 38 +- x/orbis/types/acp.go | 10 + x/orbis/types/document.pb.go | 144 +- x/orbis/types/errors.go | 10 +- x/orbis/types/events.pb.go | 499 +++-- x/orbis/types/key_derivation.pb.go | 120 +- x/orbis/types/keys.go | 47 +- x/orbis/types/keys_test.go | 21 - x/orbis/types/message_create_ring.go | 26 +- x/orbis/types/message_finalize_ring.go | 22 + x/orbis/types/message_store_document.go | 6 +- x/orbis/types/message_store_key_derivation.go | 6 +- x/orbis/types/node_info.pb.go | 71 +- x/orbis/types/query.pb.go | 399 +--- x/orbis/types/query.pb.gw.go | 128 +- x/orbis/types/ring.pb.go | 483 +++-- x/orbis/types/tx.pb.go | 1824 ++++++++++++----- 43 files changed, 5068 insertions(+), 3477 deletions(-) create mode 100644 x/orbis/keeper/reshare_sign_bytes_test.go create mode 100644 x/orbis/types/acp.go delete mode 100644 x/orbis/types/keys_test.go create mode 100644 x/orbis/types/message_finalize_ring.go diff --git a/api/sourcehub/orbis/document.pb.go b/api/sourcehub/orbis/document.pb.go index 30055c01..fb0a77a4 100644 --- a/api/sourcehub/orbis/document.pb.go +++ b/api/sourcehub/orbis/document.pb.go @@ -25,18 +25,17 @@ const ( type Document struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` // Absent means no tier. - Tier *string `protobuf:"bytes,10,opt,name=tier,proto3,oneof" json:"tier,omitempty"` + Tier *string `protobuf:"bytes,9,opt,name=tier,proto3,oneof" json:"tier,omitempty"` // Absent means no timestamp. - Timestamp *uint64 `protobuf:"varint,11,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` + Timestamp *uint64 `protobuf:"varint,10,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -78,13 +77,6 @@ func (x *Document) GetId() string { return "" } -func (x *Document) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *Document) GetCreatorDid() string { if x != nil { return x.CreatorDid @@ -152,23 +144,22 @@ var File_sourcehub_orbis_document_proto protoreflect.FileDescriptor const file_sourcehub_orbis_document_proto_rawDesc = "" + "\n" + - "\x1esourcehub/orbis/document.proto\x12\x0fsourcehub.orbis\"\xd0\x02\n" + + "\x1esourcehub/orbis/document.proto\x12\x0fsourcehub.orbis\"\xb2\x02\n" + "\bDocument\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x1c\n" + - "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x1f\n" + - "\vcreator_did\x18\x03 \x01(\tR\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" + + "\vcreator_did\x18\x02 \x01(\tR\n" + "creatorDid\x12\x17\n" + - "\aring_id\x18\x04 \x01(\tR\x06ringId\x12\x1a\n" + - "\bdocument\x18\x05 \x01(\tR\bdocument\x12\x14\n" + - "\x05proof\x18\x06 \x01(\tR\x05proof\x12\x1b\n" + - "\tpolicy_id\x18\a \x01(\tR\bpolicyId\x12\x1a\n" + - "\bresource\x18\b \x01(\tR\bresource\x12\x1e\n" + + "\aring_id\x18\x03 \x01(\tR\x06ringId\x12\x1a\n" + + "\bdocument\x18\x04 \x01(\tR\bdocument\x12\x14\n" + + "\x05proof\x18\x05 \x01(\tR\x05proof\x12\x1b\n" + + "\tpolicy_id\x18\x06 \x01(\tR\bpolicyId\x12\x1a\n" + + "\bresource\x18\a \x01(\tR\bresource\x12\x1e\n" + "\n" + - "permission\x18\t \x01(\tR\n" + + "permission\x18\b \x01(\tR\n" + "permission\x12\x17\n" + - "\x04tier\x18\n" + - " \x01(\tH\x00R\x04tier\x88\x01\x01\x12!\n" + - "\ttimestamp\x18\v \x01(\x04H\x01R\ttimestamp\x88\x01\x01B\a\n" + + "\x04tier\x18\t \x01(\tH\x00R\x04tier\x88\x01\x01\x12!\n" + + "\ttimestamp\x18\n" + + " \x01(\x04H\x01R\ttimestamp\x88\x01\x01B\a\n" + "\x05_tierB\f\n" + "\n" + "_timestampB\xa3\x01\n" + diff --git a/api/sourcehub/orbis/events.pulsar.go b/api/sourcehub/orbis/events.pulsar.go index b4226fc0..90274e60 100644 --- a/api/sourcehub/orbis/events.pulsar.go +++ b/api/sourcehub/orbis/events.pulsar.go @@ -14,19 +14,15 @@ import ( var ( md_EventRingCreated protoreflect.MessageDescriptor - fd_EventRingCreated_namespace protoreflect.FieldDescriptor fd_EventRingCreated_ring_id protoreflect.FieldDescriptor fd_EventRingCreated_creator_did protoreflect.FieldDescriptor - fd_EventRingCreated_artifact protoreflect.FieldDescriptor ) func init() { file_sourcehub_orbis_events_proto_init() md_EventRingCreated = File_sourcehub_orbis_events_proto.Messages().ByName("EventRingCreated") - fd_EventRingCreated_namespace = md_EventRingCreated.Fields().ByName("namespace") fd_EventRingCreated_ring_id = md_EventRingCreated.Fields().ByName("ring_id") fd_EventRingCreated_creator_did = md_EventRingCreated.Fields().ByName("creator_did") - fd_EventRingCreated_artifact = md_EventRingCreated.Fields().ByName("artifact") } var _ protoreflect.Message = (*fastReflection_EventRingCreated)(nil) @@ -94,12 +90,6 @@ func (x *fastReflection_EventRingCreated) Interface() protoreflect.ProtoMessage // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventRingCreated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_EventRingCreated_namespace, value) { - return - } - } if x.RingId != "" { value := protoreflect.ValueOfString(x.RingId) if !f(fd_EventRingCreated_ring_id, value) { @@ -112,12 +102,6 @@ func (x *fastReflection_EventRingCreated) Range(f func(protoreflect.FieldDescrip return } } - if x.Artifact != "" { - value := protoreflect.ValueOfString(x.Artifact) - if !f(fd_EventRingCreated_artifact, value) { - return - } - } } // Has reports whether a field is populated. @@ -133,14 +117,10 @@ func (x *fastReflection_EventRingCreated) Range(f func(protoreflect.FieldDescrip // a repeated field is populated if it is non-empty. func (x *fastReflection_EventRingCreated) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "sourcehub.orbis.EventRingCreated.namespace": - return x.Namespace != "" case "sourcehub.orbis.EventRingCreated.ring_id": return x.RingId != "" case "sourcehub.orbis.EventRingCreated.creator_did": return x.CreatorDid != "" - case "sourcehub.orbis.EventRingCreated.artifact": - return x.Artifact != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) @@ -157,14 +137,10 @@ func (x *fastReflection_EventRingCreated) Has(fd protoreflect.FieldDescriptor) b // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventRingCreated) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "sourcehub.orbis.EventRingCreated.namespace": - x.Namespace = "" case "sourcehub.orbis.EventRingCreated.ring_id": x.RingId = "" case "sourcehub.orbis.EventRingCreated.creator_did": x.CreatorDid = "" - case "sourcehub.orbis.EventRingCreated.artifact": - x.Artifact = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) @@ -181,18 +157,12 @@ func (x *fastReflection_EventRingCreated) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventRingCreated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "sourcehub.orbis.EventRingCreated.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.EventRingCreated.ring_id": value := x.RingId return protoreflect.ValueOfString(value) case "sourcehub.orbis.EventRingCreated.creator_did": value := x.CreatorDid return protoreflect.ValueOfString(value) - case "sourcehub.orbis.EventRingCreated.artifact": - value := x.Artifact - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) @@ -213,14 +183,10 @@ func (x *fastReflection_EventRingCreated) Get(descriptor protoreflect.FieldDescr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventRingCreated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "sourcehub.orbis.EventRingCreated.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.EventRingCreated.ring_id": x.RingId = value.Interface().(string) case "sourcehub.orbis.EventRingCreated.creator_did": x.CreatorDid = value.Interface().(string) - case "sourcehub.orbis.EventRingCreated.artifact": - x.Artifact = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) @@ -241,14 +207,10 @@ func (x *fastReflection_EventRingCreated) Set(fd protoreflect.FieldDescriptor, v // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventRingCreated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.EventRingCreated.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.EventRingCreated is not mutable")) case "sourcehub.orbis.EventRingCreated.ring_id": panic(fmt.Errorf("field ring_id of message sourcehub.orbis.EventRingCreated is not mutable")) case "sourcehub.orbis.EventRingCreated.creator_did": panic(fmt.Errorf("field creator_did of message sourcehub.orbis.EventRingCreated is not mutable")) - case "sourcehub.orbis.EventRingCreated.artifact": - panic(fmt.Errorf("field artifact of message sourcehub.orbis.EventRingCreated is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) @@ -262,14 +224,10 @@ func (x *fastReflection_EventRingCreated) Mutable(fd protoreflect.FieldDescripto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventRingCreated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.EventRingCreated.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.EventRingCreated.ring_id": return protoreflect.ValueOfString("") case "sourcehub.orbis.EventRingCreated.creator_did": return protoreflect.ValueOfString("") - case "sourcehub.orbis.EventRingCreated.artifact": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingCreated")) @@ -339,10 +297,6 @@ func (x *fastReflection_EventRingCreated) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.RingId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -351,10 +305,6 @@ func (x *fastReflection_EventRingCreated) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Artifact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -384,32 +334,18 @@ func (x *fastReflection_EventRingCreated) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Artifact) > 0 { - i -= len(x.Artifact) - copy(dAtA[i:], x.Artifact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) - i-- - dAtA[i] = 0x22 - } if len(x.CreatorDid) > 0 { i -= len(x.CreatorDid) copy(dAtA[i:], x.CreatorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(x.RingId) > 0 { i -= len(x.RingId) copy(dAtA[i:], x.RingId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) i-- - dAtA[i] = 0x12 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -462,38 +398,6 @@ func (x *fastReflection_EventRingCreated) 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 Namespace", 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.Namespace = 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 RingId", wireType) } @@ -525,7 +429,7 @@ func (x *fastReflection_EventRingCreated) ProtoMethods() *protoiface.Methods { } x.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } @@ -557,38 +461,6 @@ func (x *fastReflection_EventRingCreated) ProtoMethods() *protoiface.Methods { } x.CreatorDid = 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 Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -626,7 +498,6 @@ func (x *fastReflection_EventRingCreated) ProtoMethods() *protoiface.Methods { var ( md_EventRingUpdated protoreflect.MessageDescriptor - fd_EventRingUpdated_namespace protoreflect.FieldDescriptor fd_EventRingUpdated_ring_id protoreflect.FieldDescriptor fd_EventRingUpdated_updater_did protoreflect.FieldDescriptor ) @@ -634,7 +505,6 @@ var ( func init() { file_sourcehub_orbis_events_proto_init() md_EventRingUpdated = File_sourcehub_orbis_events_proto.Messages().ByName("EventRingUpdated") - fd_EventRingUpdated_namespace = md_EventRingUpdated.Fields().ByName("namespace") fd_EventRingUpdated_ring_id = md_EventRingUpdated.Fields().ByName("ring_id") fd_EventRingUpdated_updater_did = md_EventRingUpdated.Fields().ByName("updater_did") } @@ -704,12 +574,6 @@ func (x *fastReflection_EventRingUpdated) Interface() protoreflect.ProtoMessage // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventRingUpdated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_EventRingUpdated_namespace, value) { - return - } - } if x.RingId != "" { value := protoreflect.ValueOfString(x.RingId) if !f(fd_EventRingUpdated_ring_id, value) { @@ -737,8 +601,6 @@ func (x *fastReflection_EventRingUpdated) Range(f func(protoreflect.FieldDescrip // a repeated field is populated if it is non-empty. func (x *fastReflection_EventRingUpdated) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "sourcehub.orbis.EventRingUpdated.namespace": - return x.Namespace != "" case "sourcehub.orbis.EventRingUpdated.ring_id": return x.RingId != "" case "sourcehub.orbis.EventRingUpdated.updater_did": @@ -759,8 +621,6 @@ func (x *fastReflection_EventRingUpdated) Has(fd protoreflect.FieldDescriptor) b // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventRingUpdated) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "sourcehub.orbis.EventRingUpdated.namespace": - x.Namespace = "" case "sourcehub.orbis.EventRingUpdated.ring_id": x.RingId = "" case "sourcehub.orbis.EventRingUpdated.updater_did": @@ -781,9 +641,6 @@ func (x *fastReflection_EventRingUpdated) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventRingUpdated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "sourcehub.orbis.EventRingUpdated.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.EventRingUpdated.ring_id": value := x.RingId return protoreflect.ValueOfString(value) @@ -810,8 +667,6 @@ func (x *fastReflection_EventRingUpdated) Get(descriptor protoreflect.FieldDescr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventRingUpdated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "sourcehub.orbis.EventRingUpdated.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.EventRingUpdated.ring_id": x.RingId = value.Interface().(string) case "sourcehub.orbis.EventRingUpdated.updater_did": @@ -836,8 +691,6 @@ func (x *fastReflection_EventRingUpdated) Set(fd protoreflect.FieldDescriptor, v // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventRingUpdated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.EventRingUpdated.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.EventRingUpdated is not mutable")) case "sourcehub.orbis.EventRingUpdated.ring_id": panic(fmt.Errorf("field ring_id of message sourcehub.orbis.EventRingUpdated is not mutable")) case "sourcehub.orbis.EventRingUpdated.updater_did": @@ -855,8 +708,6 @@ func (x *fastReflection_EventRingUpdated) Mutable(fd protoreflect.FieldDescripto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventRingUpdated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.EventRingUpdated.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.EventRingUpdated.ring_id": return protoreflect.ValueOfString("") case "sourcehub.orbis.EventRingUpdated.updater_did": @@ -930,10 +781,6 @@ func (x *fastReflection_EventRingUpdated) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.RingId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -976,20 +823,13 @@ func (x *fastReflection_EventRingUpdated) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.UpdaterDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UpdaterDid))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(x.RingId) > 0 { i -= len(x.RingId) copy(dAtA[i:], x.RingId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) i-- - dAtA[i] = 0x12 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -1042,38 +882,6 @@ func (x *fastReflection_EventRingUpdated) 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 Namespace", 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.Namespace = 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 RingId", wireType) } @@ -1105,7 +913,7 @@ func (x *fastReflection_EventRingUpdated) ProtoMethods() *protoiface.Methods { } x.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpdaterDid", wireType) } @@ -1174,7 +982,6 @@ func (x *fastReflection_EventRingUpdated) ProtoMethods() *protoiface.Methods { var ( md_EventDocumentStored protoreflect.MessageDescriptor - fd_EventDocumentStored_namespace protoreflect.FieldDescriptor fd_EventDocumentStored_document_id protoreflect.FieldDescriptor fd_EventDocumentStored_creator_did protoreflect.FieldDescriptor ) @@ -1182,7 +989,6 @@ var ( func init() { file_sourcehub_orbis_events_proto_init() md_EventDocumentStored = File_sourcehub_orbis_events_proto.Messages().ByName("EventDocumentStored") - fd_EventDocumentStored_namespace = md_EventDocumentStored.Fields().ByName("namespace") fd_EventDocumentStored_document_id = md_EventDocumentStored.Fields().ByName("document_id") fd_EventDocumentStored_creator_did = md_EventDocumentStored.Fields().ByName("creator_did") } @@ -1252,12 +1058,6 @@ func (x *fastReflection_EventDocumentStored) Interface() protoreflect.ProtoMessa // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventDocumentStored) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_EventDocumentStored_namespace, value) { - return - } - } if x.DocumentId != "" { value := protoreflect.ValueOfString(x.DocumentId) if !f(fd_EventDocumentStored_document_id, value) { @@ -1285,8 +1085,6 @@ func (x *fastReflection_EventDocumentStored) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_EventDocumentStored) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "sourcehub.orbis.EventDocumentStored.namespace": - return x.Namespace != "" case "sourcehub.orbis.EventDocumentStored.document_id": return x.DocumentId != "" case "sourcehub.orbis.EventDocumentStored.creator_did": @@ -1307,8 +1105,6 @@ func (x *fastReflection_EventDocumentStored) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventDocumentStored) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "sourcehub.orbis.EventDocumentStored.namespace": - x.Namespace = "" case "sourcehub.orbis.EventDocumentStored.document_id": x.DocumentId = "" case "sourcehub.orbis.EventDocumentStored.creator_did": @@ -1329,9 +1125,6 @@ func (x *fastReflection_EventDocumentStored) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventDocumentStored) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "sourcehub.orbis.EventDocumentStored.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.EventDocumentStored.document_id": value := x.DocumentId return protoreflect.ValueOfString(value) @@ -1358,8 +1151,6 @@ func (x *fastReflection_EventDocumentStored) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventDocumentStored) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "sourcehub.orbis.EventDocumentStored.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.EventDocumentStored.document_id": x.DocumentId = value.Interface().(string) case "sourcehub.orbis.EventDocumentStored.creator_did": @@ -1384,8 +1175,6 @@ func (x *fastReflection_EventDocumentStored) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventDocumentStored) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.EventDocumentStored.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.EventDocumentStored is not mutable")) case "sourcehub.orbis.EventDocumentStored.document_id": panic(fmt.Errorf("field document_id of message sourcehub.orbis.EventDocumentStored is not mutable")) case "sourcehub.orbis.EventDocumentStored.creator_did": @@ -1403,8 +1192,6 @@ func (x *fastReflection_EventDocumentStored) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventDocumentStored) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.EventDocumentStored.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.EventDocumentStored.document_id": return protoreflect.ValueOfString("") case "sourcehub.orbis.EventDocumentStored.creator_did": @@ -1478,10 +1265,6 @@ func (x *fastReflection_EventDocumentStored) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.DocumentId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -1524,20 +1307,13 @@ func (x *fastReflection_EventDocumentStored) ProtoMethods() *protoiface.Methods copy(dAtA[i:], x.CreatorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(x.DocumentId) > 0 { i -= len(x.DocumentId) copy(dAtA[i:], x.DocumentId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DocumentId))) i-- - dAtA[i] = 0x12 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -1590,38 +1366,6 @@ func (x *fastReflection_EventDocumentStored) 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 Namespace", 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.Namespace = 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 DocumentId", wireType) } @@ -1653,7 +1397,7 @@ func (x *fastReflection_EventDocumentStored) ProtoMethods() *protoiface.Methods } x.DocumentId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } @@ -1722,7 +1466,6 @@ func (x *fastReflection_EventDocumentStored) ProtoMethods() *protoiface.Methods var ( md_EventKeyDerivationStored protoreflect.MessageDescriptor - fd_EventKeyDerivationStored_namespace protoreflect.FieldDescriptor fd_EventKeyDerivationStored_key_derivation_id protoreflect.FieldDescriptor fd_EventKeyDerivationStored_creator_did protoreflect.FieldDescriptor ) @@ -1730,7 +1473,6 @@ var ( func init() { file_sourcehub_orbis_events_proto_init() md_EventKeyDerivationStored = File_sourcehub_orbis_events_proto.Messages().ByName("EventKeyDerivationStored") - fd_EventKeyDerivationStored_namespace = md_EventKeyDerivationStored.Fields().ByName("namespace") fd_EventKeyDerivationStored_key_derivation_id = md_EventKeyDerivationStored.Fields().ByName("key_derivation_id") fd_EventKeyDerivationStored_creator_did = md_EventKeyDerivationStored.Fields().ByName("creator_did") } @@ -1800,12 +1542,6 @@ func (x *fastReflection_EventKeyDerivationStored) Interface() protoreflect.Proto // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventKeyDerivationStored) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_EventKeyDerivationStored_namespace, value) { - return - } - } if x.KeyDerivationId != "" { value := protoreflect.ValueOfString(x.KeyDerivationId) if !f(fd_EventKeyDerivationStored_key_derivation_id, value) { @@ -1833,8 +1569,6 @@ func (x *fastReflection_EventKeyDerivationStored) Range(f func(protoreflect.Fiel // a repeated field is populated if it is non-empty. func (x *fastReflection_EventKeyDerivationStored) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "sourcehub.orbis.EventKeyDerivationStored.namespace": - return x.Namespace != "" case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": return x.KeyDerivationId != "" case "sourcehub.orbis.EventKeyDerivationStored.creator_did": @@ -1855,8 +1589,6 @@ func (x *fastReflection_EventKeyDerivationStored) Has(fd protoreflect.FieldDescr // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventKeyDerivationStored) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "sourcehub.orbis.EventKeyDerivationStored.namespace": - x.Namespace = "" case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": x.KeyDerivationId = "" case "sourcehub.orbis.EventKeyDerivationStored.creator_did": @@ -1877,9 +1609,6 @@ func (x *fastReflection_EventKeyDerivationStored) Clear(fd protoreflect.FieldDes // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventKeyDerivationStored) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "sourcehub.orbis.EventKeyDerivationStored.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": value := x.KeyDerivationId return protoreflect.ValueOfString(value) @@ -1906,8 +1635,6 @@ func (x *fastReflection_EventKeyDerivationStored) Get(descriptor protoreflect.Fi // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventKeyDerivationStored) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "sourcehub.orbis.EventKeyDerivationStored.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": x.KeyDerivationId = value.Interface().(string) case "sourcehub.orbis.EventKeyDerivationStored.creator_did": @@ -1932,8 +1659,6 @@ func (x *fastReflection_EventKeyDerivationStored) Set(fd protoreflect.FieldDescr // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventKeyDerivationStored) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.EventKeyDerivationStored.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.EventKeyDerivationStored is not mutable")) case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": panic(fmt.Errorf("field key_derivation_id of message sourcehub.orbis.EventKeyDerivationStored is not mutable")) case "sourcehub.orbis.EventKeyDerivationStored.creator_did": @@ -1951,8 +1676,6 @@ func (x *fastReflection_EventKeyDerivationStored) Mutable(fd protoreflect.FieldD // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventKeyDerivationStored) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.EventKeyDerivationStored.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.EventKeyDerivationStored.key_derivation_id": return protoreflect.ValueOfString("") case "sourcehub.orbis.EventKeyDerivationStored.creator_did": @@ -2026,10 +1749,6 @@ func (x *fastReflection_EventKeyDerivationStored) ProtoMethods() *protoiface.Met var n int var l int _ = l - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.KeyDerivationId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -2072,20 +1791,13 @@ func (x *fastReflection_EventKeyDerivationStored) ProtoMethods() *protoiface.Met copy(dAtA[i:], x.CreatorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(x.KeyDerivationId) > 0 { i -= len(x.KeyDerivationId) copy(dAtA[i:], x.KeyDerivationId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyDerivationId))) i-- - dAtA[i] = 0x12 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -2138,38 +1850,6 @@ func (x *fastReflection_EventKeyDerivationStored) ProtoMethods() *protoiface.Met } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = 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 KeyDerivationId", wireType) } @@ -2201,7 +1881,7 @@ func (x *fastReflection_EventKeyDerivationStored) ProtoMethods() *protoiface.Met } x.KeyDerivationId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } @@ -3236,56 +2916,531 @@ func (x *fastReflection_EventNodeInfoUpdated) ProtoMethods() *protoiface.Methods } } -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: sourcehub/orbis/events.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) +var ( + md_EventRingDeleted protoreflect.MessageDescriptor + fd_EventRingDeleted_ring_id protoreflect.FieldDescriptor + fd_EventRingDeleted_reason protoreflect.FieldDescriptor ) -// EventRingCreated is emitted when a ring is created. -type EventRingCreated struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func init() { + file_sourcehub_orbis_events_proto_init() + md_EventRingDeleted = File_sourcehub_orbis_events_proto.Messages().ByName("EventRingDeleted") + fd_EventRingDeleted_ring_id = md_EventRingDeleted.Fields().ByName("ring_id") + fd_EventRingDeleted_reason = md_EventRingDeleted.Fields().ByName("reason") +} + +var _ protoreflect.Message = (*fastReflection_EventRingDeleted)(nil) - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` +type fastReflection_EventRingDeleted EventRingDeleted + +func (x *EventRingDeleted) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventRingDeleted)(x) } -func (x *EventRingCreated) Reset() { - *x = EventRingCreated{} - if protoimpl.UnsafeEnabled { - mi := &file_sourcehub_orbis_events_proto_msgTypes[0] +func (x *EventRingDeleted) slowProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_events_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } + return mi.MessageOf(x) } -func (x *EventRingCreated) String() string { - return protoimpl.X.MessageStringOf(x) -} +var _fastReflection_EventRingDeleted_messageType fastReflection_EventRingDeleted_messageType +var _ protoreflect.MessageType = fastReflection_EventRingDeleted_messageType{} -func (*EventRingCreated) ProtoMessage() {} +type fastReflection_EventRingDeleted_messageType struct{} -// Deprecated: Use EventRingCreated.ProtoReflect.Descriptor instead. -func (*EventRingCreated) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{0} +func (x fastReflection_EventRingDeleted_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventRingDeleted)(nil) } - -func (x *EventRingCreated) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" +func (x fastReflection_EventRingDeleted_messageType) New() protoreflect.Message { + return new(fastReflection_EventRingDeleted) +} +func (x fastReflection_EventRingDeleted_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventRingDeleted +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventRingDeleted) Descriptor() protoreflect.MessageDescriptor { + return md_EventRingDeleted +} + +// 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_EventRingDeleted) Type() protoreflect.MessageType { + return _fastReflection_EventRingDeleted_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventRingDeleted) New() protoreflect.Message { + return new(fastReflection_EventRingDeleted) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventRingDeleted) Interface() protoreflect.ProtoMessage { + return (*EventRingDeleted)(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_EventRingDeleted) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.RingId != "" { + value := protoreflect.ValueOfString(x.RingId) + if !f(fd_EventRingDeleted_ring_id, value) { + return + } + } + if x.Reason != "" { + value := protoreflect.ValueOfString(x.Reason) + if !f(fd_EventRingDeleted_reason, 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_EventRingDeleted) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "sourcehub.orbis.EventRingDeleted.ring_id": + return x.RingId != "" + case "sourcehub.orbis.EventRingDeleted.reason": + return x.Reason != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingDeleted")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingDeleted 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_EventRingDeleted) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "sourcehub.orbis.EventRingDeleted.ring_id": + x.RingId = "" + case "sourcehub.orbis.EventRingDeleted.reason": + x.Reason = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingDeleted")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingDeleted 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_EventRingDeleted) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "sourcehub.orbis.EventRingDeleted.ring_id": + value := x.RingId + return protoreflect.ValueOfString(value) + case "sourcehub.orbis.EventRingDeleted.reason": + value := x.Reason + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingDeleted")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingDeleted 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_EventRingDeleted) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "sourcehub.orbis.EventRingDeleted.ring_id": + x.RingId = value.Interface().(string) + case "sourcehub.orbis.EventRingDeleted.reason": + x.Reason = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingDeleted")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingDeleted 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_EventRingDeleted) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventRingDeleted.ring_id": + panic(fmt.Errorf("field ring_id of message sourcehub.orbis.EventRingDeleted is not mutable")) + case "sourcehub.orbis.EventRingDeleted.reason": + panic(fmt.Errorf("field reason of message sourcehub.orbis.EventRingDeleted is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingDeleted")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingDeleted 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_EventRingDeleted) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "sourcehub.orbis.EventRingDeleted.ring_id": + return protoreflect.ValueOfString("") + case "sourcehub.orbis.EventRingDeleted.reason": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.EventRingDeleted")) + } + panic(fmt.Errorf("message sourcehub.orbis.EventRingDeleted 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_EventRingDeleted) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in sourcehub.orbis.EventRingDeleted", 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_EventRingDeleted) 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_EventRingDeleted) 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_EventRingDeleted) 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_EventRingDeleted) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventRingDeleted) + 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.RingId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Reason) + 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().(*EventRingDeleted) + 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.Reason) > 0 { + i -= len(x.Reason) + copy(dAtA[i:], x.Reason) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reason))) + i-- + dAtA[i] = 0x12 + } + if len(x.RingId) > 0 { + i -= len(x.RingId) + copy(dAtA[i:], x.RingId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) + 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().(*EventRingDeleted) + 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: EventRingDeleted: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventRingDeleted: 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 RingId", 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.RingId = 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 Reason", 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.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: sourcehub/orbis/events.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) +) + +// EventRingCreated is emitted when a ring is created. +type EventRingCreated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` +} + +func (x *EventRingCreated) Reset() { + *x = EventRingCreated{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventRingCreated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventRingCreated) ProtoMessage() {} + +// Deprecated: Use EventRingCreated.ProtoReflect.Descriptor instead. +func (*EventRingCreated) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{0} } func (x *EventRingCreated) GetRingId() string { @@ -3302,22 +3457,14 @@ func (x *EventRingCreated) GetCreatorDid() string { return "" } -func (x *EventRingCreated) GetArtifact() string { - if x != nil { - return x.Artifact - } - return "" -} - // EventRingUpdated is emitted when a ring is updated in place. type EventRingUpdated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - UpdaterDid string `protobuf:"bytes,3,opt,name=updater_did,json=updaterDid,proto3" json:"updater_did,omitempty"` + RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + UpdaterDid string `protobuf:"bytes,2,opt,name=updater_did,json=updaterDid,proto3" json:"updater_did,omitempty"` } func (x *EventRingUpdated) Reset() { @@ -3340,13 +3487,6 @@ func (*EventRingUpdated) Descriptor() ([]byte, []int) { return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{1} } -func (x *EventRingUpdated) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *EventRingUpdated) GetRingId() string { if x != nil { return x.RingId @@ -3367,9 +3507,8 @@ type EventDocumentStored struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` } func (x *EventDocumentStored) Reset() { @@ -3392,13 +3531,6 @@ func (*EventDocumentStored) Descriptor() ([]byte, []int) { return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{2} } -func (x *EventDocumentStored) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *EventDocumentStored) GetDocumentId() string { if x != nil { return x.DocumentId @@ -3419,9 +3551,8 @@ type EventKeyDerivationStored struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - KeyDerivationId string `protobuf:"bytes,2,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + KeyDerivationId string `protobuf:"bytes,1,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` } func (x *EventKeyDerivationStored) Reset() { @@ -3444,13 +3575,6 @@ func (*EventKeyDerivationStored) Descriptor() ([]byte, []int) { return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{3} } -func (x *EventKeyDerivationStored) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *EventKeyDerivationStored) GetKeyDerivationId() string { if x != nil { return x.KeyDerivationId @@ -3553,65 +3677,104 @@ func (x *EventNodeInfoUpdated) GetControllerKey() string { return "" } +// EventRingDeleted is emitted when a ring is removed from state. +type EventRingDeleted struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (x *EventRingDeleted) Reset() { + *x = EventRingDeleted{} + if protoimpl.UnsafeEnabled { + mi := &file_sourcehub_orbis_events_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventRingDeleted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventRingDeleted) ProtoMessage() {} + +// Deprecated: Use EventRingDeleted.ProtoReflect.Descriptor instead. +func (*EventRingDeleted) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_events_proto_rawDescGZIP(), []int{6} +} + +func (x *EventRingDeleted) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *EventRingDeleted) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + var File_sourcehub_orbis_events_proto protoreflect.FileDescriptor var file_sourcehub_orbis_events_proto_rawDesc = []byte{ 0x0a, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x22, - 0x86, 0x01, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x69, 0x6e, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x22, 0x6a, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, - 0x67, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x64, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x72, 0x44, 0x69, 0x64, 0x22, 0x75, 0x0a, 0x13, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x18, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x44, 0x69, 0x64, 0x22, 0x56, 0x0a, 0x14, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, - 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x56, 0x0a, 0x14, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x42, 0xa1, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0b, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, - 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, - 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4c, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x69, 0x6e, 0x67, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x22, 0x4c, 0x0a, + 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x44, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x13, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x44, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, + 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, + 0x12, 0x2a, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6b, 0x65, 0x79, + 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x22, 0x56, 0x0a, + 0x14, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, + 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x56, 0x0a, 0x14, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x43, 0x0a, + 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x42, 0xa1, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, + 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, + 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, + 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, + 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3626,7 +3789,7 @@ func file_sourcehub_orbis_events_proto_rawDescGZIP() []byte { return file_sourcehub_orbis_events_proto_rawDescData } -var file_sourcehub_orbis_events_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_sourcehub_orbis_events_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_sourcehub_orbis_events_proto_goTypes = []interface{}{ (*EventRingCreated)(nil), // 0: sourcehub.orbis.EventRingCreated (*EventRingUpdated)(nil), // 1: sourcehub.orbis.EventRingUpdated @@ -3634,6 +3797,7 @@ var file_sourcehub_orbis_events_proto_goTypes = []interface{}{ (*EventKeyDerivationStored)(nil), // 3: sourcehub.orbis.EventKeyDerivationStored (*EventNodeInfoCreated)(nil), // 4: sourcehub.orbis.EventNodeInfoCreated (*EventNodeInfoUpdated)(nil), // 5: sourcehub.orbis.EventNodeInfoUpdated + (*EventRingDeleted)(nil), // 6: sourcehub.orbis.EventRingDeleted } var file_sourcehub_orbis_events_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -3721,6 +3885,18 @@ func file_sourcehub_orbis_events_proto_init() { return nil } } + file_sourcehub_orbis_events_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventRingDeleted); 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{ @@ -3728,7 +3904,7 @@ func file_sourcehub_orbis_events_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_orbis_events_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/api/sourcehub/orbis/key_derivation.pulsar.go b/api/sourcehub/orbis/key_derivation.pulsar.go index 83d50f45..3b1176d4 100644 --- a/api/sourcehub/orbis/key_derivation.pulsar.go +++ b/api/sourcehub/orbis/key_derivation.pulsar.go @@ -15,7 +15,6 @@ import ( var ( md_KeyDerivation protoreflect.MessageDescriptor fd_KeyDerivation_id protoreflect.FieldDescriptor - fd_KeyDerivation_namespace protoreflect.FieldDescriptor fd_KeyDerivation_creator_did protoreflect.FieldDescriptor fd_KeyDerivation_ring_id protoreflect.FieldDescriptor fd_KeyDerivation_derivation protoreflect.FieldDescriptor @@ -28,7 +27,6 @@ func init() { file_sourcehub_orbis_key_derivation_proto_init() md_KeyDerivation = File_sourcehub_orbis_key_derivation_proto.Messages().ByName("KeyDerivation") fd_KeyDerivation_id = md_KeyDerivation.Fields().ByName("id") - fd_KeyDerivation_namespace = md_KeyDerivation.Fields().ByName("namespace") fd_KeyDerivation_creator_did = md_KeyDerivation.Fields().ByName("creator_did") fd_KeyDerivation_ring_id = md_KeyDerivation.Fields().ByName("ring_id") fd_KeyDerivation_derivation = md_KeyDerivation.Fields().ByName("derivation") @@ -108,12 +106,6 @@ func (x *fastReflection_KeyDerivation) Range(f func(protoreflect.FieldDescriptor return } } - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_KeyDerivation_namespace, value) { - return - } - } if x.CreatorDid != "" { value := protoreflect.ValueOfString(x.CreatorDid) if !f(fd_KeyDerivation_creator_did, value) { @@ -167,8 +159,6 @@ func (x *fastReflection_KeyDerivation) Has(fd protoreflect.FieldDescriptor) bool switch fd.FullName() { case "sourcehub.orbis.KeyDerivation.id": return x.Id != "" - case "sourcehub.orbis.KeyDerivation.namespace": - return x.Namespace != "" case "sourcehub.orbis.KeyDerivation.creator_did": return x.CreatorDid != "" case "sourcehub.orbis.KeyDerivation.ring_id": @@ -199,8 +189,6 @@ func (x *fastReflection_KeyDerivation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.orbis.KeyDerivation.id": x.Id = "" - case "sourcehub.orbis.KeyDerivation.namespace": - x.Namespace = "" case "sourcehub.orbis.KeyDerivation.creator_did": x.CreatorDid = "" case "sourcehub.orbis.KeyDerivation.ring_id": @@ -232,9 +220,6 @@ func (x *fastReflection_KeyDerivation) Get(descriptor protoreflect.FieldDescript case "sourcehub.orbis.KeyDerivation.id": value := x.Id return protoreflect.ValueOfString(value) - case "sourcehub.orbis.KeyDerivation.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.KeyDerivation.creator_did": value := x.CreatorDid return protoreflect.ValueOfString(value) @@ -275,8 +260,6 @@ func (x *fastReflection_KeyDerivation) Set(fd protoreflect.FieldDescriptor, valu switch fd.FullName() { case "sourcehub.orbis.KeyDerivation.id": x.Id = value.Interface().(string) - case "sourcehub.orbis.KeyDerivation.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.KeyDerivation.creator_did": x.CreatorDid = value.Interface().(string) case "sourcehub.orbis.KeyDerivation.ring_id": @@ -311,8 +294,6 @@ func (x *fastReflection_KeyDerivation) Mutable(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "sourcehub.orbis.KeyDerivation.id": panic(fmt.Errorf("field id of message sourcehub.orbis.KeyDerivation is not mutable")) - case "sourcehub.orbis.KeyDerivation.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.KeyDerivation is not mutable")) case "sourcehub.orbis.KeyDerivation.creator_did": panic(fmt.Errorf("field creator_did of message sourcehub.orbis.KeyDerivation is not mutable")) case "sourcehub.orbis.KeyDerivation.ring_id": @@ -340,8 +321,6 @@ func (x *fastReflection_KeyDerivation) NewField(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "sourcehub.orbis.KeyDerivation.id": return protoreflect.ValueOfString("") - case "sourcehub.orbis.KeyDerivation.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.KeyDerivation.creator_did": return protoreflect.ValueOfString("") case "sourcehub.orbis.KeyDerivation.ring_id": @@ -427,10 +406,6 @@ func (x *fastReflection_KeyDerivation) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.CreatorDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -489,48 +464,41 @@ func (x *fastReflection_KeyDerivation) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.Permission) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permission))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } if len(x.Resource) > 0 { i -= len(x.Resource) copy(dAtA[i:], x.Resource) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resource))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(x.Derivation) > 0 { i -= len(x.Derivation) copy(dAtA[i:], x.Derivation) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Derivation))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(x.RingId) > 0 { i -= len(x.RingId) copy(dAtA[i:], x.RingId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RingId))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(x.CreatorDid) > 0 { i -= len(x.CreatorDid) copy(dAtA[i:], x.CreatorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) i-- - dAtA[i] = 0x1a - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0x12 } if len(x.Id) > 0 { @@ -622,38 +590,6 @@ func (x *fastReflection_KeyDerivation) ProtoMethods() *protoiface.Methods { 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 Namespace", 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.Namespace = 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 CreatorDid", wireType) } @@ -685,7 +621,7 @@ func (x *fastReflection_KeyDerivation) ProtoMethods() *protoiface.Methods { } x.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) } @@ -717,7 +653,7 @@ func (x *fastReflection_KeyDerivation) ProtoMethods() *protoiface.Methods { } x.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Derivation", wireType) } @@ -749,7 +685,7 @@ func (x *fastReflection_KeyDerivation) ProtoMethods() *protoiface.Methods { } x.Derivation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -781,7 +717,7 @@ func (x *fastReflection_KeyDerivation) ProtoMethods() *protoiface.Methods { } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) } @@ -813,7 +749,7 @@ func (x *fastReflection_KeyDerivation) ProtoMethods() *protoiface.Methods { } x.Resource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) } @@ -900,13 +836,12 @@ type KeyDerivation struct { unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Derivation string `protobuf:"bytes,5,opt,name=derivation,proto3" json:"derivation,omitempty"` - PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Derivation string `protobuf:"bytes,4,opt,name=derivation,proto3" json:"derivation,omitempty"` + PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` } func (x *KeyDerivation) Reset() { @@ -936,13 +871,6 @@ func (x *KeyDerivation) GetId() string { return "" } -func (x *KeyDerivation) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *KeyDerivation) GetCreatorDid() string { if x != nil { return x.CreatorDid @@ -991,33 +919,31 @@ var file_sourcehub_orbis_key_derivation_proto_rawDesc = []byte{ 0x0a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x22, 0xf0, 0x01, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x44, + 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, 0x67, 0x49, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xa8, 0x01, 0x0a, 0x13, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, - 0x69, 0x73, 0x42, 0x12, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, - 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, - 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, - 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, - 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x69, 0x6e, + 0x67, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xa8, 0x01, 0x0a, + 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x42, 0x12, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, + 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, + 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/sourcehub/orbis/node_info.pulsar.go b/api/sourcehub/orbis/node_info.pulsar.go index a1c2eca7..50e9b261 100644 --- a/api/sourcehub/orbis/node_info.pulsar.go +++ b/api/sourcehub/orbis/node_info.pulsar.go @@ -42,7 +42,7 @@ func (x *_NodeInfo_3_list) Append(value protoreflect.Value) { } func (x *_NodeInfo_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message NodeInfo at list field WhitelistedNamespaces as it is not of Message kind")) + panic(fmt.Errorf("AppendMutable can not be called on message NodeInfo at list field WhitelistedPolicyIds as it is not of Message kind")) } func (x *_NodeInfo_3_list) Truncate(n int) { @@ -108,7 +108,7 @@ var ( md_NodeInfo protoreflect.MessageDescriptor fd_NodeInfo_peer_id protoreflect.FieldDescriptor fd_NodeInfo_controller_key protoreflect.FieldDescriptor - fd_NodeInfo_whitelisted_namespaces protoreflect.FieldDescriptor + fd_NodeInfo_whitelisted_policy_ids protoreflect.FieldDescriptor fd_NodeInfo_whitelisted_ring_ids protoreflect.FieldDescriptor ) @@ -117,7 +117,7 @@ func init() { md_NodeInfo = File_sourcehub_orbis_node_info_proto.Messages().ByName("NodeInfo") fd_NodeInfo_peer_id = md_NodeInfo.Fields().ByName("peer_id") fd_NodeInfo_controller_key = md_NodeInfo.Fields().ByName("controller_key") - fd_NodeInfo_whitelisted_namespaces = md_NodeInfo.Fields().ByName("whitelisted_namespaces") + fd_NodeInfo_whitelisted_policy_ids = md_NodeInfo.Fields().ByName("whitelisted_policy_ids") fd_NodeInfo_whitelisted_ring_ids = md_NodeInfo.Fields().ByName("whitelisted_ring_ids") } @@ -198,9 +198,9 @@ func (x *fastReflection_NodeInfo) Range(f func(protoreflect.FieldDescriptor, pro return } } - if len(x.WhitelistedNamespaces) != 0 { - value := protoreflect.ValueOfList(&_NodeInfo_3_list{list: &x.WhitelistedNamespaces}) - if !f(fd_NodeInfo_whitelisted_namespaces, value) { + if len(x.WhitelistedPolicyIds) != 0 { + value := protoreflect.ValueOfList(&_NodeInfo_3_list{list: &x.WhitelistedPolicyIds}) + if !f(fd_NodeInfo_whitelisted_policy_ids, value) { return } } @@ -229,8 +229,8 @@ func (x *fastReflection_NodeInfo) Has(fd protoreflect.FieldDescriptor) bool { return x.PeerId != "" case "sourcehub.orbis.NodeInfo.controller_key": return x.ControllerKey != "" - case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": - return len(x.WhitelistedNamespaces) != 0 + case "sourcehub.orbis.NodeInfo.whitelisted_policy_ids": + return len(x.WhitelistedPolicyIds) != 0 case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": return len(x.WhitelistedRingIds) != 0 default: @@ -253,8 +253,8 @@ func (x *fastReflection_NodeInfo) Clear(fd protoreflect.FieldDescriptor) { x.PeerId = "" case "sourcehub.orbis.NodeInfo.controller_key": x.ControllerKey = "" - case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": - x.WhitelistedNamespaces = nil + case "sourcehub.orbis.NodeInfo.whitelisted_policy_ids": + x.WhitelistedPolicyIds = nil case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": x.WhitelistedRingIds = nil default: @@ -279,11 +279,11 @@ func (x *fastReflection_NodeInfo) Get(descriptor protoreflect.FieldDescriptor) p case "sourcehub.orbis.NodeInfo.controller_key": value := x.ControllerKey return protoreflect.ValueOfString(value) - case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": - if len(x.WhitelistedNamespaces) == 0 { + case "sourcehub.orbis.NodeInfo.whitelisted_policy_ids": + if len(x.WhitelistedPolicyIds) == 0 { return protoreflect.ValueOfList(&_NodeInfo_3_list{}) } - listValue := &_NodeInfo_3_list{list: &x.WhitelistedNamespaces} + listValue := &_NodeInfo_3_list{list: &x.WhitelistedPolicyIds} return protoreflect.ValueOfList(listValue) case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": if len(x.WhitelistedRingIds) == 0 { @@ -315,10 +315,10 @@ func (x *fastReflection_NodeInfo) Set(fd protoreflect.FieldDescriptor, value pro x.PeerId = value.Interface().(string) case "sourcehub.orbis.NodeInfo.controller_key": x.ControllerKey = value.Interface().(string) - case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": + case "sourcehub.orbis.NodeInfo.whitelisted_policy_ids": lv := value.List() clv := lv.(*_NodeInfo_3_list) - x.WhitelistedNamespaces = *clv.list + x.WhitelistedPolicyIds = *clv.list case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": lv := value.List() clv := lv.(*_NodeInfo_4_list) @@ -343,11 +343,11 @@ func (x *fastReflection_NodeInfo) Set(fd protoreflect.FieldDescriptor, value pro // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_NodeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": - if x.WhitelistedNamespaces == nil { - x.WhitelistedNamespaces = []string{} + case "sourcehub.orbis.NodeInfo.whitelisted_policy_ids": + if x.WhitelistedPolicyIds == nil { + x.WhitelistedPolicyIds = []string{} } - value := &_NodeInfo_3_list{list: &x.WhitelistedNamespaces} + value := &_NodeInfo_3_list{list: &x.WhitelistedPolicyIds} return protoreflect.ValueOfList(value) case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": if x.WhitelistedRingIds == nil { @@ -376,7 +376,7 @@ func (x *fastReflection_NodeInfo) NewField(fd protoreflect.FieldDescriptor) prot return protoreflect.ValueOfString("") case "sourcehub.orbis.NodeInfo.controller_key": return protoreflect.ValueOfString("") - case "sourcehub.orbis.NodeInfo.whitelisted_namespaces": + case "sourcehub.orbis.NodeInfo.whitelisted_policy_ids": list := []string{} return protoreflect.ValueOfList(&_NodeInfo_3_list{list: &list}) case "sourcehub.orbis.NodeInfo.whitelisted_ring_ids": @@ -459,8 +459,8 @@ func (x *fastReflection_NodeInfo) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.WhitelistedNamespaces) > 0 { - for _, s := range x.WhitelistedNamespaces { + if len(x.WhitelistedPolicyIds) > 0 { + for _, s := range x.WhitelistedPolicyIds { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } @@ -509,11 +509,11 @@ func (x *fastReflection_NodeInfo) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x22 } } - if len(x.WhitelistedNamespaces) > 0 { - for iNdEx := len(x.WhitelistedNamespaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.WhitelistedNamespaces[iNdEx]) - copy(dAtA[i:], x.WhitelistedNamespaces[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WhitelistedNamespaces[iNdEx]))) + if len(x.WhitelistedPolicyIds) > 0 { + for iNdEx := len(x.WhitelistedPolicyIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.WhitelistedPolicyIds[iNdEx]) + copy(dAtA[i:], x.WhitelistedPolicyIds[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WhitelistedPolicyIds[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -647,7 +647,7 @@ func (x *fastReflection_NodeInfo) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WhitelistedNamespaces", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WhitelistedPolicyIds", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -675,7 +675,7 @@ func (x *fastReflection_NodeInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.WhitelistedNamespaces = append(x.WhitelistedNamespaces, string(dAtA[iNdEx:postIndex])) + x.WhitelistedPolicyIds = append(x.WhitelistedPolicyIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: if wireType != 2 { @@ -1262,10 +1262,10 @@ type NodeInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` - ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` - WhitelistedNamespaces []string `protobuf:"bytes,3,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` - WhitelistedRingIds []string `protobuf:"bytes,4,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` + WhitelistedPolicyIds []string `protobuf:"bytes,3,rep,name=whitelisted_policy_ids,json=whitelistedPolicyIds,proto3" json:"whitelisted_policy_ids,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,4,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` } func (x *NodeInfo) Reset() { @@ -1302,9 +1302,9 @@ func (x *NodeInfo) GetControllerKey() string { return "" } -func (x *NodeInfo) GetWhitelistedNamespaces() []string { +func (x *NodeInfo) GetWhitelistedPolicyIds() []string { if x != nil { - return x.WhitelistedNamespaces + return x.WhitelistedPolicyIds } return nil } @@ -1366,35 +1366,35 @@ var file_sourcehub_orbis_node_info_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, - 0x69, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x69, 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, - 0x35, 0x0a, 0x16, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x15, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x64, 0x52, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x73, 0x22, 0x62, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, - 0x65, 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0xa3, 0x01, 0x0a, - 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x42, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, - 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, - 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, - 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, - 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x34, 0x0a, 0x16, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x52, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x73, 0x22, 0x62, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, + 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0xa3, 0x01, 0x0a, 0x13, + 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, + 0x62, 0x69, 0x73, 0x42, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, + 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, + 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, + 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, + 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/sourcehub/orbis/query.pulsar.go b/api/sourcehub/orbis/query.pulsar.go index 3e0acd7f..afe32edc 100644 --- a/api/sourcehub/orbis/query.pulsar.go +++ b/api/sourcehub/orbis/query.pulsar.go @@ -1664,14 +1664,12 @@ func (x *fastReflection_QueryRingResponse) ProtoMethods() *protoiface.Methods { var ( md_QueryRingsRequest protoreflect.MessageDescriptor - fd_QueryRingsRequest_namespace protoreflect.FieldDescriptor fd_QueryRingsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_orbis_query_proto_init() md_QueryRingsRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryRingsRequest") - fd_QueryRingsRequest_namespace = md_QueryRingsRequest.Fields().ByName("namespace") fd_QueryRingsRequest_pagination = md_QueryRingsRequest.Fields().ByName("pagination") } @@ -1740,12 +1738,6 @@ func (x *fastReflection_QueryRingsRequest) Interface() protoreflect.ProtoMessage // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryRingsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_QueryRingsRequest_namespace, value) { - return - } - } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryRingsRequest_pagination, value) { @@ -1767,8 +1759,6 @@ func (x *fastReflection_QueryRingsRequest) Range(f func(protoreflect.FieldDescri // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryRingsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "sourcehub.orbis.QueryRingsRequest.namespace": - return x.Namespace != "" case "sourcehub.orbis.QueryRingsRequest.pagination": return x.Pagination != nil default: @@ -1787,8 +1777,6 @@ func (x *fastReflection_QueryRingsRequest) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRingsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "sourcehub.orbis.QueryRingsRequest.namespace": - x.Namespace = "" case "sourcehub.orbis.QueryRingsRequest.pagination": x.Pagination = nil default: @@ -1807,9 +1795,6 @@ func (x *fastReflection_QueryRingsRequest) Clear(fd protoreflect.FieldDescriptor // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryRingsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "sourcehub.orbis.QueryRingsRequest.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.QueryRingsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -1833,8 +1818,6 @@ func (x *fastReflection_QueryRingsRequest) Get(descriptor protoreflect.FieldDesc // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRingsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "sourcehub.orbis.QueryRingsRequest.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.QueryRingsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: @@ -1862,8 +1845,6 @@ func (x *fastReflection_QueryRingsRequest) Mutable(fd protoreflect.FieldDescript x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "sourcehub.orbis.QueryRingsRequest.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryRingsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryRingsRequest")) @@ -1877,8 +1858,6 @@ func (x *fastReflection_QueryRingsRequest) Mutable(fd protoreflect.FieldDescript // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryRingsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.QueryRingsRequest.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.QueryRingsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -1951,10 +1930,6 @@ func (x *fastReflection_QueryRingsRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) @@ -2000,13 +1975,6 @@ func (x *fastReflection_QueryRingsRequest) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x12 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -2059,38 +2027,6 @@ func (x *fastReflection_QueryRingsRequest) 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 Namespace", 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.Namespace = 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 Pagination", wireType) } @@ -2735,15 +2671,13 @@ func (x *fastReflection_QueryRingsResponse) ProtoMethods() *protoiface.Methods { } var ( - md_QueryDocumentRequest protoreflect.MessageDescriptor - fd_QueryDocumentRequest_namespace protoreflect.FieldDescriptor - fd_QueryDocumentRequest_id protoreflect.FieldDescriptor + md_QueryDocumentRequest protoreflect.MessageDescriptor + fd_QueryDocumentRequest_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_orbis_query_proto_init() md_QueryDocumentRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryDocumentRequest") - fd_QueryDocumentRequest_namespace = md_QueryDocumentRequest.Fields().ByName("namespace") fd_QueryDocumentRequest_id = md_QueryDocumentRequest.Fields().ByName("id") } @@ -2812,12 +2746,6 @@ func (x *fastReflection_QueryDocumentRequest) Interface() protoreflect.ProtoMess // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryDocumentRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_QueryDocumentRequest_namespace, value) { - return - } - } if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_QueryDocumentRequest_id, value) { @@ -2839,8 +2767,6 @@ func (x *fastReflection_QueryDocumentRequest) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDocumentRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "sourcehub.orbis.QueryDocumentRequest.namespace": - return x.Namespace != "" case "sourcehub.orbis.QueryDocumentRequest.id": return x.Id != "" default: @@ -2859,8 +2785,6 @@ func (x *fastReflection_QueryDocumentRequest) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDocumentRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "sourcehub.orbis.QueryDocumentRequest.namespace": - x.Namespace = "" case "sourcehub.orbis.QueryDocumentRequest.id": x.Id = "" default: @@ -2879,9 +2803,6 @@ func (x *fastReflection_QueryDocumentRequest) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDocumentRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "sourcehub.orbis.QueryDocumentRequest.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.QueryDocumentRequest.id": value := x.Id return protoreflect.ValueOfString(value) @@ -2905,8 +2826,6 @@ func (x *fastReflection_QueryDocumentRequest) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDocumentRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "sourcehub.orbis.QueryDocumentRequest.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.QueryDocumentRequest.id": x.Id = value.Interface().(string) default: @@ -2929,8 +2848,6 @@ func (x *fastReflection_QueryDocumentRequest) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDocumentRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.QueryDocumentRequest.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryDocumentRequest is not mutable")) case "sourcehub.orbis.QueryDocumentRequest.id": panic(fmt.Errorf("field id of message sourcehub.orbis.QueryDocumentRequest is not mutable")) default: @@ -2946,8 +2863,6 @@ func (x *fastReflection_QueryDocumentRequest) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDocumentRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.QueryDocumentRequest.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.QueryDocumentRequest.id": return protoreflect.ValueOfString("") default: @@ -3019,10 +2934,6 @@ func (x *fastReflection_QueryDocumentRequest) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -3061,13 +2972,6 @@ func (x *fastReflection_QueryDocumentRequest) ProtoMethods() *protoiface.Methods copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- - dAtA[i] = 0x12 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -3120,38 +3024,6 @@ func (x *fastReflection_QueryDocumentRequest) 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 Namespace", 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.Namespace = 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 Id", wireType) } @@ -3655,14 +3527,12 @@ func (x *fastReflection_QueryDocumentResponse) ProtoMethods() *protoiface.Method var ( md_QueryDocumentsRequest protoreflect.MessageDescriptor - fd_QueryDocumentsRequest_namespace protoreflect.FieldDescriptor fd_QueryDocumentsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_orbis_query_proto_init() md_QueryDocumentsRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryDocumentsRequest") - fd_QueryDocumentsRequest_namespace = md_QueryDocumentsRequest.Fields().ByName("namespace") fd_QueryDocumentsRequest_pagination = md_QueryDocumentsRequest.Fields().ByName("pagination") } @@ -3731,12 +3601,6 @@ func (x *fastReflection_QueryDocumentsRequest) Interface() protoreflect.ProtoMes // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryDocumentsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_QueryDocumentsRequest_namespace, value) { - return - } - } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryDocumentsRequest_pagination, value) { @@ -3758,8 +3622,6 @@ func (x *fastReflection_QueryDocumentsRequest) Range(f func(protoreflect.FieldDe // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDocumentsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "sourcehub.orbis.QueryDocumentsRequest.namespace": - return x.Namespace != "" case "sourcehub.orbis.QueryDocumentsRequest.pagination": return x.Pagination != nil default: @@ -3778,8 +3640,6 @@ func (x *fastReflection_QueryDocumentsRequest) Has(fd protoreflect.FieldDescript // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDocumentsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "sourcehub.orbis.QueryDocumentsRequest.namespace": - x.Namespace = "" case "sourcehub.orbis.QueryDocumentsRequest.pagination": x.Pagination = nil default: @@ -3798,9 +3658,6 @@ func (x *fastReflection_QueryDocumentsRequest) Clear(fd protoreflect.FieldDescri // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDocumentsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "sourcehub.orbis.QueryDocumentsRequest.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.QueryDocumentsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -3824,8 +3681,6 @@ func (x *fastReflection_QueryDocumentsRequest) Get(descriptor protoreflect.Field // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDocumentsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "sourcehub.orbis.QueryDocumentsRequest.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.QueryDocumentsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: @@ -3853,8 +3708,6 @@ func (x *fastReflection_QueryDocumentsRequest) Mutable(fd protoreflect.FieldDesc x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "sourcehub.orbis.QueryDocumentsRequest.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryDocumentsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryDocumentsRequest")) @@ -3868,8 +3721,6 @@ func (x *fastReflection_QueryDocumentsRequest) Mutable(fd protoreflect.FieldDesc // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDocumentsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.QueryDocumentsRequest.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.QueryDocumentsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -3942,10 +3793,6 @@ func (x *fastReflection_QueryDocumentsRequest) ProtoMethods() *protoiface.Method var n int var l int _ = l - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) @@ -3991,13 +3838,6 @@ func (x *fastReflection_QueryDocumentsRequest) ProtoMethods() *protoiface.Method copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x12 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -4050,38 +3890,6 @@ func (x *fastReflection_QueryDocumentsRequest) ProtoMethods() *protoiface.Method } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = 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 Pagination", wireType) } @@ -4726,15 +4534,13 @@ func (x *fastReflection_QueryDocumentsResponse) ProtoMethods() *protoiface.Metho } var ( - md_QueryKeyDerivationRequest protoreflect.MessageDescriptor - fd_QueryKeyDerivationRequest_namespace protoreflect.FieldDescriptor - fd_QueryKeyDerivationRequest_id protoreflect.FieldDescriptor + md_QueryKeyDerivationRequest protoreflect.MessageDescriptor + fd_QueryKeyDerivationRequest_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_orbis_query_proto_init() md_QueryKeyDerivationRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryKeyDerivationRequest") - fd_QueryKeyDerivationRequest_namespace = md_QueryKeyDerivationRequest.Fields().ByName("namespace") fd_QueryKeyDerivationRequest_id = md_QueryKeyDerivationRequest.Fields().ByName("id") } @@ -4803,12 +4609,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) Interface() protoreflect.Prot // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryKeyDerivationRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_QueryKeyDerivationRequest_namespace, value) { - return - } - } if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_QueryKeyDerivationRequest_id, value) { @@ -4830,8 +4630,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) Range(f func(protoreflect.Fie // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryKeyDerivationRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": - return x.Namespace != "" case "sourcehub.orbis.QueryKeyDerivationRequest.id": return x.Id != "" default: @@ -4850,8 +4648,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) Has(fd protoreflect.FieldDesc // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryKeyDerivationRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": - x.Namespace = "" case "sourcehub.orbis.QueryKeyDerivationRequest.id": x.Id = "" default: @@ -4870,9 +4666,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) Clear(fd protoreflect.FieldDe // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryKeyDerivationRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.QueryKeyDerivationRequest.id": value := x.Id return protoreflect.ValueOfString(value) @@ -4896,8 +4689,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) Get(descriptor protoreflect.F // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryKeyDerivationRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.QueryKeyDerivationRequest.id": x.Id = value.Interface().(string) default: @@ -4920,8 +4711,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) Set(fd protoreflect.FieldDesc // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryKeyDerivationRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryKeyDerivationRequest is not mutable")) case "sourcehub.orbis.QueryKeyDerivationRequest.id": panic(fmt.Errorf("field id of message sourcehub.orbis.QueryKeyDerivationRequest is not mutable")) default: @@ -4937,8 +4726,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) Mutable(fd protoreflect.Field // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryKeyDerivationRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.QueryKeyDerivationRequest.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.QueryKeyDerivationRequest.id": return protoreflect.ValueOfString("") default: @@ -5010,10 +4797,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) ProtoMethods() *protoiface.Me var n int var l int _ = l - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -5052,13 +4835,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) ProtoMethods() *protoiface.Me copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- - dAtA[i] = 0x12 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -5111,38 +4887,6 @@ func (x *fastReflection_QueryKeyDerivationRequest) ProtoMethods() *protoiface.Me } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = 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 Id", wireType) } @@ -5646,14 +5390,12 @@ func (x *fastReflection_QueryKeyDerivationResponse) ProtoMethods() *protoiface.M var ( md_QueryKeyDerivationsRequest protoreflect.MessageDescriptor - fd_QueryKeyDerivationsRequest_namespace protoreflect.FieldDescriptor fd_QueryKeyDerivationsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_orbis_query_proto_init() md_QueryKeyDerivationsRequest = File_sourcehub_orbis_query_proto.Messages().ByName("QueryKeyDerivationsRequest") - fd_QueryKeyDerivationsRequest_namespace = md_QueryKeyDerivationsRequest.Fields().ByName("namespace") fd_QueryKeyDerivationsRequest_pagination = md_QueryKeyDerivationsRequest.Fields().ByName("pagination") } @@ -5722,12 +5464,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) Interface() protoreflect.Pro // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryKeyDerivationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != "" { - value := protoreflect.ValueOfString(x.Namespace) - if !f(fd_QueryKeyDerivationsRequest_namespace, value) { - return - } - } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryKeyDerivationsRequest_pagination, value) { @@ -5749,8 +5485,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) Range(f func(protoreflect.Fi // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryKeyDerivationsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": - return x.Namespace != "" case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": return x.Pagination != nil default: @@ -5769,8 +5503,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) Has(fd protoreflect.FieldDes // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryKeyDerivationsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": - x.Namespace = "" case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": x.Pagination = nil default: @@ -5789,9 +5521,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) Clear(fd protoreflect.FieldD // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryKeyDerivationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": - value := x.Namespace - return protoreflect.ValueOfString(value) case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -5815,8 +5544,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) Get(descriptor protoreflect. // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryKeyDerivationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": - x.Namespace = value.Interface().(string) case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: @@ -5844,8 +5571,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) Mutable(fd protoreflect.Fiel x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": - panic(fmt.Errorf("field namespace of message sourcehub.orbis.QueryKeyDerivationsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.orbis.QueryKeyDerivationsRequest")) @@ -5859,8 +5584,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) Mutable(fd protoreflect.Fiel // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryKeyDerivationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "sourcehub.orbis.QueryKeyDerivationsRequest.namespace": - return protoreflect.ValueOfString("") case "sourcehub.orbis.QueryKeyDerivationsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -5933,10 +5656,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) ProtoMethods() *protoiface.M var n int var l int _ = l - l = len(x.Namespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) @@ -5982,13 +5701,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) ProtoMethods() *protoiface.M copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x12 - } - if len(x.Namespace) > 0 { - i -= len(x.Namespace) - copy(dAtA[i:], x.Namespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) - i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -6041,38 +5753,6 @@ func (x *fastReflection_QueryKeyDerivationsRequest) ProtoMethods() *protoiface.M } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = 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 Pagination", wireType) } @@ -7722,8 +7402,7 @@ type QueryRingsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryRingsRequest) Reset() { @@ -7746,13 +7425,6 @@ func (*QueryRingsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{4} } -func (x *QueryRingsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *QueryRingsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination @@ -7808,8 +7480,7 @@ type QueryDocumentRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *QueryDocumentRequest) Reset() { @@ -7832,13 +7503,6 @@ func (*QueryDocumentRequest) Descriptor() ([]byte, []int) { return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{6} } -func (x *QueryDocumentRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *QueryDocumentRequest) GetId() string { if x != nil { return x.Id @@ -7886,8 +7550,7 @@ type QueryDocumentsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryDocumentsRequest) Reset() { @@ -7910,13 +7573,6 @@ func (*QueryDocumentsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{8} } -func (x *QueryDocumentsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *QueryDocumentsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination @@ -7972,8 +7628,7 @@ type QueryKeyDerivationRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *QueryKeyDerivationRequest) Reset() { @@ -7996,13 +7651,6 @@ func (*QueryKeyDerivationRequest) Descriptor() ([]byte, []int) { return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{10} } -func (x *QueryKeyDerivationRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *QueryKeyDerivationRequest) GetId() string { if x != nil { return x.Id @@ -8050,8 +7698,7 @@ type QueryKeyDerivationsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryKeyDerivationsRequest) Reset() { @@ -8074,13 +7721,6 @@ func (*QueryKeyDerivationsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_orbis_query_proto_rawDescGZIP(), []int{12} } -func (x *QueryKeyDerivationsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *QueryKeyDerivationsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination @@ -8237,178 +7877,166 @@ var file_sourcehub_orbis_query_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x22, - 0x79, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 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, 0x95, 0x01, 0x0a, 0x12, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, - 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x05, 0x72, 0x69, 0x6e, 0x67, 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, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, - 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7d, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0xa5, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, - 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x49, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, 0x1a, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, - 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, - 0x69, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0d, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x82, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0a, + 0x5b, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 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, 0x95, 0x01, 0x0a, + 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x72, 0x69, 0x6e, 0x67, 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, 0x26, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 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, 0x4e, 0x0a, 0x15, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x5f, 0x0a, 0x15, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x01, + 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, + 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, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xba, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, - 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, - 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, - 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x31, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, - 0x65, 0x4b, 0x65, 0x79, 0x22, 0x4f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, - 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, - 0x69, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x32, 0xc6, 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x82, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7f, 0x0a, 0x04, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, - 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x7e, 0x0a, 0x05, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, - 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, - 0x24, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, - 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2b, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, + 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x63, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x45, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0xba, 0x01, + 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, + 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 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, 0x31, 0x0a, 0x14, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x4f, 0x0a, + 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x32, 0x96, + 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x82, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, + 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, + 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7f, 0x0a, + 0x04, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x7e, + 0x0a, 0x05, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x8f, + 0x01, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0x9a, 0x01, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, - 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, - 0x12, 0xb0, 0x01, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, - 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0x8e, 0x01, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, - 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0xaf, 0x01, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, - 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, - 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, + 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0xa4, 0x01, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, + 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, + 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0e, 0x4b, 0x65, 0x79, + 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x4b, 0x65, 0x79, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, + 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6b, + 0x65, 0x79, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x96, + 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x2e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x42, 0xa0, - 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, - 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, - 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, - 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, - 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x35, 0x12, 0x33, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, + 0x69, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x42, 0xa0, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x42, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x20, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x6f, 0x72, 0x62, 0x69, 0x73, 0xa2, + 0x02, 0x03, 0x53, 0x4f, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, + 0x62, 0x2e, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xca, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0xe2, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x4f, 0x72, 0x62, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/api/sourcehub/orbis/query_grpc.pb.go b/api/sourcehub/orbis/query_grpc.pb.go index 44114fca..a5dc9e5e 100644 --- a/api/sourcehub/orbis/query_grpc.pb.go +++ b/api/sourcehub/orbis/query_grpc.pb.go @@ -39,15 +39,15 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Ring queries a ring by id. Ring(ctx context.Context, in *QueryRingRequest, opts ...grpc.CallOption) (*QueryRingResponse, error) - // Rings queries rings, optionally filtered by namespace. + // Rings queries rings. Rings(ctx context.Context, in *QueryRingsRequest, opts ...grpc.CallOption) (*QueryRingsResponse, error) - // Document queries an encrypted document by namespace and id. + // Document queries an encrypted document by id. Document(ctx context.Context, in *QueryDocumentRequest, opts ...grpc.CallOption) (*QueryDocumentResponse, error) - // Documents queries encrypted documents within a namespace. + // Documents queries encrypted documents. Documents(ctx context.Context, in *QueryDocumentsRequest, opts ...grpc.CallOption) (*QueryDocumentsResponse, error) - // KeyDerivation queries a key derivation by namespace and id. + // KeyDerivation queries a key derivation by id. KeyDerivation(ctx context.Context, in *QueryKeyDerivationRequest, opts ...grpc.CallOption) (*QueryKeyDerivationResponse, error) - // KeyDerivations queries key derivations within a namespace. + // KeyDerivations queries key derivations. KeyDerivations(ctx context.Context, in *QueryKeyDerivationsRequest, opts ...grpc.CallOption) (*QueryKeyDerivationsResponse, error) // NodeInfo queries node info by node key. NodeInfo(ctx context.Context, in *QueryNodeInfoRequest, opts ...grpc.CallOption) (*QueryNodeInfoResponse, error) @@ -151,15 +151,15 @@ type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Ring queries a ring by id. Ring(context.Context, *QueryRingRequest) (*QueryRingResponse, error) - // Rings queries rings, optionally filtered by namespace. + // Rings queries rings. Rings(context.Context, *QueryRingsRequest) (*QueryRingsResponse, error) - // Document queries an encrypted document by namespace and id. + // Document queries an encrypted document by id. Document(context.Context, *QueryDocumentRequest) (*QueryDocumentResponse, error) - // Documents queries encrypted documents within a namespace. + // Documents queries encrypted documents. Documents(context.Context, *QueryDocumentsRequest) (*QueryDocumentsResponse, error) - // KeyDerivation queries a key derivation by namespace and id. + // KeyDerivation queries a key derivation by id. KeyDerivation(context.Context, *QueryKeyDerivationRequest) (*QueryKeyDerivationResponse, error) - // KeyDerivations queries key derivations within a namespace. + // KeyDerivations queries key derivations. KeyDerivations(context.Context, *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, error) // NodeInfo queries node info by node key. NodeInfo(context.Context, *QueryNodeInfoRequest) (*QueryNodeInfoResponse, error) diff --git a/api/sourcehub/orbis/ring.pb.go b/api/sourcehub/orbis/ring.pb.go index 78230ed5..1a224863 100644 --- a/api/sourcehub/orbis/ring.pb.go +++ b/api/sourcehub/orbis/ring.pb.go @@ -23,20 +23,20 @@ const ( // Ring stores the active and pending committee metadata for an Orbis ring. type Ring struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` - NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerNodeKeys []string `protobuf:"bytes,4,rep,name=peer_node_keys,json=peerNodeKeys,proto3" json:"peer_node_keys,omitempty"` + Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + NewPeerNodeKeys []string `protobuf:"bytes,6,rep,name=new_peer_node_keys,json=newPeerNodeKeys,proto3" json:"new_peer_node_keys,omitempty"` // Absent means no pending threshold update. - NewThreshold *uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` + NewThreshold *uint32 `protobuf:"varint,7,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` // Absent means automatic PSS refresh is disabled. - PssInterval *uint64 `protobuf:"varint,9,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` - BlockNumberNonce uint64 `protobuf:"varint,10,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` - PolicyId string `protobuf:"bytes,11,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + PssInterval *uint64 `protobuf:"varint,8,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,9,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + PolicyId string `protobuf:"bytes,10,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Confirmations []*RingConfirmation `protobuf:"bytes,11,rep,name=confirmations,proto3" json:"confirmations,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -78,13 +78,6 @@ func (x *Ring) GetId() string { return "" } -func (x *Ring) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *Ring) GetCreatorDid() string { if x != nil { return x.CreatorDid @@ -99,9 +92,9 @@ func (x *Ring) GetRingPk() string { return "" } -func (x *Ring) GetPeerIds() []string { +func (x *Ring) GetPeerNodeKeys() []string { if x != nil { - return x.PeerIds + return x.PeerNodeKeys } return nil } @@ -113,9 +106,9 @@ func (x *Ring) GetThreshold() uint32 { return 0 } -func (x *Ring) GetNewPeerIds() []string { +func (x *Ring) GetNewPeerNodeKeys() []string { if x != nil { - return x.NewPeerIds + return x.NewPeerNodeKeys } return nil } @@ -148,28 +141,90 @@ func (x *Ring) GetPolicyId() string { return "" } +func (x *Ring) GetConfirmations() []*RingConfirmation { + if x != nil { + return x.Confirmations + } + return nil +} + +// RingConfirmation records a single peer's agreement on the ring public key. +type RingConfirmation struct { + state protoimpl.MessageState `protogen:"open.v1"` + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + RingPk string `protobuf:"bytes,2,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RingConfirmation) Reset() { + *x = RingConfirmation{} + mi := &file_sourcehub_orbis_ring_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RingConfirmation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RingConfirmation) ProtoMessage() {} + +func (x *RingConfirmation) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_ring_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RingConfirmation.ProtoReflect.Descriptor instead. +func (*RingConfirmation) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_ring_proto_rawDescGZIP(), []int{1} +} + +func (x *RingConfirmation) GetNodeKey() string { + if x != nil { + return x.NodeKey + } + return "" +} + +func (x *RingConfirmation) GetRingPk() string { + if x != nil { + return x.RingPk + } + return "" +} + var File_sourcehub_orbis_ring_proto protoreflect.FileDescriptor const file_sourcehub_orbis_ring_proto_rawDesc = "" + "\n" + - "\x1asourcehub/orbis/ring.proto\x12\x0fsourcehub.orbis\"\x89\x03\n" + + "\x1asourcehub/orbis/ring.proto\x12\x0fsourcehub.orbis\"\xca\x03\n" + "\x04Ring\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x1c\n" + - "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x1f\n" + - "\vcreator_did\x18\x03 \x01(\tR\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" + + "\vcreator_did\x18\x02 \x01(\tR\n" + "creatorDid\x12\x17\n" + - "\aring_pk\x18\x04 \x01(\tR\x06ringPk\x12\x19\n" + - "\bpeer_ids\x18\x05 \x03(\tR\apeerIds\x12\x1c\n" + - "\tthreshold\x18\x06 \x01(\rR\tthreshold\x12 \n" + - "\fnew_peer_ids\x18\a \x03(\tR\n" + - "newPeerIds\x12(\n" + - "\rnew_threshold\x18\b \x01(\rH\x00R\fnewThreshold\x88\x01\x01\x12&\n" + - "\fpss_interval\x18\t \x01(\x04H\x01R\vpssInterval\x88\x01\x01\x12,\n" + - "\x12block_number_nonce\x18\n" + - " \x01(\x04R\x10blockNumberNonce\x12\x1b\n" + - "\tpolicy_id\x18\v \x01(\tR\bpolicyIdB\x10\n" + + "\aring_pk\x18\x03 \x01(\tR\x06ringPk\x12$\n" + + "\x0epeer_node_keys\x18\x04 \x03(\tR\fpeerNodeKeys\x12\x1c\n" + + "\tthreshold\x18\x05 \x01(\rR\tthreshold\x12+\n" + + "\x12new_peer_node_keys\x18\x06 \x03(\tR\x0fnewPeerNodeKeys\x12(\n" + + "\rnew_threshold\x18\a \x01(\rH\x00R\fnewThreshold\x88\x01\x01\x12&\n" + + "\fpss_interval\x18\b \x01(\x04H\x01R\vpssInterval\x88\x01\x01\x12,\n" + + "\x12block_number_nonce\x18\t \x01(\x04R\x10blockNumberNonce\x12\x1b\n" + + "\tpolicy_id\x18\n" + + " \x01(\tR\bpolicyId\x12G\n" + + "\rconfirmations\x18\v \x03(\v2!.sourcehub.orbis.RingConfirmationR\rconfirmationsB\x10\n" + "\x0e_new_thresholdB\x0f\n" + - "\r_pss_intervalB\x9f\x01\n" + + "\r_pss_interval\"F\n" + + "\x10RingConfirmation\x12\x19\n" + + "\bnode_key\x18\x01 \x01(\tR\anodeKey\x12\x17\n" + + "\aring_pk\x18\x02 \x01(\tR\x06ringPkB\x9f\x01\n" + "\x13com.sourcehub.orbisB\tRingProtoP\x01Z cosmossdk.io/api/sourcehub/orbis\xa2\x02\x03SOX\xaa\x02\x0fSourcehub.Orbis\xca\x02\x0fSourcehub\\Orbis\xe2\x02\x1bSourcehub\\Orbis\\GPBMetadata\xea\x02\x10Sourcehub::Orbisb\x06proto3" var ( @@ -184,16 +239,18 @@ func file_sourcehub_orbis_ring_proto_rawDescGZIP() []byte { return file_sourcehub_orbis_ring_proto_rawDescData } -var file_sourcehub_orbis_ring_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sourcehub_orbis_ring_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcehub_orbis_ring_proto_goTypes = []any{ - (*Ring)(nil), // 0: sourcehub.orbis.Ring + (*Ring)(nil), // 0: sourcehub.orbis.Ring + (*RingConfirmation)(nil), // 1: sourcehub.orbis.RingConfirmation } var file_sourcehub_orbis_ring_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 + 1, // 0: sourcehub.orbis.Ring.confirmations:type_name -> sourcehub.orbis.RingConfirmation + 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_sourcehub_orbis_ring_proto_init() } @@ -208,7 +265,7 @@ func file_sourcehub_orbis_ring_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_sourcehub_orbis_ring_proto_rawDesc), len(file_sourcehub_orbis_ring_proto_rawDesc)), NumEnums: 0, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/api/sourcehub/orbis/tx.pb.go b/api/sourcehub/orbis/tx.pb.go index 9cc3eefb..ae17bc06 100644 --- a/api/sourcehub/orbis/tx.pb.go +++ b/api/sourcehub/orbis/tx.pb.go @@ -116,16 +116,15 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { } type MsgCreateRing struct { - state protoimpl.MessageState `protogen:"open.v1"` - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + PeerNodeKeys []string `protobuf:"bytes,2,rep,name=peer_node_keys,json=peerNodeKeys,proto3" json:"peer_node_keys,omitempty"` + Threshold uint32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` // Absent means automatic PSS refresh is disabled. - PssInterval *uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` - PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` + PssInterval *uint64 `protobuf:"varint,4,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + // Absent means no nonce. Provide a nonce to disambiguate rings with identical settings. + Nonce *string `protobuf:"bytes,6,opt,name=nonce,proto3,oneof" json:"nonce,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -167,23 +166,9 @@ func (x *MsgCreateRing) GetCreator() string { return "" } -func (x *MsgCreateRing) GetNamespace() string { +func (x *MsgCreateRing) GetPeerNodeKeys() []string { if x != nil { - return x.Namespace - } - return "" -} - -func (x *MsgCreateRing) GetRingPk() string { - if x != nil { - return x.RingPk - } - return "" -} - -func (x *MsgCreateRing) GetPeerIds() []string { - if x != nil { - return x.PeerIds + return x.PeerNodeKeys } return nil } @@ -209,9 +194,9 @@ func (x *MsgCreateRing) GetPolicyId() string { return "" } -func (x *MsgCreateRing) GetArtifact() string { - if x != nil { - return x.Artifact +func (x *MsgCreateRing) GetNonce() string { + if x != nil && x.Nonce != nil { + return *x.Nonce } return "" } @@ -260,11 +245,107 @@ func (x *MsgCreateRingResponse) GetRingId() string { return "" } +type MsgFinalizeRing struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgFinalizeRing) Reset() { + *x = MsgFinalizeRing{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgFinalizeRing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFinalizeRing) ProtoMessage() {} + +func (x *MsgFinalizeRing) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgFinalizeRing.ProtoReflect.Descriptor instead. +func (*MsgFinalizeRing) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgFinalizeRing) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgFinalizeRing) GetRingId() string { + if x != nil { + return x.RingId + } + return "" +} + +func (x *MsgFinalizeRing) GetRingPk() string { + if x != nil { + return x.RingPk + } + return "" +} + +type MsgFinalizeRingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MsgFinalizeRingResponse) Reset() { + *x = MsgFinalizeRingResponse{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MsgFinalizeRingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFinalizeRingResponse) ProtoMessage() {} + +func (x *MsgFinalizeRingResponse) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgFinalizeRingResponse.ProtoReflect.Descriptor instead. +func (*MsgFinalizeRingResponse) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{5} +} + type MsgUpdateRingByAcp struct { - state protoimpl.MessageState `protogen:"open.v1"` - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + NewPeerNodeKeys []string `protobuf:"bytes,3,rep,name=new_peer_node_keys,json=newPeerNodeKeys,proto3" json:"new_peer_node_keys,omitempty"` // Absent means no pending threshold update. NewThreshold *uint32 `protobuf:"varint,4,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` // Absent means no PSS refresh interval update. @@ -275,7 +356,7 @@ type MsgUpdateRingByAcp struct { func (x *MsgUpdateRingByAcp) Reset() { *x = MsgUpdateRingByAcp{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[4] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -287,7 +368,7 @@ func (x *MsgUpdateRingByAcp) String() string { func (*MsgUpdateRingByAcp) ProtoMessage() {} func (x *MsgUpdateRingByAcp) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[4] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -300,7 +381,7 @@ func (x *MsgUpdateRingByAcp) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgUpdateRingByAcp.ProtoReflect.Descriptor instead. func (*MsgUpdateRingByAcp) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{4} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgUpdateRingByAcp) GetCreator() string { @@ -317,9 +398,9 @@ func (x *MsgUpdateRingByAcp) GetRingId() string { return "" } -func (x *MsgUpdateRingByAcp) GetNewPeerIds() []string { +func (x *MsgUpdateRingByAcp) GetNewPeerNodeKeys() []string { if x != nil { - return x.NewPeerIds + return x.NewPeerNodeKeys } return nil } @@ -346,7 +427,7 @@ type MsgUpdateRingByAcpResponse struct { func (x *MsgUpdateRingByAcpResponse) Reset() { *x = MsgUpdateRingByAcpResponse{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[5] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -358,7 +439,7 @@ func (x *MsgUpdateRingByAcpResponse) String() string { func (*MsgUpdateRingByAcpResponse) ProtoMessage() {} func (x *MsgUpdateRingByAcpResponse) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[5] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -371,7 +452,7 @@ func (x *MsgUpdateRingByAcpResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgUpdateRingByAcpResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateRingByAcpResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{5} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{7} } type MsgFinalizeRingReshareByThresholdSignature struct { @@ -386,7 +467,7 @@ type MsgFinalizeRingReshareByThresholdSignature struct { func (x *MsgFinalizeRingReshareByThresholdSignature) Reset() { *x = MsgFinalizeRingReshareByThresholdSignature{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[6] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -398,7 +479,7 @@ func (x *MsgFinalizeRingReshareByThresholdSignature) String() string { func (*MsgFinalizeRingReshareByThresholdSignature) ProtoMessage() {} func (x *MsgFinalizeRingReshareByThresholdSignature) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[6] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -411,7 +492,7 @@ func (x *MsgFinalizeRingReshareByThresholdSignature) ProtoReflect() protoreflect // Deprecated: Use MsgFinalizeRingReshareByThresholdSignature.ProtoReflect.Descriptor instead. func (*MsgFinalizeRingReshareByThresholdSignature) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{6} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgFinalizeRingReshareByThresholdSignature) GetCreator() string { @@ -450,7 +531,7 @@ type MsgFinalizeRingReshareByThresholdSignatureResponse struct { func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) Reset() { *x = MsgFinalizeRingReshareByThresholdSignatureResponse{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[7] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -462,7 +543,7 @@ func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) String() string { func (*MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoMessage() {} func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[7] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -475,26 +556,25 @@ func (x *MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoReflect() prot // Deprecated: Use MsgFinalizeRingReshareByThresholdSignatureResponse.ProtoReflect.Descriptor instead. func (*MsgFinalizeRingReshareByThresholdSignatureResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{7} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{9} } type RingReshareFinalizeSignDoc struct { state protoimpl.MessageState `protogen:"open.v1"` Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - RingPk string `protobuf:"bytes,5,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - CurrentRingSha256 []byte `protobuf:"bytes,6,opt,name=current_ring_sha256,json=currentRingSha256,proto3" json:"current_ring_sha256,omitempty"` - FinalizedRingSha256 []byte `protobuf:"bytes,7,opt,name=finalized_ring_sha256,json=finalizedRingSha256,proto3" json:"finalized_ring_sha256,omitempty"` - BlockNumberNonce uint64 `protobuf:"varint,8,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + CurrentRingSha256 []byte `protobuf:"bytes,5,opt,name=current_ring_sha256,json=currentRingSha256,proto3" json:"current_ring_sha256,omitempty"` + FinalizedRingSha256 []byte `protobuf:"bytes,6,opt,name=finalized_ring_sha256,json=finalizedRingSha256,proto3" json:"finalized_ring_sha256,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,7,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *RingReshareFinalizeSignDoc) Reset() { *x = RingReshareFinalizeSignDoc{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[8] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -506,7 +586,7 @@ func (x *RingReshareFinalizeSignDoc) String() string { func (*RingReshareFinalizeSignDoc) ProtoMessage() {} func (x *RingReshareFinalizeSignDoc) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[8] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -519,7 +599,7 @@ func (x *RingReshareFinalizeSignDoc) ProtoReflect() protoreflect.Message { // Deprecated: Use RingReshareFinalizeSignDoc.ProtoReflect.Descriptor instead. func (*RingReshareFinalizeSignDoc) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{8} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{10} } func (x *RingReshareFinalizeSignDoc) GetDomain() string { @@ -536,13 +616,6 @@ func (x *RingReshareFinalizeSignDoc) GetChainId() string { return "" } -func (x *RingReshareFinalizeSignDoc) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *RingReshareFinalizeSignDoc) GetRingId() string { if x != nil { return x.RingId @@ -578,27 +651,126 @@ func (x *RingReshareFinalizeSignDoc) GetBlockNumberNonce() uint64 { return 0 } +type RingReshareSignState struct { + state protoimpl.MessageState `protogen:"open.v1"` + RingPk string `protobuf:"bytes,1,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerNodeKeys []string `protobuf:"bytes,2,rep,name=peer_node_keys,json=peerNodeKeys,proto3" json:"peer_node_keys,omitempty"` + Threshold uint32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` + NewPeerNodeKeys []string `protobuf:"bytes,4,rep,name=new_peer_node_keys,json=newPeerNodeKeys,proto3" json:"new_peer_node_keys,omitempty"` + NewThreshold *uint32 `protobuf:"varint,5,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` + PssInterval *uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,7,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + PolicyId string `protobuf:"bytes,8,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RingReshareSignState) Reset() { + *x = RingReshareSignState{} + mi := &file_sourcehub_orbis_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RingReshareSignState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RingReshareSignState) ProtoMessage() {} + +func (x *RingReshareSignState) ProtoReflect() protoreflect.Message { + mi := &file_sourcehub_orbis_tx_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RingReshareSignState.ProtoReflect.Descriptor instead. +func (*RingReshareSignState) Descriptor() ([]byte, []int) { + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *RingReshareSignState) GetRingPk() string { + if x != nil { + return x.RingPk + } + return "" +} + +func (x *RingReshareSignState) GetPeerNodeKeys() []string { + if x != nil { + return x.PeerNodeKeys + } + return nil +} + +func (x *RingReshareSignState) GetThreshold() uint32 { + if x != nil { + return x.Threshold + } + return 0 +} + +func (x *RingReshareSignState) GetNewPeerNodeKeys() []string { + if x != nil { + return x.NewPeerNodeKeys + } + return nil +} + +func (x *RingReshareSignState) GetNewThreshold() uint32 { + if x != nil && x.NewThreshold != nil { + return *x.NewThreshold + } + return 0 +} + +func (x *RingReshareSignState) GetPssInterval() uint64 { + if x != nil && x.PssInterval != nil { + return *x.PssInterval + } + return 0 +} + +func (x *RingReshareSignState) GetBlockNumberNonce() uint64 { + if x != nil { + return x.BlockNumberNonce + } + return 0 +} + +func (x *RingReshareSignState) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + type MsgStoreDocument struct { state protoimpl.MessageState `protogen:"open.v1"` Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,4,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` // Absent means no tier. - Tier *string `protobuf:"bytes,9,opt,name=tier,proto3,oneof" json:"tier,omitempty"` + Tier *string `protobuf:"bytes,8,opt,name=tier,proto3,oneof" json:"tier,omitempty"` // Absent means no timestamp. - Timestamp *uint64 `protobuf:"varint,10,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` + Timestamp *uint64 `protobuf:"varint,9,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *MsgStoreDocument) Reset() { *x = MsgStoreDocument{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[9] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -610,7 +782,7 @@ func (x *MsgStoreDocument) String() string { func (*MsgStoreDocument) ProtoMessage() {} func (x *MsgStoreDocument) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[9] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -623,7 +795,7 @@ func (x *MsgStoreDocument) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgStoreDocument.ProtoReflect.Descriptor instead. func (*MsgStoreDocument) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{9} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{12} } func (x *MsgStoreDocument) GetCreator() string { @@ -633,13 +805,6 @@ func (x *MsgStoreDocument) GetCreator() string { return "" } -func (x *MsgStoreDocument) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *MsgStoreDocument) GetRingId() string { if x != nil { return x.RingId @@ -705,7 +870,7 @@ type MsgStoreDocumentResponse struct { func (x *MsgStoreDocumentResponse) Reset() { *x = MsgStoreDocumentResponse{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[10] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +882,7 @@ func (x *MsgStoreDocumentResponse) String() string { func (*MsgStoreDocumentResponse) ProtoMessage() {} func (x *MsgStoreDocumentResponse) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[10] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +895,7 @@ func (x *MsgStoreDocumentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgStoreDocumentResponse.ProtoReflect.Descriptor instead. func (*MsgStoreDocumentResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{10} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{13} } func (x *MsgStoreDocumentResponse) GetDocumentId() string { @@ -743,19 +908,18 @@ func (x *MsgStoreDocumentResponse) GetDocumentId() string { type MsgStoreKeyDerivation struct { state protoimpl.MessageState `protogen:"open.v1"` Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Derivation string `protobuf:"bytes,4,opt,name=derivation,proto3" json:"derivation,omitempty"` - PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Derivation string `protobuf:"bytes,3,opt,name=derivation,proto3" json:"derivation,omitempty"` + PolicyId string `protobuf:"bytes,4,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,6,opt,name=permission,proto3" json:"permission,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *MsgStoreKeyDerivation) Reset() { *x = MsgStoreKeyDerivation{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[11] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -767,7 +931,7 @@ func (x *MsgStoreKeyDerivation) String() string { func (*MsgStoreKeyDerivation) ProtoMessage() {} func (x *MsgStoreKeyDerivation) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[11] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -780,7 +944,7 @@ func (x *MsgStoreKeyDerivation) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgStoreKeyDerivation.ProtoReflect.Descriptor instead. func (*MsgStoreKeyDerivation) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{11} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{14} } func (x *MsgStoreKeyDerivation) GetCreator() string { @@ -790,13 +954,6 @@ func (x *MsgStoreKeyDerivation) GetCreator() string { return "" } -func (x *MsgStoreKeyDerivation) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - func (x *MsgStoreKeyDerivation) GetRingId() string { if x != nil { return x.RingId @@ -841,7 +998,7 @@ type MsgStoreKeyDerivationResponse struct { func (x *MsgStoreKeyDerivationResponse) Reset() { *x = MsgStoreKeyDerivationResponse{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[12] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -853,7 +1010,7 @@ func (x *MsgStoreKeyDerivationResponse) String() string { func (*MsgStoreKeyDerivationResponse) ProtoMessage() {} func (x *MsgStoreKeyDerivationResponse) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[12] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -866,7 +1023,7 @@ func (x *MsgStoreKeyDerivationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgStoreKeyDerivationResponse.ProtoReflect.Descriptor instead. func (*MsgStoreKeyDerivationResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{12} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{15} } func (x *MsgStoreKeyDerivationResponse) GetKeyDerivationId() string { @@ -877,19 +1034,19 @@ func (x *MsgStoreKeyDerivationResponse) GetKeyDerivationId() string { } type MsgCreateNodeInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` - ControllerKey string `protobuf:"bytes,3,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` - WhitelistedNamespaces []string `protobuf:"bytes,4,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` - WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,3,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` + WhitelistedPolicyIds []string `protobuf:"bytes,4,rep,name=whitelisted_policy_ids,json=whitelistedPolicyIds,proto3" json:"whitelisted_policy_ids,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MsgCreateNodeInfo) Reset() { *x = MsgCreateNodeInfo{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[13] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -901,7 +1058,7 @@ func (x *MsgCreateNodeInfo) String() string { func (*MsgCreateNodeInfo) ProtoMessage() {} func (x *MsgCreateNodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[13] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -914,7 +1071,7 @@ func (x *MsgCreateNodeInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgCreateNodeInfo.ProtoReflect.Descriptor instead. func (*MsgCreateNodeInfo) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{13} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{16} } func (x *MsgCreateNodeInfo) GetCreator() string { @@ -938,9 +1095,9 @@ func (x *MsgCreateNodeInfo) GetControllerKey() string { return "" } -func (x *MsgCreateNodeInfo) GetWhitelistedNamespaces() []string { +func (x *MsgCreateNodeInfo) GetWhitelistedPolicyIds() []string { if x != nil { - return x.WhitelistedNamespaces + return x.WhitelistedPolicyIds } return nil } @@ -960,7 +1117,7 @@ type MsgCreateNodeInfoResponse struct { func (x *MsgCreateNodeInfoResponse) Reset() { *x = MsgCreateNodeInfoResponse{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[14] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -972,7 +1129,7 @@ func (x *MsgCreateNodeInfoResponse) String() string { func (*MsgCreateNodeInfoResponse) ProtoMessage() {} func (x *MsgCreateNodeInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[14] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -985,17 +1142,27 @@ func (x *MsgCreateNodeInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgCreateNodeInfoResponse.ProtoReflect.Descriptor instead. func (*MsgCreateNodeInfoResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{14} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{17} } +// MsgUpdateNodeInfo replaces mutable fields on an existing NodeInfo record. +// The signer must be the current controller_key holder. +// +// IMPORTANT: whitelisted_policy_ids and whitelisted_ring_ids are REPLACED in +// full, not merged. To add a single entry you must re-send the complete desired +// list. Sending an empty repeated field clears the whitelist entirely. type MsgUpdateNodeInfo struct { state protoimpl.MessageState `protogen:"open.v1"` Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` NodeKey string `protobuf:"bytes,2,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` // Absent means no peer_id update. - PeerId *string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3,oneof" json:"peer_id,omitempty"` - WhitelistedNamespaces []string `protobuf:"bytes,4,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` - WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` + PeerId *string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3,oneof" json:"peer_id,omitempty"` + // Replaces the full policy whitelist. Send the complete desired list on every + // update; an empty field clears all whitelisted policies. + WhitelistedPolicyIds []string `protobuf:"bytes,4,rep,name=whitelisted_policy_ids,json=whitelistedPolicyIds,proto3" json:"whitelisted_policy_ids,omitempty"` + // Replaces the full ring whitelist. Send the complete desired list on every + // update; an empty field clears all whitelisted rings. + WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` // Absent means no controller_key update. ControllerKey *string `protobuf:"bytes,6,opt,name=controller_key,json=controllerKey,proto3,oneof" json:"controller_key,omitempty"` unknownFields protoimpl.UnknownFields @@ -1004,7 +1171,7 @@ type MsgUpdateNodeInfo struct { func (x *MsgUpdateNodeInfo) Reset() { *x = MsgUpdateNodeInfo{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[15] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1016,7 +1183,7 @@ func (x *MsgUpdateNodeInfo) String() string { func (*MsgUpdateNodeInfo) ProtoMessage() {} func (x *MsgUpdateNodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[15] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1029,7 +1196,7 @@ func (x *MsgUpdateNodeInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgUpdateNodeInfo.ProtoReflect.Descriptor instead. func (*MsgUpdateNodeInfo) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{15} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{18} } func (x *MsgUpdateNodeInfo) GetCreator() string { @@ -1053,9 +1220,9 @@ func (x *MsgUpdateNodeInfo) GetPeerId() string { return "" } -func (x *MsgUpdateNodeInfo) GetWhitelistedNamespaces() []string { +func (x *MsgUpdateNodeInfo) GetWhitelistedPolicyIds() []string { if x != nil { - return x.WhitelistedNamespaces + return x.WhitelistedPolicyIds } return nil } @@ -1082,7 +1249,7 @@ type MsgUpdateNodeInfoResponse struct { func (x *MsgUpdateNodeInfoResponse) Reset() { *x = MsgUpdateNodeInfoResponse{} - mi := &file_sourcehub_orbis_tx_proto_msgTypes[16] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1094,7 +1261,7 @@ func (x *MsgUpdateNodeInfoResponse) String() string { func (*MsgUpdateNodeInfoResponse) ProtoMessage() {} func (x *MsgUpdateNodeInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_sourcehub_orbis_tx_proto_msgTypes[16] + mi := &file_sourcehub_orbis_tx_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1107,7 +1274,7 @@ func (x *MsgUpdateNodeInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MsgUpdateNodeInfoResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateNodeInfoResponse) Descriptor() ([]byte, []int) { - return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{16} + return file_sourcehub_orbis_tx_proto_rawDescGZIP(), []int{19} } var File_sourcehub_orbis_tx_proto protoreflect.FileDescriptor @@ -1118,24 +1285,27 @@ const file_sourcehub_orbis_tx_proto_rawDesc = "" + "\x0fMsgUpdateParams\x126\n" + "\tauthority\x18\x01 \x01(\tB\x18Ò´-\x14cosmos.AddressStringR\tauthority\x12:\n" + "\x06params\x18\x02 \x01(\v2\x17.sourcehub.orbis.ParamsB\t\xc8\xde\x1f\x00\xa8\xe7\xb0*\x01R\x06params:4\x82\xe7\xb0*\tauthority\x8a\xe7\xb0*!sourcehub/x/orbis/MsgUpdateParams\"\x19\n" + - "\x17MsgUpdateParamsResponse\"\x99\x02\n" + + "\x17MsgUpdateParamsResponse\"\xf6\x01\n" + "\rMsgCreateRing\x12\x18\n" + - "\acreator\x18\x01 \x01(\tR\acreator\x12\x1c\n" + - "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x17\n" + - "\aring_pk\x18\x03 \x01(\tR\x06ringPk\x12\x19\n" + - "\bpeer_ids\x18\x04 \x03(\tR\apeerIds\x12\x1c\n" + - "\tthreshold\x18\x05 \x01(\rR\tthreshold\x12&\n" + - "\fpss_interval\x18\x06 \x01(\x04H\x00R\vpssInterval\x88\x01\x01\x12\x1b\n" + - "\tpolicy_id\x18\a \x01(\tR\bpolicyId\x12\x1a\n" + - "\bartifact\x18\b \x01(\tR\bartifact:\f\x82\xe7\xb0*\acreatorB\x0f\n" + - "\r_pss_interval\"0\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12$\n" + + "\x0epeer_node_keys\x18\x02 \x03(\tR\fpeerNodeKeys\x12\x1c\n" + + "\tthreshold\x18\x03 \x01(\rR\tthreshold\x12&\n" + + "\fpss_interval\x18\x04 \x01(\x04H\x00R\vpssInterval\x88\x01\x01\x12\x1b\n" + + "\tpolicy_id\x18\x05 \x01(\tR\bpolicyId\x12\x19\n" + + "\x05nonce\x18\x06 \x01(\tH\x01R\x05nonce\x88\x01\x01:\f\x82\xe7\xb0*\acreatorB\x0f\n" + + "\r_pss_intervalB\b\n" + + "\x06_nonce\"0\n" + "\x15MsgCreateRingResponse\x12\x17\n" + - "\aring_id\x18\x01 \x01(\tR\x06ringId\"\xec\x01\n" + + "\aring_id\x18\x01 \x01(\tR\x06ringId\"k\n" + + "\x0fMsgFinalizeRing\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x17\n" + + "\aring_id\x18\x02 \x01(\tR\x06ringId\x12\x17\n" + + "\aring_pk\x18\x03 \x01(\tR\x06ringPk:\f\x82\xe7\xb0*\acreator\"\x19\n" + + "\x17MsgFinalizeRingResponse\"\xf7\x01\n" + "\x12MsgUpdateRingByAcp\x12\x18\n" + "\acreator\x18\x01 \x01(\tR\acreator\x12\x17\n" + - "\aring_id\x18\x02 \x01(\tR\x06ringId\x12 \n" + - "\fnew_peer_ids\x18\x03 \x03(\tR\n" + - "newPeerIds\x12(\n" + + "\aring_id\x18\x02 \x01(\tR\x06ringId\x12+\n" + + "\x12new_peer_node_keys\x18\x03 \x03(\tR\x0fnewPeerNodeKeys\x12(\n" + "\rnew_threshold\x18\x04 \x01(\rH\x00R\fnewThreshold\x88\x01\x01\x12&\n" + "\fpss_interval\x18\x05 \x01(\x04H\x01R\vpssInterval\x88\x01\x01:\f\x82\xe7\xb0*\acreatorB\x10\n" + "\x0e_new_thresholdB\x0f\n" + @@ -1146,72 +1316,80 @@ const file_sourcehub_orbis_tx_proto_rawDesc = "" + "\aring_id\x18\x02 \x01(\tR\x06ringId\x12)\n" + "\x10signature_scheme\x18\x03 \x01(\tR\x0fsignatureScheme\x12\x1c\n" + "\tsignature\x18\x04 \x01(\fR\tsignature:\f\x82\xe7\xb0*\acreator\"4\n" + - "2MsgFinalizeRingReshareByThresholdSignatureResponse\"\xb1\x02\n" + + "2MsgFinalizeRingReshareByThresholdSignatureResponse\"\x93\x02\n" + "\x1aRingReshareFinalizeSignDoc\x12\x16\n" + "\x06domain\x18\x01 \x01(\tR\x06domain\x12\x19\n" + - "\bchain_id\x18\x02 \x01(\tR\achainId\x12\x1c\n" + - "\tnamespace\x18\x03 \x01(\tR\tnamespace\x12\x17\n" + - "\aring_id\x18\x04 \x01(\tR\x06ringId\x12\x17\n" + - "\aring_pk\x18\x05 \x01(\tR\x06ringPk\x12.\n" + - "\x13current_ring_sha256\x18\x06 \x01(\fR\x11currentRingSha256\x122\n" + - "\x15finalized_ring_sha256\x18\a \x01(\fR\x13finalizedRingSha256\x12,\n" + - "\x12block_number_nonce\x18\b \x01(\x04R\x10blockNumberNonce\"\xcf\x02\n" + + "\bchain_id\x18\x02 \x01(\tR\achainId\x12\x17\n" + + "\aring_id\x18\x03 \x01(\tR\x06ringId\x12\x17\n" + + "\aring_pk\x18\x04 \x01(\tR\x06ringPk\x12.\n" + + "\x13current_ring_sha256\x18\x05 \x01(\fR\x11currentRingSha256\x122\n" + + "\x15finalized_ring_sha256\x18\x06 \x01(\fR\x13finalizedRingSha256\x12,\n" + + "\x12block_number_nonce\x18\a \x01(\x04R\x10blockNumberNonce\"\xe0\x02\n" + + "\x14RingReshareSignState\x12\x17\n" + + "\aring_pk\x18\x01 \x01(\tR\x06ringPk\x12$\n" + + "\x0epeer_node_keys\x18\x02 \x03(\tR\fpeerNodeKeys\x12\x1c\n" + + "\tthreshold\x18\x03 \x01(\rR\tthreshold\x12+\n" + + "\x12new_peer_node_keys\x18\x04 \x03(\tR\x0fnewPeerNodeKeys\x12(\n" + + "\rnew_threshold\x18\x05 \x01(\rH\x00R\fnewThreshold\x88\x01\x01\x12&\n" + + "\fpss_interval\x18\x06 \x01(\x04H\x01R\vpssInterval\x88\x01\x01\x12,\n" + + "\x12block_number_nonce\x18\a \x01(\x04R\x10blockNumberNonce\x12\x1b\n" + + "\tpolicy_id\x18\b \x01(\tR\bpolicyIdB\x10\n" + + "\x0e_new_thresholdB\x0f\n" + + "\r_pss_interval\"\xb1\x02\n" + "\x10MsgStoreDocument\x12\x18\n" + - "\acreator\x18\x01 \x01(\tR\acreator\x12\x1c\n" + - "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x17\n" + - "\aring_id\x18\x03 \x01(\tR\x06ringId\x12\x1a\n" + - "\bdocument\x18\x04 \x01(\tR\bdocument\x12\x14\n" + - "\x05proof\x18\x05 \x01(\tR\x05proof\x12\x1b\n" + - "\tpolicy_id\x18\x06 \x01(\tR\bpolicyId\x12\x1a\n" + - "\bresource\x18\a \x01(\tR\bresource\x12\x1e\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x17\n" + + "\aring_id\x18\x02 \x01(\tR\x06ringId\x12\x1a\n" + + "\bdocument\x18\x03 \x01(\tR\bdocument\x12\x14\n" + + "\x05proof\x18\x04 \x01(\tR\x05proof\x12\x1b\n" + + "\tpolicy_id\x18\x05 \x01(\tR\bpolicyId\x12\x1a\n" + + "\bresource\x18\x06 \x01(\tR\bresource\x12\x1e\n" + "\n" + - "permission\x18\b \x01(\tR\n" + + "permission\x18\a \x01(\tR\n" + "permission\x12\x17\n" + - "\x04tier\x18\t \x01(\tH\x00R\x04tier\x88\x01\x01\x12!\n" + - "\ttimestamp\x18\n" + - " \x01(\x04H\x01R\ttimestamp\x88\x01\x01:\f\x82\xe7\xb0*\acreatorB\a\n" + + "\x04tier\x18\b \x01(\tH\x00R\x04tier\x88\x01\x01\x12!\n" + + "\ttimestamp\x18\t \x01(\x04H\x01R\ttimestamp\x88\x01\x01:\f\x82\xe7\xb0*\acreatorB\a\n" + "\x05_tierB\f\n" + "\n" + "_timestamp\";\n" + "\x18MsgStoreDocumentResponse\x12\x1f\n" + "\vdocument_id\x18\x01 \x01(\tR\n" + - "documentId\"\xef\x01\n" + + "documentId\"\xd1\x01\n" + "\x15MsgStoreKeyDerivation\x12\x18\n" + - "\acreator\x18\x01 \x01(\tR\acreator\x12\x1c\n" + - "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x17\n" + - "\aring_id\x18\x03 \x01(\tR\x06ringId\x12\x1e\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x17\n" + + "\aring_id\x18\x02 \x01(\tR\x06ringId\x12\x1e\n" + "\n" + - "derivation\x18\x04 \x01(\tR\n" + + "derivation\x18\x03 \x01(\tR\n" + "derivation\x12\x1b\n" + - "\tpolicy_id\x18\x05 \x01(\tR\bpolicyId\x12\x1a\n" + - "\bresource\x18\x06 \x01(\tR\bresource\x12\x1e\n" + + "\tpolicy_id\x18\x04 \x01(\tR\bpolicyId\x12\x1a\n" + + "\bresource\x18\x05 \x01(\tR\bresource\x12\x1e\n" + "\n" + - "permission\x18\a \x01(\tR\n" + + "permission\x18\x06 \x01(\tR\n" + "permission:\f\x82\xe7\xb0*\acreator\"K\n" + "\x1dMsgStoreKeyDerivationResponse\x12*\n" + - "\x11key_derivation_id\x18\x01 \x01(\tR\x0fkeyDerivationId\"\xe4\x01\n" + + "\x11key_derivation_id\x18\x01 \x01(\tR\x0fkeyDerivationId\"\xe3\x01\n" + "\x11MsgCreateNodeInfo\x12\x18\n" + "\acreator\x18\x01 \x01(\tR\acreator\x12\x17\n" + "\apeer_id\x18\x02 \x01(\tR\x06peerId\x12%\n" + - "\x0econtroller_key\x18\x03 \x01(\tR\rcontrollerKey\x125\n" + - "\x16whitelisted_namespaces\x18\x04 \x03(\tR\x15whitelistedNamespaces\x120\n" + + "\x0econtroller_key\x18\x03 \x01(\tR\rcontrollerKey\x124\n" + + "\x16whitelisted_policy_ids\x18\x04 \x03(\tR\x14whitelistedPolicyIds\x120\n" + "\x14whitelisted_ring_ids\x18\x05 \x03(\tR\x12whitelistedRingIds:\f\x82\xe7\xb0*\acreator\"\x1b\n" + - "\x19MsgCreateNodeInfoResponse\"\xa8\x02\n" + + "\x19MsgCreateNodeInfoResponse\"\xa7\x02\n" + "\x11MsgUpdateNodeInfo\x12\x18\n" + "\acreator\x18\x01 \x01(\tR\acreator\x12\x19\n" + "\bnode_key\x18\x02 \x01(\tR\anodeKey\x12\x1c\n" + - "\apeer_id\x18\x03 \x01(\tH\x00R\x06peerId\x88\x01\x01\x125\n" + - "\x16whitelisted_namespaces\x18\x04 \x03(\tR\x15whitelistedNamespaces\x120\n" + + "\apeer_id\x18\x03 \x01(\tH\x00R\x06peerId\x88\x01\x01\x124\n" + + "\x16whitelisted_policy_ids\x18\x04 \x03(\tR\x14whitelistedPolicyIds\x120\n" + "\x14whitelisted_ring_ids\x18\x05 \x03(\tR\x12whitelistedRingIds\x12*\n" + "\x0econtroller_key\x18\x06 \x01(\tH\x01R\rcontrollerKey\x88\x01\x01:\f\x82\xe7\xb0*\acreatorB\n" + "\n" + "\b_peer_idB\x11\n" + "\x0f_controller_key\"\x1b\n" + - "\x19MsgUpdateNodeInfoResponse2\xe2\x06\n" + + "\x19MsgUpdateNodeInfoResponse2\xbe\a\n" + "\x03Msg\x12Z\n" + "\fUpdateParams\x12 .sourcehub.orbis.MsgUpdateParams\x1a(.sourcehub.orbis.MsgUpdateParamsResponse\x12T\n" + "\n" + - "CreateRing\x12\x1e.sourcehub.orbis.MsgCreateRing\x1a&.sourcehub.orbis.MsgCreateRingResponse\x12c\n" + + "CreateRing\x12\x1e.sourcehub.orbis.MsgCreateRing\x1a&.sourcehub.orbis.MsgCreateRingResponse\x12Z\n" + + "\fFinalizeRing\x12 .sourcehub.orbis.MsgFinalizeRing\x1a(.sourcehub.orbis.MsgFinalizeRingResponse\x12c\n" + "\x0fUpdateRingByAcp\x12#.sourcehub.orbis.MsgUpdateRingByAcp\x1a+.sourcehub.orbis.MsgUpdateRingByAcpResponse\x12\xab\x01\n" + "'FinalizeRingReshareByThresholdSignature\x12;.sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature\x1aC.sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse\x12]\n" + "\rStoreDocument\x12!.sourcehub.orbis.MsgStoreDocument\x1a).sourcehub.orbis.MsgStoreDocumentResponse\x12l\n" + @@ -1232,47 +1410,52 @@ func file_sourcehub_orbis_tx_proto_rawDescGZIP() []byte { return file_sourcehub_orbis_tx_proto_rawDescData } -var file_sourcehub_orbis_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_sourcehub_orbis_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_sourcehub_orbis_tx_proto_goTypes = []any{ (*MsgUpdateParams)(nil), // 0: sourcehub.orbis.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.orbis.MsgUpdateParamsResponse (*MsgCreateRing)(nil), // 2: sourcehub.orbis.MsgCreateRing (*MsgCreateRingResponse)(nil), // 3: sourcehub.orbis.MsgCreateRingResponse - (*MsgUpdateRingByAcp)(nil), // 4: sourcehub.orbis.MsgUpdateRingByAcp - (*MsgUpdateRingByAcpResponse)(nil), // 5: sourcehub.orbis.MsgUpdateRingByAcpResponse - (*MsgFinalizeRingReshareByThresholdSignature)(nil), // 6: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature - (*MsgFinalizeRingReshareByThresholdSignatureResponse)(nil), // 7: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse - (*RingReshareFinalizeSignDoc)(nil), // 8: sourcehub.orbis.RingReshareFinalizeSignDoc - (*MsgStoreDocument)(nil), // 9: sourcehub.orbis.MsgStoreDocument - (*MsgStoreDocumentResponse)(nil), // 10: sourcehub.orbis.MsgStoreDocumentResponse - (*MsgStoreKeyDerivation)(nil), // 11: sourcehub.orbis.MsgStoreKeyDerivation - (*MsgStoreKeyDerivationResponse)(nil), // 12: sourcehub.orbis.MsgStoreKeyDerivationResponse - (*MsgCreateNodeInfo)(nil), // 13: sourcehub.orbis.MsgCreateNodeInfo - (*MsgCreateNodeInfoResponse)(nil), // 14: sourcehub.orbis.MsgCreateNodeInfoResponse - (*MsgUpdateNodeInfo)(nil), // 15: sourcehub.orbis.MsgUpdateNodeInfo - (*MsgUpdateNodeInfoResponse)(nil), // 16: sourcehub.orbis.MsgUpdateNodeInfoResponse - (*Params)(nil), // 17: sourcehub.orbis.Params + (*MsgFinalizeRing)(nil), // 4: sourcehub.orbis.MsgFinalizeRing + (*MsgFinalizeRingResponse)(nil), // 5: sourcehub.orbis.MsgFinalizeRingResponse + (*MsgUpdateRingByAcp)(nil), // 6: sourcehub.orbis.MsgUpdateRingByAcp + (*MsgUpdateRingByAcpResponse)(nil), // 7: sourcehub.orbis.MsgUpdateRingByAcpResponse + (*MsgFinalizeRingReshareByThresholdSignature)(nil), // 8: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature + (*MsgFinalizeRingReshareByThresholdSignatureResponse)(nil), // 9: sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse + (*RingReshareFinalizeSignDoc)(nil), // 10: sourcehub.orbis.RingReshareFinalizeSignDoc + (*RingReshareSignState)(nil), // 11: sourcehub.orbis.RingReshareSignState + (*MsgStoreDocument)(nil), // 12: sourcehub.orbis.MsgStoreDocument + (*MsgStoreDocumentResponse)(nil), // 13: sourcehub.orbis.MsgStoreDocumentResponse + (*MsgStoreKeyDerivation)(nil), // 14: sourcehub.orbis.MsgStoreKeyDerivation + (*MsgStoreKeyDerivationResponse)(nil), // 15: sourcehub.orbis.MsgStoreKeyDerivationResponse + (*MsgCreateNodeInfo)(nil), // 16: sourcehub.orbis.MsgCreateNodeInfo + (*MsgCreateNodeInfoResponse)(nil), // 17: sourcehub.orbis.MsgCreateNodeInfoResponse + (*MsgUpdateNodeInfo)(nil), // 18: sourcehub.orbis.MsgUpdateNodeInfo + (*MsgUpdateNodeInfoResponse)(nil), // 19: sourcehub.orbis.MsgUpdateNodeInfoResponse + (*Params)(nil), // 20: sourcehub.orbis.Params } var file_sourcehub_orbis_tx_proto_depIdxs = []int32{ - 17, // 0: sourcehub.orbis.MsgUpdateParams.params:type_name -> sourcehub.orbis.Params + 20, // 0: sourcehub.orbis.MsgUpdateParams.params:type_name -> sourcehub.orbis.Params 0, // 1: sourcehub.orbis.Msg.UpdateParams:input_type -> sourcehub.orbis.MsgUpdateParams 2, // 2: sourcehub.orbis.Msg.CreateRing:input_type -> sourcehub.orbis.MsgCreateRing - 4, // 3: sourcehub.orbis.Msg.UpdateRingByAcp:input_type -> sourcehub.orbis.MsgUpdateRingByAcp - 6, // 4: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:input_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature - 9, // 5: sourcehub.orbis.Msg.StoreDocument:input_type -> sourcehub.orbis.MsgStoreDocument - 11, // 6: sourcehub.orbis.Msg.StoreKeyDerivation:input_type -> sourcehub.orbis.MsgStoreKeyDerivation - 13, // 7: sourcehub.orbis.Msg.CreateNodeInfo:input_type -> sourcehub.orbis.MsgCreateNodeInfo - 15, // 8: sourcehub.orbis.Msg.UpdateNodeInfo:input_type -> sourcehub.orbis.MsgUpdateNodeInfo - 1, // 9: sourcehub.orbis.Msg.UpdateParams:output_type -> sourcehub.orbis.MsgUpdateParamsResponse - 3, // 10: sourcehub.orbis.Msg.CreateRing:output_type -> sourcehub.orbis.MsgCreateRingResponse - 5, // 11: sourcehub.orbis.Msg.UpdateRingByAcp:output_type -> sourcehub.orbis.MsgUpdateRingByAcpResponse - 7, // 12: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:output_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse - 10, // 13: sourcehub.orbis.Msg.StoreDocument:output_type -> sourcehub.orbis.MsgStoreDocumentResponse - 12, // 14: sourcehub.orbis.Msg.StoreKeyDerivation:output_type -> sourcehub.orbis.MsgStoreKeyDerivationResponse - 14, // 15: sourcehub.orbis.Msg.CreateNodeInfo:output_type -> sourcehub.orbis.MsgCreateNodeInfoResponse - 16, // 16: sourcehub.orbis.Msg.UpdateNodeInfo:output_type -> sourcehub.orbis.MsgUpdateNodeInfoResponse - 9, // [9:17] is the sub-list for method output_type - 1, // [1:9] is the sub-list for method input_type + 4, // 3: sourcehub.orbis.Msg.FinalizeRing:input_type -> sourcehub.orbis.MsgFinalizeRing + 6, // 4: sourcehub.orbis.Msg.UpdateRingByAcp:input_type -> sourcehub.orbis.MsgUpdateRingByAcp + 8, // 5: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:input_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature + 12, // 6: sourcehub.orbis.Msg.StoreDocument:input_type -> sourcehub.orbis.MsgStoreDocument + 14, // 7: sourcehub.orbis.Msg.StoreKeyDerivation:input_type -> sourcehub.orbis.MsgStoreKeyDerivation + 16, // 8: sourcehub.orbis.Msg.CreateNodeInfo:input_type -> sourcehub.orbis.MsgCreateNodeInfo + 18, // 9: sourcehub.orbis.Msg.UpdateNodeInfo:input_type -> sourcehub.orbis.MsgUpdateNodeInfo + 1, // 10: sourcehub.orbis.Msg.UpdateParams:output_type -> sourcehub.orbis.MsgUpdateParamsResponse + 3, // 11: sourcehub.orbis.Msg.CreateRing:output_type -> sourcehub.orbis.MsgCreateRingResponse + 5, // 12: sourcehub.orbis.Msg.FinalizeRing:output_type -> sourcehub.orbis.MsgFinalizeRingResponse + 7, // 13: sourcehub.orbis.Msg.UpdateRingByAcp:output_type -> sourcehub.orbis.MsgUpdateRingByAcpResponse + 9, // 14: sourcehub.orbis.Msg.FinalizeRingReshareByThresholdSignature:output_type -> sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse + 13, // 15: sourcehub.orbis.Msg.StoreDocument:output_type -> sourcehub.orbis.MsgStoreDocumentResponse + 15, // 16: sourcehub.orbis.Msg.StoreKeyDerivation:output_type -> sourcehub.orbis.MsgStoreKeyDerivationResponse + 17, // 17: sourcehub.orbis.Msg.CreateNodeInfo:output_type -> sourcehub.orbis.MsgCreateNodeInfoResponse + 19, // 18: sourcehub.orbis.Msg.UpdateNodeInfo:output_type -> sourcehub.orbis.MsgUpdateNodeInfoResponse + 10, // [10:19] is the sub-list for method output_type + 1, // [1:10] 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 @@ -1285,16 +1468,17 @@ func file_sourcehub_orbis_tx_proto_init() { } file_sourcehub_orbis_params_proto_init() file_sourcehub_orbis_tx_proto_msgTypes[2].OneofWrappers = []any{} - file_sourcehub_orbis_tx_proto_msgTypes[4].OneofWrappers = []any{} - file_sourcehub_orbis_tx_proto_msgTypes[9].OneofWrappers = []any{} - file_sourcehub_orbis_tx_proto_msgTypes[15].OneofWrappers = []any{} + file_sourcehub_orbis_tx_proto_msgTypes[6].OneofWrappers = []any{} + file_sourcehub_orbis_tx_proto_msgTypes[11].OneofWrappers = []any{} + file_sourcehub_orbis_tx_proto_msgTypes[12].OneofWrappers = []any{} + file_sourcehub_orbis_tx_proto_msgTypes[18].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_sourcehub_orbis_tx_proto_rawDesc), len(file_sourcehub_orbis_tx_proto_rawDesc)), NumEnums: 0, - NumMessages: 17, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/api/sourcehub/orbis/tx_grpc.pb.go b/api/sourcehub/orbis/tx_grpc.pb.go index d848424e..dd5dbef3 100644 --- a/api/sourcehub/orbis/tx_grpc.pb.go +++ b/api/sourcehub/orbis/tx_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion9 const ( Msg_UpdateParams_FullMethodName = "/sourcehub.orbis.Msg/UpdateParams" Msg_CreateRing_FullMethodName = "/sourcehub.orbis.Msg/CreateRing" + Msg_FinalizeRing_FullMethodName = "/sourcehub.orbis.Msg/FinalizeRing" Msg_UpdateRingByAcp_FullMethodName = "/sourcehub.orbis.Msg/UpdateRingByAcp" Msg_FinalizeRingReshareByThresholdSignature_FullMethodName = "/sourcehub.orbis.Msg/FinalizeRingReshareByThresholdSignature" Msg_StoreDocument_FullMethodName = "/sourcehub.orbis.Msg/StoreDocument" @@ -38,6 +39,7 @@ type MsgClient interface { // UpdateParams defines a governance operation for updating module parameters. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) CreateRing(ctx context.Context, in *MsgCreateRing, opts ...grpc.CallOption) (*MsgCreateRingResponse, error) + FinalizeRing(ctx context.Context, in *MsgFinalizeRing, opts ...grpc.CallOption) (*MsgFinalizeRingResponse, error) UpdateRingByAcp(ctx context.Context, in *MsgUpdateRingByAcp, opts ...grpc.CallOption) (*MsgUpdateRingByAcpResponse, error) FinalizeRingReshareByThresholdSignature(ctx context.Context, in *MsgFinalizeRingReshareByThresholdSignature, opts ...grpc.CallOption) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) StoreDocument(ctx context.Context, in *MsgStoreDocument, opts ...grpc.CallOption) (*MsgStoreDocumentResponse, error) @@ -74,6 +76,16 @@ func (c *msgClient) CreateRing(ctx context.Context, in *MsgCreateRing, opts ...g return out, nil } +func (c *msgClient) FinalizeRing(ctx context.Context, in *MsgFinalizeRing, opts ...grpc.CallOption) (*MsgFinalizeRingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgFinalizeRingResponse) + err := c.cc.Invoke(ctx, Msg_FinalizeRing_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) UpdateRingByAcp(ctx context.Context, in *MsgUpdateRingByAcp, opts ...grpc.CallOption) (*MsgUpdateRingByAcpResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgUpdateRingByAcpResponse) @@ -143,6 +155,7 @@ type MsgServer interface { // UpdateParams defines a governance operation for updating module parameters. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) CreateRing(context.Context, *MsgCreateRing) (*MsgCreateRingResponse, error) + FinalizeRing(context.Context, *MsgFinalizeRing) (*MsgFinalizeRingResponse, error) UpdateRingByAcp(context.Context, *MsgUpdateRingByAcp) (*MsgUpdateRingByAcpResponse, error) FinalizeRingReshareByThresholdSignature(context.Context, *MsgFinalizeRingReshareByThresholdSignature) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) StoreDocument(context.Context, *MsgStoreDocument) (*MsgStoreDocumentResponse, error) @@ -165,6 +178,9 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (* func (UnimplementedMsgServer) CreateRing(context.Context, *MsgCreateRing) (*MsgCreateRingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRing not implemented") } +func (UnimplementedMsgServer) FinalizeRing(context.Context, *MsgFinalizeRing) (*MsgFinalizeRingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FinalizeRing not implemented") +} func (UnimplementedMsgServer) UpdateRingByAcp(context.Context, *MsgUpdateRingByAcp) (*MsgUpdateRingByAcpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRingByAcp not implemented") } @@ -240,6 +256,24 @@ func _Msg_CreateRing_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Msg_FinalizeRing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFinalizeRing) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FinalizeRing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_FinalizeRing_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FinalizeRing(ctx, req.(*MsgFinalizeRing)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_UpdateRingByAcp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateRingByAcp) if err := dec(in); err != nil { @@ -363,6 +397,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreateRing", Handler: _Msg_CreateRing_Handler, }, + { + MethodName: "FinalizeRing", + Handler: _Msg_FinalizeRing_Handler, + }, { MethodName: "UpdateRingByAcp", Handler: _Msg_UpdateRingByAcp_Handler, diff --git a/proto/sourcehub/orbis/document.proto b/proto/sourcehub/orbis/document.proto index 0c3db960..823fc83c 100644 --- a/proto/sourcehub/orbis/document.proto +++ b/proto/sourcehub/orbis/document.proto @@ -6,16 +6,15 @@ option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; // Document stores an encrypted Orbis document and its policy binding metadata. message Document { string id = 1; - string namespace = 2; - string creator_did = 3; - string ring_id = 4; - string document = 5; - string proof = 6; - string policy_id = 7; - string resource = 8; - string permission = 9; + string creator_did = 2; + string ring_id = 3; + string document = 4; + string proof = 5; + string policy_id = 6; + string resource = 7; + string permission = 8; // Absent means no tier. - optional string tier = 10; + optional string tier = 9; // Absent means no timestamp. - optional uint64 timestamp = 11; + optional uint64 timestamp = 10; } diff --git a/proto/sourcehub/orbis/events.proto b/proto/sourcehub/orbis/events.proto index 6fac4956..4a4ea9d2 100644 --- a/proto/sourcehub/orbis/events.proto +++ b/proto/sourcehub/orbis/events.proto @@ -6,31 +6,26 @@ option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; // EventRingCreated is emitted when a ring is created. message EventRingCreated { - string namespace = 1; - string ring_id = 2; - string creator_did = 3; - string artifact = 4; + string ring_id = 1; + string creator_did = 2; } // EventRingUpdated is emitted when a ring is updated in place. message EventRingUpdated { - string namespace = 1; - string ring_id = 2; - string updater_did = 3; + string ring_id = 1; + string updater_did = 2; } // EventDocumentStored is emitted when an encrypted document is stored. message EventDocumentStored { - string namespace = 1; - string document_id = 2; - string creator_did = 3; + string document_id = 1; + string creator_did = 2; } // EventKeyDerivationStored is emitted when a key derivation is stored. message EventKeyDerivationStored { - string namespace = 1; - string key_derivation_id = 2; - string creator_did = 3; + string key_derivation_id = 1; + string creator_did = 2; } // EventNodeInfoCreated is emitted when a node info record is created. @@ -44,3 +39,9 @@ message EventNodeInfoUpdated { string peer_id = 1; string controller_key = 2; } + +// EventRingDeleted is emitted when a ring is removed from state. +message EventRingDeleted { + string ring_id = 1; + string reason = 2; +} diff --git a/proto/sourcehub/orbis/key_derivation.proto b/proto/sourcehub/orbis/key_derivation.proto index a81f88f0..2d6c2ca0 100644 --- a/proto/sourcehub/orbis/key_derivation.proto +++ b/proto/sourcehub/orbis/key_derivation.proto @@ -6,11 +6,10 @@ option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; // KeyDerivation stores a signing derivation and its policy binding metadata. message KeyDerivation { string id = 1; - string namespace = 2; - string creator_did = 3; - string ring_id = 4; - string derivation = 5; - string policy_id = 6; - string resource = 7; - string permission = 8; + string creator_did = 2; + string ring_id = 3; + string derivation = 4; + string policy_id = 5; + string resource = 6; + string permission = 7; } diff --git a/proto/sourcehub/orbis/node_info.proto b/proto/sourcehub/orbis/node_info.proto index 8746380a..b72d5a03 100644 --- a/proto/sourcehub/orbis/node_info.proto +++ b/proto/sourcehub/orbis/node_info.proto @@ -7,7 +7,7 @@ option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; message NodeInfo { string peer_id = 1; string controller_key = 2; - repeated string whitelisted_namespaces = 3; + repeated string whitelisted_policy_ids = 3; repeated string whitelisted_ring_ids = 4; } diff --git a/proto/sourcehub/orbis/query.proto b/proto/sourcehub/orbis/query.proto index 6e9d8182..fb2630e8 100644 --- a/proto/sourcehub/orbis/query.proto +++ b/proto/sourcehub/orbis/query.proto @@ -26,29 +26,29 @@ service Query { option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/ring/{id}"; } - // Rings queries rings, optionally filtered by namespace. + // Rings queries rings. rpc Rings(QueryRingsRequest) returns (QueryRingsResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/rings"; } - // Document queries an encrypted document by namespace and id. + // Document queries an encrypted document by id. rpc Document(QueryDocumentRequest) returns (QueryDocumentResponse) { - option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/document/{namespace}/{id}"; + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/document/{id}"; } - // Documents queries encrypted documents within a namespace. + // Documents queries encrypted documents. rpc Documents(QueryDocumentsRequest) returns (QueryDocumentsResponse) { - option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/documents/{namespace}"; + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/documents"; } - // KeyDerivation queries a key derivation by namespace and id. + // KeyDerivation queries a key derivation by id. rpc KeyDerivation(QueryKeyDerivationRequest) returns (QueryKeyDerivationResponse) { - option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/key_derivation/{namespace}/{id}"; + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/key_derivation/{id}"; } - // KeyDerivations queries key derivations within a namespace. + // KeyDerivations queries key derivations. rpc KeyDerivations(QueryKeyDerivationsRequest) returns (QueryKeyDerivationsResponse) { - option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/key_derivations/{namespace}"; + option (google.api.http).get = "/sourcenetwork/sourcehub/orbis/key_derivations"; } // NodeInfo queries node info by node key. @@ -77,8 +77,7 @@ message QueryRingResponse { } message QueryRingsRequest { - string namespace = 1; - cosmos.base.query.v1beta1.PageRequest pagination = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 1; } message QueryRingsResponse { @@ -90,8 +89,7 @@ message QueryRingsResponse { } message QueryDocumentRequest { - string namespace = 1; - string id = 2; + string id = 1; } message QueryDocumentResponse { @@ -99,8 +97,7 @@ message QueryDocumentResponse { } message QueryDocumentsRequest { - string namespace = 1; - cosmos.base.query.v1beta1.PageRequest pagination = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 1; } message QueryDocumentsResponse { @@ -112,8 +109,7 @@ message QueryDocumentsResponse { } message QueryKeyDerivationRequest { - string namespace = 1; - string id = 2; + string id = 1; } message QueryKeyDerivationResponse { @@ -121,8 +117,7 @@ message QueryKeyDerivationResponse { } message QueryKeyDerivationsRequest { - string namespace = 1; - cosmos.base.query.v1beta1.PageRequest pagination = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 1; } message QueryKeyDerivationsResponse { diff --git a/proto/sourcehub/orbis/ring.proto b/proto/sourcehub/orbis/ring.proto index d074f9fb..959d4d24 100644 --- a/proto/sourcehub/orbis/ring.proto +++ b/proto/sourcehub/orbis/ring.proto @@ -6,16 +6,22 @@ option go_package = "github.com/sourcenetwork/sourcehub/x/orbis/types"; // Ring stores the active and pending committee metadata for an Orbis ring. message Ring { string id = 1; - string namespace = 2; - string creator_did = 3; - string ring_pk = 4; - repeated string peer_ids = 5; - uint32 threshold = 6; - repeated string new_peer_ids = 7; + string creator_did = 2; + string ring_pk = 3; + repeated string peer_node_keys = 4; + uint32 threshold = 5; + repeated string new_peer_node_keys = 6; // Absent means no pending threshold update. - optional uint32 new_threshold = 8; + optional uint32 new_threshold = 7; // Absent means automatic PSS refresh is disabled. - optional uint64 pss_interval = 9; - uint64 block_number_nonce = 10; - string policy_id = 11; + optional uint64 pss_interval = 8; + uint64 block_number_nonce = 9; + string policy_id = 10; + repeated RingConfirmation confirmations = 11; +} + +// RingConfirmation records a single peer's agreement on the ring public key. +message RingConfirmation { + string node_key = 1; + string ring_pk = 2; } diff --git a/proto/sourcehub/orbis/tx.proto b/proto/sourcehub/orbis/tx.proto index 5c6d4b8a..b9ad4a0e 100644 --- a/proto/sourcehub/orbis/tx.proto +++ b/proto/sourcehub/orbis/tx.proto @@ -17,6 +17,7 @@ service Msg { // UpdateParams defines a governance operation for updating module parameters. rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); rpc CreateRing(MsgCreateRing) returns (MsgCreateRingResponse); + rpc FinalizeRing(MsgFinalizeRing) returns (MsgFinalizeRingResponse); rpc UpdateRingByAcp(MsgUpdateRingByAcp) returns (MsgUpdateRingByAcpResponse); rpc FinalizeRingReshareByThresholdSignature(MsgFinalizeRingReshareByThresholdSignature) returns (MsgFinalizeRingReshareByThresholdSignatureResponse); rpc StoreDocument(MsgStoreDocument) returns (MsgStoreDocumentResponse); @@ -44,25 +45,33 @@ message MsgUpdateParamsResponse {} message MsgCreateRing { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; - string namespace = 2; - string ring_pk = 3; - repeated string peer_ids = 4; - uint32 threshold = 5; + repeated string peer_node_keys = 2; + uint32 threshold = 3; // Absent means automatic PSS refresh is disabled. - optional uint64 pss_interval = 6; - string policy_id = 7; - string artifact = 8; + optional uint64 pss_interval = 4; + string policy_id = 5; + // Absent means no nonce. Provide a nonce to disambiguate rings with identical settings. + optional string nonce = 6; } message MsgCreateRingResponse { string ring_id = 1; } +message MsgFinalizeRing { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string ring_id = 2; + string ring_pk = 3; +} + +message MsgFinalizeRingResponse {} + message MsgUpdateRingByAcp { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string ring_id = 2; - repeated string new_peer_ids = 3; + repeated string new_peer_node_keys = 3; // Absent means no pending threshold update. optional uint32 new_threshold = 4; // Absent means no PSS refresh interval update. @@ -84,28 +93,37 @@ message MsgFinalizeRingReshareByThresholdSignatureResponse {} message RingReshareFinalizeSignDoc { string domain = 1; string chain_id = 2; - string namespace = 3; - string ring_id = 4; - string ring_pk = 5; - bytes current_ring_sha256 = 6; - bytes finalized_ring_sha256 = 7; - uint64 block_number_nonce = 8; + string ring_id = 3; + string ring_pk = 4; + bytes current_ring_sha256 = 5; + bytes finalized_ring_sha256 = 6; + uint64 block_number_nonce = 7; +} + +message RingReshareSignState { + string ring_pk = 1; + repeated string peer_node_keys = 2; + uint32 threshold = 3; + repeated string new_peer_node_keys = 4; + optional uint32 new_threshold = 5; + optional uint64 pss_interval = 6; + uint64 block_number_nonce = 7; + string policy_id = 8; } message MsgStoreDocument { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; - string namespace = 2; - string ring_id = 3; - string document = 4; - string proof = 5; - string policy_id = 6; - string resource = 7; - string permission = 8; + string ring_id = 2; + string document = 3; + string proof = 4; + string policy_id = 5; + string resource = 6; + string permission = 7; // Absent means no tier. - optional string tier = 9; + optional string tier = 8; // Absent means no timestamp. - optional uint64 timestamp = 10; + optional uint64 timestamp = 9; } message MsgStoreDocumentResponse { @@ -115,12 +133,11 @@ message MsgStoreDocumentResponse { message MsgStoreKeyDerivation { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; - string namespace = 2; - string ring_id = 3; - string derivation = 4; - string policy_id = 5; - string resource = 6; - string permission = 7; + string ring_id = 2; + string derivation = 3; + string policy_id = 4; + string resource = 5; + string permission = 6; } message MsgStoreKeyDerivationResponse { @@ -132,19 +149,29 @@ message MsgCreateNodeInfo { string creator = 1; string peer_id = 2; string controller_key = 3; - repeated string whitelisted_namespaces = 4; + repeated string whitelisted_policy_ids = 4; repeated string whitelisted_ring_ids = 5; } message MsgCreateNodeInfoResponse {} +// MsgUpdateNodeInfo replaces mutable fields on an existing NodeInfo record. +// The signer must be the current controller_key holder. +// +// IMPORTANT: whitelisted_policy_ids and whitelisted_ring_ids are REPLACED in +// full, not merged. To add a single entry you must re-send the complete desired +// list. Sending an empty repeated field clears the whitelist entirely. message MsgUpdateNodeInfo { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string node_key = 2; // Absent means no peer_id update. optional string peer_id = 3; - repeated string whitelisted_namespaces = 4; + // Replaces the full policy whitelist. Send the complete desired list on every + // update; an empty field clears all whitelisted policies. + repeated string whitelisted_policy_ids = 4; + // Replaces the full ring whitelist. Send the complete desired list on every + // update; an empty field clears all whitelisted rings. repeated string whitelisted_ring_ids = 5; // Absent means no controller_key update. optional string controller_key = 6; diff --git a/x/orbis/keeper/acp.go b/x/orbis/keeper/acp.go index c28096dd..3033219b 100644 --- a/x/orbis/keeper/acp.go +++ b/x/orbis/keeper/acp.go @@ -3,30 +3,70 @@ package keeper import ( "context" + errorsmod "cosmossdk.io/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" + acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/sourcenetwork/sourcehub/x/orbis/types" ) -func hasRingUpdatePermission(ctx context.Context, k *Keeper, ring *types.Ring, actorDID string) (bool, error) { - req := &acptypes.QueryVerifyAccessRequestRequest{ - PolicyId: ring.PolicyId, +func (k *Keeper) registerRingACPObject(goCtx context.Context, creator string, policyID string, ringID string) error { + _, err := k.GetAcpKeeper().DirectPolicyCmd(goCtx, &acptypes.MsgDirectPolicyCmd{ + Creator: creator, + PolicyId: policyID, + Cmd: acptypes.NewRegisterObjectCmd(coretypes.NewObject(types.ACPResourceRing, ringID)), + }) + return err +} + +func (k *Keeper) ensureRingCreatePermission(goCtx context.Context, policyID string, creatorDID string) error { + if policyID == "" { + return errorsmod.Wrap(types.ErrInvalidRing, "missing policy_id") + } + + resp, err := k.GetAcpKeeper().VerifyAccessRequest(goCtx, &acptypes.QueryVerifyAccessRequestRequest{ + PolicyId: policyID, AccessRequest: &coretypes.AccessRequest{ Operations: []*coretypes.Operation{ { - Object: coretypes.NewObject(types.NamespaceResource, ring.Namespace), - Permission: types.UpdateRingPermission, + Object: coretypes.NewObject(types.ACPResourceRingPolicy, policyID), + Permission: types.ACPPermissionCreateRing, }, }, - Actor: &coretypes.Actor{ - Id: actorDID, - }, + Actor: coretypes.NewActor(creatorDID), }, - } - result, err := k.GetAcpKeeper().VerifyAccessRequest(ctx, req) + }) if err != nil { - return false, err + return err + } + if !resp.Valid { + return errorsmod.Wrapf(types.ErrUnauthorizedRingCreate, "actor %s cannot create rings under policy %s", creatorDID, policyID) + } + return nil +} + +func (k *Keeper) ensureRingUpdatePermission(goCtx context.Context, ring *types.Ring, updaterDID string) error { + if ring.PolicyId == "" { + return errorsmod.Wrap(types.ErrInvalidRing, "missing policy_id") } - return result.Valid, nil + resp, err := k.GetAcpKeeper().VerifyAccessRequest(goCtx, &acptypes.QueryVerifyAccessRequestRequest{ + PolicyId: ring.PolicyId, + AccessRequest: &coretypes.AccessRequest{ + Operations: []*coretypes.Operation{ + { + Object: coretypes.NewObject(types.ACPResourceRing, ring.Id), + Permission: types.ACPPermissionUpdateRing, + }, + }, + Actor: coretypes.NewActor(updaterDID), + }, + }) + if err != nil { + return err + } + if !resp.Valid { + return errorsmod.Wrapf(types.ErrUnauthorizedRingUpdate, "actor %s cannot update ring %s", updaterDID, ring.Id) + } + return nil } diff --git a/x/orbis/keeper/grpc_query.go b/x/orbis/keeper/grpc_query.go index e00e920c..7ea2ede5 100644 --- a/x/orbis/keeper/grpc_query.go +++ b/x/orbis/keeper/grpc_query.go @@ -43,11 +43,6 @@ func (k *Keeper) Rings(ctx context.Context, req *types.QueryRingsRequest) (*type return nil, status.Error(codes.InvalidArgument, "invalid request") } - namespaceFilter := "" - if req.Namespace != "" { - namespaceFilter = namespaceID(req.Namespace) - } - storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.RingKeyPrefix)) var rings []types.Ring @@ -55,9 +50,7 @@ func (k *Keeper) Rings(ctx context.Context, req *types.QueryRingsRequest) (*type pageRes, err := query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { var ring types.Ring k.cdc.MustUnmarshal(value, &ring) - if namespaceFilter == "" || ring.Namespace == namespaceFilter { - rings = append(rings, ring) - } + rings = append(rings, ring) return nil }) if err != nil { @@ -71,14 +64,11 @@ func (k *Keeper) Document(ctx context.Context, req *types.QueryDocumentRequest) if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.Namespace == "" { - return nil, status.Error(codes.InvalidArgument, types.ErrInvalidNamespaceId.Error()) - } if req.Id == "" { return nil, status.Error(codes.InvalidArgument, types.ErrInvalidDocumentId.Error()) } - document := k.GetDocument(ctx, namespaceID(req.Namespace), req.Id) + document := k.GetDocument(ctx, req.Id) if document == nil { return nil, status.Error(codes.NotFound, types.ErrDocumentNotFound.Error()) } @@ -90,12 +80,9 @@ func (k *Keeper) Documents(ctx context.Context, req *types.QueryDocumentsRequest if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.Namespace == "" { - return nil, status.Error(codes.InvalidArgument, types.ErrInvalidNamespaceId.Error()) - } storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) - store := prefix.NewStore(storeAdapter, append(types.KeyPrefix(types.DocumentKeyPrefix), types.NamespacePrefix(namespaceID(req.Namespace))...)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.DocumentKeyPrefix)) var documents []types.Document pageRes, err := query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { @@ -115,14 +102,11 @@ func (k *Keeper) KeyDerivation(ctx context.Context, req *types.QueryKeyDerivatio if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.Namespace == "" { - return nil, status.Error(codes.InvalidArgument, types.ErrInvalidNamespaceId.Error()) - } if req.Id == "" { return nil, status.Error(codes.InvalidArgument, types.ErrInvalidKeyDerivationId.Error()) } - keyDerivation := k.GetKeyDerivation(ctx, namespaceID(req.Namespace), req.Id) + keyDerivation := k.GetKeyDerivation(ctx, req.Id) if keyDerivation == nil { return nil, status.Error(codes.NotFound, types.ErrKeyDerivationNotFound.Error()) } @@ -147,12 +131,9 @@ func (k *Keeper) KeyDerivations(ctx context.Context, req *types.QueryKeyDerivati if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.Namespace == "" { - return nil, status.Error(codes.InvalidArgument, types.ErrInvalidNamespaceId.Error()) - } storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) - store := prefix.NewStore(storeAdapter, append(types.KeyPrefix(types.KeyDerivationKeyPrefix), types.NamespacePrefix(namespaceID(req.Namespace))...)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.KeyDerivationKeyPrefix)) var keyDerivations []types.KeyDerivation pageRes, err := query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { diff --git a/x/orbis/keeper/keeper.go b/x/orbis/keeper/keeper.go index 6accab08..ff8a0606 100644 --- a/x/orbis/keeper/keeper.go +++ b/x/orbis/keeper/keeper.go @@ -57,10 +57,6 @@ func (k *Keeper) Logger() log.Logger { return k.logger.With("module", fmt.Sprintf("x/%s", types.ModuleName)) } -func namespaceID(namespace string) string { - return types.GetNamespaceID(namespace) -} - func (k *Keeper) RingBytes(ring types.Ring) ([]byte, error) { return k.cdc.Marshal(&ring) } diff --git a/x/orbis/keeper/msg_server.go b/x/orbis/keeper/msg_server.go index 4cd79742..1a8051ad 100644 --- a/x/orbis/keeper/msg_server.go +++ b/x/orbis/keeper/msg_server.go @@ -3,6 +3,7 @@ package keeper import ( "context" "encoding/hex" + "slices" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -28,25 +29,29 @@ func (k *Keeper) UpdateParams(ctx context.Context, req *types.MsgUpdateParams) ( func (k *Keeper) CreateRing(goCtx context.Context, msg *types.MsgCreateRing) (*types.MsgCreateRingResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - namespaceID := namespaceID(msg.Namespace) creatorDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) if err != nil { return nil, err } pssInterval := optionalCreateRingPSSInterval(msg) + nonce := optionalCreateRingNonce(msg) - ringID := types.GenerateRingID(namespaceID, msg.RingPk, msg.PeerIds, msg.Threshold, pssInterval, msg.PolicyId) + for _, nodeKey := range msg.PeerNodeKeys { + if k.GetNodeInfo(goCtx, nodeKey) == nil { + return nil, errorsmod.Wrapf(types.ErrInvalidRing, "peer_node_key %q has no registered node info", nodeKey) + } + } + + ringID := types.GenerateRingID(msg.PeerNodeKeys, msg.Threshold, pssInterval, msg.PolicyId, nonce) if existing := k.GetRing(goCtx, ringID); existing != nil { return nil, types.ErrRingAlreadyExists } ring := types.Ring{ Id: ringID, - Namespace: namespaceID, CreatorDid: creatorDID, - RingPk: msg.RingPk, - PeerIds: append([]string(nil), msg.PeerIds...), + PeerNodeKeys: append([]string(nil), msg.PeerNodeKeys...), Threshold: msg.Threshold, PolicyId: msg.PolicyId, BlockNumberNonce: 0, @@ -56,13 +61,19 @@ func (k *Keeper) CreateRing(goCtx context.Context, msg *types.MsgCreateRing) (*t return nil, err } + if err := k.ensureRingCreatePermission(goCtx, msg.PolicyId, creatorDID); err != nil { + return nil, err + } + + if err := k.registerRingACPObject(goCtx, msg.Creator, msg.PolicyId, ringID); err != nil { + return nil, err + } + k.SetRing(goCtx, ring) if err := ctx.EventManager().EmitTypedEvent(&types.EventRingCreated{ - Namespace: namespaceID, RingId: ringID, CreatorDid: creatorDID, - Artifact: msg.Artifact, }); err != nil { return nil, err } @@ -70,37 +81,125 @@ func (k *Keeper) CreateRing(goCtx context.Context, msg *types.MsgCreateRing) (*t return &types.MsgCreateRingResponse{RingId: ringID}, nil } -func (k *Keeper) UpdateRingByAcp(goCtx context.Context, msg *types.MsgUpdateRingByAcp) (*types.MsgUpdateRingByAcpResponse, error) { +func (k *Keeper) FinalizeRing(goCtx context.Context, msg *types.MsgFinalizeRing) (*types.MsgFinalizeRingResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) ring := k.GetRing(goCtx, msg.RingId) if ring == nil { return nil, types.ErrRingNotFound } - if ring.PolicyId == "" { - return nil, types.ErrRingMissingPolicyId + if ring.RingPk != "" { + return nil, types.ErrRingAlreadyFinalized } - updaterDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) + signerKey, err := signerPublicKeyHex(ctx, k, msg.Creator) if err != nil { return nil, err } + authorized := false + for _, nodeKey := range ring.PeerNodeKeys { + if nodeKey == signerKey { + authorized = true + break + } + } + if !authorized { + return nil, types.ErrInvalidRingFinalizer + } + + // Reject double confirmations from the same node before checking for + // pk conflicts. Without this ordering a node that already confirmed + // correctly could delete the ring by re-submitting with a different + // ring_pk — the conflict check would fire first and wipe the ring. + for _, c := range ring.Confirmations { + if c.NodeKey == signerKey { + return nil, types.ErrDuplicateConfirmation + } + } + + // Check for a conflicting ring_pk from a prior confirmation by a + // different node. This is a genuine BFT violation. + for _, c := range ring.Confirmations { + if c.RingPk != msg.RingPk { + return nil, types.ErrRingPkConflict + } + } - allowed, err := hasRingUpdatePermission(goCtx, k, ring, updaterDID) + ring.Confirmations = append(ring.Confirmations, &types.RingConfirmation{ + NodeKey: signerKey, + RingPk: msg.RingPk, + }) + + if len(ring.Confirmations) < len(ring.PeerNodeKeys) { + k.SetRing(goCtx, *ring) + return &types.MsgFinalizeRingResponse{}, nil + } + + // All nodes confirmed — finalize. + finalizerDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) if err != nil { return nil, err } - if !allowed { - return nil, types.ErrInvalidRingUpdater + + ring.RingPk = msg.RingPk + ring.Confirmations = nil + if err := validateRing(ring); err != nil { + return nil, err } - newThreshold := optionalUpdateRingNewThreshold(msg) - if err := validateRingUpdate(msg.NewPeerIds, newThreshold, ring); err != nil { + k.SetRing(goCtx, *ring) + + if err := ctx.EventManager().EmitTypedEvent(&types.EventRingUpdated{ + RingId: ring.Id, + UpdaterDid: finalizerDID, + }); err != nil { + return nil, err + } + + return &types.MsgFinalizeRingResponse{}, nil +} + +func (k *Keeper) UpdateRingByAcp(goCtx context.Context, msg *types.MsgUpdateRingByAcp) (*types.MsgUpdateRingByAcpResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + ring := k.GetRing(goCtx, msg.RingId) + if ring == nil { + return nil, types.ErrRingNotFound + } + if err := requireRingFinalized(ring); err != nil { return nil, err } - if len(msg.NewPeerIds) > 0 { - ring.NewPeerIds = append([]string(nil), msg.NewPeerIds...) + updaterDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) + if err != nil { + return nil, err + } + if err := k.ensureRingUpdatePermission(goCtx, ring, updaterDID); err != nil { + return nil, err + } + + newThreshold := optionalUpdateRingNewThreshold(msg) + if err := validateRingUpdate(msg.NewPeerNodeKeys, newThreshold, ring); err != nil { + return nil, err + } + for _, nodeKey := range msg.NewPeerNodeKeys { + nodeInfo := k.GetNodeInfo(goCtx, nodeKey) + if nodeInfo == nil { + return nil, errorsmod.Wrapf(types.ErrInvalidRing, "peer_node_key %q has no registered node info", nodeKey) + } + if !nodeInfoAllowsRing(nodeInfo, ring) { + return nil, errorsmod.Wrapf( + types.ErrInvalidRing, + "peer_node_key %q is not whitelisted for policy_id %q or ring_id %q", + nodeKey, + ring.PolicyId, + ring.Id, + ) + } + } + + if len(msg.NewPeerNodeKeys) > 0 { + ring.NewPeerNodeKeys = append([]string(nil), msg.NewPeerNodeKeys...) } if newThreshold != nil { setRingNewThreshold(ring, newThreshold) @@ -115,7 +214,6 @@ func (k *Keeper) UpdateRingByAcp(goCtx context.Context, msg *types.MsgUpdateRing k.SetRing(goCtx, *ring) if err := ctx.EventManager().EmitTypedEvent(&types.EventRingUpdated{ - Namespace: ring.Namespace, RingId: ring.Id, UpdaterDid: updaterDID, }); err != nil { @@ -125,6 +223,11 @@ func (k *Keeper) UpdateRingByAcp(goCtx context.Context, msg *types.MsgUpdateRing return &types.MsgUpdateRingByAcpResponse{}, nil } +func nodeInfoAllowsRing(nodeInfo *types.NodeInfo, ring *types.Ring) bool { + return slices.Contains(nodeInfo.WhitelistedPolicyIds, ring.PolicyId) || + slices.Contains(nodeInfo.WhitelistedRingIds, ring.Id) +} + func (k *Keeper) FinalizeRingReshareByThresholdSignature( goCtx context.Context, msg *types.MsgFinalizeRingReshareByThresholdSignature, @@ -141,21 +244,12 @@ func (k *Keeper) FinalizeRingReshareByThresholdSignature( return nil, err } - currentRingBytes, err := k.RingBytes(*ring) - if err != nil { - return nil, errorsmod.Wrapf(types.ErrInvalidRing, "could not marshal current ring: %s", err) - } - signDocFinalizedRing, err := ringForReshareFinalization(ring) if err != nil { return nil, err } - signDocFinalizedRingBytes, err := k.RingBytes(*signDocFinalizedRing) - if err != nil { - return nil, errorsmod.Wrapf(types.ErrInvalidRing, "could not marshal finalized ring: %s", err) - } - signBytes, err := ringReshareFinalizeSignBytes(ctx.ChainID(), ring, currentRingBytes, signDocFinalizedRingBytes) + signBytes, err := ringReshareFinalizeSignBytes(ctx.ChainID(), ring, signDocFinalizedRing) if err != nil { return nil, err } @@ -168,7 +262,6 @@ func (k *Keeper) FinalizeRingReshareByThresholdSignature( k.SetRing(goCtx, finalizedRing) if err := ctx.EventManager().EmitTypedEvent(&types.EventRingUpdated{ - Namespace: finalizedRing.Namespace, RingId: finalizedRing.Id, UpdaterDid: updaterDID, }); err != nil { @@ -181,10 +274,13 @@ func (k *Keeper) FinalizeRingReshareByThresholdSignature( func (k *Keeper) StoreDocument(goCtx context.Context, msg *types.MsgStoreDocument) (*types.MsgStoreDocumentResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - namespaceID := namespaceID(msg.Namespace) - if k.GetRing(goCtx, msg.RingId) == nil { + ring := k.GetRing(goCtx, msg.RingId) + if ring == nil { return nil, types.ErrRingNotFound } + if err := requireRingFinalized(ring); err != nil { + return nil, err + } creatorDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) if err != nil { @@ -194,14 +290,13 @@ func (k *Keeper) StoreDocument(goCtx context.Context, msg *types.MsgStoreDocumen tier := optionalStoreDocumentTier(msg) timestamp := optionalStoreDocumentTimestamp(msg) - documentID := types.GenerateDocumentID(namespaceID, msg.RingId, msg.Document, msg.Proof, msg.PolicyId, msg.Resource, msg.Permission, tier, timestamp) - if existing := k.GetDocument(goCtx, namespaceID, documentID); existing != nil { + documentID := types.GenerateDocumentID(msg.RingId, msg.Document, msg.Proof, msg.PolicyId, msg.Resource, msg.Permission, tier, timestamp) + if existing := k.GetDocument(goCtx, documentID); existing != nil { return nil, types.ErrDocumentAlreadyExists } document := types.Document{ Id: documentID, - Namespace: namespaceID, CreatorDid: creatorDID, RingId: msg.RingId, Document: msg.Document, @@ -219,7 +314,6 @@ func (k *Keeper) StoreDocument(goCtx context.Context, msg *types.MsgStoreDocumen k.SetDocument(goCtx, document) if err := ctx.EventManager().EmitTypedEvent(&types.EventDocumentStored{ - Namespace: namespaceID, DocumentId: documentID, CreatorDid: creatorDID, }); err != nil { @@ -242,10 +336,10 @@ func (k *Keeper) CreateNodeInfo(goCtx context.Context, msg *types.MsgCreateNodeI } nodeInfo := types.NodeInfo{ - PeerId: msg.PeerId, - ControllerKey: msg.ControllerKey, - WhitelistedNamespaces: append([]string(nil), msg.WhitelistedNamespaces...), - WhitelistedRingIds: append([]string(nil), msg.WhitelistedRingIds...), + PeerId: msg.PeerId, + ControllerKey: msg.ControllerKey, + WhitelistedPolicyIds: append([]string(nil), msg.WhitelistedPolicyIds...), + WhitelistedRingIds: append([]string(nil), msg.WhitelistedRingIds...), } if err := validateNodeInfo(&nodeInfo); err != nil { return nil, err @@ -285,7 +379,7 @@ func (k *Keeper) UpdateNodeInfo(goCtx context.Context, msg *types.MsgUpdateNodeI if msg.XControllerKey != nil { nodeInfo.ControllerKey = msg.GetControllerKey() } - nodeInfo.WhitelistedNamespaces = append([]string(nil), msg.WhitelistedNamespaces...) + nodeInfo.WhitelistedPolicyIds = append([]string(nil), msg.WhitelistedPolicyIds...) nodeInfo.WhitelistedRingIds = append([]string(nil), msg.WhitelistedRingIds...) if err := validateNodeInfo(nodeInfo); err != nil { return nil, err @@ -328,24 +422,26 @@ func signerPublicKeyHex(ctx sdk.Context, k *Keeper, address string) (string, err func (k *Keeper) StoreKeyDerivation(goCtx context.Context, msg *types.MsgStoreKeyDerivation) (*types.MsgStoreKeyDerivationResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - namespaceID := namespaceID(msg.Namespace) - if k.GetRing(goCtx, msg.RingId) == nil { + ring := k.GetRing(goCtx, msg.RingId) + if ring == nil { return nil, types.ErrRingNotFound } + if err := requireRingFinalized(ring); err != nil { + return nil, err + } creatorDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) if err != nil { return nil, err } - keyDerivationID := types.GenerateKeyDerivationID(namespaceID, msg.RingId, msg.Derivation, msg.PolicyId, msg.Resource, msg.Permission) - if existing := k.GetKeyDerivation(goCtx, namespaceID, keyDerivationID); existing != nil { + keyDerivationID := types.GenerateKeyDerivationID(msg.RingId, msg.Derivation, msg.PolicyId, msg.Resource, msg.Permission) + if existing := k.GetKeyDerivation(goCtx, keyDerivationID); existing != nil { return nil, types.ErrKeyDerivationAlreadyExists } keyDerivation := types.KeyDerivation{ Id: keyDerivationID, - Namespace: namespaceID, CreatorDid: creatorDID, RingId: msg.RingId, Derivation: msg.Derivation, @@ -360,7 +456,6 @@ func (k *Keeper) StoreKeyDerivation(goCtx context.Context, msg *types.MsgStoreKe k.SetKeyDerivation(goCtx, keyDerivation) if err := ctx.EventManager().EmitTypedEvent(&types.EventKeyDerivationStored{ - Namespace: namespaceID, KeyDerivationId: keyDerivationID, CreatorDid: creatorDID, }); err != nil { diff --git a/x/orbis/keeper/msg_server_test.go b/x/orbis/keeper/msg_server_test.go index fc242fd3..977d1202 100644 --- a/x/orbis/keeper/msg_server_test.go +++ b/x/orbis/keeper/msg_server_test.go @@ -2,71 +2,123 @@ package keeper_test import ( "encoding/hex" + "fmt" "testing" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/stretchr/testify/require" appparams "github.com/sourcenetwork/sourcehub/app/params" keepertestutil "github.com/sourcenetwork/sourcehub/testutil/keeper" + acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" + "github.com/sourcenetwork/sourcehub/x/orbis/keeper" "github.com/sourcenetwork/sourcehub/x/orbis/types" ) const testDID = "did:example:orbis-creator" +const testPolicyOwnerDID = "did:example:orbis-policy-owner" +const testOperatorDID = "did:example:orbis-operator" +const testOutsiderDID = "did:example:orbis-outsider" +const testPeerDID = "did:example:orbis-peer" + +const testOrbisRingPolicy = ` +name: orbis ring policy +resources: +- name: ring_policy + permissions: + - name: create_ring + expr: ring_creator + relations: + - name: ring_creator + types: + - actor +- name: ring + permissions: + - name: update_ring + expr: operator + relations: + - name: operator + types: + - actor +` + +const testNonRingPolicy = ` +name: non-ring policy +resources: +- name: file +` func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { - k, ctx := keepertestutil.OrbisKeeper(t) + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) - creator := testAddress() - namespace := "vault" - namespaceID := types.GetNamespaceID(namespace) - pssInterval := uint64(600) + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + peer3Addr, peer3Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer3") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + pssInterval := uint64(600) createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ - Creator: creator, - Namespace: namespace, - RingPk: "ring-pk", - PeerIds: []string{"peer-1", "peer-2", "peer-3"}, - Threshold: 2, + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key, peer3Key}, + Threshold: 2, + PolicyId: policyID, XPssInterval: &types.MsgCreateRing_PssInterval{ PssInterval: pssInterval, }, - PolicyId: "policy-ring", - Artifact: "ring-artifact", }) require.NoError(t, err) ring := k.GetRing(ctx, createRingResp.RingId) require.NotNil(t, ring) - require.Equal(t, namespaceID, ring.Namespace) require.Equal(t, testDID, ring.CreatorDid) - require.Equal(t, "ring-pk", ring.RingPk) - require.Equal(t, []string{"peer-1", "peer-2", "peer-3"}, ring.PeerIds) + require.Empty(t, ring.RingPk) + require.Equal(t, []string{peer1Key, peer2Key, peer3Key}, ring.PeerNodeKeys) require.Equal(t, uint32(2), ring.Threshold) + require.Equal(t, policyID, ring.PolicyId) require.NotNil(t, ring.XPssInterval) require.Equal(t, pssInterval, ring.GetPssInterval()) + // all three nodes must confirm; ring not finalized until the last one + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + require.Empty(t, k.GetRing(ctx, createRingResp.RingId).RingPk) + + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + require.Empty(t, k.GetRing(ctx, createRingResp.RingId).RingPk) + + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer3Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + require.Equal(t, "ring-pk", k.GetRing(ctx, createRingResp.RingId).RingPk) + + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{ + Creator: peer1Addr, + RingId: createRingResp.RingId, + RingPk: "ring-pk-2", + }) + require.ErrorIs(t, err, types.ErrRingAlreadyFinalized) + _, err = k.CreateRing(ctx, &types.MsgCreateRing{ - Creator: creator, - Namespace: namespace, - RingPk: "ring-pk", - PeerIds: []string{"peer-1", "peer-2", "peer-3"}, - Threshold: 2, + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key, peer3Key}, + Threshold: 2, + PolicyId: policyID, XPssInterval: &types.MsgCreateRing_PssInterval{ PssInterval: pssInterval, }, - PolicyId: "policy-ring", }) require.ErrorIs(t, err, types.ErrRingAlreadyExists) tier := "gold" timestamp := uint64(42) storeDocumentMsg := &types.MsgStoreDocument{ - Creator: creator, - Namespace: namespace, + Creator: creatorAddr, RingId: createRingResp.RingId, Document: "ciphertext", Proof: "proof", @@ -84,11 +136,11 @@ func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { require.NoError(t, err) require.Equal( t, - types.GenerateDocumentID(namespaceID, createRingResp.RingId, "ciphertext", "proof", "policy-doc", "secret", "decrypt", &tier, ×tamp), + types.GenerateDocumentID(createRingResp.RingId, "ciphertext", "proof", "policy-doc", "secret", "decrypt", &tier, ×tamp), storeDocumentResp.DocumentId, ) - document := k.GetDocument(ctx, namespaceID, storeDocumentResp.DocumentId) + document := k.GetDocument(ctx, storeDocumentResp.DocumentId) require.NotNil(t, document) require.Equal(t, testDID, document.CreatorDid) require.NotNil(t, document.XTier) @@ -100,8 +152,7 @@ func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { require.ErrorIs(t, err, types.ErrDocumentAlreadyExists) storeKeyDerivationMsg := &types.MsgStoreKeyDerivation{ - Creator: creator, - Namespace: namespace, + Creator: creatorAddr, RingId: createRingResp.RingId, Derivation: "m/0/1", PolicyId: "policy-derivation", @@ -112,11 +163,11 @@ func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { require.NoError(t, err) require.Equal( t, - types.GenerateKeyDerivationID(namespaceID, createRingResp.RingId, "m/0/1", "policy-derivation", "derived-key", "derive"), + types.GenerateKeyDerivationID(createRingResp.RingId, "m/0/1", "policy-derivation", "derived-key", "derive"), storeKeyDerivationResp.KeyDerivationId, ) - keyDerivation := k.GetKeyDerivation(ctx, namespaceID, storeKeyDerivationResp.KeyDerivationId) + keyDerivation := k.GetKeyDerivation(ctx, storeKeyDerivationResp.KeyDerivationId) require.NotNil(t, keyDerivation) require.Equal(t, testDID, keyDerivation.CreatorDid) require.Equal(t, "m/0/1", keyDerivation.Derivation) @@ -125,31 +176,397 @@ func TestMsgServer_CreateRingStoreDocumentAndKeyDerivation(t *testing.T) { require.ErrorIs(t, err, types.ErrKeyDerivationAlreadyExists) } +func TestMsgServer_CreateRing_NonceDisambiguatesIdenticalSettings(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + base := &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: policyID, + } + + // first ring — no nonce + resp1, err := k.CreateRing(ctx, base) + require.NoError(t, err) + + // identical settings without nonce clash + _, err = k.CreateRing(ctx, base) + require.ErrorIs(t, err, types.ErrRingAlreadyExists) + + // same settings but with a nonce produces a different ring_id + resp2, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: policyID, + XNonce: &types.MsgCreateRing_Nonce{Nonce: "attempt-2"}, + }) + require.NoError(t, err) + require.NotEqual(t, resp1.RingId, resp2.RingId) + + // different nonce values produce different ring_ids + resp3, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: policyID, + XNonce: &types.MsgCreateRing_Nonce{Nonce: "attempt-3"}, + }) + require.NoError(t, err) + require.NotEqual(t, resp2.RingId, resp3.RingId) +} + +func TestMsgServer_CreateRingRequiresPolicyID(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + + _, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + }) + require.ErrorIs(t, err, types.ErrInvalidRing) + require.ErrorContains(t, err, "missing policy_id") +} + +func TestMsgServer_CreateRingRequiresExistingRingPolicy(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + + ringID := types.GenerateRingID([]string{peer1Key}, 1, nil, "missing-policy", nil) + _, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: "missing-policy", + }) + require.Error(t, err) + require.Nil(t, k.GetRing(ctx, ringID)) +} + +func TestMsgServer_CreateRingRequiresRegisteredRingPolicyControlObject(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + policyID := createACPPolicy(t, k, ctx, creatorAddr, testOrbisRingPolicy) + + ringID := types.GenerateRingID([]string{peer1Key}, 1, nil, policyID, nil) + _, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.ErrorIs(t, err, types.ErrUnauthorizedRingCreate) + require.Nil(t, k.GetRing(ctx, ringID)) +} + +func TestMsgServer_CreateRingRequiresPolicyWithRingResource(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + policyID := createACPPolicy(t, k, ctx, creatorAddr, testNonRingPolicy) + + ringID := types.GenerateRingID([]string{peer1Key}, 1, nil, policyID, nil) + _, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.Error(t, err) + require.Nil(t, k.GetRing(ctx, ringID)) +} + +func TestMsgServer_CreateRingRejectsActorWithoutCreatePermission(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + policyOwnerCtx := ctxWithDID(ctx, testPolicyOwnerDID) + creatorCtx := ctxWithDID(ctx, testDID) + + policyOwnerAddr, _ := testAccountWithPubKey(t, policyOwnerCtx, authKeeper) + creatorAddr, _ := testAccountWithPubKey(t, creatorCtx, authKeeper) + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, policyOwnerCtx, "12D3KooWPeer1") + policyID := createOrbisRingPolicy(t, k, policyOwnerCtx, policyOwnerAddr) + + ringID := types.GenerateRingID([]string{peer1Key}, 1, nil, policyID, nil) + _, err := k.CreateRing(creatorCtx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.ErrorIs(t, err, types.ErrUnauthorizedRingCreate) + require.Nil(t, k.GetRing(creatorCtx, ringID)) +} + +func TestMsgServer_CreateRingAllowsRingCreatorRelation(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + policyOwnerCtx := ctxWithDID(ctx, testPolicyOwnerDID) + creatorCtx := ctxWithDID(ctx, testDID) + + policyOwnerAddr, _ := testAccountWithPubKey(t, policyOwnerCtx, authKeeper) + creatorAddr, _ := testAccountWithPubKey(t, creatorCtx, authKeeper) + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, policyOwnerCtx, "12D3KooWPeer1") + policyID := createOrbisRingPolicy(t, k, policyOwnerCtx, policyOwnerAddr) + grantRingCreator(t, k, policyOwnerCtx, policyOwnerAddr, policyID, testDID) + + createRingResp, err := k.CreateRing(creatorCtx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + + ring := k.GetRing(creatorCtx, createRingResp.RingId) + require.NotNil(t, ring) + require.Equal(t, testDID, ring.CreatorDid) + + ownerResp, err := k.GetAcpKeeper().ObjectOwner(creatorCtx, &acptypes.QueryObjectOwnerRequest{ + PolicyId: policyID, + Object: coretypes.NewObject(types.ACPResourceRing, createRingResp.RingId), + }) + require.NoError(t, err) + require.True(t, ownerResp.IsRegistered) + require.Equal(t, testDID, ownerResp.Record.Metadata.OwnerDid) +} + +func TestMsgServer_CreateRingRegistersACPObject(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + + ownerResp, err := k.GetAcpKeeper().ObjectOwner(ctx, &acptypes.QueryObjectOwnerRequest{ + PolicyId: policyID, + Object: coretypes.NewObject(types.ACPResourceRing, createRingResp.RingId), + }) + require.NoError(t, err) + require.True(t, ownerResp.IsRegistered) + require.NotNil(t, ownerResp.Record) +} + +func TestMsgServer_FinalizeRing_UnauthorizedNonPeer(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + _, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + + outsiderAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{ + Creator: outsiderAddr, + RingId: createRingResp.RingId, + RingPk: "ring-pk", + }) + require.ErrorIs(t, err, types.ErrInvalidRingFinalizer) +} + +func TestMsgServer_FinalizeRing_RequiresAllNodes(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + peer3Addr, peer3Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer3") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key, peer3Key}, + Threshold: 2, + PolicyId: policyID, + }) + require.NoError(t, err) + ringID := createRingResp.RingId + + // first confirmation — not finalized + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: ringID, RingPk: "agreed-pk"}) + require.NoError(t, err) + require.Empty(t, k.GetRing(ctx, ringID).RingPk) + require.Len(t, k.GetRing(ctx, ringID).Confirmations, 1) + + // second confirmation — threshold=2 is met but not all nodes, so still not finalized + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: ringID, RingPk: "agreed-pk"}) + require.NoError(t, err) + require.Empty(t, k.GetRing(ctx, ringID).RingPk) + require.Len(t, k.GetRing(ctx, ringID).Confirmations, 2) + + // third confirmation — all nodes confirmed → finalized, confirmations cleared + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer3Addr, RingId: ringID, RingPk: "agreed-pk"}) + require.NoError(t, err) + ring := k.GetRing(ctx, ringID) + require.Equal(t, "agreed-pk", ring.RingPk) + require.Empty(t, ring.Confirmations) + + // any further confirmation must fail + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: ringID, RingPk: "agreed-pk"}) + require.ErrorIs(t, err, types.ErrRingAlreadyFinalized) +} + +func TestMsgServer_FinalizeRing_PkConflictRejected(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 2, + PolicyId: policyID, + }) + require.NoError(t, err) + ringID := createRingResp.RingId + + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: ringID, RingPk: "pk-version-A"}) + require.NoError(t, err) + + // peer2 disagrees on the ring_pk -> conflict rejected, ring remains + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: ringID, RingPk: "pk-version-B"}) + require.ErrorIs(t, err, types.ErrRingPkConflict) + require.NotNil(t, k.GetRing(ctx, ringID)) +} + +func TestMsgServer_FinalizeRing_DuplicateConfirmationRejected(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + _, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 2, + PolicyId: policyID, + }) + require.NoError(t, err) + ringID := createRingResp.RingId + + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: ringID, RingPk: "ring-pk"}) + require.NoError(t, err) + + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: ringID, RingPk: "ring-pk"}) + require.ErrorIs(t, err, types.ErrDuplicateConfirmation) +} + +func TestMsgServer_RingNotFinalizedGuard(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + ringID := createRingResp.RingId + + _, err = k.StoreDocument(ctx, &types.MsgStoreDocument{ + Creator: creatorAddr, + RingId: ringID, + Document: "ciphertext", + Proof: "proof", + PolicyId: "p", + Resource: "r", + Permission: "read", + }) + require.ErrorIs(t, err, types.ErrRingNotFinalized) + + _, err = k.StoreKeyDerivation(ctx, &types.MsgStoreKeyDerivation{ + Creator: creatorAddr, + RingId: ringID, + Derivation: "m/0/1", + PolicyId: "p", + Resource: "r", + Permission: "derive", + }) + require.ErrorIs(t, err, types.ErrRingNotFinalized) +} + func TestMsgServer_AbsentOptionalFieldsAreTreatedAsNone(t *testing.T) { - k, ctx := keepertestutil.OrbisKeeper(t) + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) - creator := testAddress() - namespace := "vault" - namespaceID := types.GetNamespaceID(namespace) + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ - Creator: creator, - Namespace: namespace, - RingPk: "ring-pk", - PeerIds: []string{"peer-1", "peer-2"}, - Threshold: 1, + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, }) require.NoError(t, err) require.Equal( t, - types.GenerateRingID(namespaceID, "ring-pk", []string{"peer-1", "peer-2"}, 1, nil, ""), + types.GenerateRingID([]string{peer1Key, peer2Key}, 1, nil, policyID, nil), createRingResp.RingId, ) + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + storeDocumentResp, err := k.StoreDocument(ctx, &types.MsgStoreDocument{ - Creator: creator, - Namespace: namespace, + Creator: creatorAddr, RingId: createRingResp.RingId, Document: "ciphertext", Proof: "proof", @@ -160,26 +577,27 @@ func TestMsgServer_AbsentOptionalFieldsAreTreatedAsNone(t *testing.T) { require.NoError(t, err) require.Equal( t, - types.GenerateDocumentID(namespaceID, createRingResp.RingId, "ciphertext", "proof", "policy-doc", "secret", "decrypt", nil, nil), + types.GenerateDocumentID(createRingResp.RingId, "ciphertext", "proof", "policy-doc", "secret", "decrypt", nil, nil), storeDocumentResp.DocumentId, ) } func TestMsgServer_ZeroPSSIntervalIsPreservedWhenPresent(t *testing.T) { - k, ctx := keepertestutil.OrbisKeeper(t) + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) - creator := testAddress() - namespace := "vault" - namespaceID := types.GetNamespaceID(namespace) + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) pssInterval := uint64(0) + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + _, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ - Creator: creator, - Namespace: namespace, - RingPk: "ring-pk", - PeerIds: []string{"peer-1", "peer-2"}, - Threshold: 1, + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, XPssInterval: &types.MsgCreateRing_PssInterval{ PssInterval: pssInterval, }, @@ -187,7 +605,7 @@ func TestMsgServer_ZeroPSSIntervalIsPreservedWhenPresent(t *testing.T) { require.NoError(t, err) require.Equal( t, - types.GenerateRingID(namespaceID, "ring-pk", []string{"peer-1", "peer-2"}, 1, &pssInterval, ""), + types.GenerateRingID([]string{peer1Key, peer2Key}, 1, &pssInterval, policyID, nil), createRingResp.RingId, ) @@ -197,51 +615,351 @@ func TestMsgServer_ZeroPSSIntervalIsPreservedWhenPresent(t *testing.T) { require.Equal(t, pssInterval, ring.GetPssInterval()) } -func TestMsgServer_UpdateRingByAcpRequiresPolicy(t *testing.T) { - k, ctx := keepertestutil.OrbisKeeper(t) - ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) +func TestMsgServer_UpdateRingByAcpAllowsRingOwner(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctxWithDID(ctx, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + + pssInterval := uint64(900) + _, err = k.UpdateRingByAcp(ctx, &types.MsgUpdateRingByAcp{ + Creator: creatorAddr, + RingId: createRingResp.RingId, + XPssInterval: &types.MsgUpdateRingByAcp_PssInterval{ + PssInterval: pssInterval, + }, + }) + require.NoError(t, err) + + ring := k.GetRing(ctx, createRingResp.RingId) + require.NotNil(t, ring) + require.Equal(t, policyID, ring.PolicyId) + require.Equal(t, pssInterval, ring.GetPssInterval()) +} + +func TestMsgServer_UpdateRingByAcpRejectsThresholdOnlyAboveExistingCommitteeSize(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctxWithDID(ctx, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ - Creator: testAddress(), - Namespace: "vault", - RingPk: "ring-pk", - PeerIds: []string{"peer-1", "peer-2"}, - Threshold: 1, + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, }) require.NoError(t, err) + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + _, err = k.UpdateRingByAcp(ctx, &types.MsgUpdateRingByAcp{ - Creator: testAddress(), - RingId: createRingResp.RingId, - NewPeerIds: []string{"peer-3", "peer-4"}, + Creator: creatorAddr, + RingId: createRingResp.RingId, + XNewThreshold: &types.MsgUpdateRingByAcp_NewThreshold{ + NewThreshold: 3, + }, + }) + require.ErrorIs(t, err, types.ErrInvalidRing) + require.ErrorContains(t, err, "new_threshold (3) cannot exceed existing committee size (2)") + + ring := k.GetRing(ctx, createRingResp.RingId) + require.NotNil(t, ring) + require.Nil(t, ring.XNewThreshold) +} + +func TestMsgServer_UpdateRingByAcpRejectsNewPeerWithoutNodeInfo(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctxWithDID(ctx, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + + _, missingNodeInfoKey := testAccountWithPubKey(t, ctx, authKeeper) + _, err = k.UpdateRingByAcp(ctx, &types.MsgUpdateRingByAcp{ + Creator: creatorAddr, + RingId: createRingResp.RingId, + NewPeerNodeKeys: []string{missingNodeInfoKey}, + XNewThreshold: &types.MsgUpdateRingByAcp_NewThreshold{ + NewThreshold: 1, + }, + }) + require.ErrorIs(t, err, types.ErrInvalidRing) + require.ErrorContains(t, err, fmt.Sprintf("peer_node_key %q has no registered node info", missingNodeInfoKey)) + + ring := k.GetRing(ctx, createRingResp.RingId) + require.NotNil(t, ring) + require.Empty(t, ring.NewPeerNodeKeys) + require.Nil(t, ring.XNewThreshold) +} + +func TestMsgServer_UpdateRingByAcpRejectsNewPeerWithoutRingWhitelist(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + ctx = ctxWithDID(ctx, testDID) + + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + _, err = k.FinalizeRing(ctx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + + _, peer3Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer3") + _, err = k.UpdateRingByAcp(ctx, &types.MsgUpdateRingByAcp{ + Creator: creatorAddr, + RingId: createRingResp.RingId, + NewPeerNodeKeys: []string{peer3Key}, + XNewThreshold: &types.MsgUpdateRingByAcp_NewThreshold{ + NewThreshold: 1, + }, + }) + require.ErrorIs(t, err, types.ErrInvalidRing) + require.ErrorContains( + t, + err, + fmt.Sprintf("peer_node_key %q is not whitelisted for policy_id %q or ring_id %q", peer3Key, policyID, createRingResp.RingId), + ) + + ring := k.GetRing(ctx, createRingResp.RingId) + require.NotNil(t, ring) + require.Empty(t, ring.NewPeerNodeKeys) + require.Nil(t, ring.XNewThreshold) +} + +func TestMsgServer_UpdateRingByAcpRejectsUnauthorizedActor(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + creatorCtx := ctxWithDID(ctx, testDID) + peerCtx := ctxWithDID(ctx, testPeerDID) + outsiderCtx := ctxWithDID(ctx, testOutsiderDID) + + creatorAddr, _ := testAccountWithPubKey(t, creatorCtx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, creatorCtx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, creatorCtx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, creatorCtx, creatorAddr) + + createRingResp, err := k.CreateRing(creatorCtx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + + _, err = k.FinalizeRing(peerCtx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + _, err = k.FinalizeRing(peerCtx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + + outsiderAddr, _ := testAccountWithPubKey(t, outsiderCtx, authKeeper) + _, err = k.UpdateRingByAcp(outsiderCtx, &types.MsgUpdateRingByAcp{ + Creator: outsiderAddr, + RingId: createRingResp.RingId, + XPssInterval: &types.MsgUpdateRingByAcp_PssInterval{ + PssInterval: 900, + }, + }) + require.ErrorIs(t, err, types.ErrUnauthorizedRingUpdate) + + ring := k.GetRing(creatorCtx, createRingResp.RingId) + require.NotNil(t, ring) + require.Nil(t, ring.XPssInterval) +} + +func TestMsgServer_UpdateRingByAcpUsesRingPolicy(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + creatorCtx := ctxWithDID(ctx, testDID) + peerCtx := ctxWithDID(ctx, testPeerDID) + operatorCtx := ctxWithDID(ctx, testOperatorDID) + + creatorAddr, _ := testAccountWithPubKey(t, creatorCtx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, creatorCtx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, creatorCtx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, creatorCtx, creatorAddr) + + createRingResp, err := k.CreateRing(creatorCtx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + + _, err = k.FinalizeRing(peerCtx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + _, err = k.FinalizeRing(peerCtx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + + operatorAddr, _ := testAccountWithPubKey(t, operatorCtx, authKeeper) + otherPolicyID := createOrbisRingPolicy(t, k, creatorCtx, creatorAddr) + _, err = k.GetAcpKeeper().DirectPolicyCmd(creatorCtx, &acptypes.MsgDirectPolicyCmd{ + Creator: creatorAddr, + PolicyId: otherPolicyID, + Cmd: acptypes.NewRegisterObjectCmd(coretypes.NewObject(types.ACPResourceRing, createRingResp.RingId)), + }) + require.NoError(t, err) + _, err = k.GetAcpKeeper().DirectPolicyCmd(creatorCtx, &acptypes.MsgDirectPolicyCmd{ + Creator: creatorAddr, + PolicyId: otherPolicyID, + Cmd: acptypes.NewSetRelationshipCmd(coretypes.NewActorRelationship( + types.ACPResourceRing, + createRingResp.RingId, + types.ACPRelationOperator, + testOperatorDID, + )), + }) + require.NoError(t, err) + + _, err = k.UpdateRingByAcp(operatorCtx, &types.MsgUpdateRingByAcp{ + Creator: operatorAddr, + RingId: createRingResp.RingId, + XPssInterval: &types.MsgUpdateRingByAcp_PssInterval{ + PssInterval: 900, + }, + }) + require.ErrorIs(t, err, types.ErrUnauthorizedRingUpdate) + require.Equal(t, policyID, k.GetRing(creatorCtx, createRingResp.RingId).PolicyId) +} + +func TestMsgServer_UpdateRingByAcpAllowsOperatorRelation(t *testing.T) { + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) + creatorCtx := ctxWithDID(ctx, testDID) + peerCtx := ctxWithDID(ctx, testPeerDID) + operatorCtx := ctxWithDID(ctx, testOperatorDID) + + creatorAddr, _ := testAccountWithPubKey(t, creatorCtx, authKeeper) + + peer1Addr, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, creatorCtx, "12D3KooWPeer1") + peer2Addr, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, creatorCtx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, creatorCtx, creatorAddr) + + createRingResp, err := k.CreateRing(creatorCtx, &types.MsgCreateRing{ + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, + }) + require.NoError(t, err) + + _, err = k.FinalizeRing(peerCtx, &types.MsgFinalizeRing{Creator: peer1Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + _, err = k.FinalizeRing(peerCtx, &types.MsgFinalizeRing{Creator: peer2Addr, RingId: createRingResp.RingId, RingPk: "ring-pk"}) + require.NoError(t, err) + + operatorAddr, _ := testAccountWithPubKey(t, operatorCtx, authKeeper) + _, err = k.GetAcpKeeper().DirectPolicyCmd(creatorCtx, &acptypes.MsgDirectPolicyCmd{ + Creator: creatorAddr, + PolicyId: policyID, + Cmd: acptypes.NewSetRelationshipCmd(coretypes.NewActorRelationship( + types.ACPResourceRing, + createRingResp.RingId, + types.ACPRelationOperator, + testOperatorDID, + )), + }) + require.NoError(t, err) + + peer3Addr, peer3Key := setupPeerWithNodeInfo(t, k, authKeeper, creatorCtx, "12D3KooWPeer3") + peer4Addr, peer4Key := setupPeerWithNodeInfo(t, k, authKeeper, creatorCtx, "12D3KooWPeer4") + updatePeerNodeWhitelists(t, k, creatorCtx, peer3Addr, peer3Key, []string{policyID}, nil) + updatePeerNodeWhitelists(t, k, creatorCtx, peer4Addr, peer4Key, nil, []string{createRingResp.RingId}) + _, err = k.UpdateRingByAcp(operatorCtx, &types.MsgUpdateRingByAcp{ + Creator: operatorAddr, + RingId: createRingResp.RingId, + NewPeerNodeKeys: []string{peer3Key, peer4Key}, XNewThreshold: &types.MsgUpdateRingByAcp_NewThreshold{ NewThreshold: 1, }, }) - require.ErrorIs(t, err, types.ErrRingMissingPolicyId) + require.NoError(t, err) + + ring := k.GetRing(creatorCtx, createRingResp.RingId) + require.NotNil(t, ring) + require.Equal(t, policyID, ring.PolicyId) + require.Equal(t, []string{peer3Key, peer4Key}, ring.NewPeerNodeKeys) + require.Equal(t, uint32(1), ring.GetNewThreshold()) } func TestMsgServer_FinalizeRingReshareRequiresPendingUpdate(t *testing.T) { - k, ctx := keepertestutil.OrbisKeeper(t) + k, authKeeper, ctx := keepertestutil.OrbisKeeperFull(t) ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) + creatorAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) + + _, peer1Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer1") + _, peer2Key := setupPeerWithNodeInfo(t, k, authKeeper, ctx, "12D3KooWPeer2") + policyID := createOrbisRingPolicy(t, k, ctx, creatorAddr) + createRingResp, err := k.CreateRing(ctx, &types.MsgCreateRing{ - Creator: testAddress(), - Namespace: "vault", - RingPk: "ring-pk", - PeerIds: []string{"peer-1", "peer-2"}, - Threshold: 1, + Creator: creatorAddr, + PeerNodeKeys: []string{peer1Key, peer2Key}, + Threshold: 1, + PolicyId: policyID, }) require.NoError(t, err) + outsiderAddr, _ := testAccountWithPubKey(t, ctx, authKeeper) _, err = k.FinalizeRingReshareByThresholdSignature(ctx, &types.MsgFinalizeRingReshareByThresholdSignature{ - Creator: testAddress(), + Creator: outsiderAddr, RingId: createRingResp.RingId, SignatureScheme: "bls12_381", Signature: []byte("signature"), }) require.ErrorIs(t, err, types.ErrInvalidRing) - require.ErrorContains(t, err, "missing new_peer_ids or new_threshold") + require.ErrorContains(t, err, "missing new_peer_node_keys or new_threshold") } func TestMsgServer_CreateNodeInfo(t *testing.T) { @@ -249,8 +967,7 @@ func TestMsgServer_CreateNodeInfo(t *testing.T) { ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) nodeAddr, nodePubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) - controllerAddr, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) - _ = controllerAddr + _, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ Creator: nodeAddr, @@ -263,7 +980,7 @@ func TestMsgServer_CreateNodeInfo(t *testing.T) { require.NotNil(t, nodeInfo) require.Equal(t, "12D3KooWExamplePeerID", nodeInfo.PeerId) require.Equal(t, controllerPubKeyHex, nodeInfo.ControllerKey) - require.Empty(t, nodeInfo.WhitelistedNamespaces) + require.Empty(t, nodeInfo.WhitelistedPolicyIds) require.Empty(t, nodeInfo.WhitelistedRingIds) } @@ -275,17 +992,17 @@ func TestMsgServer_CreateNodeInfo_WithWhitelists(t *testing.T) { _, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ - Creator: nodeAddr, - PeerId: "peer-1", - ControllerKey: controllerPubKeyHex, - WhitelistedNamespaces: []string{"orbis/ns-a", "orbis/ns-b"}, - WhitelistedRingIds: []string{"ring-1"}, + Creator: nodeAddr, + PeerId: "peer-1", + ControllerKey: controllerPubKeyHex, + WhitelistedPolicyIds: []string{"policy-a", "policy-b"}, + WhitelistedRingIds: []string{"ring-1"}, }) require.NoError(t, err) nodeInfo := k.GetNodeInfo(ctx, nodePubKeyHex) require.NotNil(t, nodeInfo) - require.Equal(t, []string{"orbis/ns-a", "orbis/ns-b"}, nodeInfo.WhitelistedNamespaces) + require.Equal(t, []string{"policy-a", "policy-b"}, nodeInfo.WhitelistedPolicyIds) require.Equal(t, []string{"ring-1"}, nodeInfo.WhitelistedRingIds) } @@ -317,25 +1034,25 @@ func TestMsgServer_UpdateNodeInfo(t *testing.T) { controllerAddr, controllerPubKeyHex := testAccountWithPubKey(t, ctx, authKeeper) _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ - Creator: nodeAddr, - PeerId: "peer-original", - ControllerKey: controllerPubKeyHex, - WhitelistedNamespaces: []string{"orbis/ns-a"}, + Creator: nodeAddr, + PeerId: "peer-original", + ControllerKey: controllerPubKeyHex, + WhitelistedPolicyIds: []string{"policy-a"}, }) require.NoError(t, err) _, err = k.UpdateNodeInfo(ctx, &types.MsgUpdateNodeInfo{ - Creator: controllerAddr, - NodeKey: nodePubKeyHex, - WhitelistedNamespaces: []string{"orbis/ns-b", "orbis/ns-c"}, - WhitelistedRingIds: []string{"ring-1", "ring-2"}, + Creator: controllerAddr, + NodeKey: nodePubKeyHex, + WhitelistedPolicyIds: []string{"policy-b", "policy-c"}, + WhitelistedRingIds: []string{"ring-1", "ring-2"}, }) require.NoError(t, err) nodeInfo := k.GetNodeInfo(ctx, nodePubKeyHex) require.NotNil(t, nodeInfo) require.Equal(t, "peer-original", nodeInfo.PeerId) - require.Equal(t, []string{"orbis/ns-b", "orbis/ns-c"}, nodeInfo.WhitelistedNamespaces) + require.Equal(t, []string{"policy-b", "policy-c"}, nodeInfo.WhitelistedPolicyIds) require.Equal(t, []string{"ring-1", "ring-2"}, nodeInfo.WhitelistedRingIds) } @@ -425,8 +1142,84 @@ func TestMsgServer_UpdateNodeInfo_Unauthorized(t *testing.T) { require.ErrorIs(t, err, types.ErrUnauthorizedNodeInfoUpdate) } -func testAddress() string { - return sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() +// setupPeerWithNodeInfo registers an account and creates a NodeInfo entry for it. +// Returns the account bech32 address and its hex-encoded public key (the node_key used in rings). +func setupPeerWithNodeInfo(t *testing.T, k keeper.Keeper, ak authkeeper.AccountKeeper, ctx sdk.Context, networkID string) (addr string, nodeKey string) { + t.Helper() + addr, nodeKey = testAccountWithPubKey(t, ctx, ak) + _, err := k.CreateNodeInfo(ctx, &types.MsgCreateNodeInfo{ + Creator: addr, + PeerId: networkID, + ControllerKey: nodeKey, + }) + require.NoError(t, err) + return addr, nodeKey +} + +func updatePeerNodeWhitelists( + t *testing.T, + k keeper.Keeper, + ctx sdk.Context, + creator string, + nodeKey string, + policyIDs []string, + ringIDs []string, +) { + t.Helper() + _, err := k.UpdateNodeInfo(ctx, &types.MsgUpdateNodeInfo{ + Creator: creator, + NodeKey: nodeKey, + WhitelistedPolicyIds: policyIDs, + WhitelistedRingIds: ringIDs, + }) + require.NoError(t, err) +} + +func createOrbisRingPolicy(t *testing.T, k keeper.Keeper, ctx sdk.Context, creator string) string { + t.Helper() + policyID := createACPPolicy(t, k, ctx, creator, testOrbisRingPolicy) + registerRingPolicyControlObject(t, k, ctx, creator, policyID) + return policyID +} + +func createACPPolicy(t *testing.T, k keeper.Keeper, ctx sdk.Context, creator string, policy string) string { + t.Helper() + resp, err := k.GetAcpKeeper().CreatePolicy(ctx, &acptypes.MsgCreatePolicy{ + Creator: creator, + Policy: policy, + MarshalType: coretypes.PolicyMarshalingType_YAML, + }) + require.NoError(t, err) + return resp.Record.Policy.Id +} + +func registerRingPolicyControlObject(t *testing.T, k keeper.Keeper, ctx sdk.Context, creator string, policyID string) { + t.Helper() + _, err := k.GetAcpKeeper().DirectPolicyCmd(ctx, &acptypes.MsgDirectPolicyCmd{ + Creator: creator, + PolicyId: policyID, + Cmd: acptypes.NewRegisterObjectCmd(coretypes.NewObject(types.ACPResourceRingPolicy, policyID)), + }) + require.NoError(t, err) +} + +func grantRingCreator(t *testing.T, k keeper.Keeper, ctx sdk.Context, creator string, policyID string, actorDID string) { + t.Helper() + _, err := k.GetAcpKeeper().DirectPolicyCmd(ctx, &acptypes.MsgDirectPolicyCmd{ + Creator: creator, + PolicyId: policyID, + Cmd: acptypes.NewSetRelationshipCmd(coretypes.NewActorRelationship( + types.ACPResourceRingPolicy, + policyID, + types.ACPRelationRingCreator, + actorDID, + )), + }) + require.NoError(t, err) +} + +func ctxWithDID(ctx sdk.Context, did string) sdk.Context { + return ctx.WithValue(appparams.ExtractedDIDContextKey, did) } // testAccountWithPubKey creates a secp256k1 keypair, registers the account in the auth keeper, @@ -443,3 +1236,8 @@ func testAccountWithPubKey(t *testing.T, ctx sdk.Context, ak authkeeper.AccountK ak.SetAccount(ctx, account) return accAddr.String(), hex.EncodeToString(pubKey.Bytes()) } + +// testPeerID returns a unique libp2p-style peer ID string for use in tests. +func testPeerID(n int) string { + return fmt.Sprintf("12D3KooWTestPeer%d", n) +} diff --git a/x/orbis/keeper/optional.go b/x/orbis/keeper/optional.go index a0c7f6c6..e3502576 100644 --- a/x/orbis/keeper/optional.go +++ b/x/orbis/keeper/optional.go @@ -10,6 +10,14 @@ func optionalCreateRingPSSInterval(msg *types.MsgCreateRing) *uint64 { return &value } +func optionalCreateRingNonce(msg *types.MsgCreateRing) *string { + if msg.XNonce == nil { + return nil + } + value := msg.GetNonce() + return &value +} + func optionalUpdateRingNewThreshold(msg *types.MsgUpdateRingByAcp) *uint32 { if msg.XNewThreshold == nil { return nil diff --git a/x/orbis/keeper/reshare_sign_bytes.go b/x/orbis/keeper/reshare_sign_bytes.go index f2fc8d0c..f3b83980 100644 --- a/x/orbis/keeper/reshare_sign_bytes.go +++ b/x/orbis/keeper/reshare_sign_bytes.go @@ -2,6 +2,7 @@ package keeper import ( "crypto/sha256" + "sort" "github.com/sourcenetwork/sourcehub/x/orbis/types" ) @@ -11,22 +12,66 @@ const RingReshareFinalizeSignDocDomain = "orbis-ring-reshare-finalize" func ringReshareFinalizeSignBytes( chainID string, currentRing *types.Ring, - currentRingBytes []byte, - finalizedRingBytes []byte, + finalizedRing *types.Ring, ) ([]byte, error) { - currentRingHash := sha256.Sum256(currentRingBytes) - finalizedRingHash := sha256.Sum256(finalizedRingBytes) + currentRingHash, err := ringReshareSignStateHash(currentRing) + if err != nil { + return nil, err + } + finalizedRingHash, err := ringReshareSignStateHash(finalizedRing) + if err != nil { + return nil, err + } signDoc := types.RingReshareFinalizeSignDoc{ Domain: RingReshareFinalizeSignDocDomain, ChainId: chainID, - Namespace: currentRing.Namespace, RingId: currentRing.Id, RingPk: currentRing.RingPk, - CurrentRingSha256: currentRingHash[:], - FinalizedRingSha256: finalizedRingHash[:], + CurrentRingSha256: currentRingHash, + FinalizedRingSha256: finalizedRingHash, BlockNumberNonce: currentRing.BlockNumberNonce, } return signDoc.Marshal() } + +func ringReshareSignStateHash(ring *types.Ring) ([]byte, error) { + signState := ringReshareSignState(ring) + signStateBytes, err := signState.Marshal() + if err != nil { + return nil, err + } + + hash := sha256.Sum256(signStateBytes) + return hash[:], nil +} + +func ringReshareSignState(ring *types.Ring) types.RingReshareSignState { + signState := types.RingReshareSignState{ + RingPk: ring.RingPk, + PeerNodeKeys: sortedStringCopy(ring.PeerNodeKeys), + Threshold: ring.Threshold, + NewPeerNodeKeys: sortedStringCopy(ring.NewPeerNodeKeys), + BlockNumberNonce: ring.BlockNumberNonce, + PolicyId: ring.PolicyId, + } + if ring.XNewThreshold != nil { + signState.XNewThreshold = &types.RingReshareSignState_NewThreshold{ + NewThreshold: ring.GetNewThreshold(), + } + } + if ring.XPssInterval != nil { + signState.XPssInterval = &types.RingReshareSignState_PssInterval{ + PssInterval: ring.GetPssInterval(), + } + } + + return signState +} + +func sortedStringCopy(values []string) []string { + copied := append([]string(nil), values...) + sort.Strings(copied) + return copied +} diff --git a/x/orbis/keeper/reshare_sign_bytes_test.go b/x/orbis/keeper/reshare_sign_bytes_test.go new file mode 100644 index 00000000..9d739d6d --- /dev/null +++ b/x/orbis/keeper/reshare_sign_bytes_test.go @@ -0,0 +1,89 @@ +package keeper + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sourcenetwork/sourcehub/x/orbis/types" +) + +func TestRingReshareFinalizeSignBytesUseCanonicalOrbisSignState(t *testing.T) { + nodeA := "02" + strings.Repeat("11", 32) + nodeB := "02" + strings.Repeat("22", 32) + nodeC := "02" + strings.Repeat("33", 32) + nodeD := "02" + strings.Repeat("44", 32) + + current := &types.Ring{ + Id: "ring-id", + CreatorDid: "did:example:one", + RingPk: "ring-pk", + PeerNodeKeys: []string{nodeB, nodeA}, + Threshold: 2, + NewPeerNodeKeys: []string{nodeD, nodeC}, + XNewThreshold: &types.Ring_NewThreshold{ + NewThreshold: 1, + }, + XPssInterval: &types.Ring_PssInterval{ + PssInterval: 30, + }, + BlockNumberNonce: 9, + PolicyId: "policy-id", + Confirmations: []*types.RingConfirmation{ + {NodeKey: nodeA, RingPk: "ring-pk"}, + }, + } + finalized, err := ringForReshareFinalization(current) + require.NoError(t, err) + + signBytes, err := ringReshareFinalizeSignBytes("sourcehub-test", current, finalized) + require.NoError(t, err) + + sameSignState := &types.Ring{ + Id: "ring-id", + CreatorDid: "did:example:two", + RingPk: "ring-pk", + PeerNodeKeys: []string{nodeA, nodeB}, + Threshold: 2, + NewPeerNodeKeys: []string{nodeC, nodeD}, + XNewThreshold: &types.Ring_NewThreshold{ + NewThreshold: 1, + }, + XPssInterval: &types.Ring_PssInterval{ + PssInterval: 30, + }, + BlockNumberNonce: 9, + PolicyId: "policy-id", + Confirmations: []*types.RingConfirmation{ + {NodeKey: nodeB, RingPk: "different-storage-only-value"}, + }, + } + sameSignStateFinalized, err := ringForReshareFinalization(sameSignState) + require.NoError(t, err) + + sameSignStateBytes, err := ringReshareFinalizeSignBytes( + "sourcehub-test", + sameSignState, + sameSignStateFinalized, + ) + require.NoError(t, err) + + require.Equal(t, signBytes, sameSignStateBytes) + + distinctSignState := *current + distinctSignState.XNewThreshold = &types.Ring_NewThreshold{ + NewThreshold: 2, + } + distinctSignStateFinalized, err := ringForReshareFinalization(&distinctSignState) + require.NoError(t, err) + + distinctSignStateBytes, err := ringReshareFinalizeSignBytes( + "sourcehub-test", + &distinctSignState, + distinctSignStateFinalized, + ) + require.NoError(t, err) + + require.NotEqual(t, signBytes, distinctSignStateBytes) +} diff --git a/x/orbis/keeper/store.go b/x/orbis/keeper/store.go index 624f99a6..7c527a1e 100644 --- a/x/orbis/keeper/store.go +++ b/x/orbis/keeper/store.go @@ -6,7 +6,6 @@ import ( "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/orbis/types" ) @@ -31,7 +30,13 @@ func (k *Keeper) GetRing(ctx context.Context, ringID string) *types.Ring { return &ring } -func (k *Keeper) GetAllRings(ctx sdk.Context) []types.Ring { +func (k *Keeper) DeleteRing(ctx context.Context, ringID string) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.RingKeyPrefix)) + store.Delete([]byte(ringID)) +} + +func (k *Keeper) GetAllRings(ctx context.Context) []types.Ring { var rings []types.Ring k.mustIterateRings(ctx, func(ring types.Ring) { rings = append(rings, ring) @@ -43,13 +48,13 @@ func (k *Keeper) SetDocument(ctx context.Context, document types.Document) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.DocumentKeyPrefix)) bz := k.cdc.MustMarshal(&document) - store.Set(types.DocumentKey(document.Namespace, document.Id), bz) + store.Set([]byte(document.Id), bz) } -func (k *Keeper) GetDocument(ctx context.Context, namespaceID, documentID string) *types.Document { +func (k *Keeper) GetDocument(ctx context.Context, documentID string) *types.Document { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.DocumentKeyPrefix)) - bz := store.Get(types.DocumentKey(namespaceID, documentID)) + bz := store.Get([]byte(documentID)) if bz == nil { return nil } @@ -71,13 +76,13 @@ func (k *Keeper) SetKeyDerivation(ctx context.Context, keyDerivation types.KeyDe storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.KeyDerivationKeyPrefix)) bz := k.cdc.MustMarshal(&keyDerivation) - store.Set(types.KeyDerivationKey(keyDerivation.Namespace, keyDerivation.Id), bz) + store.Set([]byte(keyDerivation.Id), bz) } -func (k *Keeper) GetKeyDerivation(ctx context.Context, namespaceID, keyDerivationID string) *types.KeyDerivation { +func (k *Keeper) GetKeyDerivation(ctx context.Context, keyDerivationID string) *types.KeyDerivation { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.KeyDerivationKeyPrefix)) - bz := store.Get(types.KeyDerivationKey(namespaceID, keyDerivationID)) + bz := store.Get([]byte(keyDerivationID)) if bz == nil { return nil } diff --git a/x/orbis/keeper/validation.go b/x/orbis/keeper/validation.go index e880dee3..4d3742ed 100644 --- a/x/orbis/keeper/validation.go +++ b/x/orbis/keeper/validation.go @@ -9,36 +9,41 @@ import ( "github.com/sourcenetwork/sourcehub/x/orbis/types" ) +func requireRingFinalized(ring *types.Ring) error { + if ring.RingPk == "" { + return types.ErrRingNotFinalized + } + return nil +} + func validateRing(ring *types.Ring) error { switch { case ring.Id == "": return types.ErrInvalidRingId - case ring.Namespace == "": - return types.ErrInvalidNamespaceId - case ring.RingPk == "": - return errorsmod.Wrap(types.ErrInvalidRing, "missing ring_pk") - case len(ring.PeerIds) == 0: - return errorsmod.Wrap(types.ErrInvalidRing, "missing peer_ids") - case ring.Threshold == 0 || int(ring.Threshold) > len(ring.PeerIds): - return errorsmod.Wrapf(types.ErrInvalidRing, "threshold %d is invalid for committee size %d", ring.Threshold, len(ring.PeerIds)) + case len(ring.PeerNodeKeys) == 0: + return errorsmod.Wrap(types.ErrInvalidRing, "missing peer_node_keys") + case ring.Threshold == 0 || int(ring.Threshold) > len(ring.PeerNodeKeys): + return errorsmod.Wrapf(types.ErrInvalidRing, "threshold %d is invalid for committee size %d", ring.Threshold, len(ring.PeerNodeKeys)) + case ring.PolicyId == "": + return errorsmod.Wrap(types.ErrInvalidRing, "missing policy_id") } - if err := validateUniquePeerIDs(ring.PeerIds, "peer_ids"); err != nil { + if err := validateUniquePeerNodeKeys(ring.PeerNodeKeys); err != nil { return err } - if len(ring.NewPeerIds) > 0 { - if err := validateUniquePeerIDs(ring.NewPeerIds, "new_peer_ids"); err != nil { + if len(ring.NewPeerNodeKeys) > 0 { + if err := validateUniquePeerNodeKeys(ring.NewPeerNodeKeys); err != nil { return err } } if ring.XNewThreshold != nil && ring.GetNewThreshold() == 0 { return errorsmod.Wrap(types.ErrInvalidRing, "new_threshold must be at least 1") } - if len(ring.NewPeerIds) > 0 && ring.XNewThreshold != nil && uint32(len(ring.NewPeerIds)) < ring.GetNewThreshold() { + if len(ring.NewPeerNodeKeys) > 0 && ring.XNewThreshold != nil && uint32(len(ring.NewPeerNodeKeys)) < ring.GetNewThreshold() { return errorsmod.Wrapf( types.ErrInvalidRing, - "new_peer_ids count (%d) is less than new_threshold (%d)", - len(ring.NewPeerIds), + "new_peer_node_keys count (%d) is less than new_threshold (%d)", + len(ring.NewPeerNodeKeys), ring.GetNewThreshold(), ) } @@ -46,26 +51,34 @@ func validateRing(ring *types.Ring) error { return nil } -func validateRingUpdate(newPeerIDs []string, newThreshold *uint32, existing *types.Ring) error { - reshareInProgress := len(existing.NewPeerIds) > 0 || existing.XNewThreshold != nil - touchingReshareFields := len(newPeerIDs) > 0 || newThreshold != nil +func validateRingUpdate(newPeerNodeKeys []string, newThreshold *uint32, existing *types.Ring) error { + reshareInProgress := len(existing.NewPeerNodeKeys) > 0 || existing.XNewThreshold != nil + touchingReshareFields := len(newPeerNodeKeys) > 0 || newThreshold != nil if reshareInProgress && touchingReshareFields { return types.ErrReshareInProgress } - if len(newPeerIDs) > 0 { - if err := validateUniquePeerIDs(newPeerIDs, "new_peer_ids"); err != nil { + if len(newPeerNodeKeys) > 0 { + if err := validateUniquePeerNodeKeys(newPeerNodeKeys); err != nil { return err } } if newThreshold != nil && *newThreshold < 1 { return errorsmod.Wrap(types.ErrInvalidRing, "new_threshold must be at least 1") } - if len(newPeerIDs) > 0 && newThreshold != nil && uint32(len(newPeerIDs)) < *newThreshold { + if len(newPeerNodeKeys) == 0 && newThreshold != nil && *newThreshold > uint32(len(existing.PeerNodeKeys)) { + return errorsmod.Wrapf( + types.ErrInvalidRing, + "new_threshold (%d) cannot exceed existing committee size (%d)", + *newThreshold, + len(existing.PeerNodeKeys), + ) + } + if len(newPeerNodeKeys) > 0 && newThreshold != nil && uint32(len(newPeerNodeKeys)) < *newThreshold { return errorsmod.Wrapf( types.ErrInvalidRing, - "new_peer_ids count (%d) is less than new_threshold (%d)", - len(newPeerIDs), + "new_peer_node_keys count (%d) is less than new_threshold (%d)", + len(newPeerNodeKeys), *newThreshold, ) } @@ -73,33 +86,47 @@ func validateRingUpdate(newPeerIDs []string, newThreshold *uint32, existing *typ return nil } -func validateUniquePeerIDs(peerIDs []string, fieldName string) error { - seen := make(map[string]struct{}, len(peerIDs)) - for _, id := range peerIDs { - if id == "" { - return errorsmod.Wrapf(types.ErrInvalidRing, "empty peer id in %s", fieldName) +// validateUniquePeerNodeKeys checks that each node key is a unique, validly-encoded +// 33-byte compressed secp256k1 public key. +func validateUniquePeerNodeKeys(nodeKeys []string) error { + seen := make(map[string]struct{}, len(nodeKeys)) + for _, key := range nodeKeys { + if err := validatePeerNodeKeyFormat(key); err != nil { + return err } - if _, dup := seen[id]; dup { - return errorsmod.Wrapf(types.ErrInvalidRing, "duplicate peer id in %s: %q", fieldName, id) + if _, dup := seen[key]; dup { + return errorsmod.Wrapf(types.ErrInvalidRing, "duplicate peer_node_key: %q", key) } - seen[id] = struct{}{} + seen[key] = struct{}{} + } + return nil +} + +func validatePeerNodeKeyFormat(key string) error { + if key == "" { + return errorsmod.Wrap(types.ErrInvalidRing, "empty peer_node_key") + } + keyHex := strings.TrimPrefix(key, "0x") + decoded, err := hex.DecodeString(keyHex) + if err != nil || len(decoded) != compressedPubKeyLen { + return errorsmod.Wrapf(types.ErrInvalidRing, "invalid peer_node_key encoding: %q", key) } return nil } func ringForReshareFinalization(currentRing *types.Ring) (*types.Ring, error) { finalized := *currentRing - if len(finalized.NewPeerIds) == 0 && finalized.XNewThreshold == nil { - return nil, errorsmod.Wrap(types.ErrInvalidRing, "missing new_peer_ids or new_threshold for reshare finalization") + if len(finalized.NewPeerNodeKeys) == 0 && finalized.XNewThreshold == nil { + return nil, errorsmod.Wrap(types.ErrInvalidRing, "missing new_peer_node_keys or new_threshold for reshare finalization") } - if len(finalized.NewPeerIds) > 0 { - finalized.PeerIds = append([]string(nil), finalized.NewPeerIds...) + if len(finalized.NewPeerNodeKeys) > 0 { + finalized.PeerNodeKeys = append([]string(nil), finalized.NewPeerNodeKeys...) } if finalized.XNewThreshold != nil { finalized.Threshold = finalized.GetNewThreshold() } - finalized.NewPeerIds = nil + finalized.NewPeerNodeKeys = nil finalized.XNewThreshold = nil if err := validateRing(&finalized); err != nil { @@ -113,8 +140,6 @@ func validateDocument(document *types.Document) error { switch { case document.Id == "": return types.ErrInvalidDocumentId - case document.Namespace == "": - return types.ErrInvalidNamespaceId case document.RingId == "": return types.ErrInvalidRingId case document.Document == "": @@ -131,8 +156,6 @@ func validateKeyDerivation(keyDerivation *types.KeyDerivation) error { switch { case keyDerivation.Id == "": return types.ErrInvalidKeyDerivationId - case keyDerivation.Namespace == "": - return types.ErrInvalidNamespaceId case keyDerivation.RingId == "": return types.ErrInvalidRingId case keyDerivation.Derivation == "": diff --git a/x/orbis/module/autocli.go b/x/orbis/module/autocli.go index 1c783b42..87fe8f04 100644 --- a/x/orbis/module/autocli.go +++ b/x/orbis/module/autocli.go @@ -22,27 +22,25 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { {RpcMethod: "Rings", Use: "rings", Short: "Query rings"}, { RpcMethod: "Document", - Use: "document [namespace] [id]", - Short: "Query document by namespace and id", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "id"}}, + Use: "document [id]", + Short: "Query document by id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, }, { - RpcMethod: "Documents", - Use: "documents [namespace]", - Short: "Query documents within a namespace", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}}, + RpcMethod: "Documents", + Use: "documents", + Short: "Query documents", }, { RpcMethod: "KeyDerivation", - Use: "key-derivation [namespace] [id]", - Short: "Query key derivation by namespace and id", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "id"}}, + Use: "key-derivation [id]", + Short: "Query key derivation by id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, }, { - RpcMethod: "KeyDerivations", - Use: "key-derivations [namespace]", - Short: "Query key derivations within a namespace", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}}, + RpcMethod: "KeyDerivations", + Use: "key-derivations", + Short: "Query key derivations", }, { RpcMethod: "NodeInfo", @@ -59,9 +57,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { {RpcMethod: "UpdateParams", Skip: true}, { RpcMethod: "CreateRing", - Use: "create-ring [namespace] [ring_pk] [threshold]", + Use: "create-ring [threshold] [policy_id]", Short: "Create an Orbis ring", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "ring_pk"}, {ProtoField: "threshold"}}, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "threshold"}, {ProtoField: "policy_id"}}, }, { RpcMethod: "UpdateRingByAcp", @@ -78,15 +76,15 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, { RpcMethod: "StoreDocument", - Use: "store-document [namespace] [ring_id] [document] [proof] [policy_id] [resource] [permission]", + Use: "store-document [ring_id] [document] [proof] [policy_id] [resource] [permission]", Short: "Store an encrypted Orbis document", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "ring_id"}, {ProtoField: "document"}, {ProtoField: "proof"}, {ProtoField: "policy_id"}, {ProtoField: "resource"}, {ProtoField: "permission"}}, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "ring_id"}, {ProtoField: "document"}, {ProtoField: "proof"}, {ProtoField: "policy_id"}, {ProtoField: "resource"}, {ProtoField: "permission"}}, }, { RpcMethod: "StoreKeyDerivation", - Use: "store-key-derivation [namespace] [ring_id] [derivation] [policy_id] [resource] [permission]", + Use: "store-key-derivation [ring_id] [derivation] [policy_id] [resource] [permission]", Short: "Store an Orbis key derivation", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "ring_id"}, {ProtoField: "derivation"}, {ProtoField: "policy_id"}, {ProtoField: "resource"}, {ProtoField: "permission"}}, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "ring_id"}, {ProtoField: "derivation"}, {ProtoField: "policy_id"}, {ProtoField: "resource"}, {ProtoField: "permission"}}, }, { RpcMethod: "CreateNodeInfo", diff --git a/x/orbis/types/acp.go b/x/orbis/types/acp.go new file mode 100644 index 00000000..9894774a --- /dev/null +++ b/x/orbis/types/acp.go @@ -0,0 +1,10 @@ +package types + +const ( + ACPResourceRingPolicy = "ring_policy" + ACPResourceRing = "ring" + ACPRelationRingCreator = "ring_creator" + ACPRelationOperator = "operator" + ACPPermissionCreateRing = "create_ring" + ACPPermissionUpdateRing = "update_ring" +) diff --git a/x/orbis/types/document.pb.go b/x/orbis/types/document.pb.go index 6599e818..fc006ae7 100644 --- a/x/orbis/types/document.pb.go +++ b/x/orbis/types/document.pb.go @@ -25,14 +25,13 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Document stores an encrypted Orbis document and its policy binding metadata. type Document struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,9,opt,name=permission,proto3" json:"permission,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` // Types that are valid to be assigned to XTier: // // *Document_Tier @@ -88,10 +87,10 @@ type isDocument_XTimestamp interface { } type Document_Tier struct { - Tier string `protobuf:"bytes,10,opt,name=tier,proto3,oneof" json:"tier,omitempty"` + Tier string `protobuf:"bytes,9,opt,name=tier,proto3,oneof" json:"tier,omitempty"` } type Document_Timestamp struct { - Timestamp uint64 `protobuf:"varint,11,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` + Timestamp uint64 `protobuf:"varint,10,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` } func (*Document_Tier) isDocument_XTier() {} @@ -117,13 +116,6 @@ func (m *Document) GetId() string { return "" } -func (m *Document) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *Document) GetCreatorDid() string { if m != nil { return m.CreatorDid @@ -202,28 +194,27 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/document.proto", fileDescriptor_c92869153d87ab26) } var fileDescriptor_c92869153d87ab26 = []byte{ - // 326 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0xbd, 0x4e, 0xf3, 0x30, - 0x14, 0x86, 0xe3, 0x7c, 0xfd, 0xcb, 0xe9, 0x27, 0x90, 0x2c, 0xa4, 0x5a, 0x80, 0x4c, 0x61, 0xea, - 0xd4, 0x20, 0x71, 0x07, 0x55, 0x87, 0xc2, 0xd8, 0x91, 0x25, 0x4a, 0x63, 0x53, 0x8e, 0x20, 0xb1, - 0x65, 0xbb, 0x82, 0xde, 0x41, 0x47, 0x2e, 0x8b, 0xb1, 0x23, 0x23, 0x6a, 0x6f, 0x04, 0xc5, 0x6e, - 0x9b, 0xf1, 0x7d, 0x9e, 0x93, 0xa3, 0x13, 0xbf, 0xc0, 0xad, 0x5a, 0x99, 0x42, 0xbe, 0xae, 0x16, - 0xa9, 0x32, 0x0b, 0xb4, 0xa9, 0x50, 0xc5, 0xaa, 0x94, 0x95, 0x1b, 0x6b, 0xa3, 0x9c, 0xa2, 0xe7, - 0x27, 0x3f, 0xf6, 0xfe, 0x6e, 0x1b, 0x43, 0x6f, 0x7a, 0x98, 0xa1, 0x67, 0x10, 0xa3, 0x60, 0x64, - 0x48, 0x46, 0xc9, 0x3c, 0x46, 0x41, 0xaf, 0x21, 0xa9, 0xf2, 0x52, 0x5a, 0x9d, 0x17, 0x92, 0xc5, - 0x1e, 0x37, 0x80, 0xde, 0x40, 0xbf, 0x30, 0x32, 0x77, 0xca, 0x64, 0x02, 0x05, 0xfb, 0xe7, 0x3d, - 0x1c, 0xd0, 0x14, 0x05, 0x1d, 0x40, 0xd7, 0x60, 0xb5, 0xcc, 0x50, 0xb0, 0x96, 0x97, 0x9d, 0x3a, - 0x3e, 0x0a, 0x7a, 0x09, 0xbd, 0xe3, 0x5d, 0xac, 0xed, 0xcd, 0x29, 0xd3, 0x0b, 0x68, 0x6b, 0xa3, - 0xd4, 0x0b, 0xeb, 0x78, 0x11, 0x02, 0xbd, 0x82, 0x44, 0xab, 0x77, 0x2c, 0xd6, 0xf5, 0xb2, 0x6e, - 0xf8, 0x24, 0x80, 0xb0, 0xce, 0xc8, 0xf0, 0x63, 0xac, 0x17, 0xdc, 0x31, 0x53, 0x0e, 0xa0, 0xa5, - 0x29, 0xd1, 0x5a, 0x54, 0x15, 0x4b, 0xc2, 0x8d, 0x0d, 0xa1, 0x03, 0x68, 0x39, 0x94, 0x86, 0x41, - 0x6d, 0x66, 0xd1, 0xdc, 0xa7, 0x0d, 0x21, 0xf4, 0x16, 0x12, 0x87, 0xa5, 0xb4, 0x2e, 0x2f, 0x35, - 0xeb, 0x0f, 0xc9, 0xa8, 0x35, 0x23, 0xf3, 0x06, 0x6d, 0x08, 0x99, 0x74, 0xa1, 0x9d, 0xd5, 0xe3, - 0x93, 0xff, 0x00, 0xd9, 0xc9, 0x4c, 0x9e, 0xbe, 0x77, 0x9c, 0x6c, 0x77, 0x9c, 0xfc, 0xee, 0x38, - 0xf9, 0xda, 0xf3, 0x68, 0xbb, 0xe7, 0xd1, 0xcf, 0x9e, 0x47, 0xcf, 0xf7, 0x4b, 0x74, 0xf5, 0xd3, - 0x17, 0xaa, 0x4c, 0xc3, 0x7d, 0x95, 0x74, 0x1f, 0xca, 0xbc, 0xa5, 0x4d, 0x6d, 0x9f, 0x87, 0xe2, - 0xdc, 0x5a, 0x4b, 0xbb, 0xe8, 0xf8, 0xda, 0x1e, 0xfe, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x47, - 0x6d, 0x5d, 0xd8, 0x01, 0x00, 0x00, + // 313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0x3d, 0x4e, 0x03, 0x31, + 0x10, 0x85, 0xd7, 0x4b, 0xfe, 0x76, 0x40, 0x20, 0x59, 0x48, 0xb1, 0x40, 0x32, 0x81, 0x2a, 0x55, + 0x16, 0x89, 0x1b, 0x44, 0x29, 0x02, 0x65, 0x4a, 0x9a, 0x55, 0xb2, 0x36, 0x61, 0x04, 0xbb, 0xb3, + 0xb2, 0x1d, 0x41, 0x6e, 0x90, 0x92, 0xb3, 0x70, 0x0a, 0xca, 0x94, 0x94, 0x28, 0xb9, 0x08, 0x5a, + 0x3b, 0x3f, 0xe5, 0x7b, 0xdf, 0x78, 0xfc, 0x34, 0x0f, 0xa4, 0xa5, 0x85, 0xc9, 0xf5, 0xeb, 0x62, + 0x96, 0x92, 0x99, 0xa1, 0x4d, 0x15, 0xe5, 0x8b, 0x42, 0x97, 0x6e, 0x50, 0x19, 0x72, 0xc4, 0x2f, + 0x0e, 0x7c, 0xe0, 0xf9, 0xdd, 0x77, 0x0c, 0x9d, 0xd1, 0x6e, 0x86, 0x9f, 0x43, 0x8c, 0x4a, 0xb0, + 0x1e, 0xeb, 0x27, 0x93, 0x18, 0x15, 0xbf, 0x81, 0xd3, 0xdc, 0xe8, 0xa9, 0x23, 0x93, 0x29, 0x54, + 0x22, 0xf6, 0x00, 0x76, 0xd6, 0x08, 0x15, 0xef, 0x42, 0xdb, 0x60, 0x39, 0xcf, 0x50, 0x89, 0x13, + 0x0f, 0x5b, 0xb5, 0x7c, 0x54, 0xfc, 0x0a, 0x3a, 0xfb, 0x9f, 0x45, 0xc3, 0x93, 0x83, 0xe6, 0x97, + 0xd0, 0xac, 0x0c, 0xd1, 0x8b, 0x68, 0x7a, 0x10, 0x04, 0xbf, 0x86, 0xa4, 0xa2, 0x77, 0xcc, 0x97, + 0xf5, 0xb2, 0x56, 0x78, 0x12, 0x8c, 0xb0, 0xce, 0xe8, 0x10, 0x5d, 0xb4, 0x03, 0xdb, 0x6b, 0x2e, + 0x01, 0x2a, 0x6d, 0x0a, 0xb4, 0x16, 0xa9, 0x14, 0x9d, 0x90, 0xf1, 0xe8, 0xf0, 0x2e, 0x34, 0x1c, + 0x6a, 0x23, 0x92, 0x9a, 0x8c, 0xa3, 0x89, 0x57, 0x2b, 0xc6, 0xf8, 0x2d, 0x24, 0x0e, 0x0b, 0x6d, + 0xdd, 0xb4, 0xa8, 0x04, 0xf4, 0x58, 0xbf, 0x31, 0x66, 0x93, 0xa3, 0xb5, 0x62, 0x6c, 0xd8, 0x86, + 0x66, 0x56, 0x8f, 0x0f, 0xcf, 0x00, 0xb2, 0x03, 0x19, 0x3e, 0xfd, 0x6c, 0x24, 0x5b, 0x6f, 0x24, + 0xfb, 0xdb, 0x48, 0xf6, 0xb5, 0x95, 0xd1, 0x7a, 0x2b, 0xa3, 0xdf, 0xad, 0x8c, 0x9e, 0xef, 0xe7, + 0xe8, 0xea, 0xe3, 0xe6, 0x54, 0xa4, 0x21, 0x5f, 0xa9, 0xdd, 0x07, 0x99, 0xb7, 0xf4, 0x58, 0xcc, + 0xe7, 0xae, 0x1a, 0xb7, 0xac, 0xb4, 0x9d, 0xb5, 0x7c, 0x31, 0x0f, 0xff, 0x01, 0x00, 0x00, 0xff, + 0xff, 0xaa, 0xb5, 0xc3, 0xe2, 0xba, 0x01, 0x00, 0x00, } func (m *Document) Marshal() (dAtA []byte, err error) { @@ -269,55 +260,48 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Permission) i = encodeVarintDocument(dAtA, i, uint64(len(m.Permission))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 } if len(m.Resource) > 0 { i -= len(m.Resource) copy(dAtA[i:], m.Resource) i = encodeVarintDocument(dAtA, i, uint64(len(m.Resource))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintDocument(dAtA, i, uint64(len(m.PolicyId))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) i = encodeVarintDocument(dAtA, i, uint64(len(m.Proof))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(m.Document) > 0 { i -= len(m.Document) copy(dAtA[i:], m.Document) i = encodeVarintDocument(dAtA, i, uint64(len(m.Document))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(m.RingId) > 0 { i -= len(m.RingId) copy(dAtA[i:], m.RingId) i = encodeVarintDocument(dAtA, i, uint64(len(m.RingId))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(m.CreatorDid) > 0 { i -= len(m.CreatorDid) copy(dAtA[i:], m.CreatorDid) i = encodeVarintDocument(dAtA, i, uint64(len(m.CreatorDid))) i-- - dAtA[i] = 0x1a - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintDocument(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { @@ -341,7 +325,7 @@ func (m *Document_Tier) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Tier) i = encodeVarintDocument(dAtA, i, uint64(len(m.Tier))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x4a return len(dAtA) - i, nil } func (m *Document_Timestamp) MarshalTo(dAtA []byte) (int, error) { @@ -353,7 +337,7 @@ func (m *Document_Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) i = encodeVarintDocument(dAtA, i, uint64(m.Timestamp)) i-- - dAtA[i] = 0x58 + dAtA[i] = 0x50 return len(dAtA) - i, nil } func encodeVarintDocument(dAtA []byte, offset int, v uint64) int { @@ -377,10 +361,6 @@ func (m *Document) Size() (n int) { if l > 0 { n += 1 + l + sovDocument(uint64(l)) } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovDocument(uint64(l)) - } l = len(m.CreatorDid) if l > 0 { n += 1 + l + sovDocument(uint64(l)) @@ -506,38 +486,6 @@ func (m *Document) Unmarshal(dAtA []byte) error { m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDocument - } - 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 ErrInvalidLengthDocument - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDocument - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } @@ -569,7 +517,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) } @@ -601,7 +549,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } @@ -633,7 +581,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.Document = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) } @@ -665,7 +613,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.Proof = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -697,7 +645,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) } @@ -729,7 +677,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.Resource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) } @@ -761,7 +709,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.Permission = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) } @@ -793,7 +741,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.XTier = &Document_Tier{string(dAtA[iNdEx:postIndex])} iNdEx = postIndex - case 11: + case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } diff --git a/x/orbis/types/errors.go b/x/orbis/types/errors.go index b031f32c..b81139d8 100644 --- a/x/orbis/types/errors.go +++ b/x/orbis/types/errors.go @@ -5,7 +5,6 @@ import sdkerrors "cosmossdk.io/errors" // x/orbis module sentinel errors. var ( ErrInvalidSigner = sdkerrors.Register(ModuleName, 1200, "expected gov account as only signer for proposal message") - ErrInvalidNamespaceId = sdkerrors.Register(ModuleName, 1201, "invalid namespace id") ErrInvalidRingId = sdkerrors.Register(ModuleName, 1202, "invalid ring id") ErrInvalidDocumentId = sdkerrors.Register(ModuleName, 1203, "invalid document id") ErrInvalidKeyDerivationId = sdkerrors.Register(ModuleName, 1204, "invalid key derivation id") @@ -18,8 +17,6 @@ var ( ErrKeyDerivationNotFound = sdkerrors.Register(ModuleName, 1211, "key derivation not found") ErrInvalidDocument = sdkerrors.Register(ModuleName, 1212, "invalid document") ErrInvalidKeyDerivation = sdkerrors.Register(ModuleName, 1213, "invalid key derivation") - ErrInvalidRingUpdater = sdkerrors.Register(ModuleName, 1214, "expected authorized account as a ring updater") - ErrRingMissingPolicyId = sdkerrors.Register(ModuleName, 1215, "ring missing policy_id") ErrReshareInProgress = sdkerrors.Register(ModuleName, 1216, "reshare already in progress: finalize before changing reshare parameters") ErrInvalidThresholdSignature = sdkerrors.Register(ModuleName, 1217, "invalid threshold signature") ErrInvalidSignatureScheme = sdkerrors.Register(ModuleName, 1218, "invalid signature scheme") @@ -28,4 +25,11 @@ var ( ErrNodeInfoNotFound = sdkerrors.Register(ModuleName, 1221, "node info not found") ErrInvalidNodeInfo = sdkerrors.Register(ModuleName, 1222, "invalid node info") ErrUnauthorizedNodeInfoUpdate = sdkerrors.Register(ModuleName, 1223, "tx signer does not match controller key") + ErrRingAlreadyFinalized = sdkerrors.Register(ModuleName, 1225, "ring already has a public key set") + ErrInvalidRingFinalizer = sdkerrors.Register(ModuleName, 1226, "tx signer is not a member of the ring's peer set") + ErrDuplicateConfirmation = sdkerrors.Register(ModuleName, 1227, "node has already submitted a finalize confirmation") + ErrRingPkConflict = sdkerrors.Register(ModuleName, 1228, "submitted ring_pk conflicts with existing confirmation; ring deleted") + ErrRingNotFinalized = sdkerrors.Register(ModuleName, 1229, "ring is not finalized") + ErrUnauthorizedRingUpdate = sdkerrors.Register(ModuleName, 1230, "actor is not authorized to update ring") + ErrUnauthorizedRingCreate = sdkerrors.Register(ModuleName, 1231, "actor is not authorized to create ring") ) diff --git a/x/orbis/types/events.pb.go b/x/orbis/types/events.pb.go index 77c16b47..c49df4c7 100644 --- a/x/orbis/types/events.pb.go +++ b/x/orbis/types/events.pb.go @@ -24,10 +24,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // EventRingCreated is emitted when a ring is created. type EventRingCreated struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - Artifact string `protobuf:"bytes,4,opt,name=artifact,proto3" json:"artifact,omitempty"` + RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` } func (m *EventRingCreated) Reset() { *m = EventRingCreated{} } @@ -63,13 +61,6 @@ func (m *EventRingCreated) XXX_DiscardUnknown() { var xxx_messageInfo_EventRingCreated proto.InternalMessageInfo -func (m *EventRingCreated) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *EventRingCreated) GetRingId() string { if m != nil { return m.RingId @@ -84,18 +75,10 @@ func (m *EventRingCreated) GetCreatorDid() string { return "" } -func (m *EventRingCreated) GetArtifact() string { - if m != nil { - return m.Artifact - } - return "" -} - // EventRingUpdated is emitted when a ring is updated in place. type EventRingUpdated struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - UpdaterDid string `protobuf:"bytes,3,opt,name=updater_did,json=updaterDid,proto3" json:"updater_did,omitempty"` + RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + UpdaterDid string `protobuf:"bytes,2,opt,name=updater_did,json=updaterDid,proto3" json:"updater_did,omitempty"` } func (m *EventRingUpdated) Reset() { *m = EventRingUpdated{} } @@ -131,13 +114,6 @@ func (m *EventRingUpdated) XXX_DiscardUnknown() { var xxx_messageInfo_EventRingUpdated proto.InternalMessageInfo -func (m *EventRingUpdated) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *EventRingUpdated) GetRingId() string { if m != nil { return m.RingId @@ -154,9 +130,8 @@ func (m *EventRingUpdated) GetUpdaterDid() string { // EventDocumentStored is emitted when an encrypted document is stored. type EventDocumentStored struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` } func (m *EventDocumentStored) Reset() { *m = EventDocumentStored{} } @@ -192,13 +167,6 @@ func (m *EventDocumentStored) XXX_DiscardUnknown() { var xxx_messageInfo_EventDocumentStored proto.InternalMessageInfo -func (m *EventDocumentStored) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *EventDocumentStored) GetDocumentId() string { if m != nil { return m.DocumentId @@ -215,9 +183,8 @@ func (m *EventDocumentStored) GetCreatorDid() string { // EventKeyDerivationStored is emitted when a key derivation is stored. type EventKeyDerivationStored struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - KeyDerivationId string `protobuf:"bytes,2,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + KeyDerivationId string `protobuf:"bytes,1,opt,name=key_derivation_id,json=keyDerivationId,proto3" json:"key_derivation_id,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` } func (m *EventKeyDerivationStored) Reset() { *m = EventKeyDerivationStored{} } @@ -253,13 +220,6 @@ func (m *EventKeyDerivationStored) XXX_DiscardUnknown() { var xxx_messageInfo_EventKeyDerivationStored proto.InternalMessageInfo -func (m *EventKeyDerivationStored) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *EventKeyDerivationStored) GetKeyDerivationId() string { if m != nil { return m.KeyDerivationId @@ -380,6 +340,59 @@ func (m *EventNodeInfoUpdated) GetControllerKey() string { return "" } +// EventRingDeleted is emitted when a ring is removed from state. +type EventRingDeleted struct { + RingId string `protobuf:"bytes,1,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (m *EventRingDeleted) Reset() { *m = EventRingDeleted{} } +func (m *EventRingDeleted) String() string { return proto.CompactTextString(m) } +func (*EventRingDeleted) ProtoMessage() {} +func (*EventRingDeleted) Descriptor() ([]byte, []int) { + return fileDescriptor_cb68216cf0ba47d2, []int{6} +} +func (m *EventRingDeleted) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRingDeleted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRingDeleted.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 *EventRingDeleted) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRingDeleted.Merge(m, src) +} +func (m *EventRingDeleted) XXX_Size() int { + return m.Size() +} +func (m *EventRingDeleted) XXX_DiscardUnknown() { + xxx_messageInfo_EventRingDeleted.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRingDeleted proto.InternalMessageInfo + +func (m *EventRingDeleted) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *EventRingDeleted) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + func init() { proto.RegisterType((*EventRingCreated)(nil), "sourcehub.orbis.EventRingCreated") proto.RegisterType((*EventRingUpdated)(nil), "sourcehub.orbis.EventRingUpdated") @@ -387,36 +400,35 @@ func init() { proto.RegisterType((*EventKeyDerivationStored)(nil), "sourcehub.orbis.EventKeyDerivationStored") proto.RegisterType((*EventNodeInfoCreated)(nil), "sourcehub.orbis.EventNodeInfoCreated") proto.RegisterType((*EventNodeInfoUpdated)(nil), "sourcehub.orbis.EventNodeInfoUpdated") + proto.RegisterType((*EventRingDeleted)(nil), "sourcehub.orbis.EventRingDeleted") } func init() { proto.RegisterFile("sourcehub/orbis/events.proto", fileDescriptor_cb68216cf0ba47d2) } var fileDescriptor_cb68216cf0ba47d2 = []byte{ - // 373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xc1, 0x4e, 0xc2, 0x40, - 0x10, 0xa5, 0x6a, 0x40, 0x86, 0x28, 0x5a, 0x4d, 0x68, 0x0c, 0x29, 0xa6, 0x89, 0x89, 0xf1, 0x40, - 0x4d, 0xfc, 0x03, 0xad, 0x07, 0x24, 0xf1, 0x80, 0xd1, 0x83, 0x97, 0xa6, 0x74, 0x07, 0x5c, 0x0b, - 0xbb, 0xcd, 0x76, 0x8b, 0xf6, 0x03, 0xf4, 0xec, 0x67, 0x79, 0xe4, 0xe8, 0xd1, 0xc0, 0x8f, 0x98, - 0x2e, 0x85, 0x62, 0x3c, 0x48, 0xc2, 0x71, 0xde, 0x9b, 0x7d, 0xef, 0x6d, 0x66, 0x06, 0xea, 0x11, - 0x8f, 0x85, 0x8f, 0x4f, 0x71, 0xd7, 0xe6, 0xa2, 0x4b, 0x23, 0x1b, 0x47, 0xc8, 0x64, 0xd4, 0x0c, - 0x05, 0x97, 0x5c, 0xaf, 0x2e, 0xd8, 0xa6, 0x62, 0xad, 0x77, 0x0d, 0xf6, 0xae, 0xd3, 0x8e, 0x0e, - 0x65, 0xfd, 0x2b, 0x81, 0x9e, 0x44, 0xa2, 0xd7, 0xa1, 0xcc, 0xbc, 0x21, 0x46, 0xa1, 0xe7, 0xa3, - 0xa1, 0x1d, 0x6b, 0xa7, 0xe5, 0x4e, 0x0e, 0xe8, 0x35, 0x28, 0x09, 0xca, 0xfa, 0x2e, 0x25, 0xc6, - 0x86, 0xe2, 0x8a, 0x69, 0xd9, 0x22, 0x7a, 0x03, 0x2a, 0x7e, 0xaa, 0xc0, 0x85, 0x4b, 0x28, 0x31, - 0x36, 0x15, 0x09, 0x19, 0xe4, 0x50, 0xa2, 0x1f, 0xc1, 0xb6, 0x27, 0x24, 0xed, 0x79, 0xbe, 0x34, - 0xb6, 0x14, 0xbb, 0xa8, 0xad, 0xe7, 0xa5, 0x1c, 0xf7, 0x21, 0x59, 0x33, 0x47, 0xac, 0x14, 0x7e, - 0xe5, 0xc8, 0x20, 0x87, 0x12, 0x2b, 0x86, 0x03, 0xe5, 0xe5, 0x70, 0x3f, 0x1e, 0x22, 0x93, 0x77, - 0x92, 0x8b, 0x7f, 0xed, 0x1a, 0x50, 0x21, 0x59, 0x7f, 0x6e, 0x09, 0x73, 0x68, 0x85, 0xef, 0x5b, - 0x6f, 0x1a, 0x18, 0xca, 0xb7, 0x8d, 0x89, 0x83, 0x82, 0x8e, 0x3c, 0x49, 0x39, 0x5b, 0xc9, 0xfc, - 0x0c, 0xf6, 0x03, 0x4c, 0x5c, 0xb2, 0x78, 0x95, 0x47, 0xa8, 0x06, 0xcb, 0x6a, 0xab, 0xe4, 0x78, - 0x80, 0x43, 0x15, 0xe3, 0x96, 0x13, 0x6c, 0xb1, 0x1e, 0x9f, 0x8f, 0xbd, 0x06, 0xa5, 0x10, 0x51, - 0xa4, 0xd2, 0xb3, 0x00, 0xc5, 0xb4, 0x6c, 0x11, 0xfd, 0x04, 0x76, 0x7d, 0xce, 0xa4, 0xe0, 0x83, - 0x01, 0x0a, 0x37, 0xc0, 0x24, 0xb3, 0xde, 0xc9, 0xd1, 0x36, 0x26, 0x7f, 0x74, 0xe7, 0x63, 0x5c, - 0x53, 0xf7, 0xf2, 0xe6, 0x73, 0x62, 0x6a, 0xe3, 0x89, 0xa9, 0x7d, 0x4f, 0x4c, 0xed, 0x63, 0x6a, - 0x16, 0xc6, 0x53, 0xb3, 0xf0, 0x35, 0x35, 0x0b, 0x8f, 0xe7, 0x7d, 0x2a, 0xd3, 0x5d, 0xf6, 0xf9, - 0xd0, 0x9e, 0x6d, 0x36, 0x43, 0xf9, 0xc2, 0x45, 0x60, 0xe7, 0x57, 0xf0, 0x9a, 0xdd, 0x81, 0x4c, - 0x42, 0x8c, 0xba, 0x45, 0x75, 0x07, 0x17, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x67, 0xf5, 0xdf, - 0x31, 0x27, 0x03, 0x00, 0x00, + // 344 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xc1, 0x4a, 0xc3, 0x40, + 0x10, 0x86, 0x1b, 0x0f, 0x15, 0x57, 0xb4, 0x1a, 0x45, 0x7b, 0x90, 0x28, 0x82, 0x20, 0x1e, 0x1a, + 0xc1, 0x37, 0xb0, 0xf1, 0x50, 0x2b, 0x1e, 0x2a, 0x2a, 0x78, 0x09, 0x6d, 0x76, 0x8c, 0x4b, 0xda, + 0x9d, 0x30, 0xd9, 0x54, 0xf3, 0x16, 0x3e, 0x96, 0xc7, 0x1e, 0x3d, 0x4a, 0xf3, 0x22, 0x92, 0x75, + 0x6d, 0x52, 0x04, 0x2d, 0x78, 0x9c, 0x7f, 0xfe, 0xfd, 0x66, 0x99, 0xf9, 0xd9, 0x5e, 0x82, 0x29, + 0x05, 0xf0, 0x94, 0x0e, 0x5c, 0xa4, 0x81, 0x48, 0x5c, 0x18, 0x83, 0x54, 0x49, 0x2b, 0x26, 0x54, + 0x68, 0x37, 0x66, 0xdd, 0x96, 0xee, 0x1e, 0x5e, 0xb1, 0x8d, 0x8b, 0xc2, 0xd0, 0x13, 0x32, 0x6c, + 0x13, 0xf4, 0x15, 0x70, 0x7b, 0x97, 0x2d, 0x93, 0x90, 0xa1, 0x2f, 0x78, 0xd3, 0x3a, 0xb0, 0x8e, + 0x57, 0x7a, 0xf5, 0xa2, 0xec, 0x70, 0x7b, 0x9f, 0xad, 0x06, 0x85, 0x07, 0xc9, 0xe7, 0x82, 0x37, + 0x97, 0x74, 0x93, 0x19, 0xc9, 0x13, 0x7c, 0x8e, 0x76, 0x1b, 0xf3, 0x3f, 0x69, 0xa9, 0xf6, 0xcc, + 0xd1, 0x8c, 0x54, 0xd0, 0xee, 0xd9, 0x96, 0xa6, 0x79, 0x18, 0xa4, 0x23, 0x90, 0xea, 0x46, 0x21, + 0x81, 0x7e, 0xc7, 0x8d, 0x52, 0x42, 0xd9, 0xb7, 0xb4, 0xc8, 0x37, 0x43, 0xd6, 0xd4, 0xe0, 0x2e, + 0x64, 0x1e, 0x90, 0x18, 0xf7, 0x95, 0x40, 0x69, 0xe8, 0x27, 0x6c, 0x33, 0x82, 0xcc, 0xe7, 0x33, + 0xbd, 0x9c, 0xd1, 0x88, 0xaa, 0xfe, 0x45, 0x06, 0xdd, 0xb1, 0x6d, 0x3d, 0xe8, 0x1a, 0x39, 0x74, + 0xe4, 0x23, 0x56, 0x36, 0x1c, 0x03, 0x50, 0x65, 0x27, 0x45, 0xd9, 0xe1, 0xf6, 0x11, 0x5b, 0x0f, + 0x50, 0x2a, 0xc2, 0xe1, 0x10, 0xc8, 0x8f, 0x20, 0x33, 0xd0, 0xb5, 0x52, 0xed, 0x42, 0xf6, 0x83, + 0x5b, 0xd9, 0xf5, 0xbf, 0xb8, 0xed, 0xca, 0xfd, 0x3c, 0x18, 0xc2, 0xaf, 0xf7, 0xdb, 0x61, 0x75, + 0x82, 0x7e, 0x82, 0xd2, 0xb0, 0x4c, 0x75, 0x7e, 0xf9, 0x36, 0x75, 0xac, 0xc9, 0xd4, 0xb1, 0x3e, + 0xa6, 0x8e, 0xf5, 0x9a, 0x3b, 0xb5, 0x49, 0xee, 0xd4, 0xde, 0x73, 0xa7, 0xf6, 0x70, 0x1a, 0x0a, + 0x55, 0x44, 0x2f, 0xc0, 0x91, 0xfb, 0x15, 0x44, 0x09, 0xea, 0x19, 0x29, 0x72, 0xcb, 0xd0, 0xbe, + 0x98, 0xd8, 0xaa, 0x2c, 0x86, 0x64, 0x50, 0xd7, 0xb1, 0x3d, 0xfb, 0x0c, 0x00, 0x00, 0xff, 0xff, + 0xec, 0x7b, 0x29, 0x70, 0xd6, 0x02, 0x00, 0x00, } func (m *EventRingCreated) Marshal() (dAtA []byte, err error) { @@ -439,32 +451,18 @@ func (m *EventRingCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x22 - } if len(m.CreatorDid) > 0 { i -= len(m.CreatorDid) copy(dAtA[i:], m.CreatorDid) i = encodeVarintEvents(dAtA, i, uint64(len(m.CreatorDid))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.RingId) > 0 { i -= len(m.RingId) copy(dAtA[i:], m.RingId) i = encodeVarintEvents(dAtA, i, uint64(len(m.RingId))) i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -495,20 +493,13 @@ func (m *EventRingUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.UpdaterDid) i = encodeVarintEvents(dAtA, i, uint64(len(m.UpdaterDid))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.RingId) > 0 { i -= len(m.RingId) copy(dAtA[i:], m.RingId) i = encodeVarintEvents(dAtA, i, uint64(len(m.RingId))) i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -539,20 +530,13 @@ func (m *EventDocumentStored) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.CreatorDid) i = encodeVarintEvents(dAtA, i, uint64(len(m.CreatorDid))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.DocumentId) > 0 { i -= len(m.DocumentId) copy(dAtA[i:], m.DocumentId) i = encodeVarintEvents(dAtA, i, uint64(len(m.DocumentId))) i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -583,20 +567,13 @@ func (m *EventKeyDerivationStored) MarshalToSizedBuffer(dAtA []byte) (int, error copy(dAtA[i:], m.CreatorDid) i = encodeVarintEvents(dAtA, i, uint64(len(m.CreatorDid))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.KeyDerivationId) > 0 { i -= len(m.KeyDerivationId) copy(dAtA[i:], m.KeyDerivationId) i = encodeVarintEvents(dAtA, i, uint64(len(m.KeyDerivationId))) i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -676,6 +653,43 @@ func (m *EventNodeInfoUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EventRingDeleted) 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 *EventRingDeleted) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRingDeleted) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x12 + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { offset -= sovEvents(v) base := offset @@ -693,10 +707,6 @@ func (m *EventRingCreated) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } l = len(m.RingId) if l > 0 { n += 1 + l + sovEvents(uint64(l)) @@ -705,10 +715,6 @@ func (m *EventRingCreated) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } return n } @@ -718,10 +724,6 @@ func (m *EventRingUpdated) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } l = len(m.RingId) if l > 0 { n += 1 + l + sovEvents(uint64(l)) @@ -739,10 +741,6 @@ func (m *EventDocumentStored) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } l = len(m.DocumentId) if l > 0 { n += 1 + l + sovEvents(uint64(l)) @@ -760,10 +758,6 @@ func (m *EventKeyDerivationStored) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } l = len(m.KeyDerivationId) if l > 0 { n += 1 + l + sovEvents(uint64(l)) @@ -809,6 +803,23 @@ func (m *EventNodeInfoUpdated) Size() (n int) { return n } +func (m *EventRingDeleted) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + func sovEvents(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -846,7 +857,7 @@ func (m *EventRingCreated) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -874,11 +885,11 @@ func (m *EventRingCreated) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -906,11 +917,61 @@ func (m *EventRingCreated) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RingId = string(dAtA[iNdEx:postIndex]) + m.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventRingUpdated) 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 ErrIntOverflowEvents + } + 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: EventRingUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRingUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -938,11 +999,11 @@ func (m *EventRingCreated) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CreatorDid = string(dAtA[iNdEx:postIndex]) + m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UpdaterDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -970,7 +1031,7 @@ func (m *EventRingCreated) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Artifact = string(dAtA[iNdEx:postIndex]) + m.UpdaterDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -993,7 +1054,7 @@ func (m *EventRingCreated) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventRingUpdated) Unmarshal(dAtA []byte) error { +func (m *EventDocumentStored) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1016,15 +1077,15 @@ func (m *EventRingUpdated) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventRingUpdated: wiretype end group for non-group") + return fmt.Errorf("proto: EventDocumentStored: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventRingUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventDocumentStored: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1052,43 +1113,11 @@ func (m *EventRingUpdated) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.DocumentId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RingId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdaterDid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1116,7 +1145,7 @@ func (m *EventRingUpdated) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UpdaterDid = string(dAtA[iNdEx:postIndex]) + m.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1139,7 +1168,7 @@ func (m *EventRingUpdated) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventDocumentStored) Unmarshal(dAtA []byte) error { +func (m *EventKeyDerivationStored) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1162,15 +1191,15 @@ func (m *EventDocumentStored) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventDocumentStored: wiretype end group for non-group") + return fmt.Errorf("proto: EventKeyDerivationStored: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventDocumentStored: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventKeyDerivationStored: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field KeyDerivationId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1198,41 +1227,9 @@ func (m *EventDocumentStored) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.KeyDerivationId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } @@ -1285,7 +1282,7 @@ func (m *EventDocumentStored) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventKeyDerivationStored) Unmarshal(dAtA []byte) error { +func (m *EventNodeInfoCreated) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1308,15 +1305,15 @@ func (m *EventKeyDerivationStored) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventKeyDerivationStored: wiretype end group for non-group") + return fmt.Errorf("proto: EventNodeInfoCreated: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventKeyDerivationStored: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventNodeInfoCreated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1344,43 +1341,11 @@ func (m *EventKeyDerivationStored) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.PeerId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyDerivationId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyDerivationId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1408,7 +1373,7 @@ func (m *EventKeyDerivationStored) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CreatorDid = string(dAtA[iNdEx:postIndex]) + m.ControllerKey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1431,7 +1396,7 @@ func (m *EventKeyDerivationStored) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventNodeInfoCreated) Unmarshal(dAtA []byte) error { +func (m *EventNodeInfoUpdated) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1454,10 +1419,10 @@ func (m *EventNodeInfoCreated) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventNodeInfoCreated: wiretype end group for non-group") + return fmt.Errorf("proto: EventNodeInfoUpdated: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventNodeInfoCreated: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventNodeInfoUpdated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1545,7 +1510,7 @@ func (m *EventNodeInfoCreated) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventNodeInfoUpdated) Unmarshal(dAtA []byte) error { +func (m *EventRingDeleted) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1568,15 +1533,15 @@ func (m *EventNodeInfoUpdated) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventNodeInfoUpdated: wiretype end group for non-group") + return fmt.Errorf("proto: EventRingDeleted: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventNodeInfoUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventRingDeleted: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1604,11 +1569,11 @@ func (m *EventNodeInfoUpdated) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PeerId = string(dAtA[iNdEx:postIndex]) + m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ControllerKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1636,7 +1601,7 @@ func (m *EventNodeInfoUpdated) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ControllerKey = string(dAtA[iNdEx:postIndex]) + m.Reason = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/orbis/types/key_derivation.pb.go b/x/orbis/types/key_derivation.pb.go index c93f7f55..b9f4feb4 100644 --- a/x/orbis/types/key_derivation.pb.go +++ b/x/orbis/types/key_derivation.pb.go @@ -25,13 +25,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // KeyDerivation stores a signing derivation and its policy binding metadata. type KeyDerivation struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Derivation string `protobuf:"bytes,5,opt,name=derivation,proto3" json:"derivation,omitempty"` - PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Derivation string `protobuf:"bytes,4,opt,name=derivation,proto3" json:"derivation,omitempty"` + PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` } func (m *KeyDerivation) Reset() { *m = KeyDerivation{} } @@ -74,13 +73,6 @@ func (m *KeyDerivation) GetId() string { return "" } -func (m *KeyDerivation) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *KeyDerivation) GetCreatorDid() string { if m != nil { return m.CreatorDid @@ -132,25 +124,24 @@ func init() { } var fileDescriptor_4ec7b253df726179 = []byte{ - // 276 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0x3f, 0x4e, 0xc3, 0x30, - 0x14, 0xc6, 0xe3, 0x00, 0x69, 0x62, 0x04, 0x48, 0x5e, 0xb0, 0x00, 0x19, 0x84, 0x18, 0x98, 0x1a, - 0x24, 0x6e, 0x80, 0xba, 0x14, 0x36, 0x46, 0x96, 0x28, 0x89, 0x9f, 0xca, 0x53, 0x49, 0x1c, 0xd9, - 0x2e, 0x90, 0x5b, 0x70, 0x2c, 0xc6, 0x8e, 0x8c, 0x28, 0xb9, 0x00, 0x47, 0x40, 0xb1, 0xdb, 0x66, - 0x7c, 0xbf, 0xef, 0x8f, 0xec, 0x8f, 0xde, 0x18, 0xb5, 0xd2, 0x25, 0xbc, 0xae, 0x8a, 0x54, 0xe9, - 0x02, 0x4d, 0xba, 0x84, 0x36, 0x93, 0xa0, 0xf1, 0x3d, 0xb7, 0xa8, 0xea, 0x69, 0xa3, 0x95, 0x55, - 0xec, 0x64, 0xe7, 0x9a, 0x3a, 0xd7, 0xf5, 0x1f, 0xa1, 0x47, 0x4f, 0xd0, 0xce, 0x76, 0x46, 0x76, - 0x4c, 0x43, 0x94, 0x9c, 0x5c, 0x91, 0xdb, 0xe4, 0x39, 0x44, 0xc9, 0x2e, 0x68, 0x52, 0xe7, 0x15, - 0x98, 0x26, 0x2f, 0x81, 0x87, 0x0e, 0x8f, 0x80, 0x5d, 0xd2, 0xc3, 0x52, 0x43, 0x6e, 0x95, 0xce, - 0x24, 0x4a, 0xbe, 0xe7, 0x74, 0xba, 0x41, 0x33, 0x94, 0xec, 0x94, 0x4e, 0x34, 0xd6, 0x8b, 0x0c, - 0x25, 0xdf, 0x77, 0x62, 0x34, 0x9c, 0x73, 0xc9, 0x04, 0xa5, 0xe3, 0xf3, 0xf8, 0x81, 0x0f, 0x8e, - 0x84, 0x9d, 0xd3, 0xa4, 0x51, 0x6f, 0x58, 0xb6, 0x43, 0x34, 0x72, 0x72, 0xec, 0xc1, 0x5c, 0xb2, - 0x33, 0x1a, 0x6b, 0xf0, 0x7f, 0xe1, 0x13, 0xaf, 0x6d, 0xef, 0xa1, 0xb8, 0x01, 0x5d, 0xa1, 0x31, - 0x43, 0x71, 0xec, 0x8b, 0x47, 0xf2, 0xf0, 0xf8, 0xdd, 0x09, 0xb2, 0xee, 0x04, 0xf9, 0xed, 0x04, - 0xf9, 0xea, 0x45, 0xb0, 0xee, 0x45, 0xf0, 0xd3, 0x8b, 0xe0, 0xe5, 0x6e, 0x81, 0x76, 0x98, 0xa6, - 0x54, 0x55, 0xea, 0xcb, 0x6a, 0xb0, 0x1f, 0x4a, 0x2f, 0xd3, 0x71, 0xdc, 0xcf, 0xcd, 0xbc, 0xb6, - 0x6d, 0xc0, 0x14, 0x91, 0x9b, 0xf5, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x99, 0x04, 0xf4, - 0x7e, 0x01, 0x00, 0x00, + // 263 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x86, 0xeb, 0x00, 0x69, 0x7b, 0x08, 0x90, 0xbc, 0x60, 0x81, 0x64, 0x10, 0x62, 0x60, 0x6a, + 0x90, 0x78, 0x03, 0xd4, 0xa5, 0xb0, 0x31, 0xb2, 0x44, 0x4d, 0x6c, 0x95, 0x53, 0x69, 0x1c, 0x9d, + 0x5d, 0x20, 0x6f, 0xc1, 0x63, 0x31, 0x56, 0x4c, 0x8c, 0x28, 0x79, 0x11, 0x64, 0xbb, 0x34, 0xe3, + 0xfd, 0xff, 0x7f, 0x9f, 0xee, 0x7e, 0xb8, 0xb6, 0x66, 0x4d, 0xa5, 0x7e, 0x59, 0x17, 0x99, 0xa1, + 0x02, 0x6d, 0xb6, 0xd4, 0x4d, 0xae, 0x34, 0xe1, 0xdb, 0xdc, 0xa1, 0xa9, 0x26, 0x35, 0x19, 0x67, + 0xf8, 0xc9, 0x2e, 0x35, 0x09, 0xa9, 0xab, 0x6f, 0x06, 0x47, 0x8f, 0xba, 0x99, 0xee, 0x82, 0xfc, + 0x18, 0x12, 0x54, 0x82, 0x5d, 0xb2, 0x9b, 0xf1, 0x53, 0x82, 0x8a, 0x5f, 0xc0, 0x61, 0x49, 0x7a, + 0xee, 0x0c, 0xe5, 0x0a, 0x95, 0x48, 0x82, 0x01, 0x5b, 0x69, 0x8a, 0x8a, 0x9f, 0xc2, 0x90, 0xb0, + 0x5a, 0xe4, 0xa8, 0xc4, 0x5e, 0x30, 0x53, 0x3f, 0xce, 0x14, 0x97, 0x00, 0xfd, 0x01, 0x62, 0x3f, + 0x2e, 0xf6, 0x0a, 0x3f, 0x87, 0x71, 0x6d, 0x5e, 0xb1, 0x6c, 0xfc, 0xea, 0x41, 0xb0, 0x47, 0x51, + 0x98, 0x29, 0x7e, 0x06, 0x23, 0xd2, 0xf1, 0x5a, 0x91, 0x46, 0xef, 0x7f, 0xf6, 0xe0, 0x5a, 0xd3, + 0x0a, 0xad, 0xf5, 0xe0, 0x61, 0x04, 0xf7, 0xca, 0xfd, 0xc3, 0x57, 0x2b, 0xd9, 0xa6, 0x95, 0xec, + 0xb7, 0x95, 0xec, 0xb3, 0x93, 0x83, 0x4d, 0x27, 0x07, 0x3f, 0x9d, 0x1c, 0x3c, 0xdf, 0x2e, 0xd0, + 0xf9, 0xe7, 0x4b, 0xb3, 0xca, 0x22, 0xac, 0xd2, 0xee, 0xdd, 0xd0, 0x32, 0xeb, 0xeb, 0xfb, 0xd8, + 0x16, 0xe8, 0x9a, 0x5a, 0xdb, 0x22, 0x0d, 0xc5, 0xdd, 0xfd, 0x05, 0x00, 0x00, 0xff, 0xff, 0xcd, + 0x22, 0xbd, 0x61, 0x60, 0x01, 0x00, 0x00, } func (m *KeyDerivation) Marshal() (dAtA []byte, err error) { @@ -178,48 +169,41 @@ func (m *KeyDerivation) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Permission) i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.Permission))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } if len(m.Resource) > 0 { i -= len(m.Resource) copy(dAtA[i:], m.Resource) i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.Resource))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.PolicyId))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(m.Derivation) > 0 { i -= len(m.Derivation) copy(dAtA[i:], m.Derivation) i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.Derivation))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(m.RingId) > 0 { i -= len(m.RingId) copy(dAtA[i:], m.RingId) i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.RingId))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(m.CreatorDid) > 0 { i -= len(m.CreatorDid) copy(dAtA[i:], m.CreatorDid) i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.CreatorDid))) i-- - dAtA[i] = 0x1a - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintKeyDerivation(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { @@ -253,10 +237,6 @@ func (m *KeyDerivation) Size() (n int) { if l > 0 { n += 1 + l + sovKeyDerivation(uint64(l)) } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovKeyDerivation(uint64(l)) - } l = len(m.CreatorDid) if l > 0 { n += 1 + l + sovKeyDerivation(uint64(l)) @@ -352,38 +332,6 @@ func (m *KeyDerivation) Unmarshal(dAtA []byte) error { m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeyDerivation - } - 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 ErrInvalidLengthKeyDerivation - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthKeyDerivation - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } @@ -415,7 +363,7 @@ func (m *KeyDerivation) Unmarshal(dAtA []byte) error { } m.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) } @@ -447,7 +395,7 @@ func (m *KeyDerivation) Unmarshal(dAtA []byte) error { } m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Derivation", wireType) } @@ -479,7 +427,7 @@ func (m *KeyDerivation) Unmarshal(dAtA []byte) error { } m.Derivation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -511,7 +459,7 @@ func (m *KeyDerivation) Unmarshal(dAtA []byte) error { } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) } @@ -543,7 +491,7 @@ func (m *KeyDerivation) Unmarshal(dAtA []byte) error { } m.Resource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) } diff --git a/x/orbis/types/keys.go b/x/orbis/types/keys.go index 0f67f6b0..fb1d2ab0 100644 --- a/x/orbis/types/keys.go +++ b/x/orbis/types/keys.go @@ -4,7 +4,6 @@ import ( "crypto/sha256" "encoding/binary" "encoding/hex" - "strings" ) const ( @@ -18,11 +17,6 @@ const ( DocumentKeyPrefix = "document/" KeyDerivationKeyPrefix = "key_derivation/" NodeInfoKeyPrefix = "node_info/" - - NamespaceIDPrefix = "orbis/" - - NamespaceResource = "namespace" - UpdateRingPermission = "update_ring" ) var ( @@ -33,43 +27,19 @@ func KeyPrefix(p string) []byte { return []byte(p) } -// GetNamespaceID adds the Orbis namespace prefix unless it is already present. -func GetNamespaceID(namespace string) string { - if strings.HasPrefix(namespace, NamespaceIDPrefix) { - return namespace - } - return NamespaceIDPrefix + namespace -} - -func DocumentKey(namespaceID, documentID string) []byte { - key := appendLengthPrefixedKeyPart(nil, namespaceID) - return appendLengthPrefixedKeyPart(key, documentID) -} - -func KeyDerivationKey(namespaceID, keyDerivationID string) []byte { - key := appendLengthPrefixedKeyPart(nil, namespaceID) - return appendLengthPrefixedKeyPart(key, keyDerivationID) -} - -func NamespacePrefix(namespaceID string) []byte { - return appendLengthPrefixedKeyPart(nil, namespaceID) -} - // GenerateRingID returns the stable ID for a ring's creation parameters. -func GenerateRingID(namespaceID, ringPK string, peerIDs []string, threshold uint32, pssInterval *uint64, policyID string) string { +func GenerateRingID(peerNodeKeys []string, threshold uint32, pssInterval *uint64, policyID string, nonce *string) string { h := newIDHasher("orbis/ring/v1") - h.writeString(namespaceID) - h.writeString(ringPK) - h.writeStringSlice(peerIDs) + h.writeStringSlice(peerNodeKeys) h.writeUint32(threshold) h.writeOptionalUint64(pssInterval) h.writeString(policyID) + h.writeOptionalString(nonce) return h.sum() } // GenerateDocumentID returns the stable ID for an encrypted document. func GenerateDocumentID( - namespaceID string, ringID string, document string, proof string, @@ -80,7 +50,6 @@ func GenerateDocumentID( timestamp *uint64, ) string { h := newIDHasher("orbis/document/v1") - h.writeString(namespaceID) h.writeString(ringID) h.writeString(document) h.writeString(proof) @@ -93,9 +62,8 @@ func GenerateDocumentID( } // GenerateKeyDerivationID returns the stable ID for a key derivation. -func GenerateKeyDerivationID(namespaceID, ringID, derivation, policyID, resource, permission string) string { +func GenerateKeyDerivationID(ringID, derivation, policyID, resource, permission string) string { h := newIDHasher("orbis/key_derivation/v1") - h.writeString(namespaceID) h.writeString(ringID) h.writeString(derivation) h.writeString(policyID) @@ -164,10 +132,3 @@ func (h *idHasher) sum() string { hash := sha256.Sum256(h.bytes) return hex.EncodeToString(hash[:]) } - -func appendLengthPrefixedKeyPart(dst []byte, value string) []byte { - var buf [4]byte - binary.BigEndian.PutUint32(buf[:], uint32(len(value))) - dst = append(dst, buf[:]...) - return append(dst, value...) -} diff --git a/x/orbis/types/keys_test.go b/x/orbis/types/keys_test.go deleted file mode 100644 index 4a967c82..00000000 --- a/x/orbis/types/keys_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package types - -import ( - "bytes" - "testing" - - "github.com/stretchr/testify/require" -) - -func TestNamespaceScopedKeysAreLengthPrefixed(t *testing.T) { - documentKey := DocumentKey("orbis/a", "b/c") - collidingDocumentKey := DocumentKey("orbis/a/b", "c") - require.False(t, bytes.Equal(documentKey, collidingDocumentKey)) - - keyDerivationKey := KeyDerivationKey("orbis/a", "b/c") - collidingKeyDerivationKey := KeyDerivationKey("orbis/a/b", "c") - require.False(t, bytes.Equal(keyDerivationKey, collidingKeyDerivationKey)) - - require.True(t, bytes.HasPrefix(documentKey, NamespacePrefix("orbis/a"))) - require.True(t, bytes.HasPrefix(keyDerivationKey, NamespacePrefix("orbis/a"))) -} diff --git a/x/orbis/types/message_create_ring.go b/x/orbis/types/message_create_ring.go index 64bcc963..c5c437dd 100644 --- a/x/orbis/types/message_create_ring.go +++ b/x/orbis/types/message_create_ring.go @@ -8,13 +8,12 @@ import ( var _ sdk.Msg = &MsgCreateRing{} -func NewMsgCreateRing(creator, namespace, ringPK string, peerIDs []string, threshold uint32) *MsgCreateRing { +func NewMsgCreateRing(creator string, peerNodeKeys []string, threshold uint32, policyID string) *MsgCreateRing { return &MsgCreateRing{ - Creator: creator, - Namespace: namespace, - RingPk: ringPK, - PeerIds: peerIDs, - Threshold: threshold, + Creator: creator, + PeerNodeKeys: peerNodeKeys, + Threshold: threshold, + PolicyId: policyID, } } @@ -22,17 +21,14 @@ func (msg *MsgCreateRing) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if msg.Namespace == "" { - return ErrInvalidNamespaceId + if len(msg.PeerNodeKeys) == 0 { + return errorsmod.Wrap(ErrInvalidRing, "missing peer_node_keys") } - if msg.RingPk == "" { - return errorsmod.Wrap(ErrInvalidRing, "missing ring_pk") + if msg.Threshold == 0 || int(msg.Threshold) > len(msg.PeerNodeKeys) { + return errorsmod.Wrapf(ErrInvalidRing, "threshold %d is invalid for committee size %d", msg.Threshold, len(msg.PeerNodeKeys)) } - if len(msg.PeerIds) == 0 { - return errorsmod.Wrap(ErrInvalidRing, "missing peer_ids") - } - if msg.Threshold == 0 || int(msg.Threshold) > len(msg.PeerIds) { - return errorsmod.Wrapf(ErrInvalidRing, "threshold %d is invalid for committee size %d", msg.Threshold, len(msg.PeerIds)) + if msg.PolicyId == "" { + return errorsmod.Wrap(ErrInvalidRing, "missing policy_id") } return nil } diff --git a/x/orbis/types/message_finalize_ring.go b/x/orbis/types/message_finalize_ring.go new file mode 100644 index 00000000..9cd102ee --- /dev/null +++ b/x/orbis/types/message_finalize_ring.go @@ -0,0 +1,22 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgFinalizeRing{} + +func (msg *MsgFinalizeRing) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + if msg.RingId == "" { + return ErrInvalidRingId + } + if msg.RingPk == "" { + return errorsmod.Wrap(ErrInvalidRing, "missing ring_pk") + } + return nil +} diff --git a/x/orbis/types/message_store_document.go b/x/orbis/types/message_store_document.go index c7043539..702d41d8 100644 --- a/x/orbis/types/message_store_document.go +++ b/x/orbis/types/message_store_document.go @@ -8,10 +8,9 @@ import ( var _ sdk.Msg = &MsgStoreDocument{} -func NewMsgStoreDocument(creator, namespace, ringID, document, proof, policyID, resource, permission string) *MsgStoreDocument { +func NewMsgStoreDocument(creator, ringID, document, proof, policyID, resource, permission string) *MsgStoreDocument { return &MsgStoreDocument{ Creator: creator, - Namespace: namespace, RingId: ringID, Document: document, Proof: proof, @@ -25,9 +24,6 @@ func (msg *MsgStoreDocument) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if msg.Namespace == "" { - return ErrInvalidNamespaceId - } if msg.RingId == "" { return ErrInvalidRingId } diff --git a/x/orbis/types/message_store_key_derivation.go b/x/orbis/types/message_store_key_derivation.go index 9edbc90a..72fde004 100644 --- a/x/orbis/types/message_store_key_derivation.go +++ b/x/orbis/types/message_store_key_derivation.go @@ -8,10 +8,9 @@ import ( var _ sdk.Msg = &MsgStoreKeyDerivation{} -func NewMsgStoreKeyDerivation(creator, namespace, ringID, derivation, policyID, resource, permission string) *MsgStoreKeyDerivation { +func NewMsgStoreKeyDerivation(creator, ringID, derivation, policyID, resource, permission string) *MsgStoreKeyDerivation { return &MsgStoreKeyDerivation{ Creator: creator, - Namespace: namespace, RingId: ringID, Derivation: derivation, PolicyId: policyID, @@ -24,9 +23,6 @@ func (msg *MsgStoreKeyDerivation) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if msg.Namespace == "" { - return ErrInvalidNamespaceId - } if msg.RingId == "" { return ErrInvalidRingId } diff --git a/x/orbis/types/node_info.pb.go b/x/orbis/types/node_info.pb.go index 96666a62..1823cce7 100644 --- a/x/orbis/types/node_info.pb.go +++ b/x/orbis/types/node_info.pb.go @@ -24,10 +24,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // NodeInfo stores access-control metadata for a node participating in Orbis rings. type NodeInfo struct { - PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` - ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` - WhitelistedNamespaces []string `protobuf:"bytes,3,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` - WhitelistedRingIds []string `protobuf:"bytes,4,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,2,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` + WhitelistedPolicyIds []string `protobuf:"bytes,3,rep,name=whitelisted_policy_ids,json=whitelistedPolicyIds,proto3" json:"whitelisted_policy_ids,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,4,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` } func (m *NodeInfo) Reset() { *m = NodeInfo{} } @@ -77,9 +77,9 @@ func (m *NodeInfo) GetControllerKey() string { return "" } -func (m *NodeInfo) GetWhitelistedNamespaces() []string { +func (m *NodeInfo) GetWhitelistedPolicyIds() []string { if m != nil { - return m.WhitelistedNamespaces + return m.WhitelistedPolicyIds } return nil } @@ -152,27 +152,26 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/node_info.proto", fileDescriptor_06aa462c7d79cc8e) } var fileDescriptor_06aa462c7d79cc8e = []byte{ - // 306 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xcd, 0x4e, 0x3a, 0x31, - 0x14, 0xc5, 0xe9, 0x9f, 0x7f, 0xf8, 0xa8, 0x41, 0x93, 0xc6, 0x8f, 0x61, 0x53, 0x09, 0x89, 0x09, - 0xab, 0x19, 0xa2, 0xd1, 0x07, 0x30, 0x71, 0x81, 0x26, 0x2c, 0x66, 0xe9, 0x66, 0xc2, 0x4c, 0x2f, - 0xd0, 0x00, 0xbd, 0x93, 0xb6, 0x04, 0xe7, 0x2d, 0x7c, 0x17, 0x5f, 0xc2, 0x25, 0x4b, 0x97, 0x06, - 0x5e, 0xc4, 0xb4, 0x08, 0x4c, 0xdc, 0xf5, 0xf6, 0xdc, 0x73, 0xf2, 0xeb, 0x29, 0xbd, 0x36, 0xb8, - 0xd4, 0x19, 0x4c, 0x97, 0x69, 0x84, 0x3a, 0x95, 0x26, 0x52, 0x28, 0x20, 0x91, 0x6a, 0x8c, 0x61, - 0xae, 0xd1, 0x22, 0x3b, 0x3b, 0x2c, 0x84, 0x7e, 0xa1, 0xfb, 0x41, 0x68, 0x63, 0x88, 0x02, 0x06, - 0x6a, 0x8c, 0xec, 0x8a, 0xd6, 0x73, 0x00, 0x9d, 0x48, 0x11, 0x90, 0x0e, 0xe9, 0x35, 0xe3, 0x9a, - 0x1b, 0x07, 0x82, 0xdd, 0xd0, 0xd3, 0x0c, 0x95, 0xd5, 0x38, 0x9f, 0x83, 0x4e, 0x66, 0x50, 0x04, - 0xff, 0xbc, 0xde, 0x3a, 0xde, 0xbe, 0x40, 0xc1, 0xee, 0xe9, 0xe5, 0x6a, 0x2a, 0x2d, 0xcc, 0xa5, - 0xb1, 0x20, 0x12, 0x35, 0x5a, 0x80, 0xc9, 0x47, 0x19, 0x98, 0xa0, 0xda, 0xa9, 0xf6, 0x9a, 0xf1, - 0x45, 0x49, 0x1d, 0x1e, 0x44, 0xd6, 0xa7, 0xe7, 0x65, 0x9b, 0x96, 0x6a, 0x92, 0x48, 0x61, 0x82, - 0xff, 0xde, 0xc4, 0x4a, 0x5a, 0x2c, 0xd5, 0x64, 0x20, 0x4c, 0x37, 0xa5, 0xad, 0x3d, 0xf4, 0x93, - 0xb2, 0xba, 0x60, 0x6d, 0xda, 0xf0, 0x4f, 0x75, 0x68, 0x3b, 0xf4, 0xba, 0x9b, 0x1d, 0xd4, 0x03, - 0x6d, 0x1e, 0x5a, 0xf0, 0xd8, 0x27, 0xb7, 0xed, 0xf0, 0x4f, 0x0d, 0xe1, 0x3e, 0x2d, 0xf6, 0x31, - 0xee, 0xf4, 0xf8, 0xfc, 0xb9, 0xe1, 0x64, 0xbd, 0xe1, 0xe4, 0x7b, 0xc3, 0xc9, 0xfb, 0x96, 0x57, - 0xd6, 0x5b, 0x5e, 0xf9, 0xda, 0xf2, 0xca, 0x6b, 0x7f, 0x22, 0xad, 0xb3, 0x66, 0xb8, 0x88, 0x76, - 0x41, 0x0a, 0xec, 0x0a, 0xf5, 0x2c, 0x3a, 0xd6, 0xff, 0xf6, 0xfb, 0x01, 0xb6, 0xc8, 0xc1, 0xa4, - 0x35, 0xdf, 0xfe, 0xdd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x43, 0x28, 0x2c, 0x52, 0xa0, 0x01, - 0x00, 0x00, + // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xcd, 0x4a, 0x3b, 0x31, + 0x14, 0xc5, 0x9b, 0x7f, 0xff, 0xf4, 0x23, 0x52, 0x85, 0x20, 0xda, 0x6e, 0x62, 0x29, 0x08, 0x5d, + 0xcd, 0x14, 0x15, 0x1f, 0x40, 0x70, 0x31, 0x0a, 0x22, 0xb3, 0x74, 0x13, 0x98, 0xc9, 0x6d, 0x1b, + 0x3a, 0xe6, 0x0e, 0x49, 0x4a, 0x9d, 0xb7, 0xf0, 0x59, 0x7c, 0x0a, 0x97, 0x5d, 0xba, 0x94, 0xf6, + 0x45, 0x24, 0xa9, 0xfd, 0xc0, 0x5d, 0xee, 0x3d, 0xf7, 0x1c, 0x4e, 0x7e, 0xf4, 0xc2, 0xe2, 0xdc, + 0xe4, 0x30, 0x9d, 0x67, 0x31, 0x9a, 0x4c, 0xd9, 0x58, 0xa3, 0x04, 0xa1, 0xf4, 0x18, 0xa3, 0xd2, + 0xa0, 0x43, 0x76, 0xb2, 0x3b, 0x88, 0xc2, 0xc1, 0xe0, 0x83, 0xd0, 0xd6, 0x13, 0x4a, 0x48, 0xf4, + 0x18, 0xd9, 0x39, 0x6d, 0x96, 0x00, 0x46, 0x28, 0xd9, 0x25, 0x7d, 0x32, 0x6c, 0xa7, 0x0d, 0x3f, + 0x26, 0x92, 0x5d, 0xd2, 0xe3, 0x1c, 0xb5, 0x33, 0x58, 0x14, 0x60, 0xc4, 0x0c, 0xaa, 0xee, 0xbf, + 0xa0, 0x77, 0xf6, 0xdb, 0x47, 0xa8, 0xd8, 0x0d, 0x3d, 0x5b, 0x4c, 0x95, 0x83, 0x42, 0x59, 0x07, + 0x52, 0x94, 0x58, 0xa8, 0xbc, 0x12, 0x4a, 0xda, 0x6e, 0xbd, 0x5f, 0x1f, 0xb6, 0xd3, 0xd3, 0x03, + 0xf5, 0x39, 0x88, 0x89, 0xb4, 0x6c, 0x44, 0x0f, 0xf7, 0xc2, 0x28, 0x3d, 0x09, 0x9e, 0xff, 0xc1, + 0xc3, 0x0e, 0xb4, 0x54, 0xe9, 0x49, 0x22, 0xed, 0x20, 0xa3, 0x9d, 0x6d, 0xe7, 0x7b, 0xed, 0x4c, + 0xc5, 0x7a, 0xb4, 0x15, 0x7e, 0xea, 0x9b, 0x6d, 0x9a, 0x37, 0xfd, 0xec, 0x3b, 0xdd, 0xd2, 0xf6, + 0x0e, 0x42, 0x68, 0x7d, 0x74, 0xd5, 0x8b, 0xfe, 0x50, 0x88, 0xb6, 0x69, 0x69, 0x88, 0xf1, 0xaf, + 0xbb, 0x87, 0xcf, 0x15, 0x27, 0xcb, 0x15, 0x27, 0xdf, 0x2b, 0x4e, 0xde, 0xd7, 0xbc, 0xb6, 0x5c, + 0xf3, 0xda, 0xd7, 0x9a, 0xd7, 0x5e, 0x46, 0x13, 0xe5, 0xbc, 0x35, 0xc7, 0xd7, 0x78, 0x13, 0xa4, + 0xc1, 0x2d, 0xd0, 0xcc, 0xe2, 0x3d, 0xfd, 0xb7, 0x5f, 0xfe, 0xae, 0x2a, 0xc1, 0x66, 0x8d, 0x00, + 0xff, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x9d, 0xc3, 0xe4, 0x9f, 0x01, 0x00, 0x00, } func (m *NodeInfo) Marshal() (dAtA []byte, err error) { @@ -204,11 +203,11 @@ func (m *NodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } } - if len(m.WhitelistedNamespaces) > 0 { - for iNdEx := len(m.WhitelistedNamespaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.WhitelistedNamespaces[iNdEx]) - copy(dAtA[i:], m.WhitelistedNamespaces[iNdEx]) - i = encodeVarintNodeInfo(dAtA, i, uint64(len(m.WhitelistedNamespaces[iNdEx]))) + if len(m.WhitelistedPolicyIds) > 0 { + for iNdEx := len(m.WhitelistedPolicyIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedPolicyIds[iNdEx]) + copy(dAtA[i:], m.WhitelistedPolicyIds[iNdEx]) + i = encodeVarintNodeInfo(dAtA, i, uint64(len(m.WhitelistedPolicyIds[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -297,8 +296,8 @@ func (m *NodeInfo) Size() (n int) { if l > 0 { n += 1 + l + sovNodeInfo(uint64(l)) } - if len(m.WhitelistedNamespaces) > 0 { - for _, s := range m.WhitelistedNamespaces { + if len(m.WhitelistedPolicyIds) > 0 { + for _, s := range m.WhitelistedPolicyIds { l = len(s) n += 1 + l + sovNodeInfo(uint64(l)) } @@ -430,7 +429,7 @@ func (m *NodeInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedNamespaces", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedPolicyIds", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -458,7 +457,7 @@ func (m *NodeInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.WhitelistedNamespaces = append(m.WhitelistedNamespaces, string(dAtA[iNdEx:postIndex])) + m.WhitelistedPolicyIds = append(m.WhitelistedPolicyIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: if wireType != 2 { diff --git a/x/orbis/types/query.pb.go b/x/orbis/types/query.pb.go index dddb93eb..75b830fc 100644 --- a/x/orbis/types/query.pb.go +++ b/x/orbis/types/query.pb.go @@ -202,8 +202,7 @@ func (m *QueryRingResponse) GetRing() *Ring { } type QueryRingsRequest struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryRingsRequest) Reset() { *m = QueryRingsRequest{} } @@ -239,13 +238,6 @@ func (m *QueryRingsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryRingsRequest proto.InternalMessageInfo -func (m *QueryRingsRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *QueryRingsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -306,8 +298,7 @@ func (m *QueryRingsResponse) GetPagination() *query.PageResponse { } type QueryDocumentRequest struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *QueryDocumentRequest) Reset() { *m = QueryDocumentRequest{} } @@ -343,13 +334,6 @@ func (m *QueryDocumentRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDocumentRequest proto.InternalMessageInfo -func (m *QueryDocumentRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *QueryDocumentRequest) GetId() string { if m != nil { return m.Id @@ -402,8 +386,7 @@ func (m *QueryDocumentResponse) GetDocument() *Document { } type QueryDocumentsRequest struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryDocumentsRequest) Reset() { *m = QueryDocumentsRequest{} } @@ -439,13 +422,6 @@ func (m *QueryDocumentsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDocumentsRequest proto.InternalMessageInfo -func (m *QueryDocumentsRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *QueryDocumentsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -506,8 +482,7 @@ func (m *QueryDocumentsResponse) GetPagination() *query.PageResponse { } type QueryKeyDerivationRequest struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *QueryKeyDerivationRequest) Reset() { *m = QueryKeyDerivationRequest{} } @@ -543,13 +518,6 @@ func (m *QueryKeyDerivationRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryKeyDerivationRequest proto.InternalMessageInfo -func (m *QueryKeyDerivationRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *QueryKeyDerivationRequest) GetId() string { if m != nil { return m.Id @@ -602,8 +570,7 @@ func (m *QueryKeyDerivationResponse) GetKeyDerivation() *KeyDerivation { } type QueryKeyDerivationsRequest struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryKeyDerivationsRequest) Reset() { *m = QueryKeyDerivationsRequest{} } @@ -639,13 +606,6 @@ func (m *QueryKeyDerivationsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryKeyDerivationsRequest proto.InternalMessageInfo -func (m *QueryKeyDerivationsRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *QueryKeyDerivationsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -815,64 +775,62 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/query.proto", fileDescriptor_349198995878e248) } var fileDescriptor_349198995878e248 = []byte{ - // 907 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x4f, 0xe3, 0x46, - 0x18, 0xc7, 0x33, 0x29, 0xd0, 0xe4, 0xa9, 0x08, 0x65, 0x0a, 0x2d, 0x18, 0x64, 0x5a, 0xf3, 0xda, - 0x94, 0xda, 0xbc, 0x14, 0x54, 0x51, 0x84, 0x50, 0x44, 0xa9, 0x28, 0x12, 0x85, 0x1c, 0x7b, 0x41, - 0x4e, 0x32, 0xb8, 0x56, 0x1a, 0x4f, 0xb0, 0x1d, 0xda, 0x08, 0xa5, 0x95, 0xf8, 0x04, 0x95, 0xaa, - 0xf6, 0xd0, 0x9e, 0x2b, 0xf5, 0x56, 0xce, 0xfd, 0x00, 0x2b, 0x8e, 0x48, 0x7b, 0xd9, 0xd3, 0x6a, - 0x05, 0x2b, 0xed, 0xd7, 0x58, 0x79, 0x3c, 0x76, 0x6c, 0xc7, 0x89, 0xb3, 0x2b, 0xc4, 0x05, 0x39, - 0x9e, 0xe7, 0xe5, 0xf7, 0xbc, 0xcc, 0xdf, 0xc0, 0x94, 0x45, 0x1b, 0x66, 0x99, 0xfc, 0xd0, 0x28, - 0x29, 0xd4, 0x2c, 0xe9, 0x96, 0x72, 0xde, 0x20, 0x66, 0x53, 0xae, 0x9b, 0xd4, 0xa6, 0x78, 0xc4, - 0x3f, 0x94, 0xd9, 0xa1, 0x30, 0xaa, 0xd6, 0x74, 0x83, 0x2a, 0xec, 0xaf, 0x6b, 0x23, 0xe4, 0xcb, - 0xd4, 0xaa, 0x51, 0x4b, 0x29, 0xa9, 0x16, 0x71, 0x9d, 0x95, 0x8b, 0xd5, 0x12, 0xb1, 0xd5, 0x55, - 0xa5, 0xae, 0x6a, 0xba, 0xa1, 0xda, 0x3a, 0x35, 0xb8, 0xed, 0x98, 0x46, 0x35, 0xca, 0x1e, 0x15, - 0xe7, 0x89, 0xbf, 0x9d, 0xd6, 0x28, 0xd5, 0x7e, 0x24, 0x8a, 0x5a, 0xd7, 0x15, 0xd5, 0x30, 0xa8, - 0xcd, 0x5c, 0x2c, 0x7e, 0x2a, 0x46, 0x01, 0x2b, 0xb4, 0xdc, 0xa8, 0x11, 0xc3, 0xe6, 0xe7, 0x73, - 0xd1, 0xf3, 0x2a, 0x69, 0x9e, 0x56, 0x88, 0xa9, 0x5f, 0x04, 0x33, 0xcf, 0x44, 0xad, 0x0c, 0x5a, - 0x21, 0xa7, 0xba, 0x71, 0xe6, 0x43, 0x44, 0x0d, 0xea, 0xaa, 0xa9, 0xd6, 0x3c, 0x08, 0x21, 0x7a, - 0x6a, 0xea, 0x86, 0xe6, 0x9e, 0x49, 0x63, 0x80, 0x4f, 0x9c, 0xb2, 0x8f, 0x99, 0x43, 0x91, 0x9c, - 0x37, 0x88, 0x65, 0x4b, 0x27, 0xf0, 0x41, 0xe8, 0xad, 0x55, 0xa7, 0x86, 0x45, 0xf0, 0x16, 0x0c, - 0xb9, 0x81, 0x27, 0xd0, 0xc7, 0x68, 0xe9, 0xbd, 0xb5, 0x8f, 0xe4, 0x48, 0x8b, 0x65, 0xd7, 0xa1, - 0x90, 0xbd, 0x79, 0x3e, 0x93, 0xfa, 0xf7, 0xd5, 0x75, 0x1e, 0x15, 0xb9, 0x87, 0x24, 0xc1, 0xfb, - 0x2c, 0x64, 0x51, 0x37, 0x34, 0x9e, 0x06, 0xe7, 0x20, 0xad, 0x57, 0x58, 0xac, 0x6c, 0x31, 0xad, - 0x57, 0xa4, 0x1d, 0x18, 0x0d, 0xd8, 0xf0, 0xa4, 0x9f, 0xc2, 0x80, 0xc3, 0xcb, 0x53, 0x8e, 0x77, - 0xa4, 0x64, 0xc6, 0xcc, 0x44, 0x6a, 0x06, 0xfc, 0xbd, 0x5a, 0xf0, 0x34, 0x64, 0x0d, 0xb5, 0x46, - 0xac, 0xba, 0x5a, 0x26, 0x3c, 0x57, 0xfb, 0x05, 0xde, 0x07, 0x68, 0x0f, 0x7a, 0x22, 0xcd, 0x72, - 0x2c, 0xc8, 0xee, 0x56, 0xc8, 0xce, 0x56, 0xc8, 0xee, 0x4a, 0xf1, 0xad, 0x90, 0x8f, 0x55, 0x8d, - 0xf0, 0xc8, 0xc5, 0x80, 0xa7, 0xf4, 0x07, 0xe2, 0x8d, 0xe4, 0xb9, 0x39, 0xfc, 0x26, 0x0c, 0x3a, - 0x64, 0x4e, 0xc3, 0xde, 0xe9, 0x4a, 0x1f, 0x6c, 0x97, 0x6b, 0x8e, 0xbf, 0x89, 0xc1, 0x5a, 0x4c, - 0xc4, 0x72, 0x93, 0x86, 0xb8, 0xf6, 0x60, 0x8c, 0x61, 0xed, 0xf1, 0xbd, 0xeb, 0xaf, 0x2b, 0xee, - 0x60, 0xd2, 0xfe, 0x60, 0x8e, 0x60, 0x3c, 0x12, 0x85, 0xd7, 0xb7, 0x01, 0x19, 0x6f, 0xa3, 0xf9, - 0x80, 0x26, 0x3b, 0x4a, 0xf4, 0x9d, 0x7c, 0x53, 0xa9, 0x15, 0x89, 0xf7, 0xc8, 0xc3, 0xfa, 0x07, - 0xc1, 0x87, 0xd1, 0xfc, 0xbc, 0xa0, 0x02, 0x64, 0x3d, 0x4a, 0x6f, 0x68, 0xdd, 0x2b, 0x0a, 0x0e, - 0xae, 0xed, 0xf6, 0x70, 0xc3, 0x3b, 0x80, 0x49, 0x86, 0x79, 0x48, 0x9a, 0x7b, 0xbe, 0x26, 0xbc, - 0xdd, 0x04, 0xcb, 0x20, 0xc4, 0x85, 0xe2, 0x55, 0x7f, 0x0d, 0xb9, 0xb0, 0xf0, 0xf0, 0x61, 0x8a, - 0x1d, 0xa5, 0x87, 0xfd, 0x87, 0xab, 0xc1, 0x9f, 0xd2, 0x15, 0x8a, 0xcb, 0xf2, 0xc8, 0xc3, 0xfd, - 0x1f, 0xc1, 0x54, 0x2c, 0x04, 0xaf, 0xb5, 0x08, 0x23, 0xe1, 0x5a, 0xbd, 0x39, 0x27, 0x14, 0x1b, - 0x1c, 0x76, 0x2e, 0x54, 0xf7, 0x03, 0x4e, 0x7c, 0x95, 0x5f, 0xd7, 0x23, 0x5a, 0x21, 0x07, 0xc6, - 0x19, 0xf5, 0x5a, 0x37, 0x09, 0x19, 0xa6, 0xf9, 0x55, 0xd2, 0xe4, 0x9d, 0x7b, 0xd7, 0xf9, 0x7d, - 0x48, 0x9a, 0xd2, 0x77, 0xfc, 0x2e, 0xb5, 0x5d, 0x7c, 0xed, 0xc9, 0xfa, 0xdf, 0x89, 0xae, 0x97, - 0xd3, 0xf7, 0x62, 0xf1, 0x9d, 0xa7, 0xb5, 0x27, 0x59, 0x18, 0x64, 0x11, 0xf1, 0x15, 0x82, 0x21, - 0x57, 0xd1, 0xf1, 0x6c, 0x87, 0x67, 0xe7, 0x67, 0x43, 0x98, 0xeb, 0x6d, 0xe4, 0x72, 0x49, 0x9f, - 0x5f, 0x3d, 0x7d, 0xf9, 0x7b, 0x7a, 0x11, 0xcf, 0x2b, 0xae, 0xb5, 0x41, 0xec, 0x9f, 0xa8, 0x59, - 0x55, 0xe2, 0xbf, 0x61, 0xf8, 0x57, 0x18, 0x70, 0x44, 0x12, 0x7f, 0x12, 0x1f, 0x3c, 0xf0, 0x3d, - 0x11, 0xa4, 0x5e, 0x26, 0x3c, 0xfb, 0x0a, 0xcb, 0x9e, 0xc7, 0x4b, 0x09, 0xd9, 0x1d, 0x1d, 0x56, - 0x2e, 0xf5, 0x4a, 0x0b, 0xff, 0x02, 0x83, 0x4c, 0xd4, 0x71, 0x8f, 0xf0, 0x7e, 0x0b, 0x66, 0x7b, - 0xda, 0x70, 0x86, 0x65, 0xc6, 0xb0, 0x80, 0xe7, 0xfa, 0x60, 0xb0, 0xf0, 0xdf, 0x08, 0x32, 0x9e, - 0xe2, 0xe0, 0xf9, 0xf8, 0xf8, 0x11, 0x79, 0x17, 0x16, 0x92, 0xcc, 0x38, 0xc9, 0x2e, 0x23, 0xd9, - 0xc2, 0x5f, 0x26, 0x90, 0x78, 0xe2, 0xa6, 0x5c, 0xfa, 0x17, 0xb6, 0xe5, 0x76, 0xe7, 0x2f, 0x04, - 0x59, 0x5f, 0x46, 0x71, 0x42, 0x5e, 0xbf, 0x4d, 0x8b, 0x89, 0x76, 0x1c, 0x70, 0x9b, 0x01, 0x6e, - 0xe2, 0x2f, 0xfa, 0x04, 0xb4, 0x82, 0x84, 0xf8, 0x1a, 0xc1, 0x70, 0xe8, 0x12, 0xe3, 0x7c, 0x7c, - 0xe2, 0x38, 0x85, 0x15, 0x3e, 0xeb, 0xcb, 0x96, 0x83, 0xee, 0x33, 0xd0, 0x5d, 0xbc, 0x93, 0x00, - 0x1a, 0xd6, 0x9e, 0xce, 0x7e, 0xfe, 0x87, 0x20, 0x17, 0x56, 0x2e, 0xdc, 0x0f, 0x87, 0xdf, 0xd9, - 0xe5, 0xfe, 0x8c, 0x39, 0x75, 0x81, 0x51, 0x6f, 0xe3, 0xad, 0x37, 0xa2, 0x0e, 0x37, 0xf9, 0x4f, - 0x04, 0x19, 0x4f, 0x46, 0xba, 0xed, 0x67, 0x44, 0xcf, 0xba, 0xed, 0x67, 0x54, 0xc3, 0xa4, 0xaf, - 0x18, 0xdf, 0x06, 0x5e, 0x4f, 0xe0, 0xf3, 0x85, 0x4e, 0xb9, 0xf4, 0x74, 0xb2, 0x55, 0xf8, 0xf6, - 0xe6, 0x4e, 0x44, 0xb7, 0x77, 0x22, 0x7a, 0x71, 0x27, 0xa2, 0xdf, 0xee, 0xc5, 0xd4, 0xed, 0xbd, - 0x98, 0x7a, 0x76, 0x2f, 0xa6, 0xbe, 0x5f, 0xd1, 0x74, 0xdb, 0x49, 0x5d, 0xa6, 0xb5, 0xae, 0x81, - 0x7f, 0xe6, 0xa1, 0xed, 0x66, 0x9d, 0x58, 0xa5, 0x21, 0xf6, 0xef, 0xf2, 0xfa, 0xeb, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xf4, 0x2e, 0xa4, 0xbd, 0x72, 0x0c, 0x00, 0x00, + // 868 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x4f, 0xdb, 0x58, + 0x14, 0x8d, 0x33, 0xc0, 0x24, 0x77, 0x44, 0x18, 0xde, 0xc0, 0xcc, 0x60, 0x46, 0x66, 0xc6, 0x40, + 0x60, 0x02, 0x63, 0xf3, 0xbd, 0x60, 0xa4, 0x59, 0x20, 0x66, 0x46, 0x2d, 0x12, 0x85, 0x2c, 0xdb, + 0x05, 0x72, 0xe2, 0x87, 0x6b, 0xa5, 0xf1, 0x0b, 0xb6, 0x43, 0x1b, 0x21, 0x5a, 0x89, 0x1f, 0xd0, + 0x56, 0xaa, 0xca, 0x1f, 0x68, 0x2b, 0x75, 0xd9, 0x75, 0x7f, 0x01, 0x4b, 0xa4, 0x6e, 0xba, 0xaa, + 0x2a, 0xa8, 0xd4, 0xbf, 0x51, 0xf9, 0xf9, 0xd9, 0xb1, 0x1d, 0x3b, 0x0e, 0x52, 0x36, 0xc8, 0xc9, + 0x3b, 0xf7, 0x9e, 0x73, 0xcf, 0x7d, 0x3e, 0x04, 0x26, 0x2d, 0xd2, 0x34, 0xab, 0xf8, 0x7e, 0xb3, + 0x22, 0x13, 0xb3, 0xa2, 0x5b, 0xf2, 0x51, 0x13, 0x9b, 0x2d, 0xa9, 0x61, 0x12, 0x9b, 0xa0, 0x11, + 0xff, 0x50, 0xa2, 0x87, 0xfc, 0xa8, 0x52, 0xd7, 0x0d, 0x22, 0xd3, 0xbf, 0x2e, 0x86, 0x2f, 0x55, + 0x89, 0x55, 0x27, 0x96, 0x5c, 0x51, 0x2c, 0xec, 0x16, 0xcb, 0xc7, 0xcb, 0x15, 0x6c, 0x2b, 0xcb, + 0x72, 0x43, 0xd1, 0x74, 0x43, 0xb1, 0x75, 0x62, 0x30, 0xec, 0x98, 0x46, 0x34, 0x42, 0x1f, 0x65, + 0xe7, 0x89, 0x7d, 0xfb, 0x9b, 0x46, 0x88, 0xf6, 0x00, 0xcb, 0x4a, 0x43, 0x97, 0x15, 0xc3, 0x20, + 0x36, 0x2d, 0xb1, 0xd8, 0xa9, 0x10, 0x15, 0xa8, 0x92, 0x6a, 0xb3, 0x8e, 0x0d, 0x9b, 0x9d, 0xcf, + 0x44, 0xcf, 0x6b, 0xb8, 0x75, 0xa0, 0x62, 0x53, 0x3f, 0x0e, 0x32, 0x4f, 0x45, 0x51, 0x06, 0x51, + 0xf1, 0x81, 0x6e, 0x1c, 0xfa, 0x22, 0xa2, 0x80, 0x86, 0x62, 0x2a, 0x75, 0x4f, 0x04, 0x1f, 0x3d, + 0x35, 0x75, 0x43, 0x73, 0xcf, 0xc4, 0x31, 0x40, 0xfb, 0xce, 0xd8, 0x7b, 0xb4, 0xa0, 0x8c, 0x8f, + 0x9a, 0xd8, 0xb2, 0xc5, 0x7d, 0xf8, 0x29, 0xf4, 0xad, 0xd5, 0x20, 0x86, 0x85, 0xd1, 0x26, 0x0c, + 0xb9, 0x8d, 0x7f, 0xe5, 0x7e, 0xe7, 0xe6, 0x7f, 0x58, 0xf9, 0x45, 0x8a, 0x58, 0x2c, 0xb9, 0x05, + 0x5b, 0xf9, 0x8b, 0x4f, 0x53, 0x99, 0xb7, 0x5f, 0xdf, 0x95, 0xb8, 0x32, 0xab, 0x10, 0x45, 0xf8, + 0x91, 0xb6, 0x2c, 0xeb, 0x86, 0xc6, 0x68, 0x50, 0x01, 0xb2, 0xba, 0x4a, 0x7b, 0xe5, 0xcb, 0x59, + 0x5d, 0x15, 0xff, 0x81, 0xd1, 0x00, 0x86, 0x91, 0xfe, 0x09, 0x03, 0x8e, 0x5e, 0x46, 0x39, 0xde, + 0x41, 0x49, 0xc1, 0x14, 0x22, 0xde, 0x0b, 0xd4, 0x7b, 0xb3, 0xa0, 0xff, 0x00, 0xda, 0xab, 0x64, + 0x5d, 0x8a, 0x92, 0xbb, 0x77, 0xc9, 0xd9, 0xbb, 0xe4, 0x5e, 0x1a, 0xb6, 0x77, 0x69, 0x4f, 0xd1, + 0x30, 0xab, 0x2d, 0x07, 0x2a, 0xc5, 0x97, 0x1c, 0xb3, 0x8a, 0x75, 0x67, 0xf2, 0x36, 0x60, 0xd0, + 0xe1, 0x76, 0x2c, 0xf9, 0x2e, 0x51, 0x5f, 0xd0, 0x10, 0x17, 0x8e, 0xfe, 0x0f, 0xc9, 0xca, 0x52, + 0x59, 0x73, 0xa9, 0xb2, 0x5c, 0xd2, 0x90, 0xae, 0x22, 0x8c, 0x51, 0x59, 0xdb, 0xec, 0x66, 0x25, + 0x99, 0xbb, 0x0b, 0xe3, 0x11, 0x1c, 0x9b, 0x60, 0x1d, 0x72, 0xde, 0xad, 0x64, 0xf6, 0x4c, 0x74, + 0x0c, 0xe1, 0x17, 0xf9, 0x50, 0xf1, 0x20, 0xd2, 0xaf, 0xef, 0x86, 0xbf, 0xe1, 0xe0, 0xe7, 0x28, + 0x03, 0x93, 0xbc, 0x05, 0x79, 0x4f, 0x87, 0x67, 0x7c, 0xb2, 0xe6, 0xa0, 0xf9, 0xed, 0xb2, 0xfe, + 0x2d, 0x60, 0x01, 0x26, 0xa8, 0xcc, 0x1d, 0xdc, 0xda, 0xf6, 0xdf, 0xdc, 0xa4, 0x2d, 0x54, 0x81, + 0x8f, 0x03, 0xb3, 0xb9, 0xfe, 0x85, 0x42, 0x38, 0x00, 0x98, 0x7d, 0x42, 0xc7, 0x70, 0xe1, 0xfa, + 0xe1, 0x5a, 0xf0, 0xa3, 0xa8, 0xc6, 0x91, 0xf4, 0x7d, 0x3f, 0xef, 0x39, 0x98, 0x8c, 0xa5, 0x61, + 0xc3, 0x94, 0x61, 0x24, 0x3c, 0x8c, 0xb7, 0xaa, 0x94, 0x69, 0x82, 0xfb, 0x2a, 0x84, 0x06, 0xeb, + 0xe3, 0xd2, 0x96, 0xd9, 0x5b, 0xb3, 0x4b, 0x54, 0x7c, 0xcb, 0x38, 0x24, 0x9e, 0x39, 0x13, 0x90, + 0xa3, 0xe1, 0x5a, 0xc3, 0x2d, 0xb6, 0xb5, 0xef, 0x9d, 0xcf, 0x3b, 0xb8, 0x25, 0xde, 0x61, 0x17, + 0xbe, 0x5d, 0xe2, 0x47, 0x40, 0xde, 0x0f, 0xe4, 0xc4, 0x37, 0xc8, 0xaf, 0xa2, 0xfd, 0x9d, 0xa7, + 0x95, 0xf3, 0x3c, 0x0c, 0xd2, 0x8e, 0xe8, 0x8c, 0x83, 0x21, 0x37, 0x3a, 0xd1, 0x74, 0x47, 0x65, + 0x67, 0x3e, 0xf3, 0x33, 0xdd, 0x41, 0xae, 0x2e, 0xf1, 0xaf, 0xb3, 0x0f, 0x5f, 0x5e, 0x64, 0xe7, + 0xd0, 0xac, 0xec, 0xa2, 0x0d, 0x6c, 0x3f, 0x24, 0x66, 0x4d, 0x8e, 0xff, 0x67, 0x81, 0x9e, 0xc0, + 0x80, 0x93, 0x55, 0xe8, 0x8f, 0xf8, 0xe6, 0x81, 0xe0, 0xe6, 0xc5, 0x6e, 0x10, 0xc6, 0xbe, 0x44, + 0xd9, 0x4b, 0x68, 0x3e, 0x85, 0xdd, 0x89, 0x43, 0xf9, 0x44, 0x57, 0x4f, 0xd1, 0x63, 0x18, 0xa4, + 0xd9, 0x8a, 0xba, 0xb4, 0xf7, 0x2d, 0x98, 0xee, 0x8a, 0x61, 0x1a, 0x16, 0xa9, 0x86, 0x22, 0x9a, + 0xe9, 0x41, 0x83, 0x85, 0x9e, 0x71, 0x90, 0xf3, 0x42, 0x03, 0xcd, 0xc6, 0xf7, 0x8f, 0xa4, 0x2c, + 0x5f, 0x4c, 0x83, 0x31, 0x25, 0x6b, 0x54, 0x89, 0x84, 0x16, 0x53, 0x94, 0x78, 0xf9, 0xe4, 0x3a, + 0xf2, 0x94, 0x83, 0xbc, 0x9f, 0x7e, 0x28, 0x85, 0xcb, 0xb7, 0x66, 0x2e, 0x15, 0x77, 0xc3, 0x15, + 0xb5, 0x43, 0xf3, 0x35, 0x07, 0xc3, 0xa1, 0x97, 0x15, 0x95, 0xe2, 0xc9, 0xe2, 0xc2, 0x90, 0x5f, + 0xe8, 0x09, 0xcb, 0xc4, 0x6d, 0x52, 0x71, 0x6b, 0x68, 0x25, 0x45, 0x5c, 0x38, 0x63, 0x5c, 0xdf, + 0x5e, 0x71, 0x50, 0x08, 0xa7, 0x12, 0xea, 0x85, 0xdb, 0x77, 0x70, 0xb1, 0x37, 0x30, 0x53, 0xba, + 0x41, 0x95, 0x2e, 0x21, 0xe9, 0x46, 0x4a, 0x2d, 0x74, 0xce, 0x41, 0xce, 0x8b, 0x85, 0xa4, 0xfb, + 0x16, 0xc9, 0xa7, 0xa4, 0xfb, 0x16, 0xcd, 0x24, 0xf1, 0x6f, 0xaa, 0x69, 0x1d, 0xad, 0xa6, 0x68, + 0xf2, 0x83, 0x4b, 0x3e, 0xf1, 0x72, 0xef, 0x74, 0xeb, 0xf6, 0xc5, 0x95, 0xc0, 0x5d, 0x5e, 0x09, + 0xdc, 0xe7, 0x2b, 0x81, 0x7b, 0x7e, 0x2d, 0x64, 0x2e, 0xaf, 0x85, 0xcc, 0xc7, 0x6b, 0x21, 0x73, + 0x77, 0x49, 0xd3, 0x6d, 0x87, 0xba, 0x4a, 0xea, 0x89, 0x8d, 0x1f, 0xb1, 0xd6, 0x76, 0xab, 0x81, + 0xad, 0xca, 0x10, 0xfd, 0x9d, 0xb9, 0xfa, 0x2d, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x16, 0x36, 0x35, + 0xab, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -891,15 +849,15 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Ring queries a ring by id. Ring(ctx context.Context, in *QueryRingRequest, opts ...grpc.CallOption) (*QueryRingResponse, error) - // Rings queries rings, optionally filtered by namespace. + // Rings queries rings. Rings(ctx context.Context, in *QueryRingsRequest, opts ...grpc.CallOption) (*QueryRingsResponse, error) - // Document queries an encrypted document by namespace and id. + // Document queries an encrypted document by id. Document(ctx context.Context, in *QueryDocumentRequest, opts ...grpc.CallOption) (*QueryDocumentResponse, error) - // Documents queries encrypted documents within a namespace. + // Documents queries encrypted documents. Documents(ctx context.Context, in *QueryDocumentsRequest, opts ...grpc.CallOption) (*QueryDocumentsResponse, error) - // KeyDerivation queries a key derivation by namespace and id. + // KeyDerivation queries a key derivation by id. KeyDerivation(ctx context.Context, in *QueryKeyDerivationRequest, opts ...grpc.CallOption) (*QueryKeyDerivationResponse, error) - // KeyDerivations queries key derivations within a namespace. + // KeyDerivations queries key derivations. KeyDerivations(ctx context.Context, in *QueryKeyDerivationsRequest, opts ...grpc.CallOption) (*QueryKeyDerivationsResponse, error) // NodeInfo queries node info by node key. NodeInfo(ctx context.Context, in *QueryNodeInfoRequest, opts ...grpc.CallOption) (*QueryNodeInfoResponse, error) @@ -991,15 +949,15 @@ type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Ring queries a ring by id. Ring(context.Context, *QueryRingRequest) (*QueryRingResponse, error) - // Rings queries rings, optionally filtered by namespace. + // Rings queries rings. Rings(context.Context, *QueryRingsRequest) (*QueryRingsResponse, error) - // Document queries an encrypted document by namespace and id. + // Document queries an encrypted document by id. Document(context.Context, *QueryDocumentRequest) (*QueryDocumentResponse, error) - // Documents queries encrypted documents within a namespace. + // Documents queries encrypted documents. Documents(context.Context, *QueryDocumentsRequest) (*QueryDocumentsResponse, error) - // KeyDerivation queries a key derivation by namespace and id. + // KeyDerivation queries a key derivation by id. KeyDerivation(context.Context, *QueryKeyDerivationRequest) (*QueryKeyDerivationResponse, error) - // KeyDerivations queries key derivations within a namespace. + // KeyDerivations queries key derivations. KeyDerivations(context.Context, *QueryKeyDerivationsRequest) (*QueryKeyDerivationsResponse, error) // NodeInfo queries node info by node key. NodeInfo(context.Context, *QueryNodeInfoRequest) (*QueryNodeInfoResponse, error) @@ -1375,13 +1333,6 @@ func (m *QueryRingsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1461,13 +1412,6 @@ func (m *QueryDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Id) i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1538,13 +1482,6 @@ func (m *QueryDocumentsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1624,13 +1561,6 @@ func (m *QueryKeyDerivationRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro copy(dAtA[i:], m.Id) i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1701,13 +1631,6 @@ func (m *QueryKeyDerivationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, err i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1890,10 +1813,6 @@ func (m *QueryRingsRequest) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) @@ -1926,10 +1845,6 @@ func (m *QueryDocumentRequest) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = len(m.Id) if l > 0 { n += 1 + l + sovQuery(uint64(l)) @@ -1956,10 +1871,6 @@ func (m *QueryDocumentsRequest) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) @@ -1992,10 +1903,6 @@ func (m *QueryKeyDerivationRequest) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = len(m.Id) if l > 0 { n += 1 + l + sovQuery(uint64(l)) @@ -2022,10 +1929,6 @@ func (m *QueryKeyDerivationsRequest) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) @@ -2415,38 +2318,6 @@ func (m *QueryRingsRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -2653,38 +2524,6 @@ func (m *QueryDocumentRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } @@ -2853,38 +2692,6 @@ func (m *QueryDocumentsRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -3091,38 +2898,6 @@ func (m *QueryKeyDerivationRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } @@ -3291,38 +3066,6 @@ func (m *QueryKeyDerivationsRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } diff --git a/x/orbis/types/query.pb.gw.go b/x/orbis/types/query.pb.gw.go index db5ded60..133ae87e 100644 --- a/x/orbis/types/query.pb.gw.go +++ b/x/orbis/types/query.pb.gw.go @@ -152,17 +152,6 @@ func request_Query_Document_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") @@ -190,17 +179,6 @@ func local_request_Query_Document_0(ctx context.Context, marshaler runtime.Marsh _ = err ) - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") @@ -218,31 +196,13 @@ func local_request_Query_Document_0(ctx context.Context, marshaler runtime.Marsh } var ( - filter_Query_Documents_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_Documents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_Documents_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDocumentsRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -259,24 +219,6 @@ func local_request_Query_Documents_0(ctx context.Context, marshaler runtime.Mars var protoReq QueryDocumentsRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -300,17 +242,6 @@ func request_Query_KeyDerivation_0(ctx context.Context, marshaler runtime.Marsha _ = err ) - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") @@ -338,17 +269,6 @@ func local_request_Query_KeyDerivation_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") @@ -366,31 +286,13 @@ func local_request_Query_KeyDerivation_0(ctx context.Context, marshaler runtime. } var ( - filter_Query_KeyDerivations_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_KeyDerivations_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_KeyDerivations_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryKeyDerivationsRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -407,24 +309,6 @@ func local_request_Query_KeyDerivations_0(ctx context.Context, marshaler runtime var protoReq QueryKeyDerivationsRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -892,13 +776,13 @@ var ( pattern_Query_Rings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "orbis", "rings"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_Document_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sourcenetwork", "sourcehub", "orbis", "document", "namespace", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Document_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "document", "id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_Documents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "documents", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Documents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "orbis", "documents"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_KeyDerivation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sourcenetwork", "sourcehub", "orbis", "key_derivation", "namespace", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_KeyDerivation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "key_derivation", "id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_KeyDerivations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "key_derivations", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_KeyDerivations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "orbis", "key_derivations"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_NodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "orbis", "node_info", "node_key"}, "", runtime.AssumeColonVerbOpt(true))) ) diff --git a/x/orbis/types/ring.pb.go b/x/orbis/types/ring.pb.go index adc4088b..af0d5e80 100644 --- a/x/orbis/types/ring.pb.go +++ b/x/orbis/types/ring.pb.go @@ -24,21 +24,21 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Ring stores the active and pending committee metadata for an Orbis ring. type Ring struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` - RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,5,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` - NewPeerIds []string `protobuf:"bytes,7,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreatorDid string `protobuf:"bytes,2,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` + RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerNodeKeys []string `protobuf:"bytes,4,rep,name=peer_node_keys,json=peerNodeKeys,proto3" json:"peer_node_keys,omitempty"` + Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + NewPeerNodeKeys []string `protobuf:"bytes,6,rep,name=new_peer_node_keys,json=newPeerNodeKeys,proto3" json:"new_peer_node_keys,omitempty"` // Types that are valid to be assigned to XNewThreshold: // *Ring_NewThreshold XNewThreshold isRing_XNewThreshold `protobuf_oneof:"_new_threshold"` // Types that are valid to be assigned to XPssInterval: // *Ring_PssInterval XPssInterval isRing_XPssInterval `protobuf_oneof:"_pss_interval"` - BlockNumberNonce uint64 `protobuf:"varint,10,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` - PolicyId string `protobuf:"bytes,11,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,9,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + PolicyId string `protobuf:"bytes,10,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Confirmations []*RingConfirmation `protobuf:"bytes,11,rep,name=confirmations,proto3" json:"confirmations,omitempty"` } func (m *Ring) Reset() { *m = Ring{} } @@ -86,10 +86,10 @@ type isRing_XPssInterval interface { } type Ring_NewThreshold struct { - NewThreshold uint32 `protobuf:"varint,8,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` + NewThreshold uint32 `protobuf:"varint,7,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` } type Ring_PssInterval struct { - PssInterval uint64 `protobuf:"varint,9,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + PssInterval uint64 `protobuf:"varint,8,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` } func (*Ring_NewThreshold) isRing_XNewThreshold() {} @@ -115,13 +115,6 @@ func (m *Ring) GetId() string { return "" } -func (m *Ring) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *Ring) GetCreatorDid() string { if m != nil { return m.CreatorDid @@ -136,9 +129,9 @@ func (m *Ring) GetRingPk() string { return "" } -func (m *Ring) GetPeerIds() []string { +func (m *Ring) GetPeerNodeKeys() []string { if m != nil { - return m.PeerIds + return m.PeerNodeKeys } return nil } @@ -150,9 +143,9 @@ func (m *Ring) GetThreshold() uint32 { return 0 } -func (m *Ring) GetNewPeerIds() []string { +func (m *Ring) GetNewPeerNodeKeys() []string { if m != nil { - return m.NewPeerIds + return m.NewPeerNodeKeys } return nil } @@ -185,6 +178,13 @@ func (m *Ring) GetPolicyId() string { return "" } +func (m *Ring) GetConfirmations() []*RingConfirmation { + if m != nil { + return m.Confirmations + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Ring) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -193,38 +193,95 @@ func (*Ring) XXX_OneofWrappers() []interface{} { } } +// RingConfirmation records a single peer's agreement on the ring public key. +type RingConfirmation struct { + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + RingPk string `protobuf:"bytes,2,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` +} + +func (m *RingConfirmation) Reset() { *m = RingConfirmation{} } +func (m *RingConfirmation) String() string { return proto.CompactTextString(m) } +func (*RingConfirmation) ProtoMessage() {} +func (*RingConfirmation) Descriptor() ([]byte, []int) { + return fileDescriptor_be6c219726da9c21, []int{1} +} +func (m *RingConfirmation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RingConfirmation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RingConfirmation.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 *RingConfirmation) XXX_Merge(src proto.Message) { + xxx_messageInfo_RingConfirmation.Merge(m, src) +} +func (m *RingConfirmation) XXX_Size() int { + return m.Size() +} +func (m *RingConfirmation) XXX_DiscardUnknown() { + xxx_messageInfo_RingConfirmation.DiscardUnknown(m) +} + +var xxx_messageInfo_RingConfirmation proto.InternalMessageInfo + +func (m *RingConfirmation) GetNodeKey() string { + if m != nil { + return m.NodeKey + } + return "" +} + +func (m *RingConfirmation) GetRingPk() string { + if m != nil { + return m.RingPk + } + return "" +} + func init() { proto.RegisterType((*Ring)(nil), "sourcehub.orbis.Ring") + proto.RegisterType((*RingConfirmation)(nil), "sourcehub.orbis.RingConfirmation") } func init() { proto.RegisterFile("sourcehub/orbis/ring.proto", fileDescriptor_be6c219726da9c21) } var fileDescriptor_be6c219726da9c21 = []byte{ - // 376 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xbf, 0xae, 0xd3, 0x30, - 0x14, 0xc6, 0xe3, 0xb6, 0xb4, 0xcd, 0xe9, 0xed, 0xbd, 0x57, 0x5e, 0x30, 0x7f, 0x14, 0x22, 0x06, - 0x94, 0x01, 0x35, 0x48, 0xbc, 0x41, 0xc5, 0xd0, 0x32, 0x54, 0x55, 0xc4, 0xc4, 0x62, 0x25, 0xb1, - 0xd5, 0x5a, 0x49, 0x6d, 0xcb, 0x4e, 0x29, 0x7d, 0x03, 0xd8, 0x78, 0x2c, 0xc6, 0x8e, 0x8c, 0xa8, - 0x7d, 0x11, 0x64, 0x37, 0x34, 0x30, 0xfa, 0xf7, 0x7d, 0xdf, 0x39, 0xc7, 0xfa, 0xe0, 0xb9, 0x55, - 0x7b, 0x53, 0xf2, 0xed, 0xbe, 0x48, 0x95, 0x29, 0x84, 0x4d, 0x8d, 0x90, 0x9b, 0x99, 0x36, 0xaa, - 0x51, 0xf8, 0xe1, 0xa6, 0xcd, 0xbc, 0xf6, 0xfa, 0x7b, 0x1f, 0x06, 0x99, 0x90, 0x1b, 0x7c, 0x0f, - 0x3d, 0xc1, 0x08, 0x8a, 0x51, 0x12, 0x66, 0x3d, 0xc1, 0xf0, 0x4b, 0x08, 0x65, 0xbe, 0xe3, 0x56, - 0xe7, 0x25, 0x27, 0x3d, 0x8f, 0x3b, 0x80, 0x5f, 0xc1, 0xa4, 0x34, 0x3c, 0x6f, 0x94, 0xa1, 0x4c, - 0x30, 0xd2, 0xf7, 0x3a, 0xb4, 0xe8, 0x83, 0x60, 0xf8, 0x29, 0x8c, 0xdc, 0x5a, 0xaa, 0x2b, 0x32, - 0xf0, 0xe2, 0xd0, 0x3d, 0xd7, 0x15, 0x7e, 0x06, 0x63, 0xcd, 0xb9, 0xa1, 0x82, 0x59, 0xf2, 0x24, - 0xee, 0x27, 0x61, 0x36, 0x72, 0xef, 0x25, 0xb3, 0x6e, 0x65, 0xb3, 0x35, 0xdc, 0x6e, 0x55, 0xcd, - 0xc8, 0x30, 0x46, 0xc9, 0x34, 0xeb, 0x00, 0x8e, 0xe1, 0x4e, 0xf2, 0x03, 0xbd, 0x85, 0x47, 0x3e, - 0x0c, 0x92, 0x1f, 0xd6, 0x6d, 0x3e, 0x81, 0xa9, 0x73, 0x74, 0x33, 0xc6, 0x6e, 0xc6, 0x22, 0xc8, - 0x5c, 0xf0, 0xd3, 0x5f, 0xfa, 0x0d, 0x21, 0xfc, 0x06, 0xee, 0xb4, 0xb5, 0x54, 0xc8, 0x86, 0x9b, - 0x2f, 0x79, 0x4d, 0xc2, 0x18, 0x25, 0x83, 0x05, 0xca, 0x26, 0xda, 0xda, 0x65, 0x0b, 0x9d, 0xef, - 0x2d, 0xe0, 0xa2, 0x56, 0x65, 0x45, 0xe5, 0x7e, 0x57, 0x70, 0x43, 0xa5, 0x92, 0x25, 0x27, 0xe0, - 0xdc, 0xd9, 0xa3, 0x57, 0x56, 0x5e, 0x58, 0x39, 0x8e, 0x5f, 0x40, 0xa8, 0x55, 0x2d, 0xca, 0x23, - 0x15, 0x8c, 0x4c, 0xfc, 0xaf, 0xc7, 0x57, 0xb0, 0x64, 0xf3, 0x47, 0xb8, 0xa7, 0xff, 0x5d, 0x37, - 0x7f, 0x80, 0x29, 0xfd, 0xf7, 0x8a, 0xf9, 0xc7, 0x9f, 0xe7, 0x08, 0x9d, 0xce, 0x11, 0xfa, 0x7d, - 0x8e, 0xd0, 0x8f, 0x4b, 0x14, 0x9c, 0x2e, 0x51, 0xf0, 0xeb, 0x12, 0x05, 0x9f, 0xdf, 0x6d, 0x44, - 0xe3, 0x3a, 0x2b, 0xd5, 0x2e, 0xbd, 0x36, 0x28, 0x79, 0x73, 0x50, 0xa6, 0x4a, 0xbb, 0xae, 0xbf, - 0xb6, 0x6d, 0x37, 0x47, 0xcd, 0x6d, 0x31, 0xf4, 0x7d, 0xbf, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, - 0xc3, 0x8c, 0xf7, 0x86, 0x0d, 0x02, 0x00, 0x00, + // 430 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0xcd, 0x8e, 0xd3, 0x30, + 0x14, 0x85, 0xeb, 0xb6, 0xb4, 0xcd, 0xed, 0xaf, 0xbc, 0xc1, 0xfc, 0x28, 0x84, 0x11, 0x42, 0x91, + 0x40, 0x2d, 0x82, 0x37, 0x28, 0x08, 0x66, 0x40, 0xaa, 0x46, 0x11, 0x2b, 0x36, 0x56, 0x13, 0x9b, + 0xd6, 0x4a, 0x6b, 0x47, 0xb6, 0x4b, 0xe9, 0x1b, 0xb0, 0xe4, 0xb1, 0x10, 0xab, 0x59, 0xb2, 0x44, + 0xed, 0x8b, 0x20, 0xbb, 0x19, 0x9a, 0xe9, 0x32, 0xe7, 0x9c, 0x7c, 0xf2, 0xbd, 0xe7, 0xc2, 0x43, + 0xa3, 0x36, 0x3a, 0xe3, 0xcb, 0x4d, 0x3a, 0x51, 0x3a, 0x15, 0x66, 0xa2, 0x85, 0x5c, 0x8c, 0x0b, + 0xad, 0xac, 0xc2, 0xc3, 0xff, 0xde, 0xd8, 0x7b, 0x17, 0xbf, 0x1b, 0xd0, 0x4c, 0x84, 0x5c, 0xe0, + 0x01, 0xd4, 0x05, 0x23, 0x28, 0x42, 0x71, 0x90, 0xd4, 0x05, 0xc3, 0x4f, 0xa0, 0x9b, 0x69, 0x3e, + 0xb7, 0x4a, 0x53, 0x26, 0x18, 0xa9, 0x7b, 0x03, 0x4a, 0xe9, 0x9d, 0x60, 0xf8, 0x3e, 0xb4, 0x1d, + 0x98, 0x16, 0x39, 0x69, 0x78, 0xb3, 0xe5, 0x3e, 0xaf, 0x73, 0xfc, 0x0c, 0x06, 0x05, 0xe7, 0x9a, + 0x4a, 0xc5, 0x38, 0xcd, 0xf9, 0xce, 0x90, 0x66, 0xd4, 0x88, 0x83, 0xa4, 0xe7, 0xd4, 0x99, 0x62, + 0xfc, 0x13, 0xdf, 0x19, 0xfc, 0x18, 0x02, 0xbb, 0xd4, 0xdc, 0x2c, 0xd5, 0x8a, 0x91, 0x7b, 0x11, + 0x8a, 0xfb, 0xc9, 0x49, 0xc0, 0x2f, 0x00, 0x4b, 0xbe, 0xa5, 0x67, 0x9c, 0x96, 0xe7, 0x0c, 0x25, + 0xdf, 0x5e, 0x57, 0x51, 0x31, 0xf4, 0x5d, 0xf8, 0x84, 0x6b, 0x3b, 0xdc, 0x65, 0x2d, 0xe9, 0x49, + 0xbe, 0xfd, 0x7c, 0xab, 0xfe, 0x40, 0x08, 0x3f, 0x87, 0x5e, 0x61, 0x0c, 0x15, 0xd2, 0x72, 0xfd, + 0x6d, 0xbe, 0x22, 0x9d, 0x08, 0xc5, 0xcd, 0x4b, 0x94, 0x74, 0x0b, 0x63, 0xae, 0x4a, 0xd1, 0xe5, + 0x5e, 0x02, 0x4e, 0x57, 0x2a, 0xcb, 0xa9, 0xdc, 0xac, 0x53, 0xff, 0x04, 0x99, 0x71, 0x12, 0xb8, + 0x74, 0x32, 0xf2, 0xce, 0xcc, 0x1b, 0x33, 0xa7, 0xe3, 0x47, 0x10, 0x14, 0x6a, 0x25, 0xb2, 0x1d, + 0x15, 0x8c, 0x80, 0xdf, 0x45, 0xe7, 0x28, 0x5c, 0x31, 0xfc, 0x01, 0xfa, 0x99, 0x92, 0x5f, 0x85, + 0x5e, 0xcf, 0xad, 0x50, 0xd2, 0x90, 0x6e, 0xd4, 0x88, 0xbb, 0xaf, 0x9f, 0x8e, 0xcf, 0x9a, 0x18, + 0xbb, 0x16, 0xde, 0x56, 0x92, 0xc9, 0xdd, 0xff, 0xa6, 0x23, 0x18, 0xd0, 0x3b, 0x63, 0x4e, 0x87, + 0xd0, 0xa7, 0xd5, 0x71, 0x2e, 0xde, 0xc3, 0xe8, 0x9c, 0x82, 0x1f, 0x40, 0xe7, 0x76, 0x81, 0x65, + 0xbb, 0x6d, 0x79, 0x5c, 0x5c, 0xb5, 0xc1, 0x7a, 0xb5, 0xc1, 0xe9, 0xc7, 0x5f, 0xfb, 0x10, 0xdd, + 0xec, 0x43, 0xf4, 0x77, 0x1f, 0xa2, 0x9f, 0x87, 0xb0, 0x76, 0x73, 0x08, 0x6b, 0x7f, 0x0e, 0x61, + 0xed, 0xcb, 0xab, 0x85, 0xb0, 0xee, 0xc9, 0x99, 0x5a, 0x4f, 0x8e, 0x03, 0x48, 0x6e, 0xb7, 0x4a, + 0xe7, 0x93, 0xd3, 0xd1, 0x7d, 0x2f, 0xcf, 0xce, 0xee, 0x0a, 0x6e, 0xd2, 0x96, 0x3f, 0xbc, 0x37, + 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x3c, 0x85, 0xb8, 0x96, 0x02, 0x00, 0x00, } func (m *Ring) Marshal() (dAtA []byte, err error) { @@ -247,17 +304,31 @@ func (m *Ring) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Confirmations) > 0 { + for iNdEx := len(m.Confirmations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Confirmations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRing(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintRing(dAtA, i, uint64(len(m.PolicyId))) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x52 } if m.BlockNumberNonce != 0 { i = encodeVarintRing(dAtA, i, uint64(m.BlockNumberNonce)) i-- - dAtA[i] = 0x50 + dAtA[i] = 0x48 } if m.XPssInterval != nil { { @@ -277,27 +348,27 @@ func (m *Ring) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } } - if len(m.NewPeerIds) > 0 { - for iNdEx := len(m.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NewPeerIds[iNdEx]) - copy(dAtA[i:], m.NewPeerIds[iNdEx]) - i = encodeVarintRing(dAtA, i, uint64(len(m.NewPeerIds[iNdEx]))) + if len(m.NewPeerNodeKeys) > 0 { + for iNdEx := len(m.NewPeerNodeKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NewPeerNodeKeys[iNdEx]) + copy(dAtA[i:], m.NewPeerNodeKeys[iNdEx]) + i = encodeVarintRing(dAtA, i, uint64(len(m.NewPeerNodeKeys[iNdEx]))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } } if m.Threshold != 0 { i = encodeVarintRing(dAtA, i, uint64(m.Threshold)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } - if len(m.PeerIds) > 0 { - for iNdEx := len(m.PeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PeerIds[iNdEx]) - copy(dAtA[i:], m.PeerIds[iNdEx]) - i = encodeVarintRing(dAtA, i, uint64(len(m.PeerIds[iNdEx]))) + if len(m.PeerNodeKeys) > 0 { + for iNdEx := len(m.PeerNodeKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PeerNodeKeys[iNdEx]) + copy(dAtA[i:], m.PeerNodeKeys[iNdEx]) + i = encodeVarintRing(dAtA, i, uint64(len(m.PeerNodeKeys[iNdEx]))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } if len(m.RingPk) > 0 { @@ -305,20 +376,13 @@ func (m *Ring) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.RingPk) i = encodeVarintRing(dAtA, i, uint64(len(m.RingPk))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(m.CreatorDid) > 0 { i -= len(m.CreatorDid) copy(dAtA[i:], m.CreatorDid) i = encodeVarintRing(dAtA, i, uint64(len(m.CreatorDid))) i-- - dAtA[i] = 0x1a - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintRing(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { @@ -340,7 +404,7 @@ func (m *Ring_NewThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) i = encodeVarintRing(dAtA, i, uint64(m.NewThreshold)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x38 return len(dAtA) - i, nil } func (m *Ring_PssInterval) MarshalTo(dAtA []byte) (int, error) { @@ -352,9 +416,46 @@ func (m *Ring_PssInterval) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) i = encodeVarintRing(dAtA, i, uint64(m.PssInterval)) i-- - dAtA[i] = 0x48 + dAtA[i] = 0x40 return len(dAtA) - i, nil } +func (m *RingConfirmation) 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 *RingConfirmation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RingConfirmation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RingPk) > 0 { + i -= len(m.RingPk) + copy(dAtA[i:], m.RingPk) + i = encodeVarintRing(dAtA, i, uint64(len(m.RingPk))) + i-- + dAtA[i] = 0x12 + } + if len(m.NodeKey) > 0 { + i -= len(m.NodeKey) + copy(dAtA[i:], m.NodeKey) + i = encodeVarintRing(dAtA, i, uint64(len(m.NodeKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintRing(dAtA []byte, offset int, v uint64) int { offset -= sovRing(v) base := offset @@ -376,10 +477,6 @@ func (m *Ring) Size() (n int) { if l > 0 { n += 1 + l + sovRing(uint64(l)) } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovRing(uint64(l)) - } l = len(m.CreatorDid) if l > 0 { n += 1 + l + sovRing(uint64(l)) @@ -388,8 +485,8 @@ func (m *Ring) Size() (n int) { if l > 0 { n += 1 + l + sovRing(uint64(l)) } - if len(m.PeerIds) > 0 { - for _, s := range m.PeerIds { + if len(m.PeerNodeKeys) > 0 { + for _, s := range m.PeerNodeKeys { l = len(s) n += 1 + l + sovRing(uint64(l)) } @@ -397,8 +494,8 @@ func (m *Ring) Size() (n int) { if m.Threshold != 0 { n += 1 + sovRing(uint64(m.Threshold)) } - if len(m.NewPeerIds) > 0 { - for _, s := range m.NewPeerIds { + if len(m.NewPeerNodeKeys) > 0 { + for _, s := range m.NewPeerNodeKeys { l = len(s) n += 1 + l + sovRing(uint64(l)) } @@ -416,6 +513,12 @@ func (m *Ring) Size() (n int) { if l > 0 { n += 1 + l + sovRing(uint64(l)) } + if len(m.Confirmations) > 0 { + for _, e := range m.Confirmations { + l = e.Size() + n += 1 + l + sovRing(uint64(l)) + } + } return n } @@ -437,6 +540,22 @@ func (m *Ring_PssInterval) Size() (n int) { n += 1 + sovRing(uint64(m.PssInterval)) return n } +func (m *RingConfirmation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NodeKey) + if l > 0 { + n += 1 + l + sovRing(uint64(l)) + } + l = len(m.RingPk) + if l > 0 { + n += 1 + l + sovRing(uint64(l)) + } + return n +} func sovRing(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 @@ -506,38 +625,6 @@ func (m *Ring) Unmarshal(dAtA []byte) error { m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRing - } - 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 ErrInvalidLengthRing - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRing - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } @@ -569,7 +656,7 @@ func (m *Ring) Unmarshal(dAtA []byte) error { } m.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RingPk", wireType) } @@ -601,9 +688,9 @@ func (m *Ring) Unmarshal(dAtA []byte) error { } m.RingPk = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerIds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PeerNodeKeys", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -631,9 +718,9 @@ func (m *Ring) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PeerIds = append(m.PeerIds, string(dAtA[iNdEx:postIndex])) + m.PeerNodeKeys = append(m.PeerNodeKeys, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 6: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) } @@ -652,9 +739,9 @@ func (m *Ring) Unmarshal(dAtA []byte) error { break } } - case 7: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewPeerNodeKeys", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -682,9 +769,9 @@ func (m *Ring) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NewPeerIds = append(m.NewPeerIds, string(dAtA[iNdEx:postIndex])) + m.NewPeerNodeKeys = append(m.NewPeerNodeKeys, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 8: + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } @@ -704,7 +791,7 @@ func (m *Ring) Unmarshal(dAtA []byte) error { } } m.XNewThreshold = &Ring_NewThreshold{v} - case 9: + case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } @@ -724,7 +811,7 @@ func (m *Ring) Unmarshal(dAtA []byte) error { } } m.XPssInterval = &Ring_PssInterval{v} - case 10: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) } @@ -743,7 +830,7 @@ func (m *Ring) Unmarshal(dAtA []byte) error { break } } - case 11: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -775,6 +862,154 @@ func (m *Ring) Unmarshal(dAtA []byte) error { } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Confirmations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRing + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Confirmations = append(m.Confirmations, &RingConfirmation{}) + if err := m.Confirmations[len(m.Confirmations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRing(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRing + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RingConfirmation) 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 ErrIntOverflowRing + } + 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: RingConfirmation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RingConfirmation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + 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 ErrInvalidLengthRing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingPk", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRing + } + 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 ErrInvalidLengthRing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RingPk = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRing(dAtA[iNdEx:]) diff --git a/x/orbis/types/tx.pb.go b/x/orbis/types/tx.pb.go index 37424e66..38aac52a 100644 --- a/x/orbis/types/tx.pb.go +++ b/x/orbis/types/tx.pb.go @@ -122,16 +122,16 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo type MsgCreateRing struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - PeerIds []string `protobuf:"bytes,4,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` - Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + PeerNodeKeys []string `protobuf:"bytes,2,rep,name=peer_node_keys,json=peerNodeKeys,proto3" json:"peer_node_keys,omitempty"` + Threshold uint32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` // Types that are valid to be assigned to XPssInterval: // *MsgCreateRing_PssInterval XPssInterval isMsgCreateRing_XPssInterval `protobuf_oneof:"_pss_interval"` - PolicyId string `protobuf:"bytes,7,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Artifact string `protobuf:"bytes,8,opt,name=artifact,proto3" json:"artifact,omitempty"` + PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + // Types that are valid to be assigned to XNonce: + // *MsgCreateRing_Nonce + XNonce isMsgCreateRing_XNonce `protobuf_oneof:"_nonce"` } func (m *MsgCreateRing) Reset() { *m = MsgCreateRing{} } @@ -172,12 +172,21 @@ type isMsgCreateRing_XPssInterval interface { MarshalTo([]byte) (int, error) Size() int } +type isMsgCreateRing_XNonce interface { + isMsgCreateRing_XNonce() + MarshalTo([]byte) (int, error) + Size() int +} type MsgCreateRing_PssInterval struct { - PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` + PssInterval uint64 `protobuf:"varint,4,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` +} +type MsgCreateRing_Nonce struct { + Nonce string `protobuf:"bytes,6,opt,name=nonce,proto3,oneof" json:"nonce,omitempty"` } func (*MsgCreateRing_PssInterval) isMsgCreateRing_XPssInterval() {} +func (*MsgCreateRing_Nonce) isMsgCreateRing_XNonce() {} func (m *MsgCreateRing) GetXPssInterval() isMsgCreateRing_XPssInterval { if m != nil { @@ -185,31 +194,23 @@ func (m *MsgCreateRing) GetXPssInterval() isMsgCreateRing_XPssInterval { } return nil } - -func (m *MsgCreateRing) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgCreateRing) GetNamespace() string { +func (m *MsgCreateRing) GetXNonce() isMsgCreateRing_XNonce { if m != nil { - return m.Namespace + return m.XNonce } - return "" + return nil } -func (m *MsgCreateRing) GetRingPk() string { +func (m *MsgCreateRing) GetCreator() string { if m != nil { - return m.RingPk + return m.Creator } return "" } -func (m *MsgCreateRing) GetPeerIds() []string { +func (m *MsgCreateRing) GetPeerNodeKeys() []string { if m != nil { - return m.PeerIds + return m.PeerNodeKeys } return nil } @@ -235,9 +236,9 @@ func (m *MsgCreateRing) GetPolicyId() string { return "" } -func (m *MsgCreateRing) GetArtifact() string { - if m != nil { - return m.Artifact +func (m *MsgCreateRing) GetNonce() string { + if x, ok := m.GetXNonce().(*MsgCreateRing_Nonce); ok { + return x.Nonce } return "" } @@ -246,6 +247,7 @@ func (m *MsgCreateRing) GetArtifact() string { func (*MsgCreateRing) XXX_OneofWrappers() []interface{} { return []interface{}{ (*MsgCreateRing_PssInterval)(nil), + (*MsgCreateRing_Nonce)(nil), } } @@ -293,10 +295,106 @@ func (m *MsgCreateRingResponse) GetRingId() string { return "" } +type MsgFinalizeRing struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + RingPk string `protobuf:"bytes,3,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` +} + +func (m *MsgFinalizeRing) Reset() { *m = MsgFinalizeRing{} } +func (m *MsgFinalizeRing) String() string { return proto.CompactTextString(m) } +func (*MsgFinalizeRing) ProtoMessage() {} +func (*MsgFinalizeRing) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{4} +} +func (m *MsgFinalizeRing) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFinalizeRing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFinalizeRing.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 *MsgFinalizeRing) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFinalizeRing.Merge(m, src) +} +func (m *MsgFinalizeRing) XXX_Size() int { + return m.Size() +} +func (m *MsgFinalizeRing) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFinalizeRing.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFinalizeRing proto.InternalMessageInfo + +func (m *MsgFinalizeRing) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgFinalizeRing) GetRingId() string { + if m != nil { + return m.RingId + } + return "" +} + +func (m *MsgFinalizeRing) GetRingPk() string { + if m != nil { + return m.RingPk + } + return "" +} + +type MsgFinalizeRingResponse struct { +} + +func (m *MsgFinalizeRingResponse) Reset() { *m = MsgFinalizeRingResponse{} } +func (m *MsgFinalizeRingResponse) String() string { return proto.CompactTextString(m) } +func (*MsgFinalizeRingResponse) ProtoMessage() {} +func (*MsgFinalizeRingResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{5} +} +func (m *MsgFinalizeRingResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFinalizeRingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFinalizeRingResponse.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 *MsgFinalizeRingResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFinalizeRingResponse.Merge(m, src) +} +func (m *MsgFinalizeRingResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgFinalizeRingResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFinalizeRingResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFinalizeRingResponse proto.InternalMessageInfo + type MsgUpdateRingByAcp struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - NewPeerIds []string `protobuf:"bytes,3,rep,name=new_peer_ids,json=newPeerIds,proto3" json:"new_peer_ids,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + NewPeerNodeKeys []string `protobuf:"bytes,3,rep,name=new_peer_node_keys,json=newPeerNodeKeys,proto3" json:"new_peer_node_keys,omitempty"` // Types that are valid to be assigned to XNewThreshold: // // *MsgUpdateRingByAcp_NewThreshold @@ -311,7 +409,7 @@ func (m *MsgUpdateRingByAcp) Reset() { *m = MsgUpdateRingByAcp{} } func (m *MsgUpdateRingByAcp) String() string { return proto.CompactTextString(m) } func (*MsgUpdateRingByAcp) ProtoMessage() {} func (*MsgUpdateRingByAcp) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{4} + return fileDescriptor_7711ae63507074e0, []int{6} } func (m *MsgUpdateRingByAcp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,9 +486,9 @@ func (m *MsgUpdateRingByAcp) GetRingId() string { return "" } -func (m *MsgUpdateRingByAcp) GetNewPeerIds() []string { +func (m *MsgUpdateRingByAcp) GetNewPeerNodeKeys() []string { if m != nil { - return m.NewPeerIds + return m.NewPeerNodeKeys } return nil } @@ -424,7 +522,7 @@ func (m *MsgUpdateRingByAcpResponse) Reset() { *m = MsgUpdateRingByAcpRe func (m *MsgUpdateRingByAcpResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateRingByAcpResponse) ProtoMessage() {} func (*MsgUpdateRingByAcpResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{5} + return fileDescriptor_7711ae63507074e0, []int{7} } func (m *MsgUpdateRingByAcpResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +566,7 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) String() string { } func (*MsgFinalizeRingReshareByThresholdSignature) ProtoMessage() {} func (*MsgFinalizeRingReshareByThresholdSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{6} + return fileDescriptor_7711ae63507074e0, []int{8} } func (m *MsgFinalizeRingReshareByThresholdSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -536,7 +634,7 @@ func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) String() string { } func (*MsgFinalizeRingReshareByThresholdSignatureResponse) ProtoMessage() {} func (*MsgFinalizeRingReshareByThresholdSignatureResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{7} + return fileDescriptor_7711ae63507074e0, []int{9} } func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -568,19 +666,18 @@ var xxx_messageInfo_MsgFinalizeRingReshareByThresholdSignatureResponse proto.Int type RingReshareFinalizeSignDoc struct { Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,4,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - RingPk string `protobuf:"bytes,5,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` - CurrentRingSha256 []byte `protobuf:"bytes,6,opt,name=current_ring_sha256,json=currentRingSha256,proto3" json:"current_ring_sha256,omitempty"` - FinalizedRingSha256 []byte `protobuf:"bytes,7,opt,name=finalized_ring_sha256,json=finalizedRingSha256,proto3" json:"finalized_ring_sha256,omitempty"` - BlockNumberNonce uint64 `protobuf:"varint,8,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + RingPk string `protobuf:"bytes,4,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + CurrentRingSha256 []byte `protobuf:"bytes,5,opt,name=current_ring_sha256,json=currentRingSha256,proto3" json:"current_ring_sha256,omitempty"` + FinalizedRingSha256 []byte `protobuf:"bytes,6,opt,name=finalized_ring_sha256,json=finalizedRingSha256,proto3" json:"finalized_ring_sha256,omitempty"` + BlockNumberNonce uint64 `protobuf:"varint,7,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` } func (m *RingReshareFinalizeSignDoc) Reset() { *m = RingReshareFinalizeSignDoc{} } func (m *RingReshareFinalizeSignDoc) String() string { return proto.CompactTextString(m) } func (*RingReshareFinalizeSignDoc) ProtoMessage() {} func (*RingReshareFinalizeSignDoc) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{8} + return fileDescriptor_7711ae63507074e0, []int{10} } func (m *RingReshareFinalizeSignDoc) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -623,13 +720,6 @@ func (m *RingReshareFinalizeSignDoc) GetChainId() string { return "" } -func (m *RingReshareFinalizeSignDoc) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *RingReshareFinalizeSignDoc) GetRingId() string { if m != nil { return m.RingId @@ -665,15 +755,162 @@ func (m *RingReshareFinalizeSignDoc) GetBlockNumberNonce() uint64 { return 0 } +type RingReshareSignState struct { + RingPk string `protobuf:"bytes,1,opt,name=ring_pk,json=ringPk,proto3" json:"ring_pk,omitempty"` + PeerNodeKeys []string `protobuf:"bytes,2,rep,name=peer_node_keys,json=peerNodeKeys,proto3" json:"peer_node_keys,omitempty"` + Threshold uint32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` + NewPeerNodeKeys []string `protobuf:"bytes,4,rep,name=new_peer_node_keys,json=newPeerNodeKeys,proto3" json:"new_peer_node_keys,omitempty"` + // Types that are valid to be assigned to XNewThreshold: + // + // *RingReshareSignState_NewThreshold + XNewThreshold isRingReshareSignState_XNewThreshold `protobuf_oneof:"_new_threshold"` + // Types that are valid to be assigned to XPssInterval: + // + // *RingReshareSignState_PssInterval + XPssInterval isRingReshareSignState_XPssInterval `protobuf_oneof:"_pss_interval"` + BlockNumberNonce uint64 `protobuf:"varint,7,opt,name=block_number_nonce,json=blockNumberNonce,proto3" json:"block_number_nonce,omitempty"` + PolicyId string `protobuf:"bytes,8,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` +} + +func (m *RingReshareSignState) Reset() { *m = RingReshareSignState{} } +func (m *RingReshareSignState) String() string { return proto.CompactTextString(m) } +func (*RingReshareSignState) ProtoMessage() {} +func (*RingReshareSignState) Descriptor() ([]byte, []int) { + return fileDescriptor_7711ae63507074e0, []int{11} +} +func (m *RingReshareSignState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RingReshareSignState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RingReshareSignState.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 *RingReshareSignState) XXX_Merge(src proto.Message) { + xxx_messageInfo_RingReshareSignState.Merge(m, src) +} +func (m *RingReshareSignState) XXX_Size() int { + return m.Size() +} +func (m *RingReshareSignState) XXX_DiscardUnknown() { + xxx_messageInfo_RingReshareSignState.DiscardUnknown(m) +} + +var xxx_messageInfo_RingReshareSignState proto.InternalMessageInfo + +type isRingReshareSignState_XNewThreshold interface { + isRingReshareSignState_XNewThreshold() + MarshalTo([]byte) (int, error) + Size() int +} +type isRingReshareSignState_XPssInterval interface { + isRingReshareSignState_XPssInterval() + MarshalTo([]byte) (int, error) + Size() int +} + +type RingReshareSignState_NewThreshold struct { + NewThreshold uint32 `protobuf:"varint,5,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` +} +type RingReshareSignState_PssInterval struct { + PssInterval uint64 `protobuf:"varint,6,opt,name=pss_interval,json=pssInterval,proto3,oneof" json:"pss_interval,omitempty"` +} + +func (*RingReshareSignState_NewThreshold) isRingReshareSignState_XNewThreshold() {} +func (*RingReshareSignState_PssInterval) isRingReshareSignState_XPssInterval() {} + +func (m *RingReshareSignState) GetXNewThreshold() isRingReshareSignState_XNewThreshold { + if m != nil { + return m.XNewThreshold + } + return nil +} +func (m *RingReshareSignState) GetXPssInterval() isRingReshareSignState_XPssInterval { + if m != nil { + return m.XPssInterval + } + return nil +} + +func (m *RingReshareSignState) GetRingPk() string { + if m != nil { + return m.RingPk + } + return "" +} + +func (m *RingReshareSignState) GetPeerNodeKeys() []string { + if m != nil { + return m.PeerNodeKeys + } + return nil +} + +func (m *RingReshareSignState) GetThreshold() uint32 { + if m != nil { + return m.Threshold + } + return 0 +} + +func (m *RingReshareSignState) GetNewPeerNodeKeys() []string { + if m != nil { + return m.NewPeerNodeKeys + } + return nil +} + +func (m *RingReshareSignState) GetNewThreshold() uint32 { + if x, ok := m.GetXNewThreshold().(*RingReshareSignState_NewThreshold); ok { + return x.NewThreshold + } + return 0 +} + +func (m *RingReshareSignState) GetPssInterval() uint64 { + if x, ok := m.GetXPssInterval().(*RingReshareSignState_PssInterval); ok { + return x.PssInterval + } + return 0 +} + +func (m *RingReshareSignState) GetBlockNumberNonce() uint64 { + if m != nil { + return m.BlockNumberNonce + } + return 0 +} + +func (m *RingReshareSignState) GetPolicyId() string { + if m != nil { + return m.PolicyId + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RingReshareSignState) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RingReshareSignState_NewThreshold)(nil), + (*RingReshareSignState_PssInterval)(nil), + } +} + type MsgStoreDocument struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Document string `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` - Proof string `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - PolicyId string `protobuf:"bytes,6,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,8,opt,name=permission,proto3" json:"permission,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Document string `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` + Proof string `protobuf:"bytes,4,opt,name=proof,proto3" json:"proof,omitempty"` + PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` // Types that are valid to be assigned to XTier: // // *MsgStoreDocument_Tier @@ -688,7 +925,7 @@ func (m *MsgStoreDocument) Reset() { *m = MsgStoreDocument{} } func (m *MsgStoreDocument) String() string { return proto.CompactTextString(m) } func (*MsgStoreDocument) ProtoMessage() {} func (*MsgStoreDocument) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{9} + return fileDescriptor_7711ae63507074e0, []int{12} } func (m *MsgStoreDocument) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -729,10 +966,10 @@ type isMsgStoreDocument_XTimestamp interface { } type MsgStoreDocument_Tier struct { - Tier string `protobuf:"bytes,9,opt,name=tier,proto3,oneof" json:"tier,omitempty"` + Tier string `protobuf:"bytes,8,opt,name=tier,proto3,oneof" json:"tier,omitempty"` } type MsgStoreDocument_Timestamp struct { - Timestamp uint64 `protobuf:"varint,10,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` + Timestamp uint64 `protobuf:"varint,9,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"` } func (*MsgStoreDocument_Tier) isMsgStoreDocument_XTier() {} @@ -758,13 +995,6 @@ func (m *MsgStoreDocument) GetCreator() string { return "" } -func (m *MsgStoreDocument) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *MsgStoreDocument) GetRingId() string { if m != nil { return m.RingId @@ -837,7 +1067,7 @@ func (m *MsgStoreDocumentResponse) Reset() { *m = MsgStoreDocumentRespon func (m *MsgStoreDocumentResponse) String() string { return proto.CompactTextString(m) } func (*MsgStoreDocumentResponse) ProtoMessage() {} func (*MsgStoreDocumentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{10} + return fileDescriptor_7711ae63507074e0, []int{13} } func (m *MsgStoreDocumentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -875,19 +1105,18 @@ func (m *MsgStoreDocumentResponse) GetDocumentId() string { type MsgStoreKeyDerivation struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - RingId string `protobuf:"bytes,3,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` - Derivation string `protobuf:"bytes,4,opt,name=derivation,proto3" json:"derivation,omitempty"` - PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` - Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` + RingId string `protobuf:"bytes,2,opt,name=ring_id,json=ringId,proto3" json:"ring_id,omitempty"` + Derivation string `protobuf:"bytes,3,opt,name=derivation,proto3" json:"derivation,omitempty"` + PolicyId string `protobuf:"bytes,4,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Resource string `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` + Permission string `protobuf:"bytes,6,opt,name=permission,proto3" json:"permission,omitempty"` } func (m *MsgStoreKeyDerivation) Reset() { *m = MsgStoreKeyDerivation{} } func (m *MsgStoreKeyDerivation) String() string { return proto.CompactTextString(m) } func (*MsgStoreKeyDerivation) ProtoMessage() {} func (*MsgStoreKeyDerivation) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{11} + return fileDescriptor_7711ae63507074e0, []int{14} } func (m *MsgStoreKeyDerivation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -923,13 +1152,6 @@ func (m *MsgStoreKeyDerivation) GetCreator() string { return "" } -func (m *MsgStoreKeyDerivation) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - func (m *MsgStoreKeyDerivation) GetRingId() string { if m != nil { return m.RingId @@ -973,7 +1195,7 @@ func (m *MsgStoreKeyDerivationResponse) Reset() { *m = MsgStoreKeyDeriva func (m *MsgStoreKeyDerivationResponse) String() string { return proto.CompactTextString(m) } func (*MsgStoreKeyDerivationResponse) ProtoMessage() {} func (*MsgStoreKeyDerivationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{12} + return fileDescriptor_7711ae63507074e0, []int{15} } func (m *MsgStoreKeyDerivationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1010,18 +1232,18 @@ func (m *MsgStoreKeyDerivationResponse) GetKeyDerivationId() string { } type MsgCreateNodeInfo struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` - ControllerKey string `protobuf:"bytes,3,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` - WhitelistedNamespaces []string `protobuf:"bytes,4,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` - WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + ControllerKey string `protobuf:"bytes,3,opt,name=controller_key,json=controllerKey,proto3" json:"controller_key,omitempty"` + WhitelistedPolicyIds []string `protobuf:"bytes,4,rep,name=whitelisted_policy_ids,json=whitelistedPolicyIds,proto3" json:"whitelisted_policy_ids,omitempty"` + WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` } func (m *MsgCreateNodeInfo) Reset() { *m = MsgCreateNodeInfo{} } func (m *MsgCreateNodeInfo) String() string { return proto.CompactTextString(m) } func (*MsgCreateNodeInfo) ProtoMessage() {} func (*MsgCreateNodeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{13} + return fileDescriptor_7711ae63507074e0, []int{16} } func (m *MsgCreateNodeInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1071,9 +1293,9 @@ func (m *MsgCreateNodeInfo) GetControllerKey() string { return "" } -func (m *MsgCreateNodeInfo) GetWhitelistedNamespaces() []string { +func (m *MsgCreateNodeInfo) GetWhitelistedPolicyIds() []string { if m != nil { - return m.WhitelistedNamespaces + return m.WhitelistedPolicyIds } return nil } @@ -1092,7 +1314,7 @@ func (m *MsgCreateNodeInfoResponse) Reset() { *m = MsgCreateNodeInfoResp func (m *MsgCreateNodeInfoResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreateNodeInfoResponse) ProtoMessage() {} func (*MsgCreateNodeInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{14} + return fileDescriptor_7711ae63507074e0, []int{17} } func (m *MsgCreateNodeInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1121,15 +1343,25 @@ func (m *MsgCreateNodeInfoResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateNodeInfoResponse proto.InternalMessageInfo +// MsgUpdateNodeInfo replaces mutable fields on an existing NodeInfo record. +// The signer must be the current controller_key holder. +// +// IMPORTANT: whitelisted_policy_ids and whitelisted_ring_ids are REPLACED in +// full, not merged. To add a single entry you must re-send the complete desired +// list. Sending an empty repeated field clears the whitelist entirely. type MsgUpdateNodeInfo struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` NodeKey string `protobuf:"bytes,2,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` // Types that are valid to be assigned to XPeerId: // // *MsgUpdateNodeInfo_PeerId - XPeerId isMsgUpdateNodeInfo_XPeerId `protobuf_oneof:"_peer_id"` - WhitelistedNamespaces []string `protobuf:"bytes,4,rep,name=whitelisted_namespaces,json=whitelistedNamespaces,proto3" json:"whitelisted_namespaces,omitempty"` - WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` + XPeerId isMsgUpdateNodeInfo_XPeerId `protobuf_oneof:"_peer_id"` + // Replaces the full policy whitelist. Send the complete desired list on every + // update; an empty field clears all whitelisted policies. + WhitelistedPolicyIds []string `protobuf:"bytes,4,rep,name=whitelisted_policy_ids,json=whitelistedPolicyIds,proto3" json:"whitelisted_policy_ids,omitempty"` + // Replaces the full ring whitelist. Send the complete desired list on every + // update; an empty field clears all whitelisted rings. + WhitelistedRingIds []string `protobuf:"bytes,5,rep,name=whitelisted_ring_ids,json=whitelistedRingIds,proto3" json:"whitelisted_ring_ids,omitempty"` // Types that are valid to be assigned to XControllerKey: // // *MsgUpdateNodeInfo_ControllerKey @@ -1140,7 +1372,7 @@ func (m *MsgUpdateNodeInfo) Reset() { *m = MsgUpdateNodeInfo{} } func (m *MsgUpdateNodeInfo) String() string { return proto.CompactTextString(m) } func (*MsgUpdateNodeInfo) ProtoMessage() {} func (*MsgUpdateNodeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{15} + return fileDescriptor_7711ae63507074e0, []int{18} } func (m *MsgUpdateNodeInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1224,9 +1456,9 @@ func (m *MsgUpdateNodeInfo) GetPeerId() string { return "" } -func (m *MsgUpdateNodeInfo) GetWhitelistedNamespaces() []string { +func (m *MsgUpdateNodeInfo) GetWhitelistedPolicyIds() []string { if m != nil { - return m.WhitelistedNamespaces + return m.WhitelistedPolicyIds } return nil } @@ -1260,7 +1492,7 @@ func (m *MsgUpdateNodeInfoResponse) Reset() { *m = MsgUpdateNodeInfoResp func (m *MsgUpdateNodeInfoResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateNodeInfoResponse) ProtoMessage() {} func (*MsgUpdateNodeInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7711ae63507074e0, []int{16} + return fileDescriptor_7711ae63507074e0, []int{19} } func (m *MsgUpdateNodeInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1294,11 +1526,14 @@ func init() { proto.RegisterType((*MsgUpdateParamsResponse)(nil), "sourcehub.orbis.MsgUpdateParamsResponse") proto.RegisterType((*MsgCreateRing)(nil), "sourcehub.orbis.MsgCreateRing") proto.RegisterType((*MsgCreateRingResponse)(nil), "sourcehub.orbis.MsgCreateRingResponse") + proto.RegisterType((*MsgFinalizeRing)(nil), "sourcehub.orbis.MsgFinalizeRing") + proto.RegisterType((*MsgFinalizeRingResponse)(nil), "sourcehub.orbis.MsgFinalizeRingResponse") proto.RegisterType((*MsgUpdateRingByAcp)(nil), "sourcehub.orbis.MsgUpdateRingByAcp") proto.RegisterType((*MsgUpdateRingByAcpResponse)(nil), "sourcehub.orbis.MsgUpdateRingByAcpResponse") proto.RegisterType((*MsgFinalizeRingReshareByThresholdSignature)(nil), "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignature") proto.RegisterType((*MsgFinalizeRingReshareByThresholdSignatureResponse)(nil), "sourcehub.orbis.MsgFinalizeRingReshareByThresholdSignatureResponse") proto.RegisterType((*RingReshareFinalizeSignDoc)(nil), "sourcehub.orbis.RingReshareFinalizeSignDoc") + proto.RegisterType((*RingReshareSignState)(nil), "sourcehub.orbis.RingReshareSignState") proto.RegisterType((*MsgStoreDocument)(nil), "sourcehub.orbis.MsgStoreDocument") proto.RegisterType((*MsgStoreDocumentResponse)(nil), "sourcehub.orbis.MsgStoreDocumentResponse") proto.RegisterType((*MsgStoreKeyDerivation)(nil), "sourcehub.orbis.MsgStoreKeyDerivation") @@ -1312,89 +1547,93 @@ func init() { func init() { proto.RegisterFile("sourcehub/orbis/tx.proto", fileDescriptor_7711ae63507074e0) } var fileDescriptor_7711ae63507074e0 = []byte{ - // 1303 bytes of a gzipped FileDescriptorProto + // 1365 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0x26, 0xb1, 0x1d, 0xbf, 0x3a, 0x75, 0xb2, 0x4d, 0x9b, 0x8d, 0x1b, 0x5c, 0xd7, 0x88, - 0x92, 0x1a, 0x88, 0x4b, 0x68, 0x7b, 0x68, 0x4f, 0x75, 0x2b, 0x14, 0x53, 0x25, 0xaa, 0x36, 0xe5, - 0x52, 0x09, 0x2d, 0x9b, 0xdd, 0x89, 0x3d, 0xb2, 0x77, 0x67, 0x35, 0xb3, 0x6e, 0x6a, 0x4e, 0x88, - 0x13, 0xe2, 0xc4, 0x95, 0x6f, 0x50, 0x89, 0x4b, 0x91, 0x10, 0x17, 0xbe, 0x40, 0x6f, 0x54, 0x9c, - 0x38, 0x21, 0x94, 0x22, 0xf5, 0x82, 0xc4, 0x57, 0x40, 0x33, 0x3b, 0x3b, 0xfb, 0xc7, 0x49, 0x1a, - 0x51, 0xc4, 0x25, 0xf1, 0xfb, 0xff, 0xde, 0xef, 0xcd, 0x7b, 0x33, 0x0b, 0x06, 0x23, 0x63, 0xea, - 0xa0, 0xc1, 0x78, 0xaf, 0x43, 0xe8, 0x1e, 0x66, 0x9d, 0xf0, 0xc9, 0x46, 0x40, 0x49, 0x48, 0xf4, - 0x9a, 0x92, 0x6c, 0x08, 0x49, 0x7d, 0xc9, 0xf6, 0xb0, 0x4f, 0x3a, 0xe2, 0x6f, 0xa4, 0x53, 0x5f, - 0x71, 0x08, 0xf3, 0x08, 0xeb, 0x78, 0xac, 0xdf, 0x79, 0xfc, 0x21, 0xff, 0x27, 0x05, 0xab, 0x91, - 0xc0, 0x12, 0x54, 0x27, 0x22, 0xa4, 0x68, 0xb9, 0x4f, 0xfa, 0x24, 0xe2, 0xf3, 0x5f, 0x92, 0xbb, - 0x96, 0xcf, 0x23, 0xb0, 0xa9, 0xed, 0x49, 0x9b, 0xd6, 0xcf, 0x1a, 0xd4, 0xb6, 0x59, 0xff, 0xd3, - 0xc0, 0xb5, 0x43, 0xf4, 0x40, 0x48, 0xf4, 0x9b, 0x50, 0xb1, 0xc7, 0xe1, 0x80, 0x50, 0x1c, 0x4e, - 0x0c, 0xad, 0xa9, 0xad, 0x57, 0xba, 0xc6, 0xaf, 0x3f, 0x7e, 0xb0, 0x2c, 0x83, 0xdd, 0x71, 0x5d, - 0x8a, 0x18, 0xdb, 0x0d, 0x29, 0xf6, 0xfb, 0x66, 0xa2, 0xaa, 0xdf, 0x82, 0x52, 0xe4, 0xdb, 0x98, - 0x69, 0x6a, 0xeb, 0x67, 0x36, 0x57, 0x36, 0x72, 0x85, 0x6e, 0x44, 0x01, 0xba, 0x95, 0xe7, 0xbf, - 0x5f, 0x2a, 0x3c, 0x7d, 0xf5, 0xac, 0xad, 0x99, 0xd2, 0xe2, 0xd6, 0xf5, 0xaf, 0x5e, 0x3d, 0x6b, - 0x27, 0xbe, 0xbe, 0x79, 0xf5, 0xac, 0x7d, 0x39, 0x49, 0xfc, 0x89, 0x4c, 0x3d, 0x97, 0x69, 0x6b, - 0x15, 0x56, 0x72, 0x2c, 0x13, 0xb1, 0x80, 0xf8, 0x0c, 0xb5, 0xbe, 0x9b, 0x81, 0x85, 0x6d, 0xd6, - 0xbf, 0x4b, 0x91, 0x1d, 0x22, 0x13, 0xfb, 0x7d, 0xdd, 0x80, 0xb2, 0xc3, 0x29, 0x42, 0xa3, 0xa2, - 0xcc, 0x98, 0xd4, 0xd7, 0xa0, 0xe2, 0xdb, 0x1e, 0x62, 0x81, 0xed, 0x20, 0x91, 0x7b, 0xc5, 0x4c, - 0x18, 0xfa, 0x0a, 0x94, 0x79, 0xa5, 0x56, 0x30, 0x34, 0x66, 0x85, 0xac, 0xc4, 0xc9, 0x07, 0x43, - 0x7d, 0x15, 0xe6, 0x03, 0x84, 0xa8, 0x85, 0x5d, 0x66, 0xcc, 0x35, 0x67, 0xb9, 0x47, 0x4e, 0xf7, - 0x5c, 0xc6, 0x3d, 0x86, 0x03, 0x8a, 0xd8, 0x80, 0x8c, 0x5c, 0xa3, 0xd8, 0xd4, 0xd6, 0x17, 0xcc, - 0x84, 0xa1, 0x5f, 0x81, 0x6a, 0xc0, 0x98, 0x85, 0xfd, 0x10, 0xd1, 0xc7, 0xf6, 0xc8, 0x28, 0x35, - 0xb5, 0xf5, 0xb9, 0xad, 0x82, 0x79, 0x26, 0x60, 0xac, 0x27, 0x99, 0x5f, 0x6b, 0x9a, 0x7e, 0x11, - 0x2a, 0x01, 0x19, 0x61, 0x67, 0x62, 0x61, 0xd7, 0x28, 0x8b, 0xd8, 0xf3, 0x11, 0xa3, 0xe7, 0xea, - 0x75, 0x98, 0xb7, 0x69, 0x88, 0xf7, 0x6d, 0x27, 0x34, 0xe6, 0x23, 0x59, 0x4c, 0xdf, 0xaa, 0x72, - 0x34, 0xe3, 0xf2, 0xba, 0x35, 0x58, 0xb0, 0xd2, 0xf1, 0x5a, 0xd7, 0xe0, 0x7c, 0x06, 0x9a, 0x18, - 0x34, 0x55, 0x2a, 0x76, 0x25, 0x44, 0xa2, 0xd4, 0x9e, 0xdb, 0xfa, 0x4b, 0x03, 0x5d, 0x21, 0xcd, - 0x4d, 0xba, 0x93, 0x3b, 0x4e, 0x70, 0x02, 0xa4, 0x29, 0x4f, 0x33, 0x69, 0x4f, 0x7a, 0x13, 0xaa, - 0x3e, 0x3a, 0xb0, 0x14, 0x70, 0xb3, 0x02, 0x38, 0xf0, 0xd1, 0xc1, 0x03, 0x89, 0xdd, 0x3a, 0x2c, - 0x70, 0x8d, 0x04, 0xbf, 0x39, 0x8e, 0xdf, 0x56, 0xc1, 0xe4, 0x86, 0x0f, 0x63, 0x2e, 0xc7, 0x27, - 0x8f, 0x63, 0x51, 0xe0, 0xa8, 0xe5, 0x71, 0xcc, 0xc1, 0xb1, 0x08, 0x67, 0xad, 0x4c, 0x80, 0x69, - 0x80, 0xd6, 0xa0, 0x3e, 0x5d, 0xad, 0x3a, 0x5a, 0x3f, 0x69, 0xd0, 0xde, 0x66, 0xfd, 0x8f, 0xb1, - 0x6f, 0x8f, 0xf0, 0x17, 0x31, 0x82, 0x03, 0x9b, 0xa2, 0xee, 0x44, 0xe5, 0xb7, 0x8b, 0xfb, 0xbe, - 0x1d, 0x8e, 0x29, 0xfa, 0x37, 0x20, 0x5d, 0x85, 0x45, 0x16, 0xdb, 0x5b, 0xcc, 0x19, 0x20, 0x0f, - 0xc9, 0xb3, 0x57, 0x53, 0xfc, 0x5d, 0xc1, 0xe6, 0x27, 0x4d, 0xb1, 0x04, 0x52, 0x55, 0x33, 0x61, - 0x64, 0x2b, 0x6f, 0x5d, 0x87, 0xcd, 0xd3, 0xe7, 0xad, 0xca, 0xfd, 0x61, 0x06, 0xea, 0x29, 0xdd, - 0xd8, 0x9c, 0x2b, 0xde, 0x23, 0x8e, 0x7e, 0x01, 0x4a, 0x2e, 0xf1, 0x6c, 0xec, 0xc7, 0x47, 0x26, - 0xa2, 0xf8, 0x74, 0x38, 0x03, 0x1b, 0xfb, 0x49, 0x75, 0x65, 0x41, 0xf7, 0xdc, 0xec, 0xbc, 0xcd, - 0x1e, 0x37, 0x6f, 0x38, 0xea, 0x7c, 0x82, 0x4a, 0x6a, 0x10, 0x8b, 0x99, 0x41, 0xdc, 0x80, 0x73, - 0xce, 0x98, 0x52, 0xe4, 0x87, 0x96, 0x50, 0x60, 0x03, 0x7b, 0xf3, 0xc6, 0x4d, 0x31, 0x56, 0x55, - 0x73, 0x49, 0x8a, 0x78, 0x09, 0xbb, 0x42, 0xa0, 0x6f, 0xc2, 0xf9, 0x7d, 0x59, 0x85, 0x9b, 0xb1, - 0x28, 0x0b, 0x8b, 0x73, 0x4a, 0x98, 0xb2, 0x79, 0x1f, 0xf4, 0xbd, 0x11, 0x71, 0x86, 0x96, 0x3f, - 0xf6, 0xf6, 0x10, 0xb5, 0x7c, 0xe2, 0x3b, 0x48, 0x0c, 0xde, 0x9c, 0xb9, 0x28, 0x24, 0x3b, 0x42, - 0xb0, 0xc3, 0xf9, 0xad, 0x5f, 0x66, 0x60, 0x71, 0x9b, 0xf5, 0x77, 0x43, 0x42, 0xd1, 0x3d, 0xe2, - 0x8c, 0x3d, 0xe4, 0x87, 0x6f, 0xbc, 0x80, 0xb0, 0x9b, 0x5e, 0x40, 0xd1, 0x0a, 0x70, 0xa5, 0x73, - 0x09, 0x95, 0xa2, 0xf5, 0x65, 0x28, 0x06, 0x94, 0x90, 0x7d, 0x09, 0x55, 0x44, 0x64, 0x37, 0x4a, - 0x69, 0x7a, 0xa3, 0x50, 0x14, 0x2d, 0xdd, 0x78, 0xdb, 0xc4, 0xb4, 0xde, 0x00, 0x08, 0x10, 0xf5, - 0x30, 0x63, 0x98, 0xf8, 0x72, 0xdf, 0xa4, 0x38, 0xfa, 0x0a, 0xcc, 0x85, 0x18, 0x51, 0xa3, 0xc2, - 0x25, 0x5b, 0x05, 0x53, 0x50, 0x7c, 0x46, 0x2f, 0x43, 0x25, 0xc4, 0x1e, 0x62, 0xa1, 0xed, 0x05, - 0x06, 0xc8, 0x01, 0x4d, 0x58, 0xd3, 0xe3, 0x59, 0x86, 0xa2, 0xc5, 0x8d, 0xbb, 0x55, 0x00, 0x4b, - 0xe9, 0xb5, 0x6e, 0x83, 0x91, 0x07, 0x54, 0xad, 0xad, 0x4b, 0x70, 0x26, 0xae, 0x3b, 0x59, 0x5d, - 0x10, 0xb3, 0x7a, 0x6e, 0xeb, 0x6f, 0x4d, 0x6c, 0x3c, 0x61, 0x7d, 0x1f, 0x4d, 0xee, 0x21, 0x8a, - 0x1f, 0xdb, 0x21, 0xcf, 0xfb, 0x3f, 0xef, 0x49, 0x03, 0xc0, 0x55, 0xee, 0x65, 0x57, 0x52, 0x9c, - 0x6c, 0x07, 0x8a, 0x27, 0x74, 0xa0, 0x74, 0x62, 0x07, 0xca, 0xf9, 0x0e, 0xe4, 0x46, 0xfd, 0x3e, - 0xbc, 0x75, 0x64, 0xc1, 0x0a, 0xb3, 0x36, 0x2c, 0x0d, 0xd1, 0xc4, 0x4a, 0x32, 0x4b, 0x90, 0xab, - 0x0d, 0xd3, 0x16, 0x3d, 0xb7, 0xf5, 0xa7, 0x06, 0x4b, 0xea, 0xc2, 0xd8, 0x21, 0x2e, 0xea, 0xf9, - 0xfb, 0xe4, 0xe4, 0xbd, 0x26, 0xf7, 0x7b, 0xbc, 0xd7, 0xa2, 0x7b, 0x51, 0x7f, 0x07, 0xce, 0x3a, - 0xc4, 0x0f, 0x29, 0x19, 0x8d, 0x10, 0xb5, 0x86, 0x68, 0x22, 0xc1, 0x5b, 0x48, 0xb8, 0xf7, 0xd1, - 0x44, 0xbf, 0x01, 0x17, 0x0e, 0x06, 0x38, 0x44, 0x23, 0xcc, 0x42, 0xe4, 0x5a, 0x0a, 0xf5, 0xf8, - 0x9a, 0x3d, 0x9f, 0x92, 0xee, 0x28, 0xa1, 0x7e, 0x0d, 0x96, 0xd3, 0x66, 0xb2, 0x3f, 0xcc, 0x28, - 0x0a, 0x23, 0x3d, 0x25, 0x33, 0x45, 0xaf, 0x58, 0x0e, 0xb3, 0x8b, 0xb0, 0x3a, 0x55, 0xa5, 0xda, - 0x82, 0x4f, 0x67, 0x04, 0x06, 0xd1, 0x9d, 0x70, 0x0a, 0x0c, 0x56, 0x61, 0xde, 0x27, 0x2e, 0x12, - 0x45, 0xca, 0xf5, 0xc7, 0x69, 0x5e, 0xde, 0x5a, 0x02, 0xcf, 0xac, 0x1c, 0x17, 0x09, 0x10, 0x1f, - 0x98, 0xff, 0xab, 0x78, 0xbd, 0x3d, 0xd5, 0x0c, 0x71, 0xe4, 0xb6, 0xb4, 0x5c, 0x3b, 0xa6, 0x47, - 0x14, 0x60, 0x3e, 0xbe, 0xc0, 0xbb, 0x4b, 0x50, 0xb3, 0xb2, 0x6e, 0x24, 0x8e, 0x59, 0xa4, 0x62, - 0x1c, 0x37, 0x0f, 0x4b, 0x30, 0xbb, 0xcd, 0xfa, 0xfa, 0x23, 0xa8, 0x66, 0x1e, 0x9d, 0xcd, 0xa9, - 0xc7, 0x62, 0xee, 0x65, 0x57, 0x5f, 0x7f, 0x9d, 0x86, 0x3a, 0xdb, 0x0f, 0x01, 0x52, 0xef, 0xbe, - 0xc6, 0x51, 0x76, 0x89, 0xbc, 0x7e, 0xe5, 0x64, 0xb9, 0xf2, 0xea, 0x40, 0x2d, 0xff, 0xfe, 0x79, - 0xfb, 0xf8, 0x94, 0x94, 0x52, 0xfd, 0xbd, 0x53, 0x28, 0xa9, 0x20, 0xdf, 0x6b, 0xf0, 0xee, 0x69, - 0x1f, 0x16, 0xb7, 0x8f, 0x72, 0x7c, 0x4a, 0xe3, 0xfa, 0xdd, 0x37, 0x30, 0x56, 0xd9, 0x7e, 0x06, - 0x0b, 0xd9, 0x2b, 0xee, 0xf2, 0x51, 0x5e, 0x33, 0x2a, 0xf5, 0xab, 0xaf, 0x55, 0x51, 0xee, 0x47, - 0xa0, 0x1f, 0xb1, 0xb2, 0xaf, 0x1c, 0xeb, 0x20, 0xa3, 0x57, 0xdf, 0x38, 0x9d, 0x9e, 0x8a, 0xf6, - 0x39, 0x9c, 0xcd, 0x6d, 0xb8, 0xd6, 0xf1, 0x27, 0x23, 0xd6, 0xa9, 0xb7, 0x5f, 0xaf, 0x93, 0x8e, - 0x90, 0xdb, 0x1f, 0xad, 0xe3, 0xcf, 0xc6, 0xc9, 0x11, 0x8e, 0x9e, 0xae, 0x7a, 0xf1, 0x4b, 0xfe, - 0x55, 0xd5, 0xfd, 0xe4, 0xf9, 0x61, 0x43, 0x7b, 0x71, 0xd8, 0xd0, 0xfe, 0x38, 0x6c, 0x68, 0xdf, - 0xbe, 0x6c, 0x14, 0x5e, 0xbc, 0x6c, 0x14, 0x7e, 0x7b, 0xd9, 0x28, 0x3c, 0xba, 0xd6, 0xc7, 0x21, - 0x77, 0xe4, 0x10, 0xaf, 0x13, 0xb9, 0xf5, 0x51, 0x78, 0x40, 0xe8, 0xb0, 0x33, 0xfd, 0xb5, 0x15, - 0x4e, 0x02, 0xc4, 0xf6, 0x4a, 0xe2, 0x43, 0xf1, 0xa3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x75, - 0xef, 0x0a, 0xa7, 0xd0, 0x0e, 0x00, 0x00, + 0x14, 0xf7, 0x26, 0xb1, 0x63, 0xbf, 0xda, 0x71, 0x32, 0x4d, 0x1b, 0x67, 0x1b, 0xdc, 0xd4, 0x40, + 0x71, 0x5d, 0x88, 0x4b, 0x28, 0x3d, 0xb4, 0xa7, 0xba, 0x15, 0x8a, 0x89, 0x52, 0x45, 0x9b, 0x72, + 0xa9, 0x84, 0x96, 0xcd, 0xee, 0xd4, 0x5e, 0xd9, 0xde, 0x59, 0xed, 0xac, 0x9b, 0x9a, 0x13, 0xe2, + 0x54, 0x71, 0x42, 0xe2, 0x43, 0x80, 0xc4, 0xa5, 0x48, 0x88, 0x0b, 0x12, 0xe7, 0x1e, 0x0b, 0x27, + 0x4e, 0xa8, 0x6a, 0x0e, 0xf9, 0x06, 0x70, 0x45, 0x33, 0x3b, 0x3b, 0xfb, 0xc7, 0x4e, 0x62, 0x02, + 0xe2, 0x92, 0xf8, 0xfd, 0x9d, 0xf7, 0x7e, 0xef, 0xbd, 0x79, 0xb3, 0x50, 0xa1, 0x64, 0xe8, 0x99, + 0xb8, 0x3b, 0xdc, 0x6f, 0x12, 0x6f, 0xdf, 0xa6, 0x4d, 0xff, 0xe9, 0x86, 0xeb, 0x11, 0x9f, 0xa0, + 0xb2, 0x94, 0x6c, 0x70, 0x89, 0xba, 0x64, 0x0c, 0x6c, 0x87, 0x34, 0xf9, 0xdf, 0x40, 0x47, 0x5d, + 0x31, 0x09, 0x1d, 0x10, 0xda, 0x1c, 0xd0, 0x4e, 0xf3, 0xc9, 0xfb, 0xec, 0x9f, 0x10, 0xac, 0x06, + 0x02, 0x9d, 0x53, 0xcd, 0x80, 0x10, 0xa2, 0xe5, 0x0e, 0xe9, 0x90, 0x80, 0xcf, 0x7e, 0x09, 0xee, + 0x5a, 0x3a, 0x0e, 0xd7, 0xf0, 0x8c, 0x81, 0xb0, 0xa9, 0xfd, 0xac, 0x40, 0x79, 0x87, 0x76, 0x3e, + 0x71, 0x2d, 0xc3, 0xc7, 0xbb, 0x5c, 0x82, 0x6e, 0x41, 0xc1, 0x18, 0xfa, 0x5d, 0xe2, 0xd9, 0xfe, + 0xa8, 0xa2, 0xac, 0x2b, 0xf5, 0x42, 0xab, 0xf2, 0xdb, 0x8f, 0xef, 0x2d, 0x8b, 0xc3, 0xee, 0x5a, + 0x96, 0x87, 0x29, 0xdd, 0xf3, 0x3d, 0xdb, 0xe9, 0x68, 0x91, 0x2a, 0xba, 0x0d, 0xb9, 0xc0, 0x77, + 0x65, 0x66, 0x5d, 0xa9, 0x9f, 0xdb, 0x5c, 0xd9, 0x48, 0x25, 0xba, 0x11, 0x1c, 0xd0, 0x2a, 0xbc, + 0xf8, 0xe3, 0x72, 0xe6, 0xbb, 0xa3, 0xe7, 0x0d, 0x45, 0x13, 0x16, 0xb7, 0x6f, 0x7e, 0x79, 0xf4, + 0xbc, 0x11, 0xf9, 0xfa, 0xea, 0xe8, 0x79, 0xe3, 0x4a, 0x14, 0xf8, 0x53, 0x11, 0x7a, 0x2a, 0xd2, + 0xda, 0x2a, 0xac, 0xa4, 0x58, 0x1a, 0xa6, 0x2e, 0x71, 0x28, 0xae, 0xfd, 0xa9, 0x40, 0x69, 0x87, + 0x76, 0xee, 0x79, 0xd8, 0xf0, 0xb1, 0x66, 0x3b, 0x1d, 0x54, 0x81, 0x79, 0x93, 0x51, 0xc4, 0x0b, + 0x92, 0xd2, 0x42, 0x12, 0xbd, 0x05, 0x0b, 0x2e, 0xc6, 0x9e, 0xee, 0x10, 0x0b, 0xeb, 0x3d, 0x3c, + 0x62, 0x09, 0xcc, 0xd6, 0x0b, 0x5a, 0x91, 0x71, 0x1f, 0x10, 0x0b, 0x6f, 0xe3, 0x11, 0x45, 0x6b, + 0x50, 0xf0, 0xbb, 0x1e, 0xa6, 0x5d, 0xd2, 0xb7, 0x2a, 0xb3, 0xeb, 0x4a, 0xbd, 0xa4, 0x45, 0x0c, + 0x74, 0x15, 0x8a, 0x2e, 0xa5, 0xba, 0xed, 0xf8, 0xd8, 0x7b, 0x62, 0xf4, 0x2b, 0x73, 0xeb, 0x4a, + 0x7d, 0x6e, 0x2b, 0xa3, 0x9d, 0x73, 0x29, 0x6d, 0x0b, 0xe6, 0x33, 0x45, 0x41, 0x97, 0xa0, 0xe0, + 0x92, 0xbe, 0x6d, 0x8e, 0x74, 0xdb, 0xaa, 0x64, 0x79, 0x1c, 0xf9, 0x80, 0xd1, 0xb6, 0xd0, 0x2a, + 0x64, 0x1d, 0xe2, 0x98, 0xb8, 0x92, 0x63, 0x82, 0x2d, 0x45, 0x0b, 0xc8, 0x67, 0x8a, 0x72, 0xbb, + 0xc8, 0x00, 0x0a, 0x23, 0x6e, 0x95, 0xa1, 0xa4, 0xc7, 0x8f, 0x6b, 0xe5, 0x21, 0xa7, 0x73, 0xdd, + 0xda, 0x0d, 0xb8, 0x90, 0xc8, 0x3b, 0x44, 0x04, 0xad, 0xc0, 0x3c, 0xab, 0x18, 0x3b, 0x37, 0xc8, + 0x3f, 0xc7, 0xc8, 0xb6, 0x55, 0xeb, 0xf1, 0x16, 0xf8, 0xc8, 0x76, 0x8c, 0xbe, 0xfd, 0xf9, 0x69, + 0x58, 0xc5, 0xbc, 0xcc, 0xc4, 0xbd, 0x48, 0x81, 0xdb, 0xe3, 0xe0, 0x08, 0xc1, 0x6e, 0x2f, 0x19, + 0xb9, 0x28, 0x59, 0xfc, 0x30, 0x59, 0xb2, 0xbf, 0x14, 0x40, 0xb2, 0x9c, 0x4c, 0xd2, 0x1a, 0xdd, + 0x35, 0xdd, 0xb3, 0xc4, 0x72, 0x1d, 0x90, 0x83, 0x0f, 0xf4, 0x54, 0x51, 0x67, 0x79, 0x51, 0xcb, + 0x0e, 0x3e, 0xd8, 0x8d, 0xd7, 0xb5, 0x0e, 0x25, 0xa6, 0x1c, 0xd5, 0x96, 0x95, 0xae, 0xb4, 0x95, + 0xd1, 0x8a, 0x0e, 0x3e, 0x78, 0x18, 0x72, 0x59, 0xed, 0xd2, 0x35, 0xce, 0xf2, 0x1a, 0x2b, 0xe9, + 0x1a, 0xa7, 0x6a, 0xb5, 0x08, 0x0b, 0x7a, 0xe2, 0x80, 0xb1, 0xea, 0xd5, 0xd6, 0x40, 0x1d, 0x4f, + 0x5c, 0xe2, 0xf2, 0x93, 0x02, 0x8d, 0x71, 0xcc, 0xba, 0x86, 0x87, 0x5b, 0x23, 0x19, 0xdf, 0x9e, + 0xdd, 0x71, 0x0c, 0x7f, 0xe8, 0xe1, 0xb3, 0xe0, 0x75, 0x0d, 0x16, 0x69, 0x68, 0xaf, 0x53, 0xb3, + 0x8b, 0x07, 0x58, 0x14, 0xb1, 0x2c, 0xf9, 0x7b, 0x9c, 0xcd, 0xa6, 0x40, 0xb2, 0x38, 0x52, 0x45, + 0x2d, 0x62, 0xa4, 0x6a, 0x7d, 0x13, 0x36, 0xa7, 0x8f, 0x5b, 0xa6, 0xfb, 0xcd, 0x0c, 0xa8, 0x31, + 0xdd, 0xd0, 0x9c, 0x29, 0xde, 0x27, 0x26, 0xba, 0x08, 0x39, 0x8b, 0x0c, 0x0c, 0xdb, 0x09, 0xbb, + 0x38, 0xa0, 0xd0, 0x2a, 0xe4, 0xcd, 0xae, 0x61, 0x3b, 0x51, 0x76, 0xf3, 0x9c, 0x8e, 0xb5, 0xa6, + 0x6d, 0xc5, 0x5b, 0x33, 0xd9, 0xb3, 0x73, 0xf1, 0x9e, 0x45, 0x1b, 0x70, 0xde, 0x1c, 0x7a, 0x1e, + 0x76, 0x7c, 0x9d, 0x2b, 0xd0, 0xae, 0xb1, 0xf9, 0xe1, 0x2d, 0x5e, 0xf0, 0xa2, 0xb6, 0x24, 0x44, + 0x2c, 0xc8, 0x3d, 0x2e, 0x40, 0x9b, 0x70, 0xe1, 0xb1, 0x88, 0xd3, 0x4a, 0x58, 0xe4, 0xb8, 0xc5, + 0x79, 0x29, 0x8c, 0xd9, 0xbc, 0x0b, 0x68, 0xbf, 0x4f, 0xcc, 0x9e, 0xee, 0x0c, 0x07, 0xfb, 0xbc, + 0x51, 0xd9, 0xe4, 0xcf, 0xb3, 0x9e, 0xd2, 0x16, 0xb9, 0xe4, 0x01, 0x17, 0x3c, 0xe0, 0x63, 0xfd, + 0x6a, 0x06, 0x96, 0x63, 0xa8, 0x30, 0x34, 0xf6, 0x7c, 0xc3, 0xc7, 0xf1, 0x1c, 0x94, 0x44, 0x0e, + 0xff, 0xc5, 0xad, 0x36, 0x79, 0x90, 0xe6, 0xa6, 0x1c, 0xa4, 0xec, 0xb4, 0x83, 0x94, 0x9b, 0x3c, + 0x48, 0xff, 0x0c, 0xa2, 0xe4, 0xd5, 0x9a, 0x4f, 0x5e, 0xad, 0xd3, 0x4c, 0xe1, 0x0f, 0x33, 0xb0, + 0xb8, 0x43, 0x3b, 0x7b, 0x3e, 0xf1, 0xf0, 0x7d, 0x62, 0x0e, 0x07, 0xd8, 0xf1, 0xcf, 0x32, 0x4d, + 0x2a, 0xe4, 0x2d, 0x61, 0x2e, 0xfa, 0x4d, 0xd2, 0x68, 0x19, 0xb2, 0xae, 0x47, 0xc8, 0x63, 0xd1, + 0x6f, 0x01, 0x71, 0xf2, 0x52, 0x50, 0x21, 0xef, 0xe1, 0x60, 0x17, 0x06, 0x7b, 0x41, 0x93, 0x34, + 0xaa, 0x02, 0xb8, 0xd8, 0x1b, 0xd8, 0x94, 0xda, 0xc4, 0xe1, 0xc0, 0x14, 0xb4, 0x18, 0x07, 0xad, + 0xc0, 0x9c, 0x6f, 0x63, 0x2f, 0x40, 0x63, 0x2b, 0xa3, 0x71, 0x8a, 0x21, 0x7b, 0x05, 0x0a, 0xbe, + 0x3d, 0xc0, 0xd4, 0x37, 0x06, 0x6e, 0xa5, 0x20, 0xe0, 0x8f, 0x58, 0xe3, 0xb7, 0xd8, 0x3c, 0x64, + 0x75, 0x66, 0xdc, 0x2a, 0x02, 0xe8, 0x52, 0xaf, 0x76, 0x07, 0x2a, 0x69, 0xc8, 0xe4, 0xc2, 0xb9, + 0x0c, 0xe7, 0xc2, 0xbc, 0xa3, 0xa5, 0x03, 0x21, 0xab, 0x6d, 0xd5, 0x7e, 0x55, 0xf8, 0xae, 0xe2, + 0xd6, 0xdb, 0x78, 0x74, 0x1f, 0x7b, 0xf6, 0x13, 0xc3, 0x67, 0x71, 0x9f, 0x01, 0xf5, 0x2a, 0x80, + 0x25, 0x1d, 0x08, 0xdc, 0x63, 0x9c, 0x24, 0xc6, 0x73, 0x27, 0x60, 0x9c, 0x3d, 0x11, 0xe3, 0x5c, + 0x1a, 0xe3, 0xd4, 0x9d, 0xb7, 0x0d, 0x6f, 0x4c, 0x4c, 0x49, 0xa2, 0xd2, 0x80, 0xa5, 0x1e, 0x1e, + 0xe9, 0x51, 0x64, 0x11, 0x36, 0xe5, 0x5e, 0xdc, 0xa2, 0x6d, 0xd5, 0x0e, 0x15, 0x58, 0x92, 0xcb, + 0x9c, 0xcd, 0x59, 0xdb, 0x79, 0x4c, 0x4e, 0x06, 0x87, 0x8f, 0x6a, 0x04, 0x0e, 0x23, 0xdb, 0x16, + 0x7a, 0x1b, 0x16, 0x4c, 0xe2, 0xf8, 0x1e, 0xe9, 0xf7, 0xb1, 0xc7, 0x86, 0x58, 0x00, 0x54, 0x8a, + 0xb8, 0xdb, 0x78, 0x84, 0x6e, 0xc2, 0xc5, 0x83, 0xae, 0xed, 0xe3, 0xbe, 0x4d, 0x7d, 0x6c, 0xe9, + 0x12, 0xaf, 0x70, 0xe4, 0x97, 0x63, 0xd2, 0x5d, 0x81, 0x1d, 0x45, 0x37, 0x20, 0xce, 0xd7, 0x45, + 0x79, 0x68, 0x25, 0xcb, 0x6d, 0x50, 0x4c, 0xa6, 0xf1, 0x52, 0xd1, 0x14, 0x64, 0x97, 0x60, 0x75, + 0x2c, 0x49, 0xb9, 0x0d, 0xbe, 0x9d, 0xe1, 0x10, 0x04, 0xbb, 0x71, 0x0a, 0x08, 0x56, 0x21, 0x1f, + 0x5e, 0x54, 0xe1, 0x1a, 0x70, 0x82, 0x0b, 0x0a, 0xad, 0x45, 0xe8, 0xcc, 0x8a, 0x79, 0x10, 0xf8, + 0xb0, 0x89, 0xf8, 0x9f, 0x72, 0x47, 0x8d, 0xb1, 0x52, 0x84, 0x8f, 0xbd, 0x64, 0x31, 0xc6, 0x47, + 0x10, 0x20, 0xaf, 0x8b, 0x04, 0x5a, 0x4b, 0x50, 0xd6, 0x93, 0x6e, 0x04, 0x8c, 0x49, 0xa0, 0x42, + 0x18, 0x37, 0x7f, 0x99, 0x87, 0xd9, 0x1d, 0xda, 0x41, 0x8f, 0xa0, 0x98, 0x78, 0xeb, 0xaf, 0x8f, + 0xbd, 0xd1, 0x53, 0x0f, 0x6a, 0xb5, 0x7e, 0x9a, 0x86, 0xec, 0xec, 0x87, 0x00, 0xb1, 0xe7, 0x76, + 0x75, 0x92, 0x5d, 0x24, 0x57, 0xaf, 0x9e, 0x2c, 0x97, 0x5e, 0x1f, 0x41, 0x31, 0xf1, 0x34, 0x9d, + 0x18, 0x71, 0x5c, 0x63, 0x72, 0xc4, 0x93, 0x5e, 0x9c, 0xc8, 0x84, 0x72, 0xfa, 0xb5, 0xf9, 0xe6, + 0xf1, 0xe9, 0x4a, 0x25, 0xf5, 0xfa, 0x14, 0x4a, 0xf2, 0x90, 0xef, 0x15, 0x78, 0x67, 0xda, 0xb7, + 0xdb, 0x9d, 0x29, 0x42, 0x3f, 0xce, 0x58, 0xbd, 0xf7, 0x2f, 0x8c, 0x65, 0xb4, 0x9f, 0x42, 0x29, + 0xb9, 0x00, 0xaf, 0x4c, 0xf2, 0x9a, 0x50, 0x51, 0xaf, 0x9d, 0xaa, 0x22, 0xdd, 0xf7, 0x01, 0x4d, + 0xb8, 0xee, 0xaf, 0x1e, 0xeb, 0x20, 0xa1, 0xa7, 0x6e, 0x4c, 0xa7, 0x27, 0x4f, 0xfb, 0x0c, 0x16, + 0x52, 0x77, 0x67, 0xed, 0xf8, 0xae, 0x0b, 0x75, 0xd4, 0xc6, 0xe9, 0x3a, 0xf1, 0x13, 0x52, 0x57, + 0x53, 0xed, 0xf8, 0xde, 0x38, 0xf9, 0x84, 0xc9, 0x93, 0xab, 0x66, 0xbf, 0x60, 0x1f, 0xca, 0xad, + 0x8f, 0x5f, 0xbc, 0xae, 0x2a, 0x2f, 0x5f, 0x57, 0x95, 0x57, 0xaf, 0xab, 0xca, 0xd7, 0x87, 0xd5, + 0xcc, 0xcb, 0xc3, 0x6a, 0xe6, 0xf7, 0xc3, 0x6a, 0xe6, 0xd1, 0x8d, 0x8e, 0xed, 0x33, 0x47, 0x26, + 0x19, 0x34, 0x03, 0xb7, 0x0e, 0xf6, 0x0f, 0x88, 0xd7, 0x6b, 0x8e, 0x7f, 0x40, 0xfb, 0x23, 0x17, + 0xd3, 0xfd, 0x1c, 0xff, 0xf6, 0xff, 0xe0, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0xc8, 0xba, + 0xd6, 0xa3, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1412,6 +1651,7 @@ type MsgClient interface { // UpdateParams defines a governance operation for updating module parameters. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) CreateRing(ctx context.Context, in *MsgCreateRing, opts ...grpc.CallOption) (*MsgCreateRingResponse, error) + FinalizeRing(ctx context.Context, in *MsgFinalizeRing, opts ...grpc.CallOption) (*MsgFinalizeRingResponse, error) UpdateRingByAcp(ctx context.Context, in *MsgUpdateRingByAcp, opts ...grpc.CallOption) (*MsgUpdateRingByAcpResponse, error) FinalizeRingReshareByThresholdSignature(ctx context.Context, in *MsgFinalizeRingReshareByThresholdSignature, opts ...grpc.CallOption) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) StoreDocument(ctx context.Context, in *MsgStoreDocument, opts ...grpc.CallOption) (*MsgStoreDocumentResponse, error) @@ -1446,6 +1686,15 @@ func (c *msgClient) CreateRing(ctx context.Context, in *MsgCreateRing, opts ...g return out, nil } +func (c *msgClient) FinalizeRing(ctx context.Context, in *MsgFinalizeRing, opts ...grpc.CallOption) (*MsgFinalizeRingResponse, error) { + out := new(MsgFinalizeRingResponse) + err := c.cc.Invoke(ctx, "/sourcehub.orbis.Msg/FinalizeRing", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) UpdateRingByAcp(ctx context.Context, in *MsgUpdateRingByAcp, opts ...grpc.CallOption) (*MsgUpdateRingByAcpResponse, error) { out := new(MsgUpdateRingByAcpResponse) err := c.cc.Invoke(ctx, "/sourcehub.orbis.Msg/UpdateRingByAcp", in, out, opts...) @@ -1505,6 +1754,7 @@ type MsgServer interface { // UpdateParams defines a governance operation for updating module parameters. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) CreateRing(context.Context, *MsgCreateRing) (*MsgCreateRingResponse, error) + FinalizeRing(context.Context, *MsgFinalizeRing) (*MsgFinalizeRingResponse, error) UpdateRingByAcp(context.Context, *MsgUpdateRingByAcp) (*MsgUpdateRingByAcpResponse, error) FinalizeRingReshareByThresholdSignature(context.Context, *MsgFinalizeRingReshareByThresholdSignature) (*MsgFinalizeRingReshareByThresholdSignatureResponse, error) StoreDocument(context.Context, *MsgStoreDocument) (*MsgStoreDocumentResponse, error) @@ -1523,6 +1773,9 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) CreateRing(ctx context.Context, req *MsgCreateRing) (*MsgCreateRingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRing not implemented") } +func (*UnimplementedMsgServer) FinalizeRing(ctx context.Context, req *MsgFinalizeRing) (*MsgFinalizeRingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FinalizeRing not implemented") +} func (*UnimplementedMsgServer) UpdateRingByAcp(ctx context.Context, req *MsgUpdateRingByAcp) (*MsgUpdateRingByAcpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRingByAcp not implemented") } @@ -1582,6 +1835,24 @@ func _Msg_CreateRing_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Msg_FinalizeRing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFinalizeRing) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FinalizeRing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sourcehub.orbis.Msg/FinalizeRing", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FinalizeRing(ctx, req.(*MsgFinalizeRing)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_UpdateRingByAcp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateRingByAcp) if err := dec(in); err != nil { @@ -1703,6 +1974,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateRing", Handler: _Msg_CreateRing_Handler, }, + { + MethodName: "FinalizeRing", + Handler: _Msg_FinalizeRing_Handler, + }, { MethodName: "UpdateRingByAcp", Handler: _Msg_UpdateRingByAcp_Handler, @@ -1815,19 +2090,21 @@ func (m *MsgCreateRing) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Artifact) > 0 { - i -= len(m.Artifact) - copy(dAtA[i:], m.Artifact) - i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) - i-- - dAtA[i] = 0x42 + if m.XNonce != nil { + { + size := m.XNonce.Size() + i -= size + if _, err := m.XNonce.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x2a } if m.XPssInterval != nil { { @@ -1841,31 +2118,17 @@ func (m *MsgCreateRing) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Threshold != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Threshold)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x18 } - if len(m.PeerIds) > 0 { - for iNdEx := len(m.PeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PeerIds[iNdEx]) - copy(dAtA[i:], m.PeerIds[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.PeerIds[iNdEx]))) + if len(m.PeerNodeKeys) > 0 { + for iNdEx := len(m.PeerNodeKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PeerNodeKeys[iNdEx]) + copy(dAtA[i:], m.PeerNodeKeys[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.PeerNodeKeys[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } } - if len(m.RingPk) > 0 { - i -= len(m.RingPk) - copy(dAtA[i:], m.RingPk) - i = encodeVarintTx(dAtA, i, uint64(len(m.RingPk))) - i-- - dAtA[i] = 0x1a - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x12 - } if len(m.Creator) > 0 { i -= len(m.Creator) copy(dAtA[i:], m.Creator) @@ -1885,7 +2148,21 @@ func (m *MsgCreateRing_PssInterval) MarshalToSizedBuffer(dAtA []byte) (int, erro i := len(dAtA) i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *MsgCreateRing_Nonce) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateRing_Nonce) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = encodeVarintTx(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 return len(dAtA) - i, nil } func (m *MsgCreateRingResponse) Marshal() (dAtA []byte, err error) { @@ -1918,6 +2195,73 @@ func (m *MsgCreateRingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgFinalizeRing) 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 *MsgFinalizeRing) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFinalizeRing) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RingPk) > 0 { + i -= len(m.RingPk) + copy(dAtA[i:], m.RingPk) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingPk))) + i-- + dAtA[i] = 0x1a + } + if len(m.RingId) > 0 { + i -= len(m.RingId) + copy(dAtA[i:], m.RingId) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgFinalizeRingResponse) 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 *MsgFinalizeRingResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFinalizeRingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgUpdateRingByAcp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1956,11 +2300,11 @@ func (m *MsgUpdateRingByAcp) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } } - if len(m.NewPeerIds) > 0 { - for iNdEx := len(m.NewPeerIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NewPeerIds[iNdEx]) - copy(dAtA[i:], m.NewPeerIds[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.NewPeerIds[iNdEx]))) + if len(m.NewPeerNodeKeys) > 0 { + for iNdEx := len(m.NewPeerNodeKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NewPeerNodeKeys[iNdEx]) + copy(dAtA[i:], m.NewPeerNodeKeys[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewPeerNodeKeys[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -2126,41 +2470,34 @@ func (m *RingReshareFinalizeSignDoc) MarshalToSizedBuffer(dAtA []byte) (int, err if m.BlockNumberNonce != 0 { i = encodeVarintTx(dAtA, i, uint64(m.BlockNumberNonce)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x38 } if len(m.FinalizedRingSha256) > 0 { i -= len(m.FinalizedRingSha256) copy(dAtA[i:], m.FinalizedRingSha256) i = encodeVarintTx(dAtA, i, uint64(len(m.FinalizedRingSha256))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if len(m.CurrentRingSha256) > 0 { i -= len(m.CurrentRingSha256) copy(dAtA[i:], m.CurrentRingSha256) i = encodeVarintTx(dAtA, i, uint64(len(m.CurrentRingSha256))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(m.RingPk) > 0 { i -= len(m.RingPk) copy(dAtA[i:], m.RingPk) i = encodeVarintTx(dAtA, i, uint64(len(m.RingPk))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(m.RingId) > 0 { i -= len(m.RingId) copy(dAtA[i:], m.RingId) i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) i-- - dAtA[i] = 0x22 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0x1a } if len(m.ChainId) > 0 { @@ -2180,6 +2517,113 @@ func (m *RingReshareFinalizeSignDoc) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *RingReshareSignState) 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 *RingReshareSignState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RingReshareSignState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PolicyId) > 0 { + i -= len(m.PolicyId) + copy(dAtA[i:], m.PolicyId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) + i-- + dAtA[i] = 0x42 + } + if m.BlockNumberNonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.BlockNumberNonce)) + i-- + dAtA[i] = 0x38 + } + if m.XPssInterval != nil { + { + size := m.XPssInterval.Size() + i -= size + if _, err := m.XPssInterval.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.XNewThreshold != nil { + { + size := m.XNewThreshold.Size() + i -= size + if _, err := m.XNewThreshold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.NewPeerNodeKeys) > 0 { + for iNdEx := len(m.NewPeerNodeKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NewPeerNodeKeys[iNdEx]) + copy(dAtA[i:], m.NewPeerNodeKeys[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewPeerNodeKeys[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.Threshold != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Threshold)) + i-- + dAtA[i] = 0x18 + } + if len(m.PeerNodeKeys) > 0 { + for iNdEx := len(m.PeerNodeKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PeerNodeKeys[iNdEx]) + copy(dAtA[i:], m.PeerNodeKeys[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.PeerNodeKeys[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.RingPk) > 0 { + i -= len(m.RingPk) + copy(dAtA[i:], m.RingPk) + i = encodeVarintTx(dAtA, i, uint64(len(m.RingPk))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RingReshareSignState_NewThreshold) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RingReshareSignState_NewThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.NewThreshold)) + i-- + dAtA[i] = 0x28 + return len(dAtA) - i, nil +} +func (m *RingReshareSignState_PssInterval) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RingReshareSignState_PssInterval) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.PssInterval)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} func (m *MsgStoreDocument) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2223,48 +2667,41 @@ func (m *MsgStoreDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Permission) i = encodeVarintTx(dAtA, i, uint64(len(m.Permission))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } if len(m.Resource) > 0 { i -= len(m.Resource) copy(dAtA[i:], m.Resource) i = encodeVarintTx(dAtA, i, uint64(len(m.Resource))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(m.Document) > 0 { i -= len(m.Document) copy(dAtA[i:], m.Document) i = encodeVarintTx(dAtA, i, uint64(len(m.Document))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(m.RingId) > 0 { i -= len(m.RingId) copy(dAtA[i:], m.RingId) i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) i-- - dAtA[i] = 0x1a - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0x12 } if len(m.Creator) > 0 { @@ -2288,7 +2725,7 @@ func (m *MsgStoreDocument_Tier) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Tier) i = encodeVarintTx(dAtA, i, uint64(len(m.Tier))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 return len(dAtA) - i, nil } func (m *MsgStoreDocument_Timestamp) MarshalTo(dAtA []byte) (int, error) { @@ -2300,7 +2737,7 @@ func (m *MsgStoreDocument_Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, err i := len(dAtA) i = encodeVarintTx(dAtA, i, uint64(m.Timestamp)) i-- - dAtA[i] = 0x50 + dAtA[i] = 0x48 return len(dAtA) - i, nil } func (m *MsgStoreDocumentResponse) Marshal() (dAtA []byte, err error) { @@ -2358,41 +2795,34 @@ func (m *MsgStoreKeyDerivation) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Permission) i = encodeVarintTx(dAtA, i, uint64(len(m.Permission))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if len(m.Resource) > 0 { i -= len(m.Resource) copy(dAtA[i:], m.Resource) i = encodeVarintTx(dAtA, i, uint64(len(m.Resource))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(m.Derivation) > 0 { i -= len(m.Derivation) copy(dAtA[i:], m.Derivation) i = encodeVarintTx(dAtA, i, uint64(len(m.Derivation))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(m.RingId) > 0 { i -= len(m.RingId) copy(dAtA[i:], m.RingId) i = encodeVarintTx(dAtA, i, uint64(len(m.RingId))) i-- - dAtA[i] = 0x1a - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) - i-- dAtA[i] = 0x12 } if len(m.Creator) > 0 { @@ -2464,11 +2894,11 @@ func (m *MsgCreateNodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if len(m.WhitelistedNamespaces) > 0 { - for iNdEx := len(m.WhitelistedNamespaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.WhitelistedNamespaces[iNdEx]) - copy(dAtA[i:], m.WhitelistedNamespaces[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.WhitelistedNamespaces[iNdEx]))) + if len(m.WhitelistedPolicyIds) > 0 { + for iNdEx := len(m.WhitelistedPolicyIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedPolicyIds[iNdEx]) + copy(dAtA[i:], m.WhitelistedPolicyIds[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.WhitelistedPolicyIds[iNdEx]))) i-- dAtA[i] = 0x22 } @@ -2558,11 +2988,11 @@ func (m *MsgUpdateNodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if len(m.WhitelistedNamespaces) > 0 { - for iNdEx := len(m.WhitelistedNamespaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.WhitelistedNamespaces[iNdEx]) - copy(dAtA[i:], m.WhitelistedNamespaces[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.WhitelistedNamespaces[iNdEx]))) + if len(m.WhitelistedPolicyIds) > 0 { + for iNdEx := len(m.WhitelistedPolicyIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedPolicyIds[iNdEx]) + copy(dAtA[i:], m.WhitelistedPolicyIds[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.WhitelistedPolicyIds[iNdEx]))) i-- dAtA[i] = 0x22 } @@ -2689,16 +3119,8 @@ func (m *MsgCreateRing) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RingPk) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.PeerIds) > 0 { - for _, s := range m.PeerIds { + if len(m.PeerNodeKeys) > 0 { + for _, s := range m.PeerNodeKeys { l = len(s) n += 1 + l + sovTx(uint64(l)) } @@ -2713,9 +3135,8 @@ func (m *MsgCreateRing) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Artifact) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if m.XNonce != nil { + n += m.XNonce.Size() } return n } @@ -2729,6 +3150,16 @@ func (m *MsgCreateRing_PssInterval) Size() (n int) { n += 1 + sovTx(uint64(m.PssInterval)) return n } +func (m *MsgCreateRing_Nonce) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Nonce) + n += 1 + l + sovTx(uint64(l)) + return n +} func (m *MsgCreateRingResponse) Size() (n int) { if m == nil { return 0 @@ -2742,6 +3173,36 @@ func (m *MsgCreateRingResponse) Size() (n int) { return n } +func (m *MsgFinalizeRing) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RingId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RingPk) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgFinalizeRingResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgUpdateRingByAcp) Size() (n int) { if m == nil { return 0 @@ -2756,8 +3217,8 @@ func (m *MsgUpdateRingByAcp) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.NewPeerIds) > 0 { - for _, s := range m.NewPeerIds { + if len(m.NewPeerNodeKeys) > 0 { + for _, s := range m.NewPeerNodeKeys { l = len(s) n += 1 + l + sovTx(uint64(l)) } @@ -2846,10 +3307,6 @@ func (m *RingReshareFinalizeSignDoc) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } l = len(m.RingId) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2872,19 +3329,74 @@ func (m *RingReshareFinalizeSignDoc) Size() (n int) { return n } -func (m *MsgStoreDocument) Size() (n int) { +func (m *RingReshareSignState) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Creator) + l = len(m.RingPk) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.PeerNodeKeys) > 0 { + for _, s := range m.PeerNodeKeys { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if m.Threshold != 0 { + n += 1 + sovTx(uint64(m.Threshold)) + } + if len(m.NewPeerNodeKeys) > 0 { + for _, s := range m.NewPeerNodeKeys { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if m.XNewThreshold != nil { + n += m.XNewThreshold.Size() + } + if m.XPssInterval != nil { + n += m.XPssInterval.Size() + } + if m.BlockNumberNonce != 0 { + n += 1 + sovTx(uint64(m.BlockNumberNonce)) + } + l = len(m.PolicyId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *RingReshareSignState_NewThreshold) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovTx(uint64(m.NewThreshold)) + return n +} +func (m *RingReshareSignState_PssInterval) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovTx(uint64(m.PssInterval)) + return n +} +func (m *MsgStoreDocument) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) } l = len(m.RingId) if l > 0 { @@ -2961,10 +3473,6 @@ func (m *MsgStoreKeyDerivation) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } l = len(m.RingId) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -3019,8 +3527,8 @@ func (m *MsgCreateNodeInfo) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.WhitelistedNamespaces) > 0 { - for _, s := range m.WhitelistedNamespaces { + if len(m.WhitelistedPolicyIds) > 0 { + for _, s := range m.WhitelistedPolicyIds { l = len(s) n += 1 + l + sovTx(uint64(l)) } @@ -3060,8 +3568,8 @@ func (m *MsgUpdateNodeInfo) Size() (n int) { if m.XPeerId != nil { n += m.XPeerId.Size() } - if len(m.WhitelistedNamespaces) > 0 { - for _, s := range m.WhitelistedNamespaces { + if len(m.WhitelistedPolicyIds) > 0 { + for _, s := range m.WhitelistedPolicyIds { l = len(s) n += 1 + l + sovTx(uint64(l)) } @@ -3341,7 +3849,7 @@ func (m *MsgCreateRing) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PeerNodeKeys", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3369,73 +3877,9 @@ func (m *MsgCreateRing) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.PeerNodeKeys = append(m.PeerNodeKeys, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RingPk", 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.RingPk = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerIds", 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.PeerIds = append(m.PeerIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) } @@ -3454,7 +3898,7 @@ func (m *MsgCreateRing) Unmarshal(dAtA []byte) error { break } } - case 6: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } @@ -3474,7 +3918,7 @@ func (m *MsgCreateRing) Unmarshal(dAtA []byte) error { } } m.XPssInterval = &MsgCreateRing_PssInterval{v} - case 7: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -3506,9 +3950,9 @@ func (m *MsgCreateRing) Unmarshal(dAtA []byte) error { } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3536,7 +3980,7 @@ func (m *MsgCreateRing) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Artifact = string(dAtA[iNdEx:postIndex]) + m.XNonce = &MsgCreateRing_Nonce{string(dAtA[iNdEx:postIndex])} iNdEx = postIndex default: iNdEx = preIndex @@ -3641,7 +4085,7 @@ func (m *MsgCreateRingResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { +func (m *MsgFinalizeRing) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3664,10 +4108,10 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateRingByAcp: wiretype end group for non-group") + return fmt.Errorf("proto: MsgFinalizeRing: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateRingByAcp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgFinalizeRing: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3736,7 +4180,7 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewPeerIds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RingPk", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3764,48 +4208,8 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NewPeerIds = append(m.NewPeerIds, string(dAtA[iNdEx:postIndex])) + m.RingPk = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.XNewThreshold = &MsgUpdateRingByAcp_NewThreshold{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.XPssInterval = &MsgUpdateRingByAcp_PssInterval{v} default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3827,7 +4231,7 @@ func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateRingByAcpResponse) Unmarshal(dAtA []byte) error { +func (m *MsgFinalizeRingResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3850,10 +4254,10 @@ func (m *MsgUpdateRingByAcpResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateRingByAcpResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgFinalizeRingResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateRingByAcpResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgFinalizeRingResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3877,7 +4281,7 @@ func (m *MsgUpdateRingByAcpResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateRingByAcp) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3900,10 +4304,10 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) erro fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignature: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateRingByAcp: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignature: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateRingByAcp: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3972,7 +4376,7 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) erro iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignatureScheme", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewPeerNodeKeys", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4000,13 +4404,13 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) erro if postIndex > l { return io.ErrUnexpectedEOF } - m.SignatureScheme = string(dAtA[iNdEx:postIndex]) + m.NewPeerNodeKeys = append(m.NewPeerNodeKeys, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } - var byteLen int + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4016,26 +4420,32 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) erro } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.XNewThreshold = &MsgUpdateRingByAcp_NewThreshold{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex + m.XPssInterval = &MsgUpdateRingByAcp_PssInterval{v} default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4057,7 +4467,7 @@ func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) erro } return nil } -func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateRingByAcpResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4080,10 +4490,10 @@ func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) Unmarshal(dAtA []by fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignatureResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateRingByAcpResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignatureResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateRingByAcpResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4107,7 +4517,7 @@ func (m *MsgFinalizeRingReshareByThresholdSignatureResponse) Unmarshal(dAtA []by } return nil } -func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { +func (m *MsgFinalizeRingReshareByThresholdSignature) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4130,15 +4540,15 @@ func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RingReshareFinalizeSignDoc: wiretype end group for non-group") + return fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignature: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RingReshareFinalizeSignDoc: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignature: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Domain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4166,11 +4576,11 @@ func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Domain = string(dAtA[iNdEx:postIndex]) + m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4198,11 +4608,11 @@ func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ChainId = string(dAtA[iNdEx:postIndex]) + m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignatureScheme", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4230,13 +4640,13 @@ func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.SignatureScheme = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4246,26 +4656,224 @@ func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.RingId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + 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 *MsgFinalizeRingReshareByThresholdSignatureResponse) 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: MsgFinalizeRingReshareByThresholdSignatureResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFinalizeRingReshareByThresholdSignatureResponse: 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 *RingReshareFinalizeSignDoc) 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: RingReshareFinalizeSignDoc: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RingReshareFinalizeSignDoc: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Domain", 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.Domain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RingId", 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.RingId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RingPk", wireType) } var stringLen uint64 @@ -4296,7 +4904,7 @@ func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { } m.RingPk = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CurrentRingSha256", wireType) } @@ -4330,7 +4938,7 @@ func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { m.CurrentRingSha256 = []byte{} } iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FinalizedRingSha256", wireType) } @@ -4364,7 +4972,7 @@ func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { m.FinalizedRingSha256 = []byte{} } iNdEx = postIndex - case 8: + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) } @@ -4404,7 +5012,7 @@ func (m *RingReshareFinalizeSignDoc) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { +func (m *RingReshareSignState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4427,15 +5035,15 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgStoreDocument: wiretype end group for non-group") + return fmt.Errorf("proto: RingReshareSignState: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStoreDocument: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RingReshareSignState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RingPk", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4463,11 +5071,11 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Creator = string(dAtA[iNdEx:postIndex]) + m.RingPk = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PeerNodeKeys", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4495,9 +5103,233 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.PeerNodeKeys = append(m.PeerNodeKeys, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + m.Threshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Threshold |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewPeerNodeKeys", 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.NewPeerNodeKeys = append(m.NewPeerNodeKeys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.XNewThreshold = &RingReshareSignState_NewThreshold{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PssInterval", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.XPssInterval = &RingReshareSignState_PssInterval{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumberNonce", wireType) + } + m.BlockNumberNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumberNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", 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.PolicyId = 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 *MsgStoreDocument) 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: MsgStoreDocument: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStoreDocument: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) } @@ -4529,7 +5361,7 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { } m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } @@ -4561,7 +5393,7 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { } m.Document = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) } @@ -4593,7 +5425,7 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { } m.Proof = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -4625,7 +5457,7 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) } @@ -4657,7 +5489,7 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { } m.Resource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) } @@ -4689,7 +5521,7 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { } m.Permission = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) } @@ -4721,7 +5553,7 @@ func (m *MsgStoreDocument) Unmarshal(dAtA []byte) error { } m.XTier = &MsgStoreDocument_Tier{string(dAtA[iNdEx:postIndex])} iNdEx = postIndex - case 10: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } @@ -4906,38 +5738,6 @@ func (m *MsgStoreKeyDerivation) Unmarshal(dAtA []byte) error { m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RingId", wireType) } @@ -4969,7 +5769,7 @@ func (m *MsgStoreKeyDerivation) Unmarshal(dAtA []byte) error { } m.RingId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Derivation", wireType) } @@ -5001,7 +5801,7 @@ func (m *MsgStoreKeyDerivation) Unmarshal(dAtA []byte) error { } m.Derivation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } @@ -5033,7 +5833,7 @@ func (m *MsgStoreKeyDerivation) Unmarshal(dAtA []byte) error { } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) } @@ -5065,7 +5865,7 @@ func (m *MsgStoreKeyDerivation) Unmarshal(dAtA []byte) error { } m.Resource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) } @@ -5327,7 +6127,7 @@ func (m *MsgCreateNodeInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedNamespaces", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedPolicyIds", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5355,7 +6155,7 @@ func (m *MsgCreateNodeInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.WhitelistedNamespaces = append(m.WhitelistedNamespaces, string(dAtA[iNdEx:postIndex])) + m.WhitelistedPolicyIds = append(m.WhitelistedPolicyIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 { @@ -5587,7 +6387,7 @@ func (m *MsgUpdateNodeInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedNamespaces", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedPolicyIds", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5615,7 +6415,7 @@ func (m *MsgUpdateNodeInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.WhitelistedNamespaces = append(m.WhitelistedNamespaces, string(dAtA[iNdEx:postIndex])) + m.WhitelistedPolicyIds = append(m.WhitelistedPolicyIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 {