From 2cd44c0b66b5ef4d4598bc9efec6694296d99f5b Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Fri, 18 Oct 2024 13:07:52 -0400 Subject: [PATCH] feature/1125 offload sync service worker (#1144) - **feat: provide access to block time** - **refactor: move block expiry calculation to helper function** - **feat: register decentralized web node HTMX views** - **feat: Reorganize methods in layout.templ file alphabetically** - **feat: add support for layout variants** - **feat: update Allocate RPC to use GET request with path parameters** - **feat: add gRPC Gateway endpoint for Allocate** - **refactor: rename SyncCurrent to Sync** - **feat: improve code organization by making vault assembly private** - **feat: add a new method for syncing DID documents** --- api/vault/v1/query.pulsar.go | 1635 +++------------------- api/vault/v1/query_grpc.pb.go | 77 +- api/vault/v1/tx.pulsar.go | 1393 +----------------- api/vault/v1/tx_grpc.pb.go | 45 +- app/app.go | 1 - buf.work.yaml | 4 - internal/ctx/ctx_sonr.go | 21 - pkg/nebula/components/vaultindex/file.go | 1 + pkg/nebula/global/state/worker.templ | 1 - pkg/nebula/global/styles/layout.templ | 30 +- pkg/workers/routes/webnode.go | 2 + proto/vault/v1/query.proto | 35 +- proto/vault/v1/tx.proto | 37 - x/macaroon/keeper/issuer.go | 10 +- x/vault/keeper/assembly.go | 16 +- x/vault/keeper/querier.go | 69 +- x/vault/keeper/rpc.go | 19 - x/vault/types/codec.go | 2 - x/vault/types/msgs.go | 37 +- x/vault/types/query.pb.go | 739 ++-------- x/vault/types/query.pb.gw.go | 187 +-- x/vault/types/tx.pb.go | 680 +-------- x/vault/types/tx.pb.gw.go | 171 --- 23 files changed, 571 insertions(+), 4641 deletions(-) delete mode 100644 buf.work.yaml delete mode 100644 internal/ctx/ctx_sonr.go delete mode 100644 x/vault/types/tx.pb.gw.go diff --git a/api/vault/v1/query.pulsar.go b/api/vault/v1/query.pulsar.go index 0614b4321..a8748455f 100644 --- a/api/vault/v1/query.pulsar.go +++ b/api/vault/v1/query.pulsar.go @@ -2730,25 +2730,25 @@ func (x *fastReflection_AllocateResponse) ProtoMethods() *protoiface.Methods { } var ( - md_SyncInitialRequest protoreflect.MessageDescriptor - fd_SyncInitialRequest_did protoreflect.FieldDescriptor + md_SyncRequest protoreflect.MessageDescriptor + fd_SyncRequest_did protoreflect.FieldDescriptor ) func init() { file_vault_v1_query_proto_init() - md_SyncInitialRequest = File_vault_v1_query_proto.Messages().ByName("SyncInitialRequest") - fd_SyncInitialRequest_did = md_SyncInitialRequest.Fields().ByName("did") + md_SyncRequest = File_vault_v1_query_proto.Messages().ByName("SyncRequest") + fd_SyncRequest_did = md_SyncRequest.Fields().ByName("did") } -var _ protoreflect.Message = (*fastReflection_SyncInitialRequest)(nil) +var _ protoreflect.Message = (*fastReflection_SyncRequest)(nil) -type fastReflection_SyncInitialRequest SyncInitialRequest +type fastReflection_SyncRequest SyncRequest -func (x *SyncInitialRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_SyncInitialRequest)(x) +func (x *SyncRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncRequest)(x) } -func (x *SyncInitialRequest) slowProtoReflect() protoreflect.Message { +func (x *SyncRequest) 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 +2760,43 @@ func (x *SyncInitialRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SyncInitialRequest_messageType fastReflection_SyncInitialRequest_messageType -var _ protoreflect.MessageType = fastReflection_SyncInitialRequest_messageType{} +var _fastReflection_SyncRequest_messageType fastReflection_SyncRequest_messageType +var _ protoreflect.MessageType = fastReflection_SyncRequest_messageType{} -type fastReflection_SyncInitialRequest_messageType struct{} +type fastReflection_SyncRequest_messageType struct{} -func (x fastReflection_SyncInitialRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_SyncInitialRequest)(nil) +func (x fastReflection_SyncRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncRequest)(nil) } -func (x fastReflection_SyncInitialRequest_messageType) New() protoreflect.Message { - return new(fastReflection_SyncInitialRequest) +func (x fastReflection_SyncRequest_messageType) New() protoreflect.Message { + return new(fastReflection_SyncRequest) } -func (x fastReflection_SyncInitialRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SyncInitialRequest +func (x fastReflection_SyncRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SyncInitialRequest) Descriptor() protoreflect.MessageDescriptor { - return md_SyncInitialRequest +func (x *fastReflection_SyncRequest) Descriptor() protoreflect.MessageDescriptor { + return md_SyncRequest } // 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_SyncInitialRequest) Type() protoreflect.MessageType { - return _fastReflection_SyncInitialRequest_messageType +func (x *fastReflection_SyncRequest) Type() protoreflect.MessageType { + return _fastReflection_SyncRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SyncInitialRequest) New() protoreflect.Message { - return new(fastReflection_SyncInitialRequest) +func (x *fastReflection_SyncRequest) New() protoreflect.Message { + return new(fastReflection_SyncRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SyncInitialRequest) Interface() protoreflect.ProtoMessage { - return (*SyncInitialRequest)(x) +func (x *fastReflection_SyncRequest) Interface() protoreflect.ProtoMessage { + return (*SyncRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -2804,10 +2804,10 @@ func (x *fastReflection_SyncInitialRequest) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SyncInitialRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_SyncRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Did != "" { value := protoreflect.ValueOfString(x.Did) - if !f(fd_SyncInitialRequest_did, value) { + if !f(fd_SyncRequest_did, value) { return } } @@ -2824,15 +2824,15 @@ func (x *fastReflection_SyncInitialRequest) Range(f func(protoreflect.FieldDescr // 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_SyncInitialRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_SyncRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "vault.v1.SyncInitialRequest.did": + case "vault.v1.SyncRequest.did": return x.Did != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncInitialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) } } @@ -2842,15 +2842,15 @@ func (x *fastReflection_SyncInitialRequest) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncInitialRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_SyncRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "vault.v1.SyncInitialRequest.did": + case "vault.v1.SyncRequest.did": x.Did = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncInitialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) } } @@ -2860,16 +2860,16 @@ func (x *fastReflection_SyncInitialRequest) Clear(fd protoreflect.FieldDescripto // 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_SyncInitialRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "vault.v1.SyncInitialRequest.did": + case "vault.v1.SyncRequest.did": value := x.Did return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncInitialRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", descriptor.FullName())) } } @@ -2883,15 +2883,15 @@ func (x *fastReflection_SyncInitialRequest) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncInitialRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_SyncRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "vault.v1.SyncInitialRequest.did": + case "vault.v1.SyncRequest.did": x.Did = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncInitialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) } } @@ -2905,40 +2905,40 @@ func (x *fastReflection_SyncInitialRequest) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncInitialRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncInitialRequest.did": - panic(fmt.Errorf("field did of message vault.v1.SyncInitialRequest is not mutable")) + case "vault.v1.SyncRequest.did": + panic(fmt.Errorf("field did of message vault.v1.SyncRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncInitialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncRequest 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_SyncInitialRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncInitialRequest.did": + case "vault.v1.SyncRequest.did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) } - panic(fmt.Errorf("message vault.v1.SyncInitialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncRequest 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_SyncInitialRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_SyncRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncInitialRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncRequest", d.FullName())) } panic("unreachable") } @@ -2946,7 +2946,7 @@ func (x *fastReflection_SyncInitialRequest) WhichOneof(d protoreflect.OneofDescr // 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_SyncInitialRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_SyncRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2957,7 +2957,7 @@ func (x *fastReflection_SyncInitialRequest) 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_SyncInitialRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_SyncRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2969,7 +2969,7 @@ func (x *fastReflection_SyncInitialRequest) SetUnknown(fields protoreflect.RawFi // 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_SyncInitialRequest) IsValid() bool { +func (x *fastReflection_SyncRequest) IsValid() bool { return x != nil } @@ -2979,9 +2979,9 @@ func (x *fastReflection_SyncInitialRequest) 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_SyncInitialRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SyncInitialRequest) + x := input.Message.Interface().(*SyncRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3007,7 +3007,7 @@ func (x *fastReflection_SyncInitialRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SyncInitialRequest) + x := input.Message.Interface().(*SyncRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3044,7 +3044,7 @@ func (x *fastReflection_SyncInitialRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SyncInitialRequest) + x := input.Message.Interface().(*SyncRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3076,10 +3076,10 @@ func (x *fastReflection_SyncInitialRequest) 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: SyncInitialRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncInitialRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3150,31 +3150,31 @@ func (x *fastReflection_SyncInitialRequest) ProtoMethods() *protoiface.Methods { } var ( - md_SyncInitialResponse protoreflect.MessageDescriptor - fd_SyncInitialResponse_success protoreflect.FieldDescriptor - fd_SyncInitialResponse_schema protoreflect.FieldDescriptor - fd_SyncInitialResponse_address protoreflect.FieldDescriptor - fd_SyncInitialResponse_chainID protoreflect.FieldDescriptor + md_SyncResponse protoreflect.MessageDescriptor + fd_SyncResponse_success protoreflect.FieldDescriptor + fd_SyncResponse_schema protoreflect.FieldDescriptor + fd_SyncResponse_address protoreflect.FieldDescriptor + fd_SyncResponse_chainID protoreflect.FieldDescriptor ) func init() { file_vault_v1_query_proto_init() - md_SyncInitialResponse = File_vault_v1_query_proto.Messages().ByName("SyncInitialResponse") - fd_SyncInitialResponse_success = md_SyncInitialResponse.Fields().ByName("success") - fd_SyncInitialResponse_schema = md_SyncInitialResponse.Fields().ByName("schema") - fd_SyncInitialResponse_address = md_SyncInitialResponse.Fields().ByName("address") - fd_SyncInitialResponse_chainID = md_SyncInitialResponse.Fields().ByName("chainID") + 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") } -var _ protoreflect.Message = (*fastReflection_SyncInitialResponse)(nil) +var _ protoreflect.Message = (*fastReflection_SyncResponse)(nil) -type fastReflection_SyncInitialResponse SyncInitialResponse +type fastReflection_SyncResponse SyncResponse -func (x *SyncInitialResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_SyncInitialResponse)(x) +func (x *SyncResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncResponse)(x) } -func (x *SyncInitialResponse) slowProtoReflect() protoreflect.Message { +func (x *SyncResponse) 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 +3186,43 @@ func (x *SyncInitialResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SyncInitialResponse_messageType fastReflection_SyncInitialResponse_messageType -var _ protoreflect.MessageType = fastReflection_SyncInitialResponse_messageType{} +var _fastReflection_SyncResponse_messageType fastReflection_SyncResponse_messageType +var _ protoreflect.MessageType = fastReflection_SyncResponse_messageType{} -type fastReflection_SyncInitialResponse_messageType struct{} +type fastReflection_SyncResponse_messageType struct{} -func (x fastReflection_SyncInitialResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_SyncInitialResponse)(nil) +func (x fastReflection_SyncResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncResponse)(nil) } -func (x fastReflection_SyncInitialResponse_messageType) New() protoreflect.Message { - return new(fastReflection_SyncInitialResponse) +func (x fastReflection_SyncResponse_messageType) New() protoreflect.Message { + return new(fastReflection_SyncResponse) } -func (x fastReflection_SyncInitialResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SyncInitialResponse +func (x fastReflection_SyncResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SyncInitialResponse) Descriptor() protoreflect.MessageDescriptor { - return md_SyncInitialResponse +func (x *fastReflection_SyncResponse) Descriptor() protoreflect.MessageDescriptor { + return md_SyncResponse } // 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_SyncInitialResponse) Type() protoreflect.MessageType { - return _fastReflection_SyncInitialResponse_messageType +func (x *fastReflection_SyncResponse) Type() protoreflect.MessageType { + return _fastReflection_SyncResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SyncInitialResponse) New() protoreflect.Message { - return new(fastReflection_SyncInitialResponse) +func (x *fastReflection_SyncResponse) New() protoreflect.Message { + return new(fastReflection_SyncResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SyncInitialResponse) Interface() protoreflect.ProtoMessage { - return (*SyncInitialResponse)(x) +func (x *fastReflection_SyncResponse) Interface() protoreflect.ProtoMessage { + return (*SyncResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3230,28 +3230,28 @@ func (x *fastReflection_SyncInitialResponse) Interface() protoreflect.ProtoMessa // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SyncInitialResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_SyncResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Success != false { value := protoreflect.ValueOfBool(x.Success) - if !f(fd_SyncInitialResponse_success, value) { + if !f(fd_SyncResponse_success, value) { return } } if x.Schema != nil { value := protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - if !f(fd_SyncInitialResponse_schema, value) { + if !f(fd_SyncResponse_schema, value) { return } } if x.Address != "" { value := protoreflect.ValueOfString(x.Address) - if !f(fd_SyncInitialResponse_address, value) { + if !f(fd_SyncResponse_address, value) { return } } if x.ChainID != "" { value := protoreflect.ValueOfString(x.ChainID) - if !f(fd_SyncInitialResponse_chainID, value) { + if !f(fd_SyncResponse_chainID, value) { return } } @@ -3268,21 +3268,21 @@ func (x *fastReflection_SyncInitialResponse) Range(f func(protoreflect.FieldDesc // 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_SyncInitialResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_SyncResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "vault.v1.SyncInitialResponse.success": + case "vault.v1.SyncResponse.success": return x.Success != false - case "vault.v1.SyncInitialResponse.schema": + case "vault.v1.SyncResponse.schema": return x.Schema != nil - case "vault.v1.SyncInitialResponse.address": + case "vault.v1.SyncResponse.address": return x.Address != "" - case "vault.v1.SyncInitialResponse.chainID": + case "vault.v1.SyncResponse.chainID": return x.ChainID != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) } } @@ -3292,21 +3292,21 @@ func (x *fastReflection_SyncInitialResponse) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncInitialResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_SyncResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "vault.v1.SyncInitialResponse.success": + case "vault.v1.SyncResponse.success": x.Success = false - case "vault.v1.SyncInitialResponse.schema": + case "vault.v1.SyncResponse.schema": x.Schema = nil - case "vault.v1.SyncInitialResponse.address": + case "vault.v1.SyncResponse.address": x.Address = "" - case "vault.v1.SyncInitialResponse.chainID": + case "vault.v1.SyncResponse.chainID": x.ChainID = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) } } @@ -3316,25 +3316,25 @@ func (x *fastReflection_SyncInitialResponse) Clear(fd protoreflect.FieldDescript // 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_SyncInitialResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "vault.v1.SyncInitialResponse.success": + case "vault.v1.SyncResponse.success": value := x.Success return protoreflect.ValueOfBool(value) - case "vault.v1.SyncInitialResponse.schema": + case "vault.v1.SyncResponse.schema": value := x.Schema return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "vault.v1.SyncInitialResponse.address": + case "vault.v1.SyncResponse.address": value := x.Address return protoreflect.ValueOfString(value) - case "vault.v1.SyncInitialResponse.chainID": + case "vault.v1.SyncResponse.chainID": value := x.ChainID return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", descriptor.FullName())) } } @@ -3348,21 +3348,21 @@ func (x *fastReflection_SyncInitialResponse) Get(descriptor protoreflect.FieldDe // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncInitialResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_SyncResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "vault.v1.SyncInitialResponse.success": + case "vault.v1.SyncResponse.success": x.Success = value.Bool() - case "vault.v1.SyncInitialResponse.schema": + case "vault.v1.SyncResponse.schema": x.Schema = value.Message().Interface().(*Schema) - case "vault.v1.SyncInitialResponse.address": + case "vault.v1.SyncResponse.address": x.Address = value.Interface().(string) - case "vault.v1.SyncInitialResponse.chainID": + case "vault.v1.SyncResponse.chainID": x.ChainID = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) } } @@ -3376,56 +3376,56 @@ func (x *fastReflection_SyncInitialResponse) Set(fd protoreflect.FieldDescriptor // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncInitialResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncInitialResponse.schema": + case "vault.v1.SyncResponse.schema": if x.Schema == nil { x.Schema = new(Schema) } return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - case "vault.v1.SyncInitialResponse.success": - panic(fmt.Errorf("field success of message vault.v1.SyncInitialResponse is not mutable")) - case "vault.v1.SyncInitialResponse.address": - panic(fmt.Errorf("field address of message vault.v1.SyncInitialResponse is not mutable")) - case "vault.v1.SyncInitialResponse.chainID": - panic(fmt.Errorf("field chainID of message vault.v1.SyncInitialResponse is not mutable")) + 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")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncResponse 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_SyncInitialResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncInitialResponse.success": + case "vault.v1.SyncResponse.success": return protoreflect.ValueOfBool(false) - case "vault.v1.SyncInitialResponse.schema": + case "vault.v1.SyncResponse.schema": m := new(Schema) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "vault.v1.SyncInitialResponse.address": + case "vault.v1.SyncResponse.address": return protoreflect.ValueOfString("") - case "vault.v1.SyncInitialResponse.chainID": + case "vault.v1.SyncResponse.chainID": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) } - panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncResponse 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_SyncInitialResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_SyncResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncInitialResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncResponse", d.FullName())) } panic("unreachable") } @@ -3433,7 +3433,7 @@ func (x *fastReflection_SyncInitialResponse) WhichOneof(d protoreflect.OneofDesc // 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_SyncInitialResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_SyncResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3444,7 +3444,7 @@ func (x *fastReflection_SyncInitialResponse) 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_SyncInitialResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_SyncResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3456,7 +3456,7 @@ func (x *fastReflection_SyncInitialResponse) SetUnknown(fields protoreflect.RawF // 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_SyncInitialResponse) IsValid() bool { +func (x *fastReflection_SyncResponse) IsValid() bool { return x != nil } @@ -3466,9 +3466,9 @@ func (x *fastReflection_SyncInitialResponse) 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_SyncInitialResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SyncInitialResponse) + x := input.Message.Interface().(*SyncResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3505,7 +3505,7 @@ func (x *fastReflection_SyncInitialResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SyncInitialResponse) + x := input.Message.Interface().(*SyncResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3573,7 +3573,7 @@ func (x *fastReflection_SyncInitialResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SyncInitialResponse) + x := input.Message.Interface().(*SyncResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3605,1047 +3605,10 @@ func (x *fastReflection_SyncInitialResponse) 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: SyncInitialResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncInitialResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Success = bool(v != 0) - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Schema == nil { - x.Schema = &Schema{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Schema); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SyncCurrentRequest protoreflect.MessageDescriptor - fd_SyncCurrentRequest_macaroon protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_SyncCurrentRequest = File_vault_v1_query_proto.Messages().ByName("SyncCurrentRequest") - fd_SyncCurrentRequest_macaroon = md_SyncCurrentRequest.Fields().ByName("macaroon") -} - -var _ protoreflect.Message = (*fastReflection_SyncCurrentRequest)(nil) - -type fastReflection_SyncCurrentRequest SyncCurrentRequest - -func (x *SyncCurrentRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_SyncCurrentRequest)(x) -} - -func (x *SyncCurrentRequest) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SyncCurrentRequest_messageType fastReflection_SyncCurrentRequest_messageType -var _ protoreflect.MessageType = fastReflection_SyncCurrentRequest_messageType{} - -type fastReflection_SyncCurrentRequest_messageType struct{} - -func (x fastReflection_SyncCurrentRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_SyncCurrentRequest)(nil) -} -func (x fastReflection_SyncCurrentRequest_messageType) New() protoreflect.Message { - return new(fastReflection_SyncCurrentRequest) -} -func (x fastReflection_SyncCurrentRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SyncCurrentRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SyncCurrentRequest) Descriptor() protoreflect.MessageDescriptor { - return md_SyncCurrentRequest -} - -// 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_SyncCurrentRequest) Type() protoreflect.MessageType { - return _fastReflection_SyncCurrentRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SyncCurrentRequest) New() protoreflect.Message { - return new(fastReflection_SyncCurrentRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SyncCurrentRequest) Interface() protoreflect.ProtoMessage { - return (*SyncCurrentRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_SyncCurrentRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Macaroon != "" { - value := protoreflect.ValueOfString(x.Macaroon) - if !f(fd_SyncCurrentRequest_macaroon, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_SyncCurrentRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.SyncCurrentRequest.macaroon": - return x.Macaroon != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncCurrentRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.SyncCurrentRequest.macaroon": - x.Macaroon = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SyncCurrentRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.SyncCurrentRequest.macaroon": - value := x.Macaroon - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncCurrentRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.SyncCurrentRequest.macaroon": - x.Macaroon = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncCurrentRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.SyncCurrentRequest.macaroon": - panic(fmt.Errorf("field macaroon of message vault.v1.SyncCurrentRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentRequest 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_SyncCurrentRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.SyncCurrentRequest.macaroon": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentRequest 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_SyncCurrentRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncCurrentRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SyncCurrentRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncCurrentRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_SyncCurrentRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_SyncCurrentRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SyncCurrentRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Macaroon) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SyncCurrentRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Macaroon) > 0 { - i -= len(x.Macaroon) - copy(dAtA[i:], x.Macaroon) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macaroon))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SyncCurrentRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncCurrentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncCurrentRequest: 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 Macaroon", 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.Macaroon = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SyncCurrentResponse protoreflect.MessageDescriptor - fd_SyncCurrentResponse_success protoreflect.FieldDescriptor - fd_SyncCurrentResponse_schema protoreflect.FieldDescriptor - fd_SyncCurrentResponse_address protoreflect.FieldDescriptor - fd_SyncCurrentResponse_chainID protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_SyncCurrentResponse = File_vault_v1_query_proto.Messages().ByName("SyncCurrentResponse") - fd_SyncCurrentResponse_success = md_SyncCurrentResponse.Fields().ByName("success") - fd_SyncCurrentResponse_schema = md_SyncCurrentResponse.Fields().ByName("schema") - fd_SyncCurrentResponse_address = md_SyncCurrentResponse.Fields().ByName("address") - fd_SyncCurrentResponse_chainID = md_SyncCurrentResponse.Fields().ByName("chainID") -} - -var _ protoreflect.Message = (*fastReflection_SyncCurrentResponse)(nil) - -type fastReflection_SyncCurrentResponse SyncCurrentResponse - -func (x *SyncCurrentResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_SyncCurrentResponse)(x) -} - -func (x *SyncCurrentResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SyncCurrentResponse_messageType fastReflection_SyncCurrentResponse_messageType -var _ protoreflect.MessageType = fastReflection_SyncCurrentResponse_messageType{} - -type fastReflection_SyncCurrentResponse_messageType struct{} - -func (x fastReflection_SyncCurrentResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_SyncCurrentResponse)(nil) -} -func (x fastReflection_SyncCurrentResponse_messageType) New() protoreflect.Message { - return new(fastReflection_SyncCurrentResponse) -} -func (x fastReflection_SyncCurrentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SyncCurrentResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SyncCurrentResponse) Descriptor() protoreflect.MessageDescriptor { - return md_SyncCurrentResponse -} - -// 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_SyncCurrentResponse) Type() protoreflect.MessageType { - return _fastReflection_SyncCurrentResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SyncCurrentResponse) New() protoreflect.Message { - return new(fastReflection_SyncCurrentResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SyncCurrentResponse) Interface() protoreflect.ProtoMessage { - return (*SyncCurrentResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_SyncCurrentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_SyncCurrentResponse_success, value) { - return - } - } - if x.Schema != nil { - value := protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - if !f(fd_SyncCurrentResponse_schema, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_SyncCurrentResponse_address, value) { - return - } - } - if x.ChainID != "" { - value := protoreflect.ValueOfString(x.ChainID) - if !f(fd_SyncCurrentResponse_chainID, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_SyncCurrentResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.SyncCurrentResponse.success": - return x.Success != false - case "vault.v1.SyncCurrentResponse.schema": - return x.Schema != nil - case "vault.v1.SyncCurrentResponse.address": - return x.Address != "" - case "vault.v1.SyncCurrentResponse.chainID": - return x.ChainID != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncCurrentResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.SyncCurrentResponse.success": - x.Success = false - case "vault.v1.SyncCurrentResponse.schema": - x.Schema = nil - case "vault.v1.SyncCurrentResponse.address": - x.Address = "" - case "vault.v1.SyncCurrentResponse.chainID": - x.ChainID = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SyncCurrentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.SyncCurrentResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - case "vault.v1.SyncCurrentResponse.schema": - value := x.Schema - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "vault.v1.SyncCurrentResponse.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "vault.v1.SyncCurrentResponse.chainID": - value := x.ChainID - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncCurrentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.SyncCurrentResponse.success": - x.Success = value.Bool() - case "vault.v1.SyncCurrentResponse.schema": - x.Schema = value.Message().Interface().(*Schema) - case "vault.v1.SyncCurrentResponse.address": - x.Address = value.Interface().(string) - case "vault.v1.SyncCurrentResponse.chainID": - x.ChainID = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncCurrentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.SyncCurrentResponse.schema": - if x.Schema == nil { - x.Schema = new(Schema) - } - return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - case "vault.v1.SyncCurrentResponse.success": - panic(fmt.Errorf("field success of message vault.v1.SyncCurrentResponse is not mutable")) - case "vault.v1.SyncCurrentResponse.address": - panic(fmt.Errorf("field address of message vault.v1.SyncCurrentResponse is not mutable")) - case "vault.v1.SyncCurrentResponse.chainID": - panic(fmt.Errorf("field chainID of message vault.v1.SyncCurrentResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentResponse 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_SyncCurrentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.SyncCurrentResponse.success": - return protoreflect.ValueOfBool(false) - case "vault.v1.SyncCurrentResponse.schema": - m := new(Schema) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "vault.v1.SyncCurrentResponse.address": - return protoreflect.ValueOfString("") - case "vault.v1.SyncCurrentResponse.chainID": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) - } - panic(fmt.Errorf("message vault.v1.SyncCurrentResponse 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_SyncCurrentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncCurrentResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SyncCurrentResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncCurrentResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_SyncCurrentResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_SyncCurrentResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SyncCurrentResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Success { - n += 2 - } - if x.Schema != nil { - l = options.Size(x.Schema) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainID) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SyncCurrentResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ChainID) > 0 { - i -= len(x.ChainID) - copy(dAtA[i:], x.ChainID) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainID))) - i-- - dAtA[i] = 0x22 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x1a - } - if x.Schema != nil { - encoded, err := options.Marshal(x.Schema) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Success { - i-- - if x.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SyncCurrentResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncCurrentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncCurrentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5057,7 +4020,7 @@ func (x *AllocateResponse) GetExpiryBlock() int64 { } // SyncRequest is the request type for the Sync RPC method. -type SyncInitialRequest struct { +type SyncRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -5065,8 +4028,8 @@ type SyncInitialRequest struct { Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } -func (x *SyncInitialRequest) Reset() { - *x = SyncInitialRequest{} +func (x *SyncRequest) Reset() { + *x = SyncRequest{} if protoimpl.UnsafeEnabled { mi := &file_vault_v1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -5074,26 +4037,26 @@ func (x *SyncInitialRequest) Reset() { } } -func (x *SyncInitialRequest) String() string { +func (x *SyncRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncInitialRequest) ProtoMessage() {} +func (*SyncRequest) ProtoMessage() {} -// Deprecated: Use SyncInitialRequest.ProtoReflect.Descriptor instead. -func (*SyncInitialRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead. +func (*SyncRequest) Descriptor() ([]byte, []int) { return file_vault_v1_query_proto_rawDescGZIP(), []int{6} } -func (x *SyncInitialRequest) GetDid() string { +func (x *SyncRequest) GetDid() string { if x != nil { return x.Did } return "" } -// SyncInitialResponse is the response type for the Sync RPC method. -type SyncInitialResponse struct { +// SyncResponse is the response type for the Sync RPC method. +type SyncResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -5107,8 +4070,8 @@ type SyncInitialResponse struct { ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` } -func (x *SyncInitialResponse) Reset() { - *x = SyncInitialResponse{} +func (x *SyncResponse) Reset() { + *x = SyncResponse{} if protoimpl.UnsafeEnabled { mi := &file_vault_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -5116,138 +4079,39 @@ func (x *SyncInitialResponse) Reset() { } } -func (x *SyncInitialResponse) String() string { +func (x *SyncResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncInitialResponse) ProtoMessage() {} +func (*SyncResponse) ProtoMessage() {} -// Deprecated: Use SyncInitialResponse.ProtoReflect.Descriptor instead. -func (*SyncInitialResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead. +func (*SyncResponse) Descriptor() ([]byte, []int) { return file_vault_v1_query_proto_rawDescGZIP(), []int{7} } -func (x *SyncInitialResponse) GetSuccess() bool { +func (x *SyncResponse) GetSuccess() bool { if x != nil { return x.Success } return false } -func (x *SyncInitialResponse) GetSchema() *Schema { +func (x *SyncResponse) GetSchema() *Schema { if x != nil { return x.Schema } return nil } -func (x *SyncInitialResponse) GetAddress() string { +func (x *SyncResponse) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *SyncInitialResponse) GetChainID() string { - if x != nil { - return x.ChainID - } - return "" -} - -// SyncCurrentRequest is the request type for the Sync RPC method. -type SyncCurrentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Macaroon string `protobuf:"bytes,1,opt,name=macaroon,proto3" json:"macaroon,omitempty"` -} - -func (x *SyncCurrentRequest) Reset() { - *x = SyncCurrentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SyncCurrentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SyncCurrentRequest) ProtoMessage() {} - -// Deprecated: Use SyncCurrentRequest.ProtoReflect.Descriptor instead. -func (*SyncCurrentRequest) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *SyncCurrentRequest) GetMacaroon() string { - if x != nil { - return x.Macaroon - } - return "" -} - -// SyncCurrentResponse is the response type for the Sync RPC method. -type SyncCurrentResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - 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"` - // Address is the address of the calling DID. - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - // ChainID is the chain ID of the current network. - ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` -} - -func (x *SyncCurrentResponse) Reset() { - *x = SyncCurrentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SyncCurrentResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SyncCurrentResponse) ProtoMessage() {} - -// Deprecated: Use SyncCurrentResponse.ProtoReflect.Descriptor instead. -func (*SyncCurrentResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *SyncCurrentResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *SyncCurrentResponse) GetSchema() *Schema { - if x != nil { - return x.Schema - } - return nil -} - -func (x *SyncCurrentResponse) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *SyncCurrentResponse) GetChainID() string { +func (x *SyncResponse) GetChainID() string { if x != nil { return x.ChainID } @@ -5287,23 +4151,10 @@ var file_vault_v1_query_proto_rawDesc = []byte{ 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, 0x26, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, - 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 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, 0x8d, 0x01, 0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 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, - 0x22, 0x30, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, - 0x6f, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, + 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, @@ -5311,7 +4162,7 @@ var file_vault_v1_query_proto_rawDesc = []byte{ 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, 0x80, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5f, 0x0a, 0x06, + 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, @@ -5323,36 +4174,29 @@ var file_vault_v1_query_proto_rawDesc = []byte{ 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, 0x5d, + 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, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x12, 0x2f, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x6a, 0x0a, - 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x1c, 0x2e, 0x76, - 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 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, 0x12, 0x6a, 0x0a, 0x0b, 0x53, 0x79, 0x6e, - 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 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, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 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, + 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, } var ( @@ -5367,7 +4211,7 @@ func file_vault_v1_query_proto_rawDescGZIP() []byte { return file_vault_v1_query_proto_rawDescData } -var file_vault_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +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 @@ -5375,33 +4219,28 @@ var file_vault_v1_query_proto_goTypes = []interface{}{ (*QuerySchemaResponse)(nil), // 3: vault.v1.QuerySchemaResponse (*AllocateRequest)(nil), // 4: vault.v1.AllocateRequest (*AllocateResponse)(nil), // 5: vault.v1.AllocateResponse - (*SyncInitialRequest)(nil), // 6: vault.v1.SyncInitialRequest - (*SyncInitialResponse)(nil), // 7: vault.v1.SyncInitialResponse - (*SyncCurrentRequest)(nil), // 8: vault.v1.SyncCurrentRequest - (*SyncCurrentResponse)(nil), // 9: vault.v1.SyncCurrentResponse - (*Params)(nil), // 10: vault.v1.Params - (*Schema)(nil), // 11: vault.v1.Schema + (*SyncRequest)(nil), // 6: vault.v1.SyncRequest + (*SyncResponse)(nil), // 7: vault.v1.SyncResponse + (*Params)(nil), // 8: vault.v1.Params + (*Schema)(nil), // 9: vault.v1.Schema } var file_vault_v1_query_proto_depIdxs = []int32{ - 10, // 0: vault.v1.QueryParamsResponse.params:type_name -> vault.v1.Params - 11, // 1: vault.v1.QuerySchemaResponse.schema:type_name -> vault.v1.Schema - 11, // 2: vault.v1.SyncInitialResponse.schema:type_name -> vault.v1.Schema - 11, // 3: vault.v1.SyncCurrentResponse.schema:type_name -> vault.v1.Schema - 0, // 4: vault.v1.Query.Params:input_type -> vault.v1.QueryParamsRequest - 2, // 5: vault.v1.Query.Schema:input_type -> vault.v1.QuerySchemaRequest - 4, // 6: vault.v1.Query.Allocate:input_type -> vault.v1.AllocateRequest - 6, // 7: vault.v1.Query.SyncInitial:input_type -> vault.v1.SyncInitialRequest - 8, // 8: vault.v1.Query.SyncCurrent:input_type -> vault.v1.SyncCurrentRequest - 1, // 9: vault.v1.Query.Params:output_type -> vault.v1.QueryParamsResponse - 3, // 10: vault.v1.Query.Schema:output_type -> vault.v1.QuerySchemaResponse - 5, // 11: vault.v1.Query.Allocate:output_type -> vault.v1.AllocateResponse - 7, // 12: vault.v1.Query.SyncInitial:output_type -> vault.v1.SyncInitialResponse - 9, // 13: vault.v1.Query.SyncCurrent:output_type -> vault.v1.SyncCurrentResponse - 9, // [9:14] is the sub-list for method output_type - 4, // [4:9] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 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 + 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 + 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 + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_vault_v1_query_proto_init() } @@ -5484,7 +4323,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.(*SyncInitialRequest); i { + switch v := v.(*SyncRequest); i { case 0: return &v.state case 1: @@ -5496,31 +4335,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.(*SyncInitialResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncCurrentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncCurrentResponse); i { + switch v := v.(*SyncResponse); i { case 0: return &v.state case 1: @@ -5538,7 +4353,7 @@ func file_vault_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vault_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/vault/v1/query_grpc.pb.go b/api/vault/v1/query_grpc.pb.go index 92be1c9d6..fe888fb60 100644 --- a/api/vault/v1/query_grpc.pb.go +++ b/api/vault/v1/query_grpc.pb.go @@ -19,11 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/vault.v1.Query/Params" - Query_Schema_FullMethodName = "/vault.v1.Query/Schema" - Query_Allocate_FullMethodName = "/vault.v1.Query/Allocate" - Query_SyncInitial_FullMethodName = "/vault.v1.Query/SyncInitial" - Query_SyncCurrent_FullMethodName = "/vault.v1.Query/SyncCurrent" + Query_Params_FullMethodName = "/vault.v1.Query/Params" + Query_Schema_FullMethodName = "/vault.v1.Query/Schema" + Query_Allocate_FullMethodName = "/vault.v1.Query/Allocate" + Query_Sync_FullMethodName = "/vault.v1.Query/Sync" ) // QueryClient is the client API for Query service. @@ -40,10 +39,7 @@ type QueryClient interface { Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information - SyncInitial(ctx context.Context, in *SyncInitialRequest, opts ...grpc.CallOption) (*SyncInitialResponse, error) - // SyncCurrent queries the DID document by its id. And returns the required PKL - // information - SyncCurrent(ctx context.Context, in *SyncCurrentRequest, opts ...grpc.CallOption) (*SyncCurrentResponse, error) + Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) } type queryClient struct { @@ -81,18 +77,9 @@ func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts .. return out, nil } -func (c *queryClient) SyncInitial(ctx context.Context, in *SyncInitialRequest, opts ...grpc.CallOption) (*SyncInitialResponse, error) { - out := new(SyncInitialResponse) - err := c.cc.Invoke(ctx, Query_SyncInitial_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SyncCurrent(ctx context.Context, in *SyncCurrentRequest, opts ...grpc.CallOption) (*SyncCurrentResponse, error) { - out := new(SyncCurrentResponse) - err := c.cc.Invoke(ctx, Query_SyncCurrent_FullMethodName, in, out, opts...) +func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { + out := new(SyncResponse) + err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -113,10 +100,7 @@ type QueryServer interface { Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information - SyncInitial(context.Context, *SyncInitialRequest) (*SyncInitialResponse, error) - // SyncCurrent queries the DID document by its id. And returns the required PKL - // information - SyncCurrent(context.Context, *SyncCurrentRequest) (*SyncCurrentResponse, error) + Sync(context.Context, *SyncRequest) (*SyncResponse, error) mustEmbedUnimplementedQueryServer() } @@ -133,11 +117,8 @@ func (UnimplementedQueryServer) Schema(context.Context, *QuerySchemaRequest) (*Q func (UnimplementedQueryServer) Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") } -func (UnimplementedQueryServer) SyncInitial(context.Context, *SyncInitialRequest) (*SyncInitialResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncInitial not implemented") -} -func (UnimplementedQueryServer) SyncCurrent(context.Context, *SyncCurrentRequest) (*SyncCurrentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncCurrent not implemented") +func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} @@ -206,38 +187,20 @@ func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Query_SyncInitial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SyncInitialRequest) +func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).SyncInitial(ctx, in) + return srv.(QueryServer).Sync(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_SyncInitial_FullMethodName, + FullMethod: Query_Sync_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SyncInitial(ctx, req.(*SyncInitialRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SyncCurrent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SyncCurrentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SyncCurrent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_SyncCurrent_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SyncCurrent(ctx, req.(*SyncCurrentRequest)) + return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) } return interceptor(ctx, in, info, handler) } @@ -262,12 +225,8 @@ var Query_ServiceDesc = grpc.ServiceDesc{ Handler: _Query_Allocate_Handler, }, { - MethodName: "SyncInitial", - Handler: _Query_SyncInitial_Handler, - }, - { - MethodName: "SyncCurrent", - Handler: _Query_SyncCurrent_Handler, + MethodName: "Sync", + Handler: _Query_Sync_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/vault/v1/tx.pulsar.go b/api/vault/v1/tx.pulsar.go index 359070f1e..3cc1f3899 100644 --- a/api/vault/v1/tx.pulsar.go +++ b/api/vault/v1/tx.pulsar.go @@ -16,1140 +16,6 @@ import ( sync "sync" ) -var ( - md_MsgAllocateVault protoreflect.MessageDescriptor - fd_MsgAllocateVault_authority protoreflect.FieldDescriptor - fd_MsgAllocateVault_subject protoreflect.FieldDescriptor - fd_MsgAllocateVault_origin protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_tx_proto_init() - md_MsgAllocateVault = File_vault_v1_tx_proto.Messages().ByName("MsgAllocateVault") - fd_MsgAllocateVault_authority = md_MsgAllocateVault.Fields().ByName("authority") - fd_MsgAllocateVault_subject = md_MsgAllocateVault.Fields().ByName("subject") - fd_MsgAllocateVault_origin = md_MsgAllocateVault.Fields().ByName("origin") -} - -var _ protoreflect.Message = (*fastReflection_MsgAllocateVault)(nil) - -type fastReflection_MsgAllocateVault MsgAllocateVault - -func (x *MsgAllocateVault) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAllocateVault)(x) -} - -func (x *MsgAllocateVault) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgAllocateVault_messageType fastReflection_MsgAllocateVault_messageType -var _ protoreflect.MessageType = fastReflection_MsgAllocateVault_messageType{} - -type fastReflection_MsgAllocateVault_messageType struct{} - -func (x fastReflection_MsgAllocateVault_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAllocateVault)(nil) -} -func (x fastReflection_MsgAllocateVault_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAllocateVault) -} -func (x fastReflection_MsgAllocateVault_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAllocateVault -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgAllocateVault) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAllocateVault -} - -// 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_MsgAllocateVault) Type() protoreflect.MessageType { - return _fastReflection_MsgAllocateVault_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAllocateVault) New() protoreflect.Message { - return new(fastReflection_MsgAllocateVault) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAllocateVault) Interface() protoreflect.ProtoMessage { - return (*MsgAllocateVault)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgAllocateVault) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgAllocateVault_authority, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_MsgAllocateVault_subject, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_MsgAllocateVault_origin, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgAllocateVault) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.MsgAllocateVault.authority": - return x.Authority != "" - case "vault.v1.MsgAllocateVault.subject": - return x.Subject != "" - case "vault.v1.MsgAllocateVault.origin": - return x.Origin != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVault")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVault does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAllocateVault) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.MsgAllocateVault.authority": - x.Authority = "" - case "vault.v1.MsgAllocateVault.subject": - x.Subject = "" - case "vault.v1.MsgAllocateVault.origin": - x.Origin = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVault")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVault does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgAllocateVault) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.MsgAllocateVault.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "vault.v1.MsgAllocateVault.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "vault.v1.MsgAllocateVault.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVault")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVault does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAllocateVault) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.MsgAllocateVault.authority": - x.Authority = value.Interface().(string) - case "vault.v1.MsgAllocateVault.subject": - x.Subject = value.Interface().(string) - case "vault.v1.MsgAllocateVault.origin": - x.Origin = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVault")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVault does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAllocateVault) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgAllocateVault.authority": - panic(fmt.Errorf("field authority of message vault.v1.MsgAllocateVault is not mutable")) - case "vault.v1.MsgAllocateVault.subject": - panic(fmt.Errorf("field subject of message vault.v1.MsgAllocateVault is not mutable")) - case "vault.v1.MsgAllocateVault.origin": - panic(fmt.Errorf("field origin of message vault.v1.MsgAllocateVault is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVault")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVault 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_MsgAllocateVault) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgAllocateVault.authority": - return protoreflect.ValueOfString("") - case "vault.v1.MsgAllocateVault.subject": - return protoreflect.ValueOfString("") - case "vault.v1.MsgAllocateVault.origin": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVault")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVault 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_MsgAllocateVault) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgAllocateVault", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgAllocateVault) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAllocateVault) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgAllocateVault) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAllocateVault) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAllocateVault) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAllocateVault) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - i-- - dAtA[i] = 0x1a - } - 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.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAllocateVault) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 3: - 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 - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgAllocateVaultResponse protoreflect.MessageDescriptor - fd_MsgAllocateVaultResponse_cid protoreflect.FieldDescriptor - fd_MsgAllocateVaultResponse_expiry_block protoreflect.FieldDescriptor - fd_MsgAllocateVaultResponse_token protoreflect.FieldDescriptor - fd_MsgAllocateVaultResponse_localhost protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_tx_proto_init() - md_MsgAllocateVaultResponse = File_vault_v1_tx_proto.Messages().ByName("MsgAllocateVaultResponse") - fd_MsgAllocateVaultResponse_cid = md_MsgAllocateVaultResponse.Fields().ByName("cid") - fd_MsgAllocateVaultResponse_expiry_block = md_MsgAllocateVaultResponse.Fields().ByName("expiry_block") - fd_MsgAllocateVaultResponse_token = md_MsgAllocateVaultResponse.Fields().ByName("token") - fd_MsgAllocateVaultResponse_localhost = md_MsgAllocateVaultResponse.Fields().ByName("localhost") -} - -var _ protoreflect.Message = (*fastReflection_MsgAllocateVaultResponse)(nil) - -type fastReflection_MsgAllocateVaultResponse MsgAllocateVaultResponse - -func (x *MsgAllocateVaultResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAllocateVaultResponse)(x) -} - -func (x *MsgAllocateVaultResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgAllocateVaultResponse_messageType fastReflection_MsgAllocateVaultResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgAllocateVaultResponse_messageType{} - -type fastReflection_MsgAllocateVaultResponse_messageType struct{} - -func (x fastReflection_MsgAllocateVaultResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAllocateVaultResponse)(nil) -} -func (x fastReflection_MsgAllocateVaultResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAllocateVaultResponse) -} -func (x fastReflection_MsgAllocateVaultResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAllocateVaultResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgAllocateVaultResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAllocateVaultResponse -} - -// 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_MsgAllocateVaultResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgAllocateVaultResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAllocateVaultResponse) New() protoreflect.Message { - return new(fastReflection_MsgAllocateVaultResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAllocateVaultResponse) Interface() protoreflect.ProtoMessage { - return (*MsgAllocateVaultResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgAllocateVaultResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Cid != "" { - value := protoreflect.ValueOfString(x.Cid) - if !f(fd_MsgAllocateVaultResponse_cid, value) { - return - } - } - if x.ExpiryBlock != int64(0) { - value := protoreflect.ValueOfInt64(x.ExpiryBlock) - if !f(fd_MsgAllocateVaultResponse_expiry_block, value) { - return - } - } - if x.Token != "" { - value := protoreflect.ValueOfString(x.Token) - if !f(fd_MsgAllocateVaultResponse_token, value) { - return - } - } - if x.Localhost != false { - value := protoreflect.ValueOfBool(x.Localhost) - if !f(fd_MsgAllocateVaultResponse_localhost, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgAllocateVaultResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.MsgAllocateVaultResponse.cid": - return x.Cid != "" - case "vault.v1.MsgAllocateVaultResponse.expiry_block": - return x.ExpiryBlock != int64(0) - case "vault.v1.MsgAllocateVaultResponse.token": - return x.Token != "" - case "vault.v1.MsgAllocateVaultResponse.localhost": - return x.Localhost != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVaultResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAllocateVaultResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.MsgAllocateVaultResponse.cid": - x.Cid = "" - case "vault.v1.MsgAllocateVaultResponse.expiry_block": - x.ExpiryBlock = int64(0) - case "vault.v1.MsgAllocateVaultResponse.token": - x.Token = "" - case "vault.v1.MsgAllocateVaultResponse.localhost": - x.Localhost = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVaultResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgAllocateVaultResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.MsgAllocateVaultResponse.cid": - value := x.Cid - return protoreflect.ValueOfString(value) - case "vault.v1.MsgAllocateVaultResponse.expiry_block": - value := x.ExpiryBlock - return protoreflect.ValueOfInt64(value) - case "vault.v1.MsgAllocateVaultResponse.token": - value := x.Token - return protoreflect.ValueOfString(value) - case "vault.v1.MsgAllocateVaultResponse.localhost": - value := x.Localhost - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVaultResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVaultResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAllocateVaultResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.MsgAllocateVaultResponse.cid": - x.Cid = value.Interface().(string) - case "vault.v1.MsgAllocateVaultResponse.expiry_block": - x.ExpiryBlock = value.Int() - case "vault.v1.MsgAllocateVaultResponse.token": - x.Token = value.Interface().(string) - case "vault.v1.MsgAllocateVaultResponse.localhost": - x.Localhost = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVaultResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAllocateVaultResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgAllocateVaultResponse.cid": - panic(fmt.Errorf("field cid of message vault.v1.MsgAllocateVaultResponse is not mutable")) - case "vault.v1.MsgAllocateVaultResponse.expiry_block": - panic(fmt.Errorf("field expiry_block of message vault.v1.MsgAllocateVaultResponse is not mutable")) - case "vault.v1.MsgAllocateVaultResponse.token": - panic(fmt.Errorf("field token of message vault.v1.MsgAllocateVaultResponse is not mutable")) - case "vault.v1.MsgAllocateVaultResponse.localhost": - panic(fmt.Errorf("field localhost of message vault.v1.MsgAllocateVaultResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVaultResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVaultResponse 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_MsgAllocateVaultResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgAllocateVaultResponse.cid": - return protoreflect.ValueOfString("") - case "vault.v1.MsgAllocateVaultResponse.expiry_block": - return protoreflect.ValueOfInt64(int64(0)) - case "vault.v1.MsgAllocateVaultResponse.token": - return protoreflect.ValueOfString("") - case "vault.v1.MsgAllocateVaultResponse.localhost": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgAllocateVaultResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgAllocateVaultResponse 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_MsgAllocateVaultResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgAllocateVaultResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgAllocateVaultResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAllocateVaultResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgAllocateVaultResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAllocateVaultResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Cid) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ExpiryBlock != 0 { - n += 1 + runtime.Sov(uint64(x.ExpiryBlock)) - } - l = len(x.Token) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Localhost { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAllocateVaultResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Localhost { - i-- - if x.Localhost { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(x.Token) > 0 { - i -= len(x.Token) - copy(dAtA[i:], x.Token) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token))) - i-- - dAtA[i] = 0x1a - } - if x.ExpiryBlock != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryBlock)) - i-- - dAtA[i] = 0x10 - } - if len(x.Cid) > 0 { - i -= len(x.Cid) - copy(dAtA[i:], x.Cid) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAllocateVaultResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVaultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVaultResponse: 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 Cid", 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.Cid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryBlock", wireType) - } - x.ExpiryBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ExpiryBlock |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Localhost", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Localhost = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_MsgUpdateParams protoreflect.MessageDescriptor fd_MsgUpdateParams_authority protoreflect.FieldDescriptor @@ -1172,7 +38,7 @@ func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[2] + mi := &file_vault_v1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1667,7 +533,7 @@ func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[3] + mi := &file_vault_v1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2018,126 +884,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// MsgAllocateVault is the message type for the AllocateVault RPC. -type MsgAllocateVault struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the service account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // subject is a unique human-defined identifier to associate with the vault. - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - // origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` -} - -func (x *MsgAllocateVault) Reset() { - *x = MsgAllocateVault{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAllocateVault) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAllocateVault) ProtoMessage() {} - -// Deprecated: Use MsgAllocateVault.ProtoReflect.Descriptor instead. -func (*MsgAllocateVault) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgAllocateVault) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgAllocateVault) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *MsgAllocateVault) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -// MsgAllocateVaultResponse is the response type for the AllocateVault RPC. -type MsgAllocateVaultResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // CID is the content identifier of the vault. - Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` - // ExpiryBlock is the block number at which the vault will expire. - ExpiryBlock int64 `protobuf:"varint,2,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"` - // RegistrationOptions is a json string of the - // PublicKeyCredentialCreationOptions for WebAuthn - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` - // IsLocalhost is a flag to indicate if the vault is localhost - Localhost bool `protobuf:"varint,4,opt,name=localhost,proto3" json:"localhost,omitempty"` -} - -func (x *MsgAllocateVaultResponse) Reset() { - *x = MsgAllocateVaultResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAllocateVaultResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAllocateVaultResponse) ProtoMessage() {} - -// Deprecated: Use MsgAllocateVaultResponse.ProtoReflect.Descriptor instead. -func (*MsgAllocateVaultResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *MsgAllocateVaultResponse) GetCid() string { - if x != nil { - return x.Cid - } - return "" -} - -func (x *MsgAllocateVaultResponse) GetExpiryBlock() int64 { - if x != nil { - return x.ExpiryBlock - } - return 0 -} - -func (x *MsgAllocateVaultResponse) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *MsgAllocateVaultResponse) GetLocalhost() bool { - if x != nil { - return x.Localhost - } - return false -} - // MsgUpdateParams is the Msg/UpdateParams request type. // // Since: cosmos-sdk 0.47 @@ -2157,7 +903,7 @@ type MsgUpdateParams struct { func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[2] + mi := &file_vault_v1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2171,7 +917,7 @@ func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{2} + return file_vault_v1_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgUpdateParams) GetAuthority() string { @@ -2201,7 +947,7 @@ type MsgUpdateParamsResponse struct { func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[3] + mi := &file_vault_v1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2215,7 +961,7 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{3} + return file_vault_v1_tx_proto_rawDescGZIP(), []int{1} } var File_vault_v1_tx_proto protoreflect.FileDescriptor @@ -2230,57 +976,32 @@ var file_vault_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x01, - 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, - 0x6c, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 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, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, - 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, - 0x18, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, - 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, - 0x73, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2e, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, - 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, - 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc7, 0x01, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x6b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, - 0x6c, 0x74, 0x12, 0x1a, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x22, - 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x12, 0x2f, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4c, - 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x19, - 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x21, 0x2e, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, - 0xb0, 0x2a, 0x01, 0x42, 0x85, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 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, + 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x5a, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4c, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x19, 0x2e, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x21, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, + 0x42, 0x85, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, + 0x31, 0x42, 0x07, 0x54, 0x78, 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 ( @@ -2295,22 +1016,18 @@ func file_vault_v1_tx_proto_rawDescGZIP() []byte { return file_vault_v1_tx_proto_rawDescData } -var file_vault_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_vault_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_vault_v1_tx_proto_goTypes = []interface{}{ - (*MsgAllocateVault)(nil), // 0: vault.v1.MsgAllocateVault - (*MsgAllocateVaultResponse)(nil), // 1: vault.v1.MsgAllocateVaultResponse - (*MsgUpdateParams)(nil), // 2: vault.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 3: vault.v1.MsgUpdateParamsResponse - (*Params)(nil), // 4: vault.v1.Params + (*MsgUpdateParams)(nil), // 0: vault.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: vault.v1.MsgUpdateParamsResponse + (*Params)(nil), // 2: vault.v1.Params } var file_vault_v1_tx_proto_depIdxs = []int32{ - 4, // 0: vault.v1.MsgUpdateParams.params:type_name -> vault.v1.Params - 0, // 1: vault.v1.Msg.AllocateVault:input_type -> vault.v1.MsgAllocateVault - 2, // 2: vault.v1.Msg.UpdateParams:input_type -> vault.v1.MsgUpdateParams - 1, // 3: vault.v1.Msg.AllocateVault:output_type -> vault.v1.MsgAllocateVaultResponse - 3, // 4: vault.v1.Msg.UpdateParams:output_type -> vault.v1.MsgUpdateParamsResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type + 2, // 0: vault.v1.MsgUpdateParams.params:type_name -> vault.v1.Params + 0, // 1: vault.v1.Msg.UpdateParams:input_type -> vault.v1.MsgUpdateParams + 1, // 2: vault.v1.Msg.UpdateParams:output_type -> vault.v1.MsgUpdateParamsResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -2324,30 +1041,6 @@ func file_vault_v1_tx_proto_init() { file_vault_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_vault_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAllocateVault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAllocateVaultResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { case 0: return &v.state @@ -2359,7 +1052,7 @@ func file_vault_v1_tx_proto_init() { return nil } } - file_vault_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_vault_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state @@ -2378,7 +1071,7 @@ func file_vault_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vault_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/api/vault/v1/tx_grpc.pb.go b/api/vault/v1/tx_grpc.pb.go index 9ba35ba81..61ed82741 100644 --- a/api/vault/v1/tx_grpc.pb.go +++ b/api/vault/v1/tx_grpc.pb.go @@ -19,18 +19,13 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_AllocateVault_FullMethodName = "/vault.v1.Msg/AllocateVault" - Msg_UpdateParams_FullMethodName = "/vault.v1.Msg/UpdateParams" + Msg_UpdateParams_FullMethodName = "/vault.v1.Msg/UpdateParams" ) // MsgClient is the client API for Msg service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MsgClient interface { - // AllocateVault assembles a sqlite3 database in a local directory and returns - // the CID of the database. this operation is called by services initiating a - // controller registration. - AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) // UpdateParams defines a governance operation for updating the parameters. // // Since: cosmos-sdk 0.47 @@ -45,15 +40,6 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } -func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) { - out := new(MsgAllocateVaultResponse) - err := c.cc.Invoke(ctx, Msg_AllocateVault_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) @@ -67,10 +53,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts // All implementations must embed UnimplementedMsgServer // for forward compatibility type MsgServer interface { - // AllocateVault assembles a sqlite3 database in a local directory and returns - // the CID of the database. this operation is called by services initiating a - // controller registration. - AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) // UpdateParams defines a governance operation for updating the parameters. // // Since: cosmos-sdk 0.47 @@ -82,9 +64,6 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented") -} func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } @@ -101,24 +80,6 @@ func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { s.RegisterService(&Msg_ServiceDesc, srv) } -func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAllocateVault) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).AllocateVault(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_AllocateVault_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateParams) if err := dec(in); err != nil { @@ -144,10 +105,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ ServiceName: "vault.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "AllocateVault", - Handler: _Msg_AllocateVault_Handler, - }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, diff --git a/app/app.go b/app/app.go index 54d9aba8a..7c3de4940 100644 --- a/app/app.go +++ b/app/app.go @@ -1190,7 +1190,6 @@ func GetDefaultBypassFeeMessages() []string { sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenTry{}), sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenConfirm{}), sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenAck{}), - sdk.MsgTypeURL(&vaulttypes.MsgAllocateVault{}), sdk.MsgTypeURL(&didtypes.MsgLinkAuthentication{}), } } diff --git a/buf.work.yaml b/buf.work.yaml deleted file mode 100644 index 494296bfa..000000000 --- a/buf.work.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version: v1 -directories: - - proto - - third_party/proto diff --git a/internal/ctx/ctx_sonr.go b/internal/ctx/ctx_sonr.go deleted file mode 100644 index 33ef1d6d1..000000000 --- a/internal/ctx/ctx_sonr.go +++ /dev/null @@ -1,21 +0,0 @@ -package ctx - -import ( - "time" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type SonrContext struct { - sdk.Context -} - -func GetSonrCTX(ctx sdk.Context) *SonrContext { - return &SonrContext{ctx} -} - -func (s *SonrContext) GetBlockExpiration(duration time.Duration) int64 { - blockTime := s.BlockTime() - avgBlockTime := float64(blockTime.Sub(blockTime).Seconds()) - return int64(duration.Seconds() / avgBlockTime) -} diff --git a/pkg/nebula/components/vaultindex/file.go b/pkg/nebula/components/vaultindex/file.go index 186c6e1ec..f3f831b7d 100644 --- a/pkg/nebula/components/vaultindex/file.go +++ b/pkg/nebula/components/vaultindex/file.go @@ -8,6 +8,7 @@ import ( "github.com/onsonr/sonr/internal/dwn/gen" ) +// BuildFile builds the index.html file for the vault func BuildFile(cnfg *gen.Config) (files.Node, error) { w := bytes.NewBuffer(nil) err := IndexFile().Render(context.Background(), w) diff --git a/pkg/nebula/global/state/worker.templ b/pkg/nebula/global/state/worker.templ index 4b3de4773..2fd285c00 100644 --- a/pkg/nebula/global/state/worker.templ +++ b/pkg/nebula/global/state/worker.templ @@ -2,7 +2,6 @@ package state var ( serviceWorkerInstall = templ.NewOnceHandle() - serviceWorkerReady = templ.NewOnceHandle() ) templ RegisterServiceWorker() { diff --git a/pkg/nebula/global/styles/layout.templ b/pkg/nebula/global/styles/layout.templ index 767eaa034..52c108f9e 100644 --- a/pkg/nebula/global/styles/layout.templ +++ b/pkg/nebula/global/styles/layout.templ @@ -1,29 +1,27 @@ package styles +// Icon is a component that renders an icon type Icon interface { Render() templ.Component } +// Variant is a component that has attributes type Variant interface { Attributes() templ.Attributes } -templ Spacer() { -
-} - -templ Rows() { -
- { children... } -
-} +// ╭───────────────────────────────────────────────────────────╮ +// │ General Layout Components │ +// ╰───────────────────────────────────────────────────────────╯ +// Columns is a component that renders a flex container with a gap of 3 and a max width of 100% templ Columns() {
{ children... }
} +// Layout is a component that renders the general layout of the application templ Layout(title string, remote bool) { @@ -51,6 +49,7 @@ templ Layout(title string, remote bool) { } +// LayoutNoBody is a component that renders the general layout of the application without the body tag templ LayoutNoBody(title string, remote bool) { @@ -80,6 +79,7 @@ templ LayoutNoBody(title string, remote bool) { } +// OpenModal is a component that renders a modal with a title and description templ OpenModal(title, description string) {
} + +// Rows is a component that renders a flex container with a gap of 2 and a max width of 100% +templ Rows() { +
+ { children... } +
+} + +// Spacer is a component that renders a
tag +templ Spacer() { +
+} diff --git a/pkg/workers/routes/webnode.go b/pkg/workers/routes/webnode.go index d59b512bd..ca0955d1f 100644 --- a/pkg/workers/routes/webnode.go +++ b/pkg/workers/routes/webnode.go @@ -7,6 +7,7 @@ import ( "github.com/onsonr/sonr/pkg/workers/handlers" ) +// RegisterWebNodeAPI registers the Decentralized Web Node API routes. func RegisterWebNodeAPI(e *echo.Echo) { g1 := e.Group("api") g1.GET("/register/:subject/start", handlers.Auth.RegisterSubjectStart) @@ -22,6 +23,7 @@ func RegisterWebNodeAPI(e *echo.Echo) { g1.POST("/:origin/grant/:subject", handlers.OpenID.GrantAuthorization) } +// RegisterWebNodeViews registers the Decentralized Web Node HTMX views. func RegisterWebNodeViews(e *echo.Echo) { e.File("/", "index.html") e.GET("/#", authentication.CurrentViewRoute) diff --git a/proto/vault/v1/query.proto b/proto/vault/v1/query.proto index 9512d6423..5c42b0553 100644 --- a/proto/vault/v1/query.proto +++ b/proto/vault/v1/query.proto @@ -22,20 +22,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).post = "/vault/v1/allocate"; + option (google.api.http).get = "/vault/v1/allocate/{origin}/{subject}"; } // Sync queries the DID document by its id. And returns the required PKL // information - rpc SyncInitial(SyncInitialRequest) returns (SyncInitialResponse) { + rpc Sync(SyncRequest) returns (SyncResponse) { option (google.api.http).post = "/vault/v1/sync-initial"; } - - // SyncCurrent queries the DID document by its id. And returns the required PKL - // information - rpc SyncCurrent(SyncCurrentRequest) returns (SyncCurrentResponse) { - option (google.api.http).post = "/vault/v1/sync-current"; - } } // QueryParamsRequest is the request type for the Query/Params RPC method. @@ -72,31 +66,12 @@ message AllocateResponse { } // SyncRequest is the request type for the Sync RPC method. -message SyncInitialRequest { +message SyncRequest { string did = 1; } -// SyncInitialResponse is the response type for the Sync RPC method. -message SyncInitialResponse { - bool success = 1; - - // Schema is the DID document. - Schema schema = 2; - - // Address is the address of the calling DID. - string address = 3; - - // ChainID is the chain ID of the current network. - string chainID = 4; -} - -// SyncCurrentRequest is the request type for the Sync RPC method. -message SyncCurrentRequest { - string macaroon = 1; -} - -// SyncCurrentResponse is the response type for the Sync RPC method. -message SyncCurrentResponse { +// SyncResponse is the response type for the Sync RPC method. +message SyncResponse { bool success = 1; // Schema is the DID document. diff --git a/proto/vault/v1/tx.proto b/proto/vault/v1/tx.proto index 7a80a5bea..6b43f5aee 100644 --- a/proto/vault/v1/tx.proto +++ b/proto/vault/v1/tx.proto @@ -12,49 +12,12 @@ option go_package = "github.com/onsonr/sonr/x/vault/types"; // Msg defines the Msg service. service Msg { option (cosmos.msg.v1.service) = true; - // AllocateVault assembles a sqlite3 database in a local directory and returns - // the CID of the database. this operation is called by services initiating a - // controller registration. - rpc AllocateVault(MsgAllocateVault) returns (MsgAllocateVaultResponse) { - option (google.api.http).post = "/vault/v1/allocate"; - } - // UpdateParams defines a governance operation for updating the parameters. // // Since: cosmos-sdk 0.47 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } -// MsgAllocateVault is the message type for the AllocateVault RPC. -message MsgAllocateVault { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the service account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // subject is a unique human-defined identifier to associate with the vault. - string subject = 2; - - // origin is the origin of the request in wildcard form. - string origin = 3; -} - -// MsgAllocateVaultResponse is the response type for the AllocateVault RPC. -message MsgAllocateVaultResponse { - // CID is the content identifier of the vault. - string cid = 1; - - // ExpiryBlock is the block number at which the vault will expire. - int64 expiry_block = 2; - - // RegistrationOptions is a json string of the - // PublicKeyCredentialCreationOptions for WebAuthn - string token = 3; - - // IsLocalhost is a flag to indicate if the vault is localhost - bool localhost = 4; -} - // MsgUpdateParams is the Msg/UpdateParams request type. // // Since: cosmos-sdk 0.47 diff --git a/x/macaroon/keeper/issuer.go b/x/macaroon/keeper/issuer.go index 71435f1ea..166fd46f1 100644 --- a/x/macaroon/keeper/issuer.go +++ b/x/macaroon/keeper/issuer.go @@ -6,7 +6,6 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/onsonr/sonr/internal/ctx" didtypes "github.com/onsonr/sonr/x/did/types" "gopkg.in/macaroon.v2" ) @@ -15,7 +14,6 @@ var fourYears = time.Hour * 24 * 365 * 4 // IssueAdminMacaroon creates a macaroon with the specified parameters. func (k Keeper) IssueAdminMacaroon(sdkctx sdk.Context, controller didtypes.ControllerI) (*macaroon.Macaroon, error) { - sctx := ctx.GetSonrCTX(sdkctx) // Derive the root key by hashing the shared MPC public key rootKey := sha256.Sum256([]byte(controller.PublicKey())) // Create the macaroon @@ -25,7 +23,7 @@ func (k Keeper) IssueAdminMacaroon(sdkctx sdk.Context, controller didtypes.Contr } // Add the block expiry caveat - caveat := fmt.Sprintf("block-expiry=%d", sctx.GetBlockExpiration(fourYears)) + caveat := fmt.Sprintf("block-expiry=%d", calculateBlockExpiry(sdkctx, fourYears)) err = m.AddFirstPartyCaveat([]byte(caveat)) if err != nil { return nil, err @@ -53,3 +51,9 @@ func (k Keeper) IssueServiceMacaroon(sdkctx sdk.Context, sharedMPCPubKey, locati return m, nil } + +func calculateBlockExpiry(sdkctx sdk.Context, duration time.Duration) uint64 { + blockTime := sdkctx.BlockTime() + avgBlockTime := float64(blockTime.Sub(blockTime).Seconds()) + return uint64(duration.Seconds() / avgBlockTime) +} diff --git a/x/vault/keeper/assembly.go b/x/vault/keeper/assembly.go index ee15add13..1de08ebb0 100644 --- a/x/vault/keeper/assembly.go +++ b/x/vault/keeper/assembly.go @@ -5,13 +5,12 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/onsonr/sonr/internal/ctx" 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) (string, int64, error) { +func (k Keeper) assembleVault(cotx sdk.Context) (string, int64, error) { _, con, err := k.DIDKeeper.NewController(cotx) if err != nil { return "", 0, err @@ -20,7 +19,7 @@ func (k Keeper) AssembleVault(cotx sdk.Context) (string, int64, error) { if err != nil { return "", 0, err } - sch, err := k.CurrentSchema(cotx) + sch, err := k.currentSchema(cotx) if err != nil { return "", 0, err } @@ -32,12 +31,11 @@ func (k Keeper) AssembleVault(cotx sdk.Context) (string, int64, error) { if err != nil { return "", 0, err } - sctx := ctx.GetSonrCTX(cotx) - return cid.String(), sctx.GetBlockExpiration(time.Second * 30), nil + return cid.String(), calculateBlockExpiry(cotx, time.Second*30), nil } // currentSchema returns the current schema -func (k Keeper) CurrentSchema(ctx sdk.Context) (*dwngen.Schema, error) { +func (k Keeper) currentSchema(ctx sdk.Context) (*dwngen.Schema, error) { p, err := k.Params.Get(ctx) if err != nil { return nil, err @@ -55,3 +53,9 @@ func (k Keeper) CurrentSchema(ctx sdk.Context) (*dwngen.Schema, error) { 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 fbb6d134d..b4a7ae793 100644 --- a/x/vault/keeper/querier.go +++ b/x/vault/keeper/querier.go @@ -10,14 +10,17 @@ import ( var _ types.QueryServer = Querier{} -type Querier struct { - Keeper -} +type Querier struct{ Keeper } func NewQuerier(keeper Keeper) Querier { return Querier{Keeper: keeper} } +// ╭───────────────────────────────────────────────────────────╮ +// │ Fixed Query Methods │ +// ╰───────────────────────────────────────────────────────────╯ + +// Params implements types.QueryServer. func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) @@ -42,41 +45,16 @@ func (k Querier) Schema(goCtx context.Context, req *types.QuerySchemaRequest) (* }, nil } -// SyncInitial implements types.QueryServer. -func (k Querier) SyncInitial(goCtx context.Context, req *types.SyncInitialRequest) (*types.SyncInitialResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - p, err := k.Keeper.Params.Get(ctx) - if err != nil { - return nil, err - } - c, _ := k.DIDKeeper.ResolveController(ctx, req.Did) - if c == nil { - return &types.SyncInitialResponse{ - Success: false, - Schema: p.Schema, - ChainID: ctx.ChainID(), - }, nil - } - return &types.SyncInitialResponse{ - Success: true, - Schema: p.Schema, - ChainID: ctx.ChainID(), - Address: c.SonrAddress(), - }, nil -} - -// SyncCurrent implements types.QueryServer. -func (k Querier) SyncCurrent(goCtx context.Context, req *types.SyncCurrentRequest) (*types.SyncCurrentResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.SyncCurrentResponse{}, nil -} +// ╭───────────────────────────────────────────────────────────╮ +// │ Pre-Authenticated Queries │ +// ╰───────────────────────────────────────────────────────────╯ // Allocate implements types.QueryServer. func (k Querier) Allocate(goCtx context.Context, req *types.AllocateRequest) (*types.AllocateResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // 2.Allocate the vault msg.GetSubject(), msg.GetOrigin() - cid, expiryBlock, err := k.AssembleVault(ctx) + cid, expiryBlock, err := k.assembleVault(ctx) if err != nil { return nil, err } @@ -87,3 +65,30 @@ func (k Querier) Allocate(goCtx context.Context, req *types.AllocateRequest) (*t ExpiryBlock: expiryBlock, }, nil } + +// ╭───────────────────────────────────────────────────────────╮ +// │ Authenticated Endpoints │ +// ╰───────────────────────────────────────────────────────────╯ + +// Sync implements types.QueryServer. +func (k Querier) Sync(goCtx context.Context, req *types.SyncRequest) (*types.SyncResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + p, err := k.Keeper.Params.Get(ctx) + if err != nil { + return nil, err + } + c, _ := k.DIDKeeper.ResolveController(ctx, req.Did) + if c == nil { + return &types.SyncResponse{ + Success: false, + Schema: p.Schema, + ChainID: ctx.ChainID(), + }, nil + } + return &types.SyncResponse{ + Success: true, + Schema: p.Schema, + ChainID: ctx.ChainID(), + Address: c.SonrAddress(), + }, nil +} diff --git a/x/vault/keeper/rpc.go b/x/vault/keeper/rpc.go index 8a739158a..725c6830a 100644 --- a/x/vault/keeper/rpc.go +++ b/x/vault/keeper/rpc.go @@ -3,7 +3,6 @@ package keeper import ( "context" - sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "cosmossdk.io/errors" @@ -28,21 +27,3 @@ func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams return nil, ms.k.Params.Set(ctx, msg.Params) } - -// AllocateVault implements types.MsgServer. -func (ms msgServer) AllocateVault(goCtx context.Context, msg *types.MsgAllocateVault) (*types.MsgAllocateVaultResponse, error) { - // 1.Check if the service origin is valid - ctx := sdk.UnwrapSDKContext(goCtx) - - // 2.Allocate the vault msg.GetSubject(), msg.GetOrigin() - cid, expiryBlock, err := ms.k.AssembleVault(ctx) - if err != nil { - return nil, err - } - - // 3.Return the response - return &types.MsgAllocateVaultResponse{ - ExpiryBlock: expiryBlock, - Cid: cid, - }, nil -} diff --git a/x/vault/types/codec.go b/x/vault/types/codec.go index 991711e70..550adfc39 100644 --- a/x/vault/types/codec.go +++ b/x/vault/types/codec.go @@ -23,7 +23,6 @@ func init() { // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgUpdateParams{}, ModuleName+"/MsgUpdateParams", nil) - cdc.RegisterConcrete(&MsgAllocateVault{}, ModuleName+"/MsgAllocateVault", nil) } func RegisterInterfaces(registry types.InterfaceRegistry) { @@ -32,7 +31,6 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgUpdateParams{}, - &MsgAllocateVault{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/vault/types/msgs.go b/x/vault/types/msgs.go index 092984344..294eedd9a 100644 --- a/x/vault/types/msgs.go +++ b/x/vault/types/msgs.go @@ -7,6 +7,10 @@ import ( var _ sdk.Msg = &MsgUpdateParams{} +// ╭──────────────────────────────────────────────────────╮ +// │ MsgUpdateParams │ +// ╰──────────────────────────────────────────────────────╯ + // NewMsgUpdateParams creates new instance of MsgUpdateParams func NewMsgUpdateParams( sender sdk.Address, @@ -45,36 +49,3 @@ func (msg *MsgUpdateParams) Validate() error { return msg.Params.Validate() } - -// -// [AllocateVault] -// - -// NewMsgAllocateVault creates a new instance of MsgAllocateVault -func NewMsgAllocateVault( - sender sdk.Address, -) (*MsgAllocateVault, error) { - return &MsgAllocateVault{}, nil -} - -// GetSigners returns the expected signers for a MsgUpdateParams message. -func (msg *MsgAllocateVault) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} - -// Route returns the name of the module -func (msg MsgAllocateVault) Route() string { return ModuleName } - -// Type returns the the action -func (msg MsgAllocateVault) Type() string { return "allocate_vault" } - -// GetSignBytes implements the LegacyMsg interface. -func (msg MsgAllocateVault) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) -} - -// Vaalidate does a sanity check on the provided data. -func (msg *MsgAllocateVault) Validate() error { - return nil -} diff --git a/x/vault/types/query.pb.go b/x/vault/types/query.pb.go index 92f404eef..0f63c611a 100644 --- a/x/vault/types/query.pb.go +++ b/x/vault/types/query.pb.go @@ -325,22 +325,22 @@ func (m *AllocateResponse) GetExpiryBlock() int64 { } // SyncRequest is the request type for the Sync RPC method. -type SyncInitialRequest struct { +type SyncRequest struct { Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } -func (m *SyncInitialRequest) Reset() { *m = SyncInitialRequest{} } -func (m *SyncInitialRequest) String() string { return proto.CompactTextString(m) } -func (*SyncInitialRequest) ProtoMessage() {} -func (*SyncInitialRequest) Descriptor() ([]byte, []int) { +func (m *SyncRequest) Reset() { *m = SyncRequest{} } +func (m *SyncRequest) String() string { return proto.CompactTextString(m) } +func (*SyncRequest) ProtoMessage() {} +func (*SyncRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e6d49a2800ab3e4b, []int{6} } -func (m *SyncInitialRequest) XXX_Unmarshal(b []byte) error { +func (m *SyncRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SyncInitialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SyncInitialRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_SyncRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -350,27 +350,27 @@ func (m *SyncInitialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *SyncInitialRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncInitialRequest.Merge(m, src) +func (m *SyncRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncRequest.Merge(m, src) } -func (m *SyncInitialRequest) XXX_Size() int { +func (m *SyncRequest) XXX_Size() int { return m.Size() } -func (m *SyncInitialRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SyncInitialRequest.DiscardUnknown(m) +func (m *SyncRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SyncRequest.DiscardUnknown(m) } -var xxx_messageInfo_SyncInitialRequest proto.InternalMessageInfo +var xxx_messageInfo_SyncRequest proto.InternalMessageInfo -func (m *SyncInitialRequest) GetDid() string { +func (m *SyncRequest) GetDid() string { if m != nil { return m.Did } return "" } -// SyncInitialResponse is the response type for the Sync RPC method. -type SyncInitialResponse struct { +// SyncResponse is the response type for the Sync RPC method. +type SyncResponse 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 +380,18 @@ type SyncInitialResponse struct { ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` } -func (m *SyncInitialResponse) Reset() { *m = SyncInitialResponse{} } -func (m *SyncInitialResponse) String() string { return proto.CompactTextString(m) } -func (*SyncInitialResponse) ProtoMessage() {} -func (*SyncInitialResponse) Descriptor() ([]byte, []int) { +func (m *SyncResponse) Reset() { *m = SyncResponse{} } +func (m *SyncResponse) String() string { return proto.CompactTextString(m) } +func (*SyncResponse) ProtoMessage() {} +func (*SyncResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e6d49a2800ab3e4b, []int{7} } -func (m *SyncInitialResponse) XXX_Unmarshal(b []byte) error { +func (m *SyncResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SyncInitialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SyncInitialResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_SyncResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -401,157 +401,40 @@ func (m *SyncInitialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *SyncInitialResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncInitialResponse.Merge(m, src) +func (m *SyncResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncResponse.Merge(m, src) } -func (m *SyncInitialResponse) XXX_Size() int { +func (m *SyncResponse) XXX_Size() int { return m.Size() } -func (m *SyncInitialResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SyncInitialResponse.DiscardUnknown(m) +func (m *SyncResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SyncResponse.DiscardUnknown(m) } -var xxx_messageInfo_SyncInitialResponse proto.InternalMessageInfo +var xxx_messageInfo_SyncResponse proto.InternalMessageInfo -func (m *SyncInitialResponse) GetSuccess() bool { +func (m *SyncResponse) GetSuccess() bool { if m != nil { return m.Success } return false } -func (m *SyncInitialResponse) GetSchema() *Schema { +func (m *SyncResponse) GetSchema() *Schema { if m != nil { return m.Schema } return nil } -func (m *SyncInitialResponse) GetAddress() string { +func (m *SyncResponse) GetAddress() string { if m != nil { return m.Address } return "" } -func (m *SyncInitialResponse) GetChainID() string { - if m != nil { - return m.ChainID - } - return "" -} - -// SyncCurrentRequest is the request type for the Sync RPC method. -type SyncCurrentRequest struct { - Macaroon string `protobuf:"bytes,1,opt,name=macaroon,proto3" json:"macaroon,omitempty"` -} - -func (m *SyncCurrentRequest) Reset() { *m = SyncCurrentRequest{} } -func (m *SyncCurrentRequest) String() string { return proto.CompactTextString(m) } -func (*SyncCurrentRequest) ProtoMessage() {} -func (*SyncCurrentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e6d49a2800ab3e4b, []int{8} -} -func (m *SyncCurrentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SyncCurrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SyncCurrentRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SyncCurrentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncCurrentRequest.Merge(m, src) -} -func (m *SyncCurrentRequest) XXX_Size() int { - return m.Size() -} -func (m *SyncCurrentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SyncCurrentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SyncCurrentRequest proto.InternalMessageInfo - -func (m *SyncCurrentRequest) GetMacaroon() string { - if m != nil { - return m.Macaroon - } - return "" -} - -// SyncCurrentResponse is the response type for the Sync RPC method. -type SyncCurrentResponse 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"` - // Address is the address of the calling DID. - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - // ChainID is the chain ID of the current network. - ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` -} - -func (m *SyncCurrentResponse) Reset() { *m = SyncCurrentResponse{} } -func (m *SyncCurrentResponse) String() string { return proto.CompactTextString(m) } -func (*SyncCurrentResponse) ProtoMessage() {} -func (*SyncCurrentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e6d49a2800ab3e4b, []int{9} -} -func (m *SyncCurrentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SyncCurrentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SyncCurrentResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SyncCurrentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncCurrentResponse.Merge(m, src) -} -func (m *SyncCurrentResponse) XXX_Size() int { - return m.Size() -} -func (m *SyncCurrentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SyncCurrentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SyncCurrentResponse proto.InternalMessageInfo - -func (m *SyncCurrentResponse) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -func (m *SyncCurrentResponse) GetSchema() *Schema { - if m != nil { - return m.Schema - } - return nil -} - -func (m *SyncCurrentResponse) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *SyncCurrentResponse) GetChainID() string { +func (m *SyncResponse) GetChainID() string { if m != nil { return m.ChainID } @@ -565,53 +448,49 @@ func init() { proto.RegisterType((*QuerySchemaResponse)(nil), "vault.v1.QuerySchemaResponse") proto.RegisterType((*AllocateRequest)(nil), "vault.v1.AllocateRequest") proto.RegisterType((*AllocateResponse)(nil), "vault.v1.AllocateResponse") - proto.RegisterType((*SyncInitialRequest)(nil), "vault.v1.SyncInitialRequest") - proto.RegisterType((*SyncInitialResponse)(nil), "vault.v1.SyncInitialResponse") - proto.RegisterType((*SyncCurrentRequest)(nil), "vault.v1.SyncCurrentRequest") - proto.RegisterType((*SyncCurrentResponse)(nil), "vault.v1.SyncCurrentResponse") + proto.RegisterType((*SyncRequest)(nil), "vault.v1.SyncRequest") + proto.RegisterType((*SyncResponse)(nil), "vault.v1.SyncResponse") } func init() { proto.RegisterFile("vault/v1/query.proto", fileDescriptor_e6d49a2800ab3e4b) } var fileDescriptor_e6d49a2800ab3e4b = []byte{ - // 580 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x54, 0x41, 0x6f, 0xd3, 0x30, - 0x18, 0x6d, 0xda, 0xad, 0x74, 0x2e, 0x12, 0x95, 0x57, 0x55, 0x21, 0xda, 0xa2, 0x11, 0x21, 0xd4, - 0x0b, 0x0d, 0x1b, 0x77, 0x10, 0x1b, 0x97, 0xdd, 0xa0, 0x13, 0x17, 0x24, 0x54, 0xb9, 0xae, 0xd5, - 0x7a, 0xa4, 0x76, 0x66, 0x3b, 0xd5, 0x7a, 0x43, 0xdc, 0x91, 0x90, 0xb8, 0xf2, 0x83, 0x38, 0x4e, - 0xe2, 0xc2, 0x11, 0xb5, 0xfc, 0x10, 0x14, 0xdb, 0x49, 0x9a, 0xb6, 0x83, 0xe3, 0x2e, 0x55, 0xbe, - 0xf7, 0x7d, 0x7e, 0xcf, 0xcf, 0x7a, 0x5f, 0x41, 0x7b, 0x86, 0x92, 0x48, 0x85, 0xb3, 0xe3, 0xf0, - 0x2a, 0x21, 0x62, 0xde, 0x8b, 0x05, 0x57, 0x1c, 0x36, 0x34, 0xda, 0x9b, 0x1d, 0x7b, 0x07, 0x63, - 0xce, 0xc7, 0x11, 0x09, 0x51, 0x4c, 0x43, 0xc4, 0x18, 0x57, 0x48, 0x51, 0xce, 0xa4, 0x99, 0xf3, - 0x3a, 0xf9, 0xe9, 0x31, 0x61, 0x44, 0x52, 0x8b, 0x07, 0x6d, 0x00, 0xdf, 0xa6, 0x74, 0x6f, 0x90, - 0x40, 0x53, 0xd9, 0x27, 0x57, 0x09, 0x91, 0x2a, 0x78, 0x09, 0xf6, 0x4b, 0xa8, 0x8c, 0x39, 0x93, - 0x04, 0x76, 0x41, 0x3d, 0xd6, 0x88, 0xeb, 0x1c, 0x39, 0xdd, 0xe6, 0x49, 0xab, 0x97, 0xa9, 0xf7, - 0xec, 0xa4, 0xed, 0xe7, 0xb4, 0x17, 0x78, 0x42, 0xa6, 0x68, 0x9d, 0x36, 0x43, 0x0b, 0x5a, 0xa9, - 0x91, 0x4d, 0x5a, 0x3b, 0x69, 0xfb, 0xc1, 0x19, 0x78, 0xf0, 0x2a, 0x8a, 0x38, 0x46, 0x8a, 0x58, - 0x4e, 0xd8, 0x01, 0x75, 0x2e, 0xe8, 0x98, 0x32, 0x7d, 0x78, 0xaf, 0x6f, 0x2b, 0xe8, 0x82, 0x7b, - 0x32, 0x19, 0x5e, 0x12, 0xac, 0xdc, 0xaa, 0x6e, 0x64, 0x65, 0xf0, 0xdd, 0x01, 0xad, 0x82, 0xc5, - 0xde, 0x41, 0x8f, 0x63, 0x4c, 0xa4, 0xf1, 0xd6, 0xe8, 0x67, 0x25, 0x6c, 0x81, 0x1a, 0xa6, 0x23, - 0x4b, 0x92, 0x7e, 0x42, 0x0f, 0x34, 0xa6, 0x08, 0x23, 0xc1, 0x39, 0x73, 0x6b, 0x1a, 0xce, 0x6b, - 0x78, 0x08, 0x40, 0x9c, 0x0c, 0x23, 0x8a, 0x07, 0x89, 0xa0, 0xee, 0x8e, 0xee, 0xee, 0x19, 0xe4, - 0x9d, 0xa0, 0xf0, 0x11, 0xb8, 0x4f, 0xae, 0x63, 0x2a, 0xe6, 0x83, 0x61, 0xc4, 0xf1, 0x47, 0x77, - 0xf7, 0xc8, 0xe9, 0xd6, 0xfa, 0x4d, 0x83, 0x9d, 0xa6, 0x50, 0xf0, 0x04, 0xc0, 0x8b, 0x39, 0xc3, - 0xe7, 0x8c, 0x2a, 0x8a, 0xa2, 0xcc, 0x66, 0x0b, 0xd4, 0x46, 0x74, 0x64, 0x3d, 0xa6, 0x9f, 0xc1, - 0x17, 0x07, 0xec, 0x97, 0x06, 0xff, 0xeb, 0xa4, 0x78, 0xe7, 0xea, 0xbf, 0xdf, 0x39, 0xe5, 0x40, - 0xa3, 0x91, 0x48, 0x39, 0x8c, 0xc1, 0xac, 0x4c, 0x3b, 0x78, 0x82, 0x28, 0x3b, 0x7f, 0x6d, 0xcd, - 0x65, 0x65, 0xf0, 0xcc, 0xdc, 0xfb, 0x2c, 0x11, 0x82, 0x30, 0x95, 0xdd, 0x7b, 0xf5, 0xad, 0x9c, - 0xf2, 0x5b, 0xe5, 0x0e, 0xf2, 0x23, 0x77, 0xeb, 0xe0, 0xe4, 0xd3, 0x0e, 0xd8, 0xd5, 0xf9, 0x84, - 0x03, 0x50, 0x37, 0x81, 0x86, 0x07, 0x85, 0xc2, 0xe6, 0x9e, 0x78, 0x87, 0xb7, 0x74, 0x8d, 0x91, - 0xc0, 0xfd, 0xfc, 0xf3, 0xcf, 0xb7, 0x2a, 0x84, 0xad, 0x30, 0xdf, 0x3e, 0xb3, 0x1f, 0xa9, 0x80, - 0xb9, 0xf0, 0x86, 0x40, 0x69, 0x63, 0x36, 0x04, 0xca, 0x9b, 0xb3, 0x4d, 0xc0, 0xfa, 0xff, 0x00, - 0x1a, 0x59, 0xc6, 0xe1, 0xc3, 0x82, 0x64, 0x6d, 0x7b, 0x3c, 0x6f, 0x5b, 0xcb, 0x92, 0x7b, 0x9a, - 0xbc, 0x1d, 0xc0, 0x82, 0x1c, 0x65, 0x94, 0x97, 0xa0, 0xb9, 0x92, 0xbd, 0x55, 0x13, 0x9b, 0xd9, - 0x5d, 0x35, 0xb1, 0x25, 0xb0, 0x81, 0xaf, 0x75, 0xdc, 0xa0, 0xb3, 0x62, 0x62, 0xce, 0xf0, 0x53, - 0x6a, 0xc9, 0xad, 0x96, 0x4d, 0xc9, 0xba, 0x56, 0x39, 0x6f, 0xeb, 0x5a, 0x6b, 0xd1, 0xba, 0x55, - 0x0b, 0x9b, 0xb9, 0xd3, 0x17, 0x3f, 0x16, 0xbe, 0x73, 0xb3, 0xf0, 0x9d, 0xdf, 0x0b, 0xdf, 0xf9, - 0xba, 0xf4, 0x2b, 0x37, 0x4b, 0xbf, 0xf2, 0x6b, 0xe9, 0x57, 0xde, 0x3f, 0x1e, 0x53, 0x35, 0x49, - 0x86, 0x3d, 0xcc, 0xa7, 0x21, 0x67, 0x92, 0x33, 0x11, 0xea, 0x9f, 0x6b, 0xcb, 0xa4, 0xe6, 0x31, - 0x91, 0xc3, 0xba, 0xfe, 0x57, 0x7d, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x30, 0x93, 0x81, - 0xad, 0x05, 0x00, 0x00, + // 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, 0x8b, 0x13, + 0x3c, 0x91, 0x3d, 0x7a, 0x96, 0x52, 0xa9, 0x82, 0x17, 0x70, 0x6f, 0x09, 0x95, 0xb1, 0xe0, 0x92, + 0xa2, 0x0e, 0xd4, 0x63, 0x8d, 0xb8, 0xce, 0xbe, 0xd3, 0x69, 0x1e, 0xb5, 0xba, 0x85, 0x7a, 0xd7, + 0x4e, 0xda, 0xfe, 0x82, 0xf6, 0x84, 0x8c, 0xe9, 0x04, 0xaf, 0xd2, 0x16, 0x68, 0x49, 0x2b, 0x35, + 0xb2, 0x4e, 0x6b, 0x27, 0x6d, 0x3f, 0x78, 0x05, 0x77, 0x5f, 0x46, 0x91, 0x20, 0x58, 0x51, 0xcb, + 0x89, 0xda, 0x50, 0x17, 0x09, 0x1b, 0x31, 0xae, 0x0f, 0x6f, 0xf5, 0x6c, 0x85, 0x5c, 0xb8, 0x23, + 0xd3, 0xc1, 0x07, 0x4a, 0x94, 0x5b, 0xd5, 0x8d, 0xa2, 0x0c, 0xbe, 0x3b, 0xd0, 0x2a, 0x59, 0xec, + 0x1d, 0xf4, 0x38, 0x21, 0x54, 0x1a, 0x6f, 0x8d, 0x5e, 0x51, 0xa2, 0x16, 0xd4, 0x08, 0x1b, 0x5a, + 0x92, 0xfc, 0x13, 0x79, 0xd0, 0x98, 0x60, 0x82, 0x13, 0x21, 0xb8, 0x5b, 0xd3, 0xf0, 0xa2, 0x46, + 0x7b, 0x00, 0x71, 0x3a, 0x88, 0x18, 0xe9, 0xa7, 0x09, 0x73, 0x37, 0x74, 0x77, 0xcb, 0x20, 0xa7, + 0x09, 0x43, 0x8f, 0x60, 0x9b, 0x9e, 0xc7, 0x2c, 0xc9, 0xfa, 0x83, 0x48, 0x90, 0x8f, 0xee, 0xe6, + 0xbe, 0xd3, 0xa9, 0xf5, 0x9a, 0x06, 0x3b, 0xce, 0xa1, 0xe0, 0x21, 0x34, 0x4f, 0x32, 0x4e, 0x0a, + 0x7f, 0x2d, 0xa8, 0x0d, 0xd9, 0xd0, 0x9a, 0xcb, 0x3f, 0x83, 0xcf, 0x0e, 0x6c, 0x9b, 0x89, 0x5b, + 0xef, 0x5e, 0xbe, 0x6c, 0xf5, 0xff, 0x2f, 0x9b, 0x73, 0xe0, 0xe1, 0x30, 0xc9, 0x39, 0x8c, 0xa5, + 0xa2, 0xcc, 0x3b, 0x64, 0x8c, 0x19, 0x7f, 0xf3, 0xda, 0xda, 0x29, 0xca, 0xa3, 0xaf, 0x35, 0xd8, + 0xd4, 0xfb, 0x44, 0x7d, 0xa8, 0x9b, 0x00, 0xa0, 0xdd, 0x52, 0x61, 0x3d, 0x57, 0xde, 0xde, 0x3f, + 0xba, 0xc6, 0x48, 0xe0, 0x7e, 0xfa, 0xf9, 0xe7, 0x5b, 0x15, 0xa1, 0x56, 0xb8, 0x48, 0xab, 0xc9, + 0x53, 0x2e, 0x60, 0x2e, 0xbc, 0x26, 0xb0, 0x94, 0xb0, 0x35, 0x81, 0xe5, 0xa4, 0xdd, 0x24, 0x60, + 0xfd, 0xc7, 0xd0, 0x28, 0x32, 0x81, 0x1e, 0x94, 0x24, 0x2b, 0x69, 0xf3, 0xbc, 0x9b, 0x5a, 0x96, + 0xfc, 0x40, 0x93, 0x3f, 0x45, 0x4f, 0x4a, 0x72, 0x6c, 0x67, 0xc2, 0x0b, 0x93, 0xca, 0xcb, 0xf0, + 0xc2, 0xa6, 0xf0, 0x12, 0x9d, 0xc2, 0x46, 0xbe, 0x45, 0x74, 0xff, 0xda, 0x4e, 0xca, 0xbd, 0x7b, + 0xed, 0x55, 0xd8, 0xaa, 0xf8, 0x5a, 0xc5, 0x0d, 0xda, 0xd7, 0x2c, 0x64, 0x9c, 0x1c, 0x30, 0xce, + 0x14, 0xc3, 0xd1, 0xf1, 0xf3, 0x1f, 0x33, 0xdf, 0xb9, 0x9a, 0xf9, 0xce, 0xef, 0x99, 0xef, 0x7c, + 0x99, 0xfb, 0x95, 0xab, 0xb9, 0x5f, 0xf9, 0x35, 0xf7, 0x2b, 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, } // Reference imports to suppress errors if they are not otherwise used. @@ -636,10 +515,7 @@ type QueryClient interface { Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information - SyncInitial(ctx context.Context, in *SyncInitialRequest, opts ...grpc.CallOption) (*SyncInitialResponse, error) - // SyncCurrent queries the DID document by its id. And returns the required PKL - // information - SyncCurrent(ctx context.Context, in *SyncCurrentRequest, opts ...grpc.CallOption) (*SyncCurrentResponse, error) + Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) } type queryClient struct { @@ -677,18 +553,9 @@ func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts .. return out, nil } -func (c *queryClient) SyncInitial(ctx context.Context, in *SyncInitialRequest, opts ...grpc.CallOption) (*SyncInitialResponse, error) { - out := new(SyncInitialResponse) - err := c.cc.Invoke(ctx, "/vault.v1.Query/SyncInitial", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SyncCurrent(ctx context.Context, in *SyncCurrentRequest, opts ...grpc.CallOption) (*SyncCurrentResponse, error) { - out := new(SyncCurrentResponse) - err := c.cc.Invoke(ctx, "/vault.v1.Query/SyncCurrent", in, out, opts...) +func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { + out := new(SyncResponse) + err := c.cc.Invoke(ctx, "/vault.v1.Query/Sync", in, out, opts...) if err != nil { return nil, err } @@ -707,10 +574,7 @@ type QueryServer interface { Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information - SyncInitial(context.Context, *SyncInitialRequest) (*SyncInitialResponse, error) - // SyncCurrent queries the DID document by its id. And returns the required PKL - // information - SyncCurrent(context.Context, *SyncCurrentRequest) (*SyncCurrentResponse, error) + Sync(context.Context, *SyncRequest) (*SyncResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -726,11 +590,8 @@ func (*UnimplementedQueryServer) Schema(ctx context.Context, req *QuerySchemaReq func (*UnimplementedQueryServer) Allocate(ctx context.Context, req *AllocateRequest) (*AllocateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") } -func (*UnimplementedQueryServer) SyncInitial(ctx context.Context, req *SyncInitialRequest) (*SyncInitialResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncInitial not implemented") -} -func (*UnimplementedQueryServer) SyncCurrent(ctx context.Context, req *SyncCurrentRequest) (*SyncCurrentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncCurrent not implemented") +func (*UnimplementedQueryServer) Sync(ctx context.Context, req *SyncRequest) (*SyncResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -791,38 +652,20 @@ func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Query_SyncInitial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SyncInitialRequest) +func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).SyncInitial(ctx, in) + return srv.(QueryServer).Sync(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vault.v1.Query/SyncInitial", + FullMethod: "/vault.v1.Query/Sync", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SyncInitial(ctx, req.(*SyncInitialRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SyncCurrent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SyncCurrentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SyncCurrent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vault.v1.Query/SyncCurrent", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SyncCurrent(ctx, req.(*SyncCurrentRequest)) + return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) } return interceptor(ctx, in, info, handler) } @@ -844,12 +687,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_Allocate_Handler, }, { - MethodName: "SyncInitial", - Handler: _Query_SyncInitial_Handler, - }, - { - MethodName: "SyncCurrent", - Handler: _Query_SyncCurrent_Handler, + MethodName: "Sync", + Handler: _Query_Sync_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -1068,7 +907,7 @@ func (m *AllocateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SyncInitialRequest) Marshal() (dAtA []byte, err error) { +func (m *SyncRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1078,12 +917,12 @@ func (m *SyncInitialRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SyncInitialRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SyncRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncInitialRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1098,7 +937,7 @@ func (m *SyncInitialRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SyncInitialResponse) Marshal() (dAtA []byte, err error) { +func (m *SyncResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1108,101 +947,12 @@ func (m *SyncInitialResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SyncInitialResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *SyncResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncInitialResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0x22 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x1a - } - if m.Schema != nil { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SyncCurrentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SyncCurrentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncCurrentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Macaroon) > 0 { - i -= len(m.Macaroon) - copy(dAtA[i:], m.Macaroon) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Macaroon))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SyncCurrentResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SyncCurrentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncCurrentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1345,7 +1095,7 @@ func (m *AllocateResponse) Size() (n int) { return n } -func (m *SyncInitialRequest) Size() (n int) { +func (m *SyncRequest) Size() (n int) { if m == nil { return 0 } @@ -1358,44 +1108,7 @@ func (m *SyncInitialRequest) Size() (n int) { return n } -func (m *SyncInitialResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Success { - n += 2 - } - if m.Schema != nil { - l = m.Schema.Size() - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChainID) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *SyncCurrentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Macaroon) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *SyncCurrentResponse) Size() (n int) { +func (m *SyncResponse) Size() (n int) { if m == nil { return 0 } @@ -1996,7 +1709,7 @@ func (m *AllocateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncInitialRequest) Unmarshal(dAtA []byte) error { +func (m *SyncRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2019,10 +1732,10 @@ func (m *SyncInitialRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SyncInitialRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SyncRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SyncInitialRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2078,7 +1791,7 @@ func (m *SyncInitialRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncInitialResponse) Unmarshal(dAtA []byte) error { +func (m *SyncResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2101,262 +1814,10 @@ func (m *SyncInitialResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SyncInitialResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SyncResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SyncInitialResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schema == nil { - m.Schema = &Schema{} - } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SyncCurrentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SyncCurrentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SyncCurrentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Macaroon", 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.Macaroon = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SyncCurrentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SyncCurrentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SyncCurrentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SyncResponse: 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 2826f259f..43ff72a40 100644 --- a/x/vault/types/query.pb.gw.go +++ b/x/vault/types/query.pb.gw.go @@ -69,19 +69,37 @@ func local_request_Query_Schema_0(ctx context.Context, marshaler runtime.Marshal } -var ( - filter_Query_Allocate_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - 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 metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + 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") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Allocate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + 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)) @@ -93,11 +111,33 @@ func local_request_Query_Allocate_0(ctx context.Context, marshaler runtime.Marsh var protoReq AllocateRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + 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") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Allocate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + 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) @@ -106,73 +146,37 @@ func local_request_Query_Allocate_0(ctx context.Context, marshaler runtime.Marsh } var ( - filter_Query_SyncInitial_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_Sync_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Query_SyncInitial_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncInitialRequest +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 metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SyncInitial_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Sync_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SyncInitial(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Sync(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_SyncInitial_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncInitialRequest +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 metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SyncInitial_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Sync_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SyncInitial(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_SyncCurrent_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_SyncCurrent_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncCurrentRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SyncCurrent_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.SyncCurrent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_SyncCurrent_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncCurrentRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SyncCurrent_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.SyncCurrent(ctx, &protoReq) + msg, err := server.Sync(ctx, &protoReq) return msg, metadata, err } @@ -229,7 +233,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("POST", pattern_Query_Allocate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Allocate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -252,7 +256,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("POST", pattern_Query_SyncInitial_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", 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 @@ -263,7 +267,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_SyncInitial_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Sync_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -271,30 +275,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_SyncInitial_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Query_SyncCurrent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_SyncCurrent_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_SyncCurrent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Sync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -379,7 +360,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("POST", pattern_Query_Allocate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Allocate_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) @@ -399,7 +380,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("POST", pattern_Query_SyncInitial_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", 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,34 +389,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_SyncInitial_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Sync_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_SyncInitial_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Query_SyncCurrent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_SyncCurrent_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_SyncCurrent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Sync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -447,11 +408,9 @@ 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}, []string{"vault", "v1", "allocate"}, "", 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_SyncInitial_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "sync-initial"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_SyncCurrent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "sync-current"}, "", 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))) ) var ( @@ -461,7 +420,5 @@ var ( forward_Query_Allocate_0 = runtime.ForwardResponseMessage - forward_Query_SyncInitial_0 = runtime.ForwardResponseMessage - - forward_Query_SyncCurrent_0 = runtime.ForwardResponseMessage + forward_Query_Sync_0 = runtime.ForwardResponseMessage ) diff --git a/x/vault/types/tx.pb.go b/x/vault/types/tx.pb.go index 02a9d66ce..6b234b963 100644 --- a/x/vault/types/tx.pb.go +++ b/x/vault/types/tx.pb.go @@ -31,144 +31,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgAllocateVault is the message type for the AllocateVault RPC. -type MsgAllocateVault struct { - // authority is the address of the service account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // subject is a unique human-defined identifier to associate with the vault. - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - // origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` -} - -func (m *MsgAllocateVault) Reset() { *m = MsgAllocateVault{} } -func (m *MsgAllocateVault) String() string { return proto.CompactTextString(m) } -func (*MsgAllocateVault) ProtoMessage() {} -func (*MsgAllocateVault) Descriptor() ([]byte, []int) { - return fileDescriptor_311d0123a4881c5c, []int{0} -} -func (m *MsgAllocateVault) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAllocateVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAllocateVault.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgAllocateVault) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAllocateVault.Merge(m, src) -} -func (m *MsgAllocateVault) XXX_Size() int { - return m.Size() -} -func (m *MsgAllocateVault) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAllocateVault.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAllocateVault proto.InternalMessageInfo - -func (m *MsgAllocateVault) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgAllocateVault) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *MsgAllocateVault) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -// MsgAllocateVaultResponse is the response type for the AllocateVault RPC. -type MsgAllocateVaultResponse struct { - // CID is the content identifier of the vault. - Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` - // ExpiryBlock is the block number at which the vault will expire. - ExpiryBlock int64 `protobuf:"varint,2,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"` - // RegistrationOptions is a json string of the - // PublicKeyCredentialCreationOptions for WebAuthn - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` - // IsLocalhost is a flag to indicate if the vault is localhost - Localhost bool `protobuf:"varint,4,opt,name=localhost,proto3" json:"localhost,omitempty"` -} - -func (m *MsgAllocateVaultResponse) Reset() { *m = MsgAllocateVaultResponse{} } -func (m *MsgAllocateVaultResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAllocateVaultResponse) ProtoMessage() {} -func (*MsgAllocateVaultResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_311d0123a4881c5c, []int{1} -} -func (m *MsgAllocateVaultResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAllocateVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAllocateVaultResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgAllocateVaultResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAllocateVaultResponse.Merge(m, src) -} -func (m *MsgAllocateVaultResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgAllocateVaultResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAllocateVaultResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAllocateVaultResponse proto.InternalMessageInfo - -func (m *MsgAllocateVaultResponse) GetCid() string { - if m != nil { - return m.Cid - } - return "" -} - -func (m *MsgAllocateVaultResponse) GetExpiryBlock() int64 { - if m != nil { - return m.ExpiryBlock - } - return 0 -} - -func (m *MsgAllocateVaultResponse) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -func (m *MsgAllocateVaultResponse) GetLocalhost() bool { - if m != nil { - return m.Localhost - } - return false -} - // MsgUpdateParams is the Msg/UpdateParams request type. // // Since: cosmos-sdk 0.47 @@ -185,7 +47,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_311d0123a4881c5c, []int{2} + return fileDescriptor_311d0123a4881c5c, []int{0} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -239,7 +101,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_311d0123a4881c5c, []int{3} + return fileDescriptor_311d0123a4881c5c, []int{1} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -269,8 +131,6 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgAllocateVault)(nil), "vault.v1.MsgAllocateVault") - proto.RegisterType((*MsgAllocateVaultResponse)(nil), "vault.v1.MsgAllocateVaultResponse") proto.RegisterType((*MsgUpdateParams)(nil), "vault.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "vault.v1.MsgUpdateParamsResponse") } @@ -278,38 +138,29 @@ func init() { func init() { proto.RegisterFile("vault/v1/tx.proto", fileDescriptor_311d0123a4881c5c) } var fileDescriptor_311d0123a4881c5c = []byte{ - // 491 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x4f, 0x6b, 0x13, 0x41, - 0x1c, 0xcd, 0x34, 0x6d, 0x6c, 0xa6, 0x55, 0xe3, 0x10, 0xda, 0xcd, 0x52, 0xd6, 0x76, 0xf1, 0x50, - 0x0a, 0xee, 0xd0, 0x0a, 0x1e, 0x3c, 0x08, 0xcd, 0xd9, 0x80, 0xac, 0xe8, 0xc1, 0x4b, 0x99, 0x6c, - 0x86, 0xc9, 0x98, 0xdd, 0xf9, 0x2d, 0x3b, 0x93, 0x90, 0xdc, 0xa4, 0x9e, 0x04, 0x0f, 0x82, 0x5f, - 0xa4, 0x07, 0xbf, 0x83, 0x3d, 0x16, 0xbd, 0x78, 0x12, 0x49, 0x84, 0x7e, 0x0d, 0xd9, 0x7f, 0x8d, - 0x89, 0xe4, 0xd2, 0xcb, 0xb2, 0xbf, 0xf7, 0xde, 0xfc, 0xde, 0xe3, 0xcd, 0xe0, 0x07, 0x23, 0x36, - 0x0c, 0x0d, 0x1d, 0x1d, 0x53, 0x33, 0xf6, 0xe2, 0x04, 0x0c, 0x90, 0xcd, 0x0c, 0xf2, 0x46, 0xc7, - 0xf6, 0x6e, 0x00, 0x3a, 0x02, 0x4d, 0x23, 0x2d, 0x52, 0x45, 0xa4, 0x45, 0x2e, 0xb1, 0x5b, 0x39, - 0x71, 0x96, 0x4d, 0x34, 0x1f, 0x0a, 0xaa, 0x29, 0x40, 0x40, 0x8e, 0xa7, 0x7f, 0x05, 0xba, 0x27, - 0x00, 0x44, 0xc8, 0x29, 0x8b, 0x25, 0x65, 0x4a, 0x81, 0x61, 0x46, 0x82, 0x2a, 0xcf, 0xec, 0xdc, - 0x84, 0x10, 0x5c, 0x71, 0x2d, 0x0b, 0xdc, 0xfd, 0x84, 0x70, 0xa3, 0xa3, 0xc5, 0x69, 0x18, 0x42, - 0xc0, 0x0c, 0x7f, 0x93, 0xaa, 0xc8, 0x53, 0x5c, 0x67, 0x43, 0xd3, 0x87, 0x44, 0x9a, 0x89, 0x85, - 0xf6, 0xd1, 0x61, 0xbd, 0x6d, 0x7d, 0xff, 0xfa, 0xb8, 0x59, 0xa4, 0x38, 0xed, 0xf5, 0x12, 0xae, - 0xf5, 0x2b, 0x93, 0x48, 0x25, 0xfc, 0xb9, 0x94, 0x58, 0xf8, 0x8e, 0x1e, 0x76, 0xdf, 0xf1, 0xc0, - 0x58, 0x6b, 0xe9, 0x29, 0xbf, 0x1c, 0xc9, 0x0e, 0xae, 0x41, 0x22, 0x85, 0x54, 0x56, 0x35, 0x23, - 0x8a, 0xe9, 0xd9, 0xbd, 0xf3, 0xeb, 0x8b, 0xa3, 0xf9, 0x06, 0xf7, 0x03, 0xc2, 0xd6, 0x72, 0x1c, - 0x9f, 0xeb, 0x18, 0x94, 0xe6, 0xa4, 0x81, 0xab, 0x81, 0xec, 0xe5, 0x81, 0xfc, 0xf4, 0x97, 0x1c, - 0xe0, 0x6d, 0x3e, 0x8e, 0x65, 0x32, 0x39, 0xeb, 0x86, 0x10, 0x0c, 0x32, 0xd7, 0xaa, 0xbf, 0x95, - 0x63, 0xed, 0x14, 0x22, 0x4d, 0xbc, 0x61, 0x60, 0xc0, 0x4b, 0xe3, 0x7c, 0x20, 0x7b, 0xb8, 0x9e, - 0x3a, 0x84, 0x7d, 0xd0, 0xc6, 0x5a, 0xdf, 0x47, 0x87, 0x9b, 0xfe, 0x1c, 0x70, 0x3f, 0x22, 0x7c, - 0xbf, 0xa3, 0xc5, 0xeb, 0xb8, 0xc7, 0x0c, 0x7f, 0xc9, 0x12, 0x16, 0xe9, 0x5b, 0x77, 0xe2, 0xe1, - 0x5a, 0x9c, 0x6d, 0xc8, 0xc2, 0x6d, 0x9d, 0x34, 0xbc, 0xf2, 0xee, 0xbd, 0x7c, 0x73, 0x7b, 0xfd, - 0xf2, 0xd7, 0xc3, 0x8a, 0x5f, 0xa8, 0xfe, 0x6b, 0xa4, 0x85, 0x77, 0x97, 0xa2, 0x94, 0x7d, 0x9c, - 0x7c, 0x43, 0xb8, 0xda, 0xd1, 0x82, 0x0c, 0xf0, 0xdd, 0xc5, 0xfb, 0xb3, 0xe7, 0x1e, 0xcb, 0x65, - 0xda, 0xee, 0x6a, 0xae, 0x5c, 0xec, 0xda, 0xe7, 0x3f, 0xfe, 0x7c, 0x59, 0x6b, 0xba, 0x84, 0xde, - 0xbc, 0x1a, 0x56, 0x08, 0xc9, 0x0b, 0xbc, 0xbd, 0xd0, 0x4b, 0x6b, 0x61, 0xdf, 0xbf, 0x94, 0x7d, - 0xb0, 0x92, 0x2a, 0x9d, 0xec, 0x8d, 0xf7, 0xd7, 0x17, 0x47, 0xa8, 0xfd, 0xfc, 0x72, 0xea, 0xa0, - 0xab, 0xa9, 0x83, 0x7e, 0x4f, 0x1d, 0xf4, 0x79, 0xe6, 0x54, 0xae, 0x66, 0x4e, 0xe5, 0xe7, 0xcc, - 0xa9, 0xbc, 0x7d, 0x24, 0xa4, 0xe9, 0x0f, 0xbb, 0x5e, 0x00, 0x11, 0x05, 0xa5, 0x41, 0x25, 0x34, - 0xfb, 0x8c, 0x8b, 0x68, 0x66, 0x12, 0x73, 0xdd, 0xad, 0x65, 0x8f, 0xf9, 0xc9, 0xdf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xc3, 0x77, 0xd8, 0x9e, 0x6b, 0x03, 0x00, 0x00, + // 338 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x50, 0x4d, 0x4b, 0x02, 0x41, + 0x18, 0xde, 0xe9, 0x43, 0x72, 0x8a, 0x3e, 0x16, 0x49, 0x5d, 0x62, 0x33, 0xe9, 0x20, 0x42, 0x3b, + 0x68, 0xd0, 0xa1, 0x43, 0x90, 0xe7, 0x84, 0x30, 0xba, 0x78, 0x89, 0x51, 0x87, 0x71, 0xc1, 0x9d, + 0x77, 0xd9, 0x77, 0x14, 0xbd, 0x45, 0xb7, 0x6e, 0xfd, 0x14, 0x0f, 0xfd, 0x08, 0x8f, 0xd2, 0xa9, + 0x53, 0x84, 0x1e, 0xfc, 0x1b, 0xe1, 0xee, 0xda, 0x92, 0xd0, 0x65, 0x98, 0xf7, 0xf9, 0x9a, 0x67, + 0x5e, 0x7a, 0x34, 0xe0, 0xfd, 0x9e, 0x66, 0x83, 0x0a, 0xd3, 0x43, 0xc7, 0x0f, 0x40, 0x83, 0xb9, + 0x13, 0x42, 0xce, 0xa0, 0x62, 0x65, 0xdb, 0x80, 0x1e, 0x20, 0xf3, 0x50, 0x2e, 0x15, 0x1e, 0xca, + 0x48, 0x62, 0xe5, 0x23, 0xe2, 0x29, 0x9c, 0x58, 0x34, 0xc4, 0x54, 0x46, 0x82, 0x84, 0x08, 0x5f, + 0xde, 0x62, 0xf4, 0x44, 0x02, 0xc8, 0x9e, 0x60, 0xdc, 0x77, 0x19, 0x57, 0x0a, 0x34, 0xd7, 0x2e, + 0xa8, 0x95, 0xe7, 0xf8, 0xb7, 0x84, 0x14, 0x4a, 0xa0, 0x1b, 0xe3, 0xc5, 0x57, 0x42, 0x0f, 0xea, + 0x28, 0x1f, 0xfd, 0x0e, 0xd7, 0xe2, 0x9e, 0x07, 0xdc, 0x43, 0xf3, 0x8a, 0xa6, 0x79, 0x5f, 0x77, + 0x21, 0x70, 0xf5, 0x28, 0x47, 0x0a, 0xa4, 0x94, 0xae, 0xe5, 0x3e, 0xde, 0x2f, 0x32, 0x71, 0x89, + 0xdb, 0x4e, 0x27, 0x10, 0x88, 0x0f, 0x3a, 0x70, 0x95, 0x6c, 0x24, 0x52, 0xd3, 0xa1, 0x29, 0x3f, + 0x4c, 0xc8, 0x6d, 0x14, 0x48, 0x69, 0xb7, 0x7a, 0xe8, 0xac, 0xbe, 0xe9, 0x44, 0xc9, 0xb5, 0xad, + 0xc9, 0xd7, 0xa9, 0xd1, 0x88, 0x55, 0xd7, 0xfb, 0x2f, 0x8b, 0x71, 0x39, 0xf1, 0x17, 0xf3, 0x34, + 0xbb, 0x56, 0xa5, 0x21, 0xd0, 0x07, 0x85, 0xa2, 0xda, 0xa4, 0x9b, 0x75, 0x94, 0xe6, 0x1d, 0xdd, + 0xfb, 0xd3, 0x34, 0x9f, 0xbc, 0xb0, 0xe6, 0xb4, 0xce, 0xfe, 0xa5, 0x56, 0xa1, 0xd6, 0xf6, 0xf3, + 0x62, 0x5c, 0x26, 0xb5, 0x9b, 0xc9, 0xcc, 0x26, 0xd3, 0x99, 0x4d, 0xbe, 0x67, 0x36, 0x79, 0x9b, + 0xdb, 0xc6, 0x74, 0x6e, 0x1b, 0x9f, 0x73, 0xdb, 0x68, 0x9e, 0x4b, 0x57, 0x77, 0xfb, 0x2d, 0xa7, + 0x0d, 0x1e, 0x03, 0x85, 0xa0, 0x02, 0x16, 0x1e, 0x43, 0x16, 0x6d, 0x53, 0x8f, 0x7c, 0x81, 0xad, + 0x54, 0xb8, 0xc9, 0xcb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xa7, 0x73, 0x6d, 0xe8, 0x01, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -324,10 +175,6 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - // AllocateVault assembles a sqlite3 database in a local directory and returns - // the CID of the database. this operation is called by services initiating a - // controller registration. - AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) // UpdateParams defines a governance operation for updating the parameters. // // Since: cosmos-sdk 0.47 @@ -342,15 +189,6 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) { - out := new(MsgAllocateVaultResponse) - err := c.cc.Invoke(ctx, "/vault.v1.Msg/AllocateVault", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, "/vault.v1.Msg/UpdateParams", in, out, opts...) @@ -362,10 +200,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts // MsgServer is the server API for Msg service. type MsgServer interface { - // AllocateVault assembles a sqlite3 database in a local directory and returns - // the CID of the database. this operation is called by services initiating a - // controller registration. - AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) // UpdateParams defines a governance operation for updating the parameters. // // Since: cosmos-sdk 0.47 @@ -376,9 +210,6 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) AllocateVault(ctx context.Context, req *MsgAllocateVault) (*MsgAllocateVaultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented") -} func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } @@ -387,24 +218,6 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAllocateVault) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).AllocateVault(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vault.v1.Msg/AllocateVault", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateParams) if err := dec(in); err != nil { @@ -427,10 +240,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "vault.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "AllocateVault", - Handler: _Msg_AllocateVault_Handler, - }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, @@ -440,102 +249,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "vault/v1/tx.proto", } -func (m *MsgAllocateVault) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgAllocateVault) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgAllocateVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintTx(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgAllocateVaultResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgAllocateVaultResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgAllocateVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Localhost { - i-- - if m.Localhost { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Token) > 0 { - i -= len(m.Token) - copy(dAtA[i:], m.Token) - i = encodeVarintTx(dAtA, i, uint64(len(m.Token))) - i-- - dAtA[i] = 0x1a - } - if m.ExpiryBlock != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.ExpiryBlock)) - i-- - dAtA[i] = 0x10 - } - if len(m.Cid) > 0 { - i -= len(m.Cid) - copy(dAtA[i:], m.Cid) - i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -610,50 +323,6 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgAllocateVault) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgAllocateVaultResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Cid) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.ExpiryBlock != 0 { - n += 1 + sovTx(uint64(m.ExpiryBlock)) - } - l = len(m.Token) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Localhost { - n += 2 - } - return n -} - func (m *MsgUpdateParams) Size() (n int) { if m == nil { return 0 @@ -684,305 +353,6 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgAllocateVault) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgAllocateVault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAllocateVault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgAllocateVaultResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgAllocateVaultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAllocateVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiryBlock", wireType) - } - m.ExpiryBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiryBlock |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Localhost", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Localhost = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/vault/types/tx.pb.gw.go b/x/vault/types/tx.pb.gw.go deleted file mode 100644 index fe2439e86..000000000 --- a/x/vault/types/tx.pb.gw.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: vault/v1/tx.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -var ( - filter_Msg_AllocateVault_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Msg_AllocateVault_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgAllocateVault - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_AllocateVault_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AllocateVault(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Msg_AllocateVault_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgAllocateVault - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_AllocateVault_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AllocateVault(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". -// UnaryRPC :call MsgServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. -func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { - - mux.Handle("POST", pattern_Msg_AllocateVault_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Msg_AllocateVault_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_AllocateVault_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterMsgHandler(ctx, mux, conn) -} - -// RegisterMsgHandler registers the http handlers for service Msg to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) -} - -// RegisterMsgHandlerClient registers the http handlers for service Msg -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "MsgClient" to call the correct interceptors. -func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { - - mux.Handle("POST", pattern_Msg_AllocateVault_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Msg_AllocateVault_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_AllocateVault_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Msg_AllocateVault_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "allocate"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Msg_AllocateVault_0 = runtime.ForwardResponseMessage -)