diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index 27ed636fe..6aff4e648 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -5357,28 +5357,29 @@ var file_did_v1_query_proto_rawDesc = []byte{ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x32, 0xdc, 0x02, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x32, 0xec, 0x02, 0x0a, + 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x53, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, - 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, - 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x54, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, - 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, - 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, 0x0f, 0x2f, 0x64, - 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x5c, 0x0a, - 0x06, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, + 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x64, 0x69, + 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x54, 0x0a, 0x07, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x69, 0x64, + 0x7d, 0x12, 0x57, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x12, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, + 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x5f, 0x0a, 0x06, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, diff --git a/api/vault/v1/query.pulsar.go b/api/vault/v1/query.pulsar.go index a8748455f..d9fee446c 100644 --- a/api/vault/v1/query.pulsar.go +++ b/api/vault/v1/query.pulsar.go @@ -1596,27 +1596,23 @@ func (x *fastReflection_QuerySchemaResponse) ProtoMethods() *protoiface.Methods } var ( - md_AllocateRequest protoreflect.MessageDescriptor - fd_AllocateRequest_origin protoreflect.FieldDescriptor - fd_AllocateRequest_subject protoreflect.FieldDescriptor + md_QueryAllocateRequest protoreflect.MessageDescriptor ) func init() { file_vault_v1_query_proto_init() - md_AllocateRequest = File_vault_v1_query_proto.Messages().ByName("AllocateRequest") - fd_AllocateRequest_origin = md_AllocateRequest.Fields().ByName("origin") - fd_AllocateRequest_subject = md_AllocateRequest.Fields().ByName("subject") + md_QueryAllocateRequest = File_vault_v1_query_proto.Messages().ByName("QueryAllocateRequest") } -var _ protoreflect.Message = (*fastReflection_AllocateRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAllocateRequest)(nil) -type fastReflection_AllocateRequest AllocateRequest +type fastReflection_QueryAllocateRequest QueryAllocateRequest -func (x *AllocateRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_AllocateRequest)(x) +func (x *QueryAllocateRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllocateRequest)(x) } -func (x *AllocateRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryAllocateRequest) slowProtoReflect() protoreflect.Message { mi := &file_vault_v1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1628,43 +1624,43 @@ func (x *AllocateRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_AllocateRequest_messageType fastReflection_AllocateRequest_messageType -var _ protoreflect.MessageType = fastReflection_AllocateRequest_messageType{} +var _fastReflection_QueryAllocateRequest_messageType fastReflection_QueryAllocateRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllocateRequest_messageType{} -type fastReflection_AllocateRequest_messageType struct{} +type fastReflection_QueryAllocateRequest_messageType struct{} -func (x fastReflection_AllocateRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_AllocateRequest)(nil) +func (x fastReflection_QueryAllocateRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllocateRequest)(nil) } -func (x fastReflection_AllocateRequest_messageType) New() protoreflect.Message { - return new(fastReflection_AllocateRequest) +func (x fastReflection_QueryAllocateRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllocateRequest) } -func (x fastReflection_AllocateRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AllocateRequest +func (x fastReflection_QueryAllocateRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllocateRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_AllocateRequest) Descriptor() protoreflect.MessageDescriptor { - return md_AllocateRequest +func (x *fastReflection_QueryAllocateRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllocateRequest } // 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_AllocateRequest) Type() protoreflect.MessageType { - return _fastReflection_AllocateRequest_messageType +func (x *fastReflection_QueryAllocateRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllocateRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_AllocateRequest) New() protoreflect.Message { - return new(fastReflection_AllocateRequest) +func (x *fastReflection_QueryAllocateRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllocateRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_AllocateRequest) Interface() protoreflect.ProtoMessage { - return (*AllocateRequest)(x) +func (x *fastReflection_QueryAllocateRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllocateRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -1672,19 +1668,7 @@ func (x *fastReflection_AllocateRequest) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_AllocateRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_AllocateRequest_origin, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_AllocateRequest_subject, value) { - return - } - } +func (x *fastReflection_QueryAllocateRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1698,17 +1682,13 @@ func (x *fastReflection_AllocateRequest) Range(f func(protoreflect.FieldDescript // 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_AllocateRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryAllocateRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "vault.v1.AllocateRequest.origin": - return x.Origin != "" - case "vault.v1.AllocateRequest.subject": - return x.Subject != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) } - panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", fd.FullName())) } } @@ -1718,17 +1698,13 @@ func (x *fastReflection_AllocateRequest) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AllocateRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAllocateRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "vault.v1.AllocateRequest.origin": - x.Origin = "" - case "vault.v1.AllocateRequest.subject": - x.Subject = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) } - panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", fd.FullName())) } } @@ -1738,19 +1714,13 @@ func (x *fastReflection_AllocateRequest) Clear(fd protoreflect.FieldDescriptor) // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_AllocateRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllocateRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "vault.v1.AllocateRequest.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "vault.v1.AllocateRequest.subject": - value := x.Subject - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) } - panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", descriptor.FullName())) } } @@ -1764,17 +1734,13 @@ func (x *fastReflection_AllocateRequest) Get(descriptor protoreflect.FieldDescri // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AllocateRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryAllocateRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "vault.v1.AllocateRequest.origin": - x.Origin = value.Interface().(string) - case "vault.v1.AllocateRequest.subject": - x.Subject = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) } - panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", fd.FullName())) } } @@ -1788,44 +1754,36 @@ func (x *fastReflection_AllocateRequest) Set(fd protoreflect.FieldDescriptor, va // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AllocateRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllocateRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.AllocateRequest.origin": - panic(fmt.Errorf("field origin of message vault.v1.AllocateRequest is not mutable")) - case "vault.v1.AllocateRequest.subject": - panic(fmt.Errorf("field subject of message vault.v1.AllocateRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) } - panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateRequest 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_AllocateRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllocateRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.AllocateRequest.origin": - return protoreflect.ValueOfString("") - case "vault.v1.AllocateRequest.subject": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) } - panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateRequest 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_AllocateRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryAllocateRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.AllocateRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in vault.v1.QueryAllocateRequest", d.FullName())) } panic("unreachable") } @@ -1833,7 +1791,7 @@ func (x *fastReflection_AllocateRequest) WhichOneof(d protoreflect.OneofDescript // 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_AllocateRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryAllocateRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1844,7 +1802,7 @@ func (x *fastReflection_AllocateRequest) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AllocateRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryAllocateRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1856,7 +1814,7 @@ func (x *fastReflection_AllocateRequest) SetUnknown(fields protoreflect.RawField // 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_AllocateRequest) IsValid() bool { +func (x *fastReflection_QueryAllocateRequest) IsValid() bool { return x != nil } @@ -1866,9 +1824,9 @@ func (x *fastReflection_AllocateRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_AllocateRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryAllocateRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AllocateRequest) + x := input.Message.Interface().(*QueryAllocateRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1880,14 +1838,6 @@ func (x *fastReflection_AllocateRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1898,7 +1848,7 @@ func (x *fastReflection_AllocateRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AllocateRequest) + x := input.Message.Interface().(*QueryAllocateRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1917,20 +1867,6 @@ func (x *fastReflection_AllocateRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Subject) > 0 { - i -= len(x.Subject) - copy(dAtA[i:], x.Subject) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -1942,7 +1878,7 @@ func (x *fastReflection_AllocateRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AllocateRequest) + x := input.Message.Interface().(*QueryAllocateRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1974,76 +1910,12 @@ func (x *fastReflection_AllocateRequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllocateRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllocateRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllocateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllocateRequest: 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 Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Origin = 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 Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2080,33 +1952,33 @@ func (x *fastReflection_AllocateRequest) ProtoMethods() *protoiface.Methods { } var ( - md_AllocateResponse protoreflect.MessageDescriptor - fd_AllocateResponse_success protoreflect.FieldDescriptor - fd_AllocateResponse_cid protoreflect.FieldDescriptor - fd_AllocateResponse_macaroon protoreflect.FieldDescriptor - fd_AllocateResponse_public_uri protoreflect.FieldDescriptor - fd_AllocateResponse_expiry_block protoreflect.FieldDescriptor + md_QueryAllocateResponse protoreflect.MessageDescriptor + fd_QueryAllocateResponse_success protoreflect.FieldDescriptor + fd_QueryAllocateResponse_cid protoreflect.FieldDescriptor + fd_QueryAllocateResponse_macaroon protoreflect.FieldDescriptor + fd_QueryAllocateResponse_public_uri protoreflect.FieldDescriptor + fd_QueryAllocateResponse_expiry_block protoreflect.FieldDescriptor ) func init() { file_vault_v1_query_proto_init() - md_AllocateResponse = File_vault_v1_query_proto.Messages().ByName("AllocateResponse") - fd_AllocateResponse_success = md_AllocateResponse.Fields().ByName("success") - fd_AllocateResponse_cid = md_AllocateResponse.Fields().ByName("cid") - fd_AllocateResponse_macaroon = md_AllocateResponse.Fields().ByName("macaroon") - fd_AllocateResponse_public_uri = md_AllocateResponse.Fields().ByName("public_uri") - fd_AllocateResponse_expiry_block = md_AllocateResponse.Fields().ByName("expiry_block") + md_QueryAllocateResponse = File_vault_v1_query_proto.Messages().ByName("QueryAllocateResponse") + fd_QueryAllocateResponse_success = md_QueryAllocateResponse.Fields().ByName("success") + fd_QueryAllocateResponse_cid = md_QueryAllocateResponse.Fields().ByName("cid") + fd_QueryAllocateResponse_macaroon = md_QueryAllocateResponse.Fields().ByName("macaroon") + fd_QueryAllocateResponse_public_uri = md_QueryAllocateResponse.Fields().ByName("public_uri") + fd_QueryAllocateResponse_expiry_block = md_QueryAllocateResponse.Fields().ByName("expiry_block") } -var _ protoreflect.Message = (*fastReflection_AllocateResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAllocateResponse)(nil) -type fastReflection_AllocateResponse AllocateResponse +type fastReflection_QueryAllocateResponse QueryAllocateResponse -func (x *AllocateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_AllocateResponse)(x) +func (x *QueryAllocateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllocateResponse)(x) } -func (x *AllocateResponse) slowProtoReflect() protoreflect.Message { +func (x *QueryAllocateResponse) slowProtoReflect() protoreflect.Message { mi := &file_vault_v1_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2118,43 +1990,43 @@ func (x *AllocateResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_AllocateResponse_messageType fastReflection_AllocateResponse_messageType -var _ protoreflect.MessageType = fastReflection_AllocateResponse_messageType{} +var _fastReflection_QueryAllocateResponse_messageType fastReflection_QueryAllocateResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllocateResponse_messageType{} -type fastReflection_AllocateResponse_messageType struct{} +type fastReflection_QueryAllocateResponse_messageType struct{} -func (x fastReflection_AllocateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_AllocateResponse)(nil) +func (x fastReflection_QueryAllocateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllocateResponse)(nil) } -func (x fastReflection_AllocateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_AllocateResponse) +func (x fastReflection_QueryAllocateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllocateResponse) } -func (x fastReflection_AllocateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AllocateResponse +func (x fastReflection_QueryAllocateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllocateResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_AllocateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_AllocateResponse +func (x *fastReflection_QueryAllocateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllocateResponse } // 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_AllocateResponse) Type() protoreflect.MessageType { - return _fastReflection_AllocateResponse_messageType +func (x *fastReflection_QueryAllocateResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllocateResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_AllocateResponse) New() protoreflect.Message { - return new(fastReflection_AllocateResponse) +func (x *fastReflection_QueryAllocateResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllocateResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_AllocateResponse) Interface() protoreflect.ProtoMessage { - return (*AllocateResponse)(x) +func (x *fastReflection_QueryAllocateResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllocateResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2162,34 +2034,34 @@ func (x *fastReflection_AllocateResponse) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_AllocateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryAllocateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Success != false { value := protoreflect.ValueOfBool(x.Success) - if !f(fd_AllocateResponse_success, value) { + if !f(fd_QueryAllocateResponse_success, value) { return } } if x.Cid != "" { value := protoreflect.ValueOfString(x.Cid) - if !f(fd_AllocateResponse_cid, value) { + if !f(fd_QueryAllocateResponse_cid, value) { return } } if x.Macaroon != "" { value := protoreflect.ValueOfString(x.Macaroon) - if !f(fd_AllocateResponse_macaroon, value) { + if !f(fd_QueryAllocateResponse_macaroon, value) { return } } if x.PublicUri != "" { value := protoreflect.ValueOfString(x.PublicUri) - if !f(fd_AllocateResponse_public_uri, value) { + if !f(fd_QueryAllocateResponse_public_uri, value) { return } } if x.ExpiryBlock != int64(0) { value := protoreflect.ValueOfInt64(x.ExpiryBlock) - if !f(fd_AllocateResponse_expiry_block, value) { + if !f(fd_QueryAllocateResponse_expiry_block, value) { return } } @@ -2206,23 +2078,23 @@ func (x *fastReflection_AllocateResponse) Range(f func(protoreflect.FieldDescrip // 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_AllocateResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryAllocateResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "vault.v1.AllocateResponse.success": + case "vault.v1.QueryAllocateResponse.success": return x.Success != false - case "vault.v1.AllocateResponse.cid": + case "vault.v1.QueryAllocateResponse.cid": return x.Cid != "" - case "vault.v1.AllocateResponse.macaroon": + case "vault.v1.QueryAllocateResponse.macaroon": return x.Macaroon != "" - case "vault.v1.AllocateResponse.public_uri": + case "vault.v1.QueryAllocateResponse.public_uri": return x.PublicUri != "" - case "vault.v1.AllocateResponse.expiry_block": + case "vault.v1.QueryAllocateResponse.expiry_block": return x.ExpiryBlock != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) } - panic(fmt.Errorf("message vault.v1.AllocateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", fd.FullName())) } } @@ -2232,23 +2104,23 @@ func (x *fastReflection_AllocateResponse) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AllocateResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAllocateResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "vault.v1.AllocateResponse.success": + case "vault.v1.QueryAllocateResponse.success": x.Success = false - case "vault.v1.AllocateResponse.cid": + case "vault.v1.QueryAllocateResponse.cid": x.Cid = "" - case "vault.v1.AllocateResponse.macaroon": + case "vault.v1.QueryAllocateResponse.macaroon": x.Macaroon = "" - case "vault.v1.AllocateResponse.public_uri": + case "vault.v1.QueryAllocateResponse.public_uri": x.PublicUri = "" - case "vault.v1.AllocateResponse.expiry_block": + case "vault.v1.QueryAllocateResponse.expiry_block": x.ExpiryBlock = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) } - panic(fmt.Errorf("message vault.v1.AllocateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", fd.FullName())) } } @@ -2258,28 +2130,28 @@ func (x *fastReflection_AllocateResponse) Clear(fd protoreflect.FieldDescriptor) // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_AllocateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllocateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "vault.v1.AllocateResponse.success": + case "vault.v1.QueryAllocateResponse.success": value := x.Success return protoreflect.ValueOfBool(value) - case "vault.v1.AllocateResponse.cid": + case "vault.v1.QueryAllocateResponse.cid": value := x.Cid return protoreflect.ValueOfString(value) - case "vault.v1.AllocateResponse.macaroon": + case "vault.v1.QueryAllocateResponse.macaroon": value := x.Macaroon return protoreflect.ValueOfString(value) - case "vault.v1.AllocateResponse.public_uri": + case "vault.v1.QueryAllocateResponse.public_uri": value := x.PublicUri return protoreflect.ValueOfString(value) - case "vault.v1.AllocateResponse.expiry_block": + case "vault.v1.QueryAllocateResponse.expiry_block": value := x.ExpiryBlock return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) } - panic(fmt.Errorf("message vault.v1.AllocateResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", descriptor.FullName())) } } @@ -2293,23 +2165,23 @@ func (x *fastReflection_AllocateResponse) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AllocateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryAllocateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "vault.v1.AllocateResponse.success": + case "vault.v1.QueryAllocateResponse.success": x.Success = value.Bool() - case "vault.v1.AllocateResponse.cid": + case "vault.v1.QueryAllocateResponse.cid": x.Cid = value.Interface().(string) - case "vault.v1.AllocateResponse.macaroon": + case "vault.v1.QueryAllocateResponse.macaroon": x.Macaroon = value.Interface().(string) - case "vault.v1.AllocateResponse.public_uri": + case "vault.v1.QueryAllocateResponse.public_uri": x.PublicUri = value.Interface().(string) - case "vault.v1.AllocateResponse.expiry_block": + case "vault.v1.QueryAllocateResponse.expiry_block": x.ExpiryBlock = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) } - panic(fmt.Errorf("message vault.v1.AllocateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", fd.FullName())) } } @@ -2323,56 +2195,56 @@ func (x *fastReflection_AllocateResponse) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AllocateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllocateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.AllocateResponse.success": - panic(fmt.Errorf("field success of message vault.v1.AllocateResponse is not mutable")) - case "vault.v1.AllocateResponse.cid": - panic(fmt.Errorf("field cid of message vault.v1.AllocateResponse is not mutable")) - case "vault.v1.AllocateResponse.macaroon": - panic(fmt.Errorf("field macaroon of message vault.v1.AllocateResponse is not mutable")) - case "vault.v1.AllocateResponse.public_uri": - panic(fmt.Errorf("field public_uri of message vault.v1.AllocateResponse is not mutable")) - case "vault.v1.AllocateResponse.expiry_block": - panic(fmt.Errorf("field expiry_block of message vault.v1.AllocateResponse is not mutable")) + case "vault.v1.QueryAllocateResponse.success": + panic(fmt.Errorf("field success of message vault.v1.QueryAllocateResponse is not mutable")) + case "vault.v1.QueryAllocateResponse.cid": + panic(fmt.Errorf("field cid of message vault.v1.QueryAllocateResponse is not mutable")) + case "vault.v1.QueryAllocateResponse.macaroon": + panic(fmt.Errorf("field macaroon of message vault.v1.QueryAllocateResponse is not mutable")) + case "vault.v1.QueryAllocateResponse.public_uri": + panic(fmt.Errorf("field public_uri of message vault.v1.QueryAllocateResponse is not mutable")) + case "vault.v1.QueryAllocateResponse.expiry_block": + panic(fmt.Errorf("field expiry_block of message vault.v1.QueryAllocateResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) } - panic(fmt.Errorf("message vault.v1.AllocateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateResponse 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_AllocateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAllocateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.AllocateResponse.success": + case "vault.v1.QueryAllocateResponse.success": return protoreflect.ValueOfBool(false) - case "vault.v1.AllocateResponse.cid": + case "vault.v1.QueryAllocateResponse.cid": return protoreflect.ValueOfString("") - case "vault.v1.AllocateResponse.macaroon": + case "vault.v1.QueryAllocateResponse.macaroon": return protoreflect.ValueOfString("") - case "vault.v1.AllocateResponse.public_uri": + case "vault.v1.QueryAllocateResponse.public_uri": return protoreflect.ValueOfString("") - case "vault.v1.AllocateResponse.expiry_block": + case "vault.v1.QueryAllocateResponse.expiry_block": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) } - panic(fmt.Errorf("message vault.v1.AllocateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QueryAllocateResponse 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_AllocateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryAllocateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.AllocateResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in vault.v1.QueryAllocateResponse", d.FullName())) } panic("unreachable") } @@ -2380,7 +2252,7 @@ func (x *fastReflection_AllocateResponse) WhichOneof(d protoreflect.OneofDescrip // 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_AllocateResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryAllocateResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2391,7 +2263,7 @@ func (x *fastReflection_AllocateResponse) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AllocateResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryAllocateResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2403,7 +2275,7 @@ func (x *fastReflection_AllocateResponse) SetUnknown(fields protoreflect.RawFiel // 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_AllocateResponse) IsValid() bool { +func (x *fastReflection_QueryAllocateResponse) IsValid() bool { return x != nil } @@ -2413,9 +2285,9 @@ func (x *fastReflection_AllocateResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_AllocateResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryAllocateResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AllocateResponse) + x := input.Message.Interface().(*QueryAllocateResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2455,7 +2327,7 @@ func (x *fastReflection_AllocateResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AllocateResponse) + x := input.Message.Interface().(*QueryAllocateResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2521,7 +2393,7 @@ func (x *fastReflection_AllocateResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AllocateResponse) + x := input.Message.Interface().(*QueryAllocateResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2553,10 +2425,10 @@ func (x *fastReflection_AllocateResponse) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllocateResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllocateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllocateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllocateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2730,25 +2602,25 @@ func (x *fastReflection_AllocateResponse) ProtoMethods() *protoiface.Methods { } var ( - md_SyncRequest protoreflect.MessageDescriptor - fd_SyncRequest_did protoreflect.FieldDescriptor + md_QuerySyncRequest protoreflect.MessageDescriptor + fd_QuerySyncRequest_did protoreflect.FieldDescriptor ) func init() { file_vault_v1_query_proto_init() - md_SyncRequest = File_vault_v1_query_proto.Messages().ByName("SyncRequest") - fd_SyncRequest_did = md_SyncRequest.Fields().ByName("did") + md_QuerySyncRequest = File_vault_v1_query_proto.Messages().ByName("QuerySyncRequest") + fd_QuerySyncRequest_did = md_QuerySyncRequest.Fields().ByName("did") } -var _ protoreflect.Message = (*fastReflection_SyncRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QuerySyncRequest)(nil) -type fastReflection_SyncRequest SyncRequest +type fastReflection_QuerySyncRequest QuerySyncRequest -func (x *SyncRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_SyncRequest)(x) +func (x *QuerySyncRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySyncRequest)(x) } -func (x *SyncRequest) slowProtoReflect() protoreflect.Message { +func (x *QuerySyncRequest) slowProtoReflect() protoreflect.Message { mi := &file_vault_v1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2760,43 +2632,43 @@ func (x *SyncRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SyncRequest_messageType fastReflection_SyncRequest_messageType -var _ protoreflect.MessageType = fastReflection_SyncRequest_messageType{} +var _fastReflection_QuerySyncRequest_messageType fastReflection_QuerySyncRequest_messageType +var _ protoreflect.MessageType = fastReflection_QuerySyncRequest_messageType{} -type fastReflection_SyncRequest_messageType struct{} +type fastReflection_QuerySyncRequest_messageType struct{} -func (x fastReflection_SyncRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_SyncRequest)(nil) +func (x fastReflection_QuerySyncRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySyncRequest)(nil) } -func (x fastReflection_SyncRequest_messageType) New() protoreflect.Message { - return new(fastReflection_SyncRequest) +func (x fastReflection_QuerySyncRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySyncRequest) } -func (x fastReflection_SyncRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SyncRequest +func (x fastReflection_QuerySyncRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySyncRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SyncRequest) Descriptor() protoreflect.MessageDescriptor { - return md_SyncRequest +func (x *fastReflection_QuerySyncRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySyncRequest } // 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_SyncRequest) Type() protoreflect.MessageType { - return _fastReflection_SyncRequest_messageType +func (x *fastReflection_QuerySyncRequest) Type() protoreflect.MessageType { + return _fastReflection_QuerySyncRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SyncRequest) New() protoreflect.Message { - return new(fastReflection_SyncRequest) +func (x *fastReflection_QuerySyncRequest) New() protoreflect.Message { + return new(fastReflection_QuerySyncRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SyncRequest) Interface() protoreflect.ProtoMessage { - return (*SyncRequest)(x) +func (x *fastReflection_QuerySyncRequest) Interface() protoreflect.ProtoMessage { + return (*QuerySyncRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -2804,10 +2676,10 @@ func (x *fastReflection_SyncRequest) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SyncRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QuerySyncRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Did != "" { value := protoreflect.ValueOfString(x.Did) - if !f(fd_SyncRequest_did, value) { + if !f(fd_QuerySyncRequest_did, value) { return } } @@ -2824,15 +2696,15 @@ func (x *fastReflection_SyncRequest) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_SyncRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QuerySyncRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "vault.v1.SyncRequest.did": + case "vault.v1.QuerySyncRequest.did": return x.Did != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", fd.FullName())) } } @@ -2842,15 +2714,15 @@ func (x *fastReflection_SyncRequest) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QuerySyncRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "vault.v1.SyncRequest.did": + case "vault.v1.QuerySyncRequest.did": x.Did = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", fd.FullName())) } } @@ -2860,16 +2732,16 @@ func (x *fastReflection_SyncRequest) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SyncRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QuerySyncRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "vault.v1.SyncRequest.did": + case "vault.v1.QuerySyncRequest.did": value := x.Did return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", descriptor.FullName())) } } @@ -2883,15 +2755,15 @@ func (x *fastReflection_SyncRequest) Get(descriptor protoreflect.FieldDescriptor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QuerySyncRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "vault.v1.SyncRequest.did": + case "vault.v1.QuerySyncRequest.did": x.Did = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", fd.FullName())) } } @@ -2905,40 +2777,40 @@ func (x *fastReflection_SyncRequest) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QuerySyncRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncRequest.did": - panic(fmt.Errorf("field did of message vault.v1.SyncRequest is not mutable")) + case "vault.v1.QuerySyncRequest.did": + panic(fmt.Errorf("field did of message vault.v1.QuerySyncRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncRequest 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_SyncRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QuerySyncRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncRequest.did": + case "vault.v1.QuerySyncRequest.did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncRequest 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_SyncRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QuerySyncRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in vault.v1.QuerySyncRequest", d.FullName())) } panic("unreachable") } @@ -2946,7 +2818,7 @@ func (x *fastReflection_SyncRequest) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SyncRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QuerySyncRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2957,7 +2829,7 @@ func (x *fastReflection_SyncRequest) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QuerySyncRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2969,7 +2841,7 @@ func (x *fastReflection_SyncRequest) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_SyncRequest) IsValid() bool { +func (x *fastReflection_QuerySyncRequest) IsValid() bool { return x != nil } @@ -2979,9 +2851,9 @@ func (x *fastReflection_SyncRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QuerySyncRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SyncRequest) + x := input.Message.Interface().(*QuerySyncRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3007,7 +2879,7 @@ func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SyncRequest) + x := input.Message.Interface().(*QuerySyncRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3044,7 +2916,7 @@ func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SyncRequest) + x := input.Message.Interface().(*QuerySyncRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3076,10 +2948,10 @@ func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySyncRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3150,31 +3022,31 @@ func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { } var ( - md_SyncResponse protoreflect.MessageDescriptor - fd_SyncResponse_success protoreflect.FieldDescriptor - fd_SyncResponse_schema protoreflect.FieldDescriptor - fd_SyncResponse_address protoreflect.FieldDescriptor - fd_SyncResponse_chainID protoreflect.FieldDescriptor + md_QuerySyncResponse protoreflect.MessageDescriptor + fd_QuerySyncResponse_success protoreflect.FieldDescriptor + fd_QuerySyncResponse_schema protoreflect.FieldDescriptor + fd_QuerySyncResponse_address protoreflect.FieldDescriptor + fd_QuerySyncResponse_chainID protoreflect.FieldDescriptor ) func init() { file_vault_v1_query_proto_init() - md_SyncResponse = File_vault_v1_query_proto.Messages().ByName("SyncResponse") - fd_SyncResponse_success = md_SyncResponse.Fields().ByName("success") - fd_SyncResponse_schema = md_SyncResponse.Fields().ByName("schema") - fd_SyncResponse_address = md_SyncResponse.Fields().ByName("address") - fd_SyncResponse_chainID = md_SyncResponse.Fields().ByName("chainID") + md_QuerySyncResponse = File_vault_v1_query_proto.Messages().ByName("QuerySyncResponse") + fd_QuerySyncResponse_success = md_QuerySyncResponse.Fields().ByName("success") + fd_QuerySyncResponse_schema = md_QuerySyncResponse.Fields().ByName("schema") + fd_QuerySyncResponse_address = md_QuerySyncResponse.Fields().ByName("address") + fd_QuerySyncResponse_chainID = md_QuerySyncResponse.Fields().ByName("chainID") } -var _ protoreflect.Message = (*fastReflection_SyncResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QuerySyncResponse)(nil) -type fastReflection_SyncResponse SyncResponse +type fastReflection_QuerySyncResponse QuerySyncResponse -func (x *SyncResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_SyncResponse)(x) +func (x *QuerySyncResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySyncResponse)(x) } -func (x *SyncResponse) slowProtoReflect() protoreflect.Message { +func (x *QuerySyncResponse) slowProtoReflect() protoreflect.Message { mi := &file_vault_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3186,43 +3058,43 @@ func (x *SyncResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SyncResponse_messageType fastReflection_SyncResponse_messageType -var _ protoreflect.MessageType = fastReflection_SyncResponse_messageType{} +var _fastReflection_QuerySyncResponse_messageType fastReflection_QuerySyncResponse_messageType +var _ protoreflect.MessageType = fastReflection_QuerySyncResponse_messageType{} -type fastReflection_SyncResponse_messageType struct{} +type fastReflection_QuerySyncResponse_messageType struct{} -func (x fastReflection_SyncResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_SyncResponse)(nil) +func (x fastReflection_QuerySyncResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySyncResponse)(nil) } -func (x fastReflection_SyncResponse_messageType) New() protoreflect.Message { - return new(fastReflection_SyncResponse) +func (x fastReflection_QuerySyncResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySyncResponse) } -func (x fastReflection_SyncResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SyncResponse +func (x fastReflection_QuerySyncResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySyncResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SyncResponse) Descriptor() protoreflect.MessageDescriptor { - return md_SyncResponse +func (x *fastReflection_QuerySyncResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySyncResponse } // 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_SyncResponse) Type() protoreflect.MessageType { - return _fastReflection_SyncResponse_messageType +func (x *fastReflection_QuerySyncResponse) Type() protoreflect.MessageType { + return _fastReflection_QuerySyncResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SyncResponse) New() protoreflect.Message { - return new(fastReflection_SyncResponse) +func (x *fastReflection_QuerySyncResponse) New() protoreflect.Message { + return new(fastReflection_QuerySyncResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SyncResponse) Interface() protoreflect.ProtoMessage { - return (*SyncResponse)(x) +func (x *fastReflection_QuerySyncResponse) Interface() protoreflect.ProtoMessage { + return (*QuerySyncResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3230,28 +3102,28 @@ func (x *fastReflection_SyncResponse) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SyncResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QuerySyncResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Success != false { value := protoreflect.ValueOfBool(x.Success) - if !f(fd_SyncResponse_success, value) { + if !f(fd_QuerySyncResponse_success, value) { return } } if x.Schema != nil { value := protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - if !f(fd_SyncResponse_schema, value) { + if !f(fd_QuerySyncResponse_schema, value) { return } } if x.Address != "" { value := protoreflect.ValueOfString(x.Address) - if !f(fd_SyncResponse_address, value) { + if !f(fd_QuerySyncResponse_address, value) { return } } if x.ChainID != "" { value := protoreflect.ValueOfString(x.ChainID) - if !f(fd_SyncResponse_chainID, value) { + if !f(fd_QuerySyncResponse_chainID, value) { return } } @@ -3268,21 +3140,21 @@ func (x *fastReflection_SyncResponse) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_SyncResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QuerySyncResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.QuerySyncResponse.success": return x.Success != false - case "vault.v1.SyncResponse.schema": + case "vault.v1.QuerySyncResponse.schema": return x.Schema != nil - case "vault.v1.SyncResponse.address": + case "vault.v1.QuerySyncResponse.address": return x.Address != "" - case "vault.v1.SyncResponse.chainID": + case "vault.v1.QuerySyncResponse.chainID": return x.ChainID != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", fd.FullName())) } } @@ -3292,21 +3164,21 @@ func (x *fastReflection_SyncResponse) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QuerySyncResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.QuerySyncResponse.success": x.Success = false - case "vault.v1.SyncResponse.schema": + case "vault.v1.QuerySyncResponse.schema": x.Schema = nil - case "vault.v1.SyncResponse.address": + case "vault.v1.QuerySyncResponse.address": x.Address = "" - case "vault.v1.SyncResponse.chainID": + case "vault.v1.QuerySyncResponse.chainID": x.ChainID = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", fd.FullName())) } } @@ -3316,25 +3188,25 @@ func (x *fastReflection_SyncResponse) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SyncResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QuerySyncResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.QuerySyncResponse.success": value := x.Success return protoreflect.ValueOfBool(value) - case "vault.v1.SyncResponse.schema": + case "vault.v1.QuerySyncResponse.schema": value := x.Schema return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "vault.v1.SyncResponse.address": + case "vault.v1.QuerySyncResponse.address": value := x.Address return protoreflect.ValueOfString(value) - case "vault.v1.SyncResponse.chainID": + case "vault.v1.QuerySyncResponse.chainID": value := x.ChainID return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", descriptor.FullName())) } } @@ -3348,21 +3220,21 @@ func (x *fastReflection_SyncResponse) Get(descriptor protoreflect.FieldDescripto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QuerySyncResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.QuerySyncResponse.success": x.Success = value.Bool() - case "vault.v1.SyncResponse.schema": + case "vault.v1.QuerySyncResponse.schema": x.Schema = value.Message().Interface().(*Schema) - case "vault.v1.SyncResponse.address": + case "vault.v1.QuerySyncResponse.address": x.Address = value.Interface().(string) - case "vault.v1.SyncResponse.chainID": + case "vault.v1.QuerySyncResponse.chainID": x.ChainID = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", fd.FullName())) } } @@ -3376,56 +3248,56 @@ func (x *fastReflection_SyncResponse) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QuerySyncResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncResponse.schema": + case "vault.v1.QuerySyncResponse.schema": if x.Schema == nil { x.Schema = new(Schema) } return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - case "vault.v1.SyncResponse.success": - panic(fmt.Errorf("field success of message vault.v1.SyncResponse is not mutable")) - case "vault.v1.SyncResponse.address": - panic(fmt.Errorf("field address of message vault.v1.SyncResponse is not mutable")) - case "vault.v1.SyncResponse.chainID": - panic(fmt.Errorf("field chainID of message vault.v1.SyncResponse is not mutable")) + case "vault.v1.QuerySyncResponse.success": + panic(fmt.Errorf("field success of message vault.v1.QuerySyncResponse is not mutable")) + case "vault.v1.QuerySyncResponse.address": + panic(fmt.Errorf("field address of message vault.v1.QuerySyncResponse is not mutable")) + case "vault.v1.QuerySyncResponse.chainID": + panic(fmt.Errorf("field chainID of message vault.v1.QuerySyncResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncResponse 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_SyncResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QuerySyncResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.QuerySyncResponse.success": return protoreflect.ValueOfBool(false) - case "vault.v1.SyncResponse.schema": + case "vault.v1.QuerySyncResponse.schema": m := new(Schema) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "vault.v1.SyncResponse.address": + case "vault.v1.QuerySyncResponse.address": return protoreflect.ValueOfString("") - case "vault.v1.SyncResponse.chainID": + case "vault.v1.QuerySyncResponse.chainID": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.QuerySyncResponse 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_SyncResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QuerySyncResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in vault.v1.QuerySyncResponse", d.FullName())) } panic("unreachable") } @@ -3433,7 +3305,7 @@ func (x *fastReflection_SyncResponse) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SyncResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QuerySyncResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3444,7 +3316,7 @@ func (x *fastReflection_SyncResponse) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QuerySyncResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3456,7 +3328,7 @@ func (x *fastReflection_SyncResponse) SetUnknown(fields protoreflect.RawFields) // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_SyncResponse) IsValid() bool { +func (x *fastReflection_QuerySyncResponse) IsValid() bool { return x != nil } @@ -3466,9 +3338,9 @@ func (x *fastReflection_SyncResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QuerySyncResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SyncResponse) + x := input.Message.Interface().(*QuerySyncResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3505,7 +3377,7 @@ func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SyncResponse) + x := input.Message.Interface().(*QuerySyncResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3573,7 +3445,7 @@ func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SyncResponse) + x := input.Message.Interface().(*QuerySyncResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3605,10 +3477,10 @@ func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySyncResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3907,18 +3779,15 @@ func (x *QuerySchemaResponse) GetSchema() *Schema { return nil } -// AllocateRequest is the request type for the Allocate RPC method. -type AllocateRequest struct { +// QueryAllocateRequest is the request type for the Allocate RPC method. +type QueryAllocateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` } -func (x *AllocateRequest) Reset() { - *x = AllocateRequest{} +func (x *QueryAllocateRequest) Reset() { + *x = QueryAllocateRequest{} if protoimpl.UnsafeEnabled { mi := &file_vault_v1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3926,33 +3795,19 @@ func (x *AllocateRequest) Reset() { } } -func (x *AllocateRequest) String() string { +func (x *QueryAllocateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AllocateRequest) ProtoMessage() {} +func (*QueryAllocateRequest) ProtoMessage() {} -// Deprecated: Use AllocateRequest.ProtoReflect.Descriptor instead. -func (*AllocateRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryAllocateRequest.ProtoReflect.Descriptor instead. +func (*QueryAllocateRequest) Descriptor() ([]byte, []int) { return file_vault_v1_query_proto_rawDescGZIP(), []int{4} } -func (x *AllocateRequest) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *AllocateRequest) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - // AllocateResponse is the response type for the Allocate RPC method. -type AllocateResponse struct { +type QueryAllocateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -3964,8 +3819,8 @@ type AllocateResponse struct { ExpiryBlock int64 `protobuf:"varint,5,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"` } -func (x *AllocateResponse) Reset() { - *x = AllocateResponse{} +func (x *QueryAllocateResponse) Reset() { + *x = QueryAllocateResponse{} if protoimpl.UnsafeEnabled { mi := &file_vault_v1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3973,46 +3828,46 @@ func (x *AllocateResponse) Reset() { } } -func (x *AllocateResponse) String() string { +func (x *QueryAllocateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AllocateResponse) ProtoMessage() {} +func (*QueryAllocateResponse) ProtoMessage() {} -// Deprecated: Use AllocateResponse.ProtoReflect.Descriptor instead. -func (*AllocateResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryAllocateResponse.ProtoReflect.Descriptor instead. +func (*QueryAllocateResponse) Descriptor() ([]byte, []int) { return file_vault_v1_query_proto_rawDescGZIP(), []int{5} } -func (x *AllocateResponse) GetSuccess() bool { +func (x *QueryAllocateResponse) GetSuccess() bool { if x != nil { return x.Success } return false } -func (x *AllocateResponse) GetCid() string { +func (x *QueryAllocateResponse) GetCid() string { if x != nil { return x.Cid } return "" } -func (x *AllocateResponse) GetMacaroon() string { +func (x *QueryAllocateResponse) GetMacaroon() string { if x != nil { return x.Macaroon } return "" } -func (x *AllocateResponse) GetPublicUri() string { +func (x *QueryAllocateResponse) GetPublicUri() string { if x != nil { return x.PublicUri } return "" } -func (x *AllocateResponse) GetExpiryBlock() int64 { +func (x *QueryAllocateResponse) GetExpiryBlock() int64 { if x != nil { return x.ExpiryBlock } @@ -4020,7 +3875,7 @@ func (x *AllocateResponse) GetExpiryBlock() int64 { } // SyncRequest is the request type for the Sync RPC method. -type SyncRequest struct { +type QuerySyncRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4028,8 +3883,8 @@ type SyncRequest struct { Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } -func (x *SyncRequest) Reset() { - *x = SyncRequest{} +func (x *QuerySyncRequest) Reset() { + *x = QuerySyncRequest{} if protoimpl.UnsafeEnabled { mi := &file_vault_v1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4037,18 +3892,18 @@ func (x *SyncRequest) Reset() { } } -func (x *SyncRequest) String() string { +func (x *QuerySyncRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncRequest) ProtoMessage() {} +func (*QuerySyncRequest) ProtoMessage() {} -// Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead. -func (*SyncRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QuerySyncRequest.ProtoReflect.Descriptor instead. +func (*QuerySyncRequest) Descriptor() ([]byte, []int) { return file_vault_v1_query_proto_rawDescGZIP(), []int{6} } -func (x *SyncRequest) GetDid() string { +func (x *QuerySyncRequest) GetDid() string { if x != nil { return x.Did } @@ -4056,7 +3911,7 @@ func (x *SyncRequest) GetDid() string { } // SyncResponse is the response type for the Sync RPC method. -type SyncResponse struct { +type QuerySyncResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4070,8 +3925,8 @@ type SyncResponse struct { ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` } -func (x *SyncResponse) Reset() { - *x = SyncResponse{} +func (x *QuerySyncResponse) Reset() { + *x = QuerySyncResponse{} if protoimpl.UnsafeEnabled { mi := &file_vault_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4079,39 +3934,39 @@ func (x *SyncResponse) Reset() { } } -func (x *SyncResponse) String() string { +func (x *QuerySyncResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncResponse) ProtoMessage() {} +func (*QuerySyncResponse) ProtoMessage() {} -// Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead. -func (*SyncResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QuerySyncResponse.ProtoReflect.Descriptor instead. +func (*QuerySyncResponse) Descriptor() ([]byte, []int) { return file_vault_v1_query_proto_rawDescGZIP(), []int{7} } -func (x *SyncResponse) GetSuccess() bool { +func (x *QuerySyncResponse) GetSuccess() bool { if x != nil { return x.Success } return false } -func (x *SyncResponse) GetSchema() *Schema { +func (x *QuerySyncResponse) GetSchema() *Schema { if x != nil { return x.Schema } return nil } -func (x *SyncResponse) GetAddress() string { +func (x *QuerySyncResponse) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *SyncResponse) GetChainID() string { +func (x *QuerySyncResponse) GetChainID() string { if x != nil { return x.ChainID } @@ -4137,66 +3992,64 @@ var file_vault_v1_query_proto_rawDesc = []byte{ 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x22, 0x43, 0x0a, 0x0f, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x41, 0x6c, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, - 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, - 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x55, 0x72, 0x69, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x1f, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x53, 0x79, - 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x49, 0x44, 0x32, 0x92, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5f, 0x0a, 0x06, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5f, 0x0a, - 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, + 0x68, 0x65, 0x6d, 0x61, 0x22, 0x16, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa1, 0x01, 0x0a, + 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, + 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x55, 0x72, 0x69, 0x12, 0x21, 0x0a, + 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x22, 0x24, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x44, 0x32, 0x93, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5f, + 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, + 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x5f, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, - 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x70, - 0x0a, 0x08, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x2f, 0x7b, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x7d, - 0x12, 0x55, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x15, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, - 0x16, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2d, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, - 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, + 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x12, 0x67, 0x0a, 0x08, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x76, + 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, + 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x5f, 0x0a, 0x04, 0x53, 0x79, 0x6e, + 0x63, 0x12, 0x1a, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x79, + 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, + 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, + 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, + 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, + 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4213,29 +4066,29 @@ func file_vault_v1_query_proto_rawDescGZIP() []byte { var file_vault_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_vault_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: vault.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: vault.v1.QueryParamsResponse - (*QuerySchemaRequest)(nil), // 2: vault.v1.QuerySchemaRequest - (*QuerySchemaResponse)(nil), // 3: vault.v1.QuerySchemaResponse - (*AllocateRequest)(nil), // 4: vault.v1.AllocateRequest - (*AllocateResponse)(nil), // 5: vault.v1.AllocateResponse - (*SyncRequest)(nil), // 6: vault.v1.SyncRequest - (*SyncResponse)(nil), // 7: vault.v1.SyncResponse - (*Params)(nil), // 8: vault.v1.Params - (*Schema)(nil), // 9: vault.v1.Schema + (*QueryParamsRequest)(nil), // 0: vault.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: vault.v1.QueryParamsResponse + (*QuerySchemaRequest)(nil), // 2: vault.v1.QuerySchemaRequest + (*QuerySchemaResponse)(nil), // 3: vault.v1.QuerySchemaResponse + (*QueryAllocateRequest)(nil), // 4: vault.v1.QueryAllocateRequest + (*QueryAllocateResponse)(nil), // 5: vault.v1.QueryAllocateResponse + (*QuerySyncRequest)(nil), // 6: vault.v1.QuerySyncRequest + (*QuerySyncResponse)(nil), // 7: vault.v1.QuerySyncResponse + (*Params)(nil), // 8: vault.v1.Params + (*Schema)(nil), // 9: vault.v1.Schema } var file_vault_v1_query_proto_depIdxs = []int32{ 8, // 0: vault.v1.QueryParamsResponse.params:type_name -> vault.v1.Params 9, // 1: vault.v1.QuerySchemaResponse.schema:type_name -> vault.v1.Schema - 9, // 2: vault.v1.SyncResponse.schema:type_name -> vault.v1.Schema + 9, // 2: vault.v1.QuerySyncResponse.schema:type_name -> vault.v1.Schema 0, // 3: vault.v1.Query.Params:input_type -> vault.v1.QueryParamsRequest 2, // 4: vault.v1.Query.Schema:input_type -> vault.v1.QuerySchemaRequest - 4, // 5: vault.v1.Query.Allocate:input_type -> vault.v1.AllocateRequest - 6, // 6: vault.v1.Query.Sync:input_type -> vault.v1.SyncRequest + 4, // 5: vault.v1.Query.Allocate:input_type -> vault.v1.QueryAllocateRequest + 6, // 6: vault.v1.Query.Sync:input_type -> vault.v1.QuerySyncRequest 1, // 7: vault.v1.Query.Params:output_type -> vault.v1.QueryParamsResponse 3, // 8: vault.v1.Query.Schema:output_type -> vault.v1.QuerySchemaResponse - 5, // 9: vault.v1.Query.Allocate:output_type -> vault.v1.AllocateResponse - 7, // 10: vault.v1.Query.Sync:output_type -> vault.v1.SyncResponse + 5, // 9: vault.v1.Query.Allocate:output_type -> vault.v1.QueryAllocateResponse + 7, // 10: vault.v1.Query.Sync:output_type -> vault.v1.QuerySyncResponse 7, // [7:11] is the sub-list for method output_type 3, // [3:7] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -4299,7 +4152,7 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AllocateRequest); i { + switch v := v.(*QueryAllocateRequest); i { case 0: return &v.state case 1: @@ -4311,7 +4164,7 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AllocateResponse); i { + switch v := v.(*QueryAllocateResponse); i { case 0: return &v.state case 1: @@ -4323,7 +4176,7 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncRequest); i { + switch v := v.(*QuerySyncRequest); i { case 0: return &v.state case 1: @@ -4335,7 +4188,7 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncResponse); i { + switch v := v.(*QuerySyncResponse); i { case 0: return &v.state case 1: diff --git a/api/vault/v1/query_grpc.pb.go b/api/vault/v1/query_grpc.pb.go index fe888fb60..7ba8152ba 100644 --- a/api/vault/v1/query_grpc.pb.go +++ b/api/vault/v1/query_grpc.pb.go @@ -36,10 +36,10 @@ type QueryClient interface { Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) // Allocate initializes a Target Vault available for claims with a compatible // Authentication mechanism. The default authentication mechanism is WebAuthn. - Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) + Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information - Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) + Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) } type queryClient struct { @@ -68,8 +68,8 @@ func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts . return out, nil } -func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) { - out := new(AllocateResponse) +func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) { + out := new(QueryAllocateResponse) err := c.cc.Invoke(ctx, Query_Allocate_FullMethodName, in, out, opts...) if err != nil { return nil, err @@ -77,8 +77,8 @@ func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts .. return out, nil } -func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { - out := new(SyncResponse) +func (c *queryClient) Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) { + out := new(QuerySyncResponse) err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, opts...) if err != nil { return nil, err @@ -97,10 +97,10 @@ type QueryServer interface { Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) // Allocate initializes a Target Vault available for claims with a compatible // Authentication mechanism. The default authentication mechanism is WebAuthn. - Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) + Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information - Sync(context.Context, *SyncRequest) (*SyncResponse, error) + Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error) mustEmbedUnimplementedQueryServer() } @@ -114,10 +114,10 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*Q func (UnimplementedQueryServer) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented") } -func (UnimplementedQueryServer) Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) { +func (UnimplementedQueryServer) Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") } -func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) { +func (UnimplementedQueryServer) Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} @@ -170,7 +170,7 @@ func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interf } func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AllocateRequest) + in := new(QueryAllocateRequest) if err := dec(in); err != nil { return nil, err } @@ -182,13 +182,13 @@ func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Query_Allocate_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Allocate(ctx, req.(*AllocateRequest)) + return srv.(QueryServer).Allocate(ctx, req.(*QueryAllocateRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SyncRequest) + in := new(QuerySyncRequest) if err := dec(in); err != nil { return nil, err } @@ -200,7 +200,7 @@ func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interfac FullMethod: Query_Sync_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) + return srv.(QueryServer).Sync(ctx, req.(*QuerySyncRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 9aa6410a8..42559bf7f 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -10,22 +10,22 @@ option go_package = "github.com/onsonr/sonr/x/did/types"; service Query { // Params queries all parameters of the module. rpc Params(QueryRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/params"; + option (google.api.http).get = "/did/v1/params"; } // Resolve queries the DID document by its id. rpc Resolve(QueryRequest) returns (QueryResolveResponse) { - option (google.api.http).get = "/did/{did}"; + option (google.api.http).get = "/did/v1/{did}"; } // Sign signs a message with the DID document rpc Sign(QuerySignRequest) returns (QuerySignResponse) { - option (google.api.http).post = "/did/{did}/sign"; + option (google.api.http).post = "/did/v1/{did}/sign"; } // Verify verifies a message with the DID document rpc Verify(QueryVerifyRequest) returns (QueryVerifyResponse) { - option (google.api.http).post = "/did/{did}/verify"; + option (google.api.http).post = "/did/v1/{did}/verify"; } } diff --git a/proto/vault/v1/query.proto b/proto/vault/v1/query.proto index 5c42b0553..c18bce559 100644 --- a/proto/vault/v1/query.proto +++ b/proto/vault/v1/query.proto @@ -21,14 +21,14 @@ service Query { // Allocate initializes a Target Vault available for claims with a compatible // Authentication mechanism. The default authentication mechanism is WebAuthn. - rpc Allocate(AllocateRequest) returns (AllocateResponse) { - option (google.api.http).get = "/vault/v1/allocate/{origin}/{subject}"; + rpc Allocate(QueryAllocateRequest) returns (QueryAllocateResponse) { + option (google.api.http).get = "/vault/v1/allocate"; } // Sync queries the DID document by its id. And returns the required PKL // information - rpc Sync(SyncRequest) returns (SyncResponse) { - option (google.api.http).post = "/vault/v1/sync-initial"; + rpc Sync(QuerySyncRequest) returns (QuerySyncResponse) { + option (google.api.http).get = "/vault/v1/sync-initial"; } } @@ -50,14 +50,11 @@ message QuerySchemaResponse { Schema schema = 1; } -// AllocateRequest is the request type for the Allocate RPC method. -message AllocateRequest { - string origin = 1; - string subject = 2; -} +// QueryAllocateRequest is the request type for the Allocate RPC method. +message QueryAllocateRequest {} // AllocateResponse is the response type for the Allocate RPC method. -message AllocateResponse { +message QueryAllocateResponse { bool success = 1; string cid = 2; string macaroon = 3; @@ -66,12 +63,12 @@ message AllocateResponse { } // SyncRequest is the request type for the Sync RPC method. -message SyncRequest { +message QuerySyncRequest { string did = 1; } // SyncResponse is the response type for the Sync RPC method. -message SyncResponse { +message QuerySyncResponse { bool success = 1; // Schema is the DID document. diff --git a/slumber.yml b/slumber.yml new file mode 100644 index 000000000..737300931 --- /dev/null +++ b/slumber.yml @@ -0,0 +1,48 @@ +# For basic usage info, see: +# https://slumber.lucaspickering.me/book/getting_started.html +# For all collection options, see: +# https://slumber.lucaspickering.me/book/api/request_collection/index.html + +# Profiles are groups of data you can easily switch between. A common usage is +# to define profiles for various environments of a REST service +# slumber.yml +# $schema: https://json.schemastore.org/github-workflow +profiles: + local: + data: + host: http://localhost:1317 + production: + data: + host: https://api.sonr.id + +requests: + did: !folder + name: x/did + requests: + get_did_params: !request + method: GET + url: "{{host}}/did/v1/params" + + macaroon: !folder + name: x/macaroon + requests: + get_macaroon_params: !request + method: GET + url: "{{host}}/macaroon/v1/params" + + service: !folder + name: x/service + requests: + get_service_params: !request + method: GET + url: "{{host}}/service/v1/params" + + vault: !folder + name: x/vault + requests: + get_vault_params: !request + method: GET + url: "{{host}}/vault/v1/params" + get_vault_schema: !request + method: GET + url: "{{host}}/vault/v1/schema" diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index cbe55aeda..70a78c331 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -551,45 +551,45 @@ func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb62 var fileDescriptor_ae1fa9bb626e2869 = []byte{ // 625 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x54, 0x41, 0x6b, 0x13, 0x41, - 0x14, 0x6e, 0x92, 0x66, 0xd3, 0x3c, 0x4b, 0x9b, 0x4e, 0xa3, 0x6e, 0x63, 0x59, 0xca, 0x1c, 0x4a, - 0x45, 0xc9, 0xd2, 0xf6, 0xaa, 0x17, 0xe9, 0x45, 0x50, 0xb0, 0x51, 0x3c, 0x88, 0x50, 0xa7, 0x99, - 0xe7, 0x76, 0xe8, 0x66, 0x26, 0xdd, 0x99, 0x2c, 0x06, 0xd1, 0x83, 0xbf, 0x40, 0xf1, 0xee, 0xef, - 0xf1, 0x58, 0xf0, 0xe2, 0xc1, 0x83, 0xb4, 0xfe, 0x10, 0xd9, 0xd9, 0xc9, 0x36, 0xbb, 0xe8, 0x51, - 0xbc, 0x84, 0xbc, 0xef, 0xbd, 0xf7, 0xcd, 0xfb, 0x76, 0xbe, 0x37, 0x40, 0xb8, 0xe0, 0x61, 0xba, - 0x1b, 0x9e, 0x4d, 0x30, 0x99, 0xf6, 0xc7, 0x89, 0x32, 0x8a, 0x78, 0x5c, 0xf0, 0x7e, 0xba, 0xdb, - 0xeb, 0xba, 0x5c, 0x84, 0x12, 0xb5, 0xd0, 0x79, 0xb6, 0xb7, 0x19, 0x29, 0x15, 0xc5, 0x18, 0xb2, - 0xb1, 0x08, 0x99, 0x94, 0xca, 0x30, 0x23, 0x94, 0x74, 0x59, 0xfa, 0x0a, 0x96, 0x0f, 0x33, 0xaa, - 0x01, 0x9e, 0x4d, 0x50, 0x1b, 0xd2, 0x81, 0x06, 0x17, 0xdc, 0xaf, 0x6d, 0xd5, 0x76, 0xda, 0x83, - 0xec, 0x2f, 0xb9, 0x01, 0x9e, 0x4a, 0x44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 0x7b, 0xe2, 0x97, 0x26, 0x5e, 0xdc, 0xca, 0xde, 0xad, + 0x0a, 0x5a, 0xdd, 0x24, 0xba, 0xf9, 0xfe, 0xeb, 0x8f, 0x4f, 0xcd, 0x2e, 0xe9, 0x44, 0x6e, 0xff, + 0x8b, 0xcd, 0x21, 0x4f, 0x61, 0xc5, 0x2d, 0xcd, 0x1f, 0x58, 0xfb, 0x35, 0xb4, 0xb2, 0x60, 0x74, + 0xc3, 0xd2, 0xae, 0x93, 0x6b, 0x25, 0xed, 0x1b, 0x2e, 0xf8, 0x5b, 0xf2, 0x1c, 0x96, 0x73, 0x13, + 0x93, 0xa0, 0xd2, 0xbc, 0xb0, 0x57, 0xbd, 0x9b, 0xbf, 0xc9, 0x38, 0xce, 0x9e, 0xe5, 0xf4, 0x29, + 0xa9, 0x70, 0x46, 0xb9, 0xa7, 0xc8, 0x11, 0x78, 0x85, 0x93, 0x48, 0xaf, 0x42, 0x50, 0xb1, 0x7f, + 0xed, 0x26, 0xaa, 0xd6, 0xa3, 0x7d, 0x4b, 0xbf, 0x49, 0xfd, 0x2a, 0x7d, 0x66, 0xab, 0x1e, 0xdc, + 0xfb, 0x72, 0x11, 0x36, 0xce, 0x2f, 0xc2, 0xc6, 0xf7, 0x8b, 0xb0, 0xf1, 0xe1, 0x32, 0x5c, 0x3a, + 0xbf, 0x0c, 0x97, 0xbe, 0x5d, 0x86, 0x4b, 0x2f, 0x68, 0x2c, 0xcc, 0xc9, 0xf4, 0x78, 0x30, 0x52, + 0xe3, 0x48, 0x49, 0xad, 0x64, 0x1a, 0xd9, 0x9f, 0xd7, 0x96, 0xc7, 0xcc, 0x26, 0xa8, 0x8f, 0x3d, + 0xfb, 0xbd, 0xdc, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xc1, 0x21, 0x0f, 0x81, 0x05, 0x00, 0x00, } diff --git a/x/did/types/query.pb.gw.go b/x/did/types/query.pb.gw.go index eb2b6c633..b43c6c14d 100644 --- a/x/did/types/query.pb.gw.go +++ b/x/did/types/query.pb.gw.go @@ -508,13 +508,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"did", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0}, []string{"did"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0}, []string{"did", "v1"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Sign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "sign"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Sign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0, 2, 2}, []string{"did", "v1", "sign"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Verify_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "verify"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Verify_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0, 2, 2}, []string{"did", "v1", "verify"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/vault/keeper/assembly.go b/x/vault/keeper/assembly.go deleted file mode 100644 index a1866bdba..000000000 --- a/x/vault/keeper/assembly.go +++ /dev/null @@ -1,57 +0,0 @@ -package keeper - -import ( - "context" - "time" - - sdk "github.com/cosmos/cosmos-sdk/types" - dwngen "github.com/onsonr/sonr/internal/dwn/gen" - "github.com/onsonr/sonr/x/vault/types" -) - -// assembleVault assembles the initial vault -func (k Keeper) assembleVault(cotx sdk.Context, schema *dwngen.Schema) (string, int64, error) { - _, con, err := k.DIDKeeper.NewController(cotx) - if err != nil { - return "", 0, err - } - usrKs, err := con.ExportUserKs() - if err != nil { - return "", 0, err - } - v, err := types.NewVault(usrKs, con.SonrAddress(), con.ChainID(), schema) - if err != nil { - return "", 0, err - } - cid, err := k.ipfsClient.Unixfs().Add(context.Background(), v.FS) - if err != nil { - return "", 0, err - } - return cid.String(), calculateBlockExpiry(cotx, time.Second*30), nil -} - -// currentSchema returns the current schema -func (k Keeper) currentSchema(ctx sdk.Context) (*dwngen.Schema, error) { - p, err := k.Params.Get(ctx) - if err != nil { - return nil, err - } - schema := p.Schema - return &dwngen.Schema{ - Version: int(schema.Version), - Account: schema.Account, - Asset: schema.Asset, - Chain: schema.Chain, - Credential: schema.Credential, - Jwk: schema.Jwk, - Grant: schema.Grant, - Keyshare: schema.Keyshare, - Profile: schema.Profile, - }, nil -} - -func calculateBlockExpiry(sdkctx sdk.Context, duration time.Duration) int64 { - blockTime := sdkctx.BlockTime() - avgBlockTime := float64(blockTime.Sub(blockTime).Seconds()) - return int64(duration.Seconds() / avgBlockTime) -} diff --git a/x/vault/keeper/keeper.go b/x/vault/keeper/keeper.go index 6e990dc55..81e382a0d 100644 --- a/x/vault/keeper/keeper.go +++ b/x/vault/keeper/keeper.go @@ -1,17 +1,21 @@ package keeper import ( + "time" + "cosmossdk.io/collections" storetypes "cosmossdk.io/core/store" "cosmossdk.io/log" "cosmossdk.io/orm/model/ormdb" "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" 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" "github.com/ipfs/kubo/client/rpc" apiv1 "github.com/onsonr/sonr/api/vault/v1" + dwngen "github.com/onsonr/sonr/internal/dwn/gen" didkeeper "github.com/onsonr/sonr/x/did/keeper" macaroonkeeper "github.com/onsonr/sonr/x/macaroon/keeper" "github.com/onsonr/sonr/x/vault/types" @@ -43,7 +47,7 @@ func NewKeeper( logger log.Logger, authority string, authKeeper authkeeper.AccountKeeper, - didk didkeeper.Keeper, + didKeeper didkeeper.Keeper, macaroonKeeper macaroonkeeper.Keeper, ) Keeper { logger = logger.With(log.ModuleKey, "x/"+types.ModuleName) @@ -64,11 +68,15 @@ func NewKeeper( panic(err) } - ipfsClient, _ := rpc.NewLocalApi() + ipfsClient, err := rpc.NewLocalApi() + if err != nil { + panic(err) + } + k := Keeper{ cdc: cdc, logger: logger, - DIDKeeper: didk, + DIDKeeper: didKeeper, MacaroonKeeper: macaroonKeeper, AccountKeeper: authKeeper, Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), @@ -87,3 +95,29 @@ func NewKeeper( return k } + +// currentSchema returns the current schema +func (k Keeper) currentSchema(ctx sdk.Context) (*dwngen.Schema, error) { + p, err := k.Params.Get(ctx) + if err != nil { + return nil, err + } + schema := p.Schema + return &dwngen.Schema{ + Version: int(schema.Version), + Account: schema.Account, + Asset: schema.Asset, + Chain: schema.Chain, + Credential: schema.Credential, + Jwk: schema.Jwk, + Grant: schema.Grant, + Keyshare: schema.Keyshare, + Profile: schema.Profile, + }, nil +} + +func calculateBlockExpiry(sdkctx sdk.Context, duration time.Duration) int64 { + blockTime := sdkctx.BlockTime() + avgBlockTime := float64(blockTime.Sub(blockTime).Seconds()) + return int64(duration.Seconds() / avgBlockTime) +} diff --git a/x/vault/keeper/querier.go b/x/vault/keeper/querier.go index f3b6729ef..4e926749b 100644 --- a/x/vault/keeper/querier.go +++ b/x/vault/keeper/querier.go @@ -2,8 +2,11 @@ package keeper import ( "context" + "time" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/onsonr/crypto/mpc" + didtypes "github.com/onsonr/sonr/x/did/types" "github.com/onsonr/sonr/x/vault/types" ) @@ -50,25 +53,46 @@ func (k Querier) Schema(goCtx context.Context, req *types.QuerySchemaRequest) (* // ╰───────────────────────────────────────────────────────────╯ // Allocate implements types.QueryServer. -func (k Querier) Allocate(goCtx context.Context, req *types.AllocateRequest) (*types.AllocateResponse, error) { +func (k Querier) Allocate(goCtx context.Context, req *types.QueryAllocateRequest) (*types.QueryAllocateResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // 1. Get current schema sch, err := k.currentSchema(ctx) if err != nil { + ctx.Logger().Error(err.Error()) return nil, types.ErrInvalidSchema.Wrap(err.Error()) } - - // 2.Allocate the vault msg.GetSubject(), msg.GetOrigin() - cid, expiryBlock, err := k.assembleVault(ctx, sch) + shares, err := mpc.GenerateKeyshares() if err != nil { + ctx.Logger().Error(err.Error()) + return nil, err + } + con, err := didtypes.NewController(ctx, shares) + if err != nil { + ctx.Logger().Error(err.Error()) + return nil, err + } + + usrKs, err := con.ExportUserKs() + if err != nil { + ctx.Logger().Error(err.Error()) + return nil, types.ErrInvalidSchema.Wrap(err.Error()) + } + v, err := types.NewVault(usrKs, con.SonrAddress(), con.ChainID(), sch) + if err != nil { + ctx.Logger().Error(err.Error()) + return nil, types.ErrInvalidSchema.Wrap(err.Error()) + } + cid, err := k.ipfsClient.Unixfs().Add(context.Background(), v.FS) + if err != nil { + ctx.Logger().Error(err.Error()) return nil, types.ErrVaultAssembly.Wrap(err.Error()) } - return &types.AllocateResponse{ + return &types.QueryAllocateResponse{ Success: true, - Cid: cid, - ExpiryBlock: expiryBlock, + Cid: cid.String(), + ExpiryBlock: calculateBlockExpiry(ctx, time.Second*30), }, nil } @@ -77,7 +101,7 @@ func (k Querier) Allocate(goCtx context.Context, req *types.AllocateRequest) (*t // ╰───────────────────────────────────────────────────────────╯ // Sync implements types.QueryServer. -func (k Querier) Sync(goCtx context.Context, req *types.SyncRequest) (*types.SyncResponse, error) { +func (k Querier) Sync(goCtx context.Context, req *types.QuerySyncRequest) (*types.QuerySyncResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) p, err := k.Keeper.Params.Get(ctx) if err != nil { @@ -85,13 +109,13 @@ func (k Querier) Sync(goCtx context.Context, req *types.SyncRequest) (*types.Syn } c, _ := k.DIDKeeper.ResolveController(ctx, req.Did) if c == nil { - return &types.SyncResponse{ + return &types.QuerySyncResponse{ Success: false, Schema: p.Schema, ChainID: ctx.ChainID(), }, nil } - return &types.SyncResponse{ + return &types.QuerySyncResponse{ Success: true, Schema: p.Schema, ChainID: ctx.ChainID(), diff --git a/x/vault/types/query.pb.go b/x/vault/types/query.pb.go index 0f63c611a..66b2a6d93 100644 --- a/x/vault/types/query.pb.go +++ b/x/vault/types/query.pb.go @@ -194,24 +194,22 @@ func (m *QuerySchemaResponse) GetSchema() *Schema { return nil } -// AllocateRequest is the request type for the Allocate RPC method. -type AllocateRequest struct { - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` +// QueryAllocateRequest is the request type for the Allocate RPC method. +type QueryAllocateRequest struct { } -func (m *AllocateRequest) Reset() { *m = AllocateRequest{} } -func (m *AllocateRequest) String() string { return proto.CompactTextString(m) } -func (*AllocateRequest) ProtoMessage() {} -func (*AllocateRequest) Descriptor() ([]byte, []int) { +func (m *QueryAllocateRequest) Reset() { *m = QueryAllocateRequest{} } +func (m *QueryAllocateRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllocateRequest) ProtoMessage() {} +func (*QueryAllocateRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e6d49a2800ab3e4b, []int{4} } -func (m *AllocateRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryAllocateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *AllocateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryAllocateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_AllocateRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryAllocateRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -221,34 +219,20 @@ func (m *AllocateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *AllocateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocateRequest.Merge(m, src) +func (m *QueryAllocateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllocateRequest.Merge(m, src) } -func (m *AllocateRequest) XXX_Size() int { +func (m *QueryAllocateRequest) XXX_Size() int { return m.Size() } -func (m *AllocateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AllocateRequest.DiscardUnknown(m) +func (m *QueryAllocateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllocateRequest.DiscardUnknown(m) } -var xxx_messageInfo_AllocateRequest proto.InternalMessageInfo - -func (m *AllocateRequest) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *AllocateRequest) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} +var xxx_messageInfo_QueryAllocateRequest proto.InternalMessageInfo // AllocateResponse is the response type for the Allocate RPC method. -type AllocateResponse struct { +type QueryAllocateResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` Macaroon string `protobuf:"bytes,3,opt,name=macaroon,proto3" json:"macaroon,omitempty"` @@ -256,18 +240,18 @@ type AllocateResponse struct { ExpiryBlock int64 `protobuf:"varint,5,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"` } -func (m *AllocateResponse) Reset() { *m = AllocateResponse{} } -func (m *AllocateResponse) String() string { return proto.CompactTextString(m) } -func (*AllocateResponse) ProtoMessage() {} -func (*AllocateResponse) Descriptor() ([]byte, []int) { +func (m *QueryAllocateResponse) Reset() { *m = QueryAllocateResponse{} } +func (m *QueryAllocateResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllocateResponse) ProtoMessage() {} +func (*QueryAllocateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e6d49a2800ab3e4b, []int{5} } -func (m *AllocateResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryAllocateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *AllocateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryAllocateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_AllocateResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryAllocateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -277,47 +261,47 @@ func (m *AllocateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *AllocateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocateResponse.Merge(m, src) +func (m *QueryAllocateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllocateResponse.Merge(m, src) } -func (m *AllocateResponse) XXX_Size() int { +func (m *QueryAllocateResponse) XXX_Size() int { return m.Size() } -func (m *AllocateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AllocateResponse.DiscardUnknown(m) +func (m *QueryAllocateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllocateResponse.DiscardUnknown(m) } -var xxx_messageInfo_AllocateResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryAllocateResponse proto.InternalMessageInfo -func (m *AllocateResponse) GetSuccess() bool { +func (m *QueryAllocateResponse) GetSuccess() bool { if m != nil { return m.Success } return false } -func (m *AllocateResponse) GetCid() string { +func (m *QueryAllocateResponse) GetCid() string { if m != nil { return m.Cid } return "" } -func (m *AllocateResponse) GetMacaroon() string { +func (m *QueryAllocateResponse) GetMacaroon() string { if m != nil { return m.Macaroon } return "" } -func (m *AllocateResponse) GetPublicUri() string { +func (m *QueryAllocateResponse) GetPublicUri() string { if m != nil { return m.PublicUri } return "" } -func (m *AllocateResponse) GetExpiryBlock() int64 { +func (m *QueryAllocateResponse) GetExpiryBlock() int64 { if m != nil { return m.ExpiryBlock } @@ -325,22 +309,22 @@ func (m *AllocateResponse) GetExpiryBlock() int64 { } // SyncRequest is the request type for the Sync RPC method. -type SyncRequest struct { +type QuerySyncRequest struct { Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } -func (m *SyncRequest) Reset() { *m = SyncRequest{} } -func (m *SyncRequest) String() string { return proto.CompactTextString(m) } -func (*SyncRequest) ProtoMessage() {} -func (*SyncRequest) Descriptor() ([]byte, []int) { +func (m *QuerySyncRequest) Reset() { *m = QuerySyncRequest{} } +func (m *QuerySyncRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySyncRequest) ProtoMessage() {} +func (*QuerySyncRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e6d49a2800ab3e4b, []int{6} } -func (m *SyncRequest) XXX_Unmarshal(b []byte) error { +func (m *QuerySyncRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QuerySyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SyncRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QuerySyncRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -350,19 +334,19 @@ func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *SyncRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncRequest.Merge(m, src) +func (m *QuerySyncRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySyncRequest.Merge(m, src) } -func (m *SyncRequest) XXX_Size() int { +func (m *QuerySyncRequest) XXX_Size() int { return m.Size() } -func (m *SyncRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SyncRequest.DiscardUnknown(m) +func (m *QuerySyncRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySyncRequest.DiscardUnknown(m) } -var xxx_messageInfo_SyncRequest proto.InternalMessageInfo +var xxx_messageInfo_QuerySyncRequest proto.InternalMessageInfo -func (m *SyncRequest) GetDid() string { +func (m *QuerySyncRequest) GetDid() string { if m != nil { return m.Did } @@ -370,7 +354,7 @@ func (m *SyncRequest) GetDid() string { } // SyncResponse is the response type for the Sync RPC method. -type SyncResponse struct { +type QuerySyncResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Schema is the DID document. Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` @@ -380,18 +364,18 @@ type SyncResponse struct { ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` } -func (m *SyncResponse) Reset() { *m = SyncResponse{} } -func (m *SyncResponse) String() string { return proto.CompactTextString(m) } -func (*SyncResponse) ProtoMessage() {} -func (*SyncResponse) Descriptor() ([]byte, []int) { +func (m *QuerySyncResponse) Reset() { *m = QuerySyncResponse{} } +func (m *QuerySyncResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySyncResponse) ProtoMessage() {} +func (*QuerySyncResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e6d49a2800ab3e4b, []int{7} } -func (m *SyncResponse) XXX_Unmarshal(b []byte) error { +func (m *QuerySyncResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QuerySyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SyncResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QuerySyncResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -401,40 +385,40 @@ func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *SyncResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncResponse.Merge(m, src) +func (m *QuerySyncResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySyncResponse.Merge(m, src) } -func (m *SyncResponse) XXX_Size() int { +func (m *QuerySyncResponse) XXX_Size() int { return m.Size() } -func (m *SyncResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SyncResponse.DiscardUnknown(m) +func (m *QuerySyncResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySyncResponse.DiscardUnknown(m) } -var xxx_messageInfo_SyncResponse proto.InternalMessageInfo +var xxx_messageInfo_QuerySyncResponse proto.InternalMessageInfo -func (m *SyncResponse) GetSuccess() bool { +func (m *QuerySyncResponse) GetSuccess() bool { if m != nil { return m.Success } return false } -func (m *SyncResponse) GetSchema() *Schema { +func (m *QuerySyncResponse) GetSchema() *Schema { if m != nil { return m.Schema } return nil } -func (m *SyncResponse) GetAddress() string { +func (m *QuerySyncResponse) GetAddress() string { if m != nil { return m.Address } return "" } -func (m *SyncResponse) GetChainID() string { +func (m *QuerySyncResponse) GetChainID() string { if m != nil { return m.ChainID } @@ -446,51 +430,49 @@ func init() { proto.RegisterType((*QueryParamsResponse)(nil), "vault.v1.QueryParamsResponse") proto.RegisterType((*QuerySchemaRequest)(nil), "vault.v1.QuerySchemaRequest") proto.RegisterType((*QuerySchemaResponse)(nil), "vault.v1.QuerySchemaResponse") - proto.RegisterType((*AllocateRequest)(nil), "vault.v1.AllocateRequest") - proto.RegisterType((*AllocateResponse)(nil), "vault.v1.AllocateResponse") - proto.RegisterType((*SyncRequest)(nil), "vault.v1.SyncRequest") - proto.RegisterType((*SyncResponse)(nil), "vault.v1.SyncResponse") + proto.RegisterType((*QueryAllocateRequest)(nil), "vault.v1.QueryAllocateRequest") + proto.RegisterType((*QueryAllocateResponse)(nil), "vault.v1.QueryAllocateResponse") + proto.RegisterType((*QuerySyncRequest)(nil), "vault.v1.QuerySyncRequest") + proto.RegisterType((*QuerySyncResponse)(nil), "vault.v1.QuerySyncResponse") } func init() { proto.RegisterFile("vault/v1/query.proto", fileDescriptor_e6d49a2800ab3e4b) } var fileDescriptor_e6d49a2800ab3e4b = []byte{ - // 548 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0x6e, 0xda, 0xad, 0x74, 0xaf, 0x93, 0xa8, 0xcc, 0xa8, 0x42, 0xb4, 0x85, 0x11, 0x81, 0xe8, - 0x65, 0x8d, 0x36, 0xee, 0x20, 0x06, 0x17, 0x6e, 0xd0, 0x69, 0x17, 0x2e, 0x95, 0xeb, 0x5a, 0xad, - 0x21, 0xb5, 0xb3, 0xd8, 0xa9, 0x16, 0x4d, 0xbb, 0x70, 0xe0, 0x8c, 0xe0, 0xca, 0x0f, 0xe2, 0x38, - 0x89, 0x0b, 0x47, 0xd4, 0xf2, 0x43, 0x50, 0x6c, 0xa7, 0x59, 0xdb, 0xc1, 0x2e, 0x55, 0xde, 0xf7, - 0x9e, 0xbf, 0xcf, 0x9f, 0xdf, 0xa7, 0xc2, 0xce, 0x14, 0xa7, 0x91, 0x0a, 0xa7, 0x87, 0xe1, 0x59, - 0x4a, 0x93, 0xac, 0x1b, 0x27, 0x42, 0x09, 0xd4, 0xd0, 0x68, 0x77, 0x7a, 0xe8, 0xed, 0x8e, 0x84, - 0x18, 0x45, 0x34, 0xc4, 0x31, 0x0b, 0x31, 0xe7, 0x42, 0x61, 0xc5, 0x04, 0x97, 0x66, 0xce, 0x6b, - 0x2f, 0x4e, 0x8f, 0x28, 0xa7, 0x92, 0x59, 0x3c, 0xd8, 0x01, 0xf4, 0x2e, 0xa7, 0x7b, 0x8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, 0xef, 0x1f, 0x8f, 0x98, 0x1a, 0xa7, - 0x83, 0x2e, 0x11, 0x93, 0x50, 0x70, 0x29, 0x78, 0x12, 0xea, 0x9f, 0x73, 0xcb, 0xa4, 0xb2, 0x98, - 0xca, 0x41, 0x5d, 0xff, 0x2f, 0x3c, 0xfb, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x9f, 0x2a, 0xf0, - 0x6f, 0x04, 0x00, 0x00, + // 520 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x3f, 0x6f, 0xd3, 0x40, + 0x18, 0xc6, 0xe3, 0xa4, 0x0d, 0xc9, 0x95, 0x21, 0x1c, 0x21, 0xb2, 0x4c, 0x6b, 0x82, 0xd5, 0x21, + 0x0b, 0xb6, 0x5a, 0x76, 0x10, 0x15, 0x0b, 0x1b, 0x18, 0xb1, 0xb0, 0x44, 0x97, 0xf3, 0xc9, 0x39, + 0xe1, 0xdc, 0xb9, 0x3e, 0x3b, 0xaa, 0x57, 0x56, 0x16, 0xa4, 0x7e, 0x02, 0xbe, 0x0d, 0x63, 0x25, + 0x16, 0x46, 0x94, 0xf0, 0x41, 0xd0, 0xfd, 0x71, 0xdc, 0x38, 0x0d, 0x5d, 0x22, 0xdf, 0xf3, 0xbc, + 0xf9, 0x3d, 0xef, 0xeb, 0x7b, 0x0d, 0x86, 0x4b, 0x54, 0x24, 0x79, 0xb0, 0x3c, 0x0b, 0x2e, 0x0b, + 0x92, 0x95, 0x7e, 0x9a, 0xf1, 0x9c, 0xc3, 0x9e, 0x52, 0xfd, 0xe5, 0x99, 0x73, 0x1c, 0x73, 0x1e, + 0x27, 0x24, 0x40, 0x29, 0x0d, 0x10, 0x63, 0x3c, 0x47, 0x39, 0xe5, 0x4c, 0xe8, 0x3a, 0x67, 0xb4, + 0xf9, 0x77, 0x4c, 0x18, 0x11, 0xd4, 0xe8, 0xde, 0x10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 0xd5, 0xa7, 0xff, 0xf2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xd7, 0xbb, 0xa9, 0x67, 0x52, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -512,10 +494,10 @@ type QueryClient interface { Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) // Allocate initializes a Target Vault available for claims with a compatible // Authentication mechanism. The default authentication mechanism is WebAuthn. - Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) + Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information - Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) + Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) } type queryClient struct { @@ -544,8 +526,8 @@ func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts . return out, nil } -func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) { - out := new(AllocateResponse) +func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) { + out := new(QueryAllocateResponse) err := c.cc.Invoke(ctx, "/vault.v1.Query/Allocate", in, out, opts...) if err != nil { return nil, err @@ -553,8 +535,8 @@ func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts .. return out, nil } -func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { - out := new(SyncResponse) +func (c *queryClient) Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) { + out := new(QuerySyncResponse) err := c.cc.Invoke(ctx, "/vault.v1.Query/Sync", in, out, opts...) if err != nil { return nil, err @@ -571,10 +553,10 @@ type QueryServer interface { Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) // Allocate initializes a Target Vault available for claims with a compatible // Authentication mechanism. The default authentication mechanism is WebAuthn. - Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) + Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information - Sync(context.Context, *SyncRequest) (*SyncResponse, error) + Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -587,10 +569,10 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) Schema(ctx context.Context, req *QuerySchemaRequest) (*QuerySchemaResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented") } -func (*UnimplementedQueryServer) Allocate(ctx context.Context, req *AllocateRequest) (*AllocateResponse, error) { +func (*UnimplementedQueryServer) Allocate(ctx context.Context, req *QueryAllocateRequest) (*QueryAllocateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") } -func (*UnimplementedQueryServer) Sync(ctx context.Context, req *SyncRequest) (*SyncResponse, error) { +func (*UnimplementedQueryServer) Sync(ctx context.Context, req *QuerySyncRequest) (*QuerySyncResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } @@ -635,7 +617,7 @@ func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interf } func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AllocateRequest) + in := new(QueryAllocateRequest) if err := dec(in); err != nil { return nil, err } @@ -647,13 +629,13 @@ func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: "/vault.v1.Query/Allocate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Allocate(ctx, req.(*AllocateRequest)) + return srv.(QueryServer).Allocate(ctx, req.(*QueryAllocateRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SyncRequest) + in := new(QuerySyncRequest) if err := dec(in); err != nil { return nil, err } @@ -665,7 +647,7 @@ func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interfac FullMethod: "/vault.v1.Query/Sync", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) + return srv.(QueryServer).Sync(ctx, req.(*QuerySyncRequest)) } return interceptor(ctx, in, info, handler) } @@ -811,7 +793,7 @@ func (m *QuerySchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *AllocateRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllocateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -821,34 +803,20 @@ func (m *AllocateRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AllocateRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllocateRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AllocateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllocateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *AllocateResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllocateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -858,12 +826,12 @@ func (m *AllocateResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AllocateResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllocateResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AllocateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllocateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -907,7 +875,7 @@ func (m *AllocateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SyncRequest) Marshal() (dAtA []byte, err error) { +func (m *QuerySyncRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -917,12 +885,12 @@ func (m *SyncRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SyncRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySyncRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -937,7 +905,7 @@ func (m *SyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SyncResponse) Marshal() (dAtA []byte, err error) { +func (m *QuerySyncResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -947,12 +915,12 @@ func (m *SyncResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SyncResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySyncResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1051,24 +1019,16 @@ func (m *QuerySchemaResponse) Size() (n int) { return n } -func (m *AllocateRequest) Size() (n int) { +func (m *QueryAllocateRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } return n } -func (m *AllocateResponse) Size() (n int) { +func (m *QueryAllocateResponse) Size() (n int) { if m == nil { return 0 } @@ -1095,7 +1055,7 @@ func (m *AllocateResponse) Size() (n int) { return n } -func (m *SyncRequest) Size() (n int) { +func (m *QuerySyncRequest) Size() (n int) { if m == nil { return 0 } @@ -1108,7 +1068,7 @@ func (m *SyncRequest) Size() (n int) { return n } -func (m *SyncResponse) Size() (n int) { +func (m *QuerySyncResponse) Size() (n int) { if m == nil { return 0 } @@ -1410,7 +1370,7 @@ func (m *QuerySchemaResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *AllocateRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllocateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1433,76 +1393,12 @@ func (m *AllocateRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AllocateRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllocateRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AllocateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllocateRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", 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.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", 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.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1524,7 +1420,7 @@ func (m *AllocateRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *AllocateResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllocateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1547,10 +1443,10 @@ func (m *AllocateResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AllocateResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllocateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AllocateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllocateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1709,7 +1605,7 @@ func (m *AllocateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySyncRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1732,10 +1628,10 @@ func (m *SyncRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SyncRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySyncRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1791,7 +1687,7 @@ func (m *SyncRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySyncResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1814,10 +1710,10 @@ func (m *SyncResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SyncResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySyncResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/vault/types/query.pb.gw.go b/x/vault/types/query.pb.gw.go index 43ff72a40..68721a175 100644 --- a/x/vault/types/query.pb.gw.go +++ b/x/vault/types/query.pb.gw.go @@ -70,76 +70,18 @@ func local_request_Query_Schema_0(ctx context.Context, marshaler runtime.Marshal } func request_Query_Allocate_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AllocateRequest + var protoReq QueryAllocateRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - - val, ok = pathParams["subject"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subject") - } - - protoReq.Subject, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subject", err) - } - msg, err := client.Allocate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Allocate_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AllocateRequest + var protoReq QueryAllocateRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - - val, ok = pathParams["subject"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subject") - } - - protoReq.Subject, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subject", err) - } - msg, err := server.Allocate(ctx, &protoReq) return msg, metadata, err @@ -150,7 +92,7 @@ var ( ) func request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncRequest + var protoReq QuerySyncRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -166,7 +108,7 @@ func request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, clie } func local_request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncRequest + var protoReq QuerySyncRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -256,7 +198,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("POST", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -380,7 +322,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("POST", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Sync_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) @@ -408,7 +350,7 @@ var ( pattern_Query_Schema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "schema"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Allocate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"vault", "v1", "allocate", "origin", "subject"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Allocate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "allocate"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "sync-initial"}, "", runtime.AssumeColonVerbOpt(false))) )