diff --git a/.air.toml b/.air.toml new file mode 100644 index 000000000..d19d21810 --- /dev/null +++ b/.air.toml @@ -0,0 +1,50 @@ +root = "." +testdata_dir = "testdata" +tmp_dir = "tmp" + +[build] +delay = 1000 +cmd = "devbox run build:motr" +exclude_dir = ["assets", "tmp", "vendor", "testdata"] +exclude_file = [] +exclude_regex = ["_test.go"] +exclude_unchanged = true +follow_symlink = false +full_bin = "bunx wrangler -c ./cmd/motr/wrangler.toml dev" +include_dir = ["cmd/dwn", "cmd/motr", "internal", "models", "pkl"] +include_ext = ["go", "templ", "html", "pkl", "js", "mjs"] +include_file = [ + "wrangler.toml", + "Dockerfile", + ".goreleaser.yaml", + "go.mod", + "devbox.json", + ".air.toml", +] +kill_delay = "2s" +log = "build-errors.log" +poll = false +poll_interval = 0 +post_cmd = [] +pre_cmd = ["templ generate"] +rerun = false +rerun_delay = 500 +send_interrupt = false +stop_on_error = false + +[color] +build = "yellow" +main = "magenta" +runner = "green" +watcher = "cyan" + +[log] +main_only = true +time = true + +[misc] +clean_on_exit = true + +[screen] +clear_on_rebuild = true +keep_scroll = true diff --git a/Makefile b/Makefile index 632b87d35..028dca694 100644 --- a/Makefile +++ b/Makefile @@ -299,18 +299,15 @@ sh-testnet: mod-tidy ### templ & vault ### ############################################################################### -.PHONY: templ vault - -templ: - @echo "Generating templ files" - templ generate +.PHONY: dwn motr dwn: - @echo "Generating go-pkl files" - go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/txns.pkl - go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/vault.pkl - @echo "Building vault.wasm" - GOOS=js GOARCH=wasm go build -o ./internal/vfs/dwn.wasm ./cmd/dwn/main.go + @echo "(dwn) Building dwn.wasm -> IPFS Vault" + GOOS=js GOARCH=wasm go build -o ./internal/vfs/dwn.wasm ./cmd/dwn + +motr: + @echo "(motr) Building app.wasm -> Deploy to Cloudflare Workers" + GOOS=js GOARCH=wasm go build -o ./motr/build/app.wasm ./motr ############################################################################### ### help ### diff --git a/api/did/v1/accounts.pulsar.go b/api/did/v1/accounts.pulsar.go deleted file mode 100644 index 44bb1d4a2..000000000 --- a/api/did/v1/accounts.pulsar.go +++ /dev/null @@ -1,1675 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package didv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_BtcAccount protoreflect.MessageDescriptor -) - -func init() { - file_did_v1_accounts_proto_init() - md_BtcAccount = File_did_v1_accounts_proto.Messages().ByName("BtcAccount") -} - -var _ protoreflect.Message = (*fastReflection_BtcAccount)(nil) - -type fastReflection_BtcAccount BtcAccount - -func (x *BtcAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_BtcAccount)(x) -} - -func (x *BtcAccount) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_accounts_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_BtcAccount_messageType fastReflection_BtcAccount_messageType -var _ protoreflect.MessageType = fastReflection_BtcAccount_messageType{} - -type fastReflection_BtcAccount_messageType struct{} - -func (x fastReflection_BtcAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_BtcAccount)(nil) -} -func (x fastReflection_BtcAccount_messageType) New() protoreflect.Message { - return new(fastReflection_BtcAccount) -} -func (x fastReflection_BtcAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BtcAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BtcAccount) Descriptor() protoreflect.MessageDescriptor { - return md_BtcAccount -} - -// 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_BtcAccount) Type() protoreflect.MessageType { - return _fastReflection_BtcAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BtcAccount) New() protoreflect.Message { - return new(fastReflection_BtcAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BtcAccount) Interface() protoreflect.ProtoMessage { - return (*BtcAccount)(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_BtcAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_BtcAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BtcAccount")) - } - panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BtcAccount")) - } - panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BtcAccount")) - } - panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BtcAccount")) - } - panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BtcAccount")) - } - panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BtcAccount")) - } - panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.BtcAccount", 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_BtcAccount) 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_BtcAccount) 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_BtcAccount) 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_BtcAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BtcAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BtcAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BtcAccount) - 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: BtcAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BtcAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EthAccount protoreflect.MessageDescriptor -) - -func init() { - file_did_v1_accounts_proto_init() - md_EthAccount = File_did_v1_accounts_proto.Messages().ByName("EthAccount") -} - -var _ protoreflect.Message = (*fastReflection_EthAccount)(nil) - -type fastReflection_EthAccount EthAccount - -func (x *EthAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_EthAccount)(x) -} - -func (x *EthAccount) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_accounts_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_EthAccount_messageType fastReflection_EthAccount_messageType -var _ protoreflect.MessageType = fastReflection_EthAccount_messageType{} - -type fastReflection_EthAccount_messageType struct{} - -func (x fastReflection_EthAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_EthAccount)(nil) -} -func (x fastReflection_EthAccount_messageType) New() protoreflect.Message { - return new(fastReflection_EthAccount) -} -func (x fastReflection_EthAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EthAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EthAccount) Descriptor() protoreflect.MessageDescriptor { - return md_EthAccount -} - -// 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_EthAccount) Type() protoreflect.MessageType { - return _fastReflection_EthAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EthAccount) New() protoreflect.Message { - return new(fastReflection_EthAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EthAccount) Interface() protoreflect.ProtoMessage { - return (*EthAccount)(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_EthAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EthAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.EthAccount")) - } - panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.EthAccount")) - } - panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.EthAccount")) - } - panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.EthAccount")) - } - panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.EthAccount")) - } - panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.EthAccount")) - } - panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.EthAccount", 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_EthAccount) 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_EthAccount) 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_EthAccount) 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_EthAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EthAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EthAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EthAccount) - 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: EthAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EthAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_IBCAccount protoreflect.MessageDescriptor -) - -func init() { - file_did_v1_accounts_proto_init() - md_IBCAccount = File_did_v1_accounts_proto.Messages().ByName("IBCAccount") -} - -var _ protoreflect.Message = (*fastReflection_IBCAccount)(nil) - -type fastReflection_IBCAccount IBCAccount - -func (x *IBCAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_IBCAccount)(x) -} - -func (x *IBCAccount) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_accounts_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_IBCAccount_messageType fastReflection_IBCAccount_messageType -var _ protoreflect.MessageType = fastReflection_IBCAccount_messageType{} - -type fastReflection_IBCAccount_messageType struct{} - -func (x fastReflection_IBCAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_IBCAccount)(nil) -} -func (x fastReflection_IBCAccount_messageType) New() protoreflect.Message { - return new(fastReflection_IBCAccount) -} -func (x fastReflection_IBCAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_IBCAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_IBCAccount) Descriptor() protoreflect.MessageDescriptor { - return md_IBCAccount -} - -// 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_IBCAccount) Type() protoreflect.MessageType { - return _fastReflection_IBCAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_IBCAccount) New() protoreflect.Message { - return new(fastReflection_IBCAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_IBCAccount) Interface() protoreflect.ProtoMessage { - return (*IBCAccount)(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_IBCAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_IBCAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.IBCAccount")) - } - panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.IBCAccount")) - } - panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.IBCAccount")) - } - panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.IBCAccount")) - } - panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.IBCAccount")) - } - panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.IBCAccount")) - } - panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.IBCAccount", 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_IBCAccount) 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_IBCAccount) 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_IBCAccount) 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_IBCAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*IBCAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*IBCAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*IBCAccount) - 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: IBCAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IBCAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SnrAccount protoreflect.MessageDescriptor -) - -func init() { - file_did_v1_accounts_proto_init() - md_SnrAccount = File_did_v1_accounts_proto.Messages().ByName("SnrAccount") -} - -var _ protoreflect.Message = (*fastReflection_SnrAccount)(nil) - -type fastReflection_SnrAccount SnrAccount - -func (x *SnrAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_SnrAccount)(x) -} - -func (x *SnrAccount) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_accounts_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SnrAccount_messageType fastReflection_SnrAccount_messageType -var _ protoreflect.MessageType = fastReflection_SnrAccount_messageType{} - -type fastReflection_SnrAccount_messageType struct{} - -func (x fastReflection_SnrAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_SnrAccount)(nil) -} -func (x fastReflection_SnrAccount_messageType) New() protoreflect.Message { - return new(fastReflection_SnrAccount) -} -func (x fastReflection_SnrAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SnrAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SnrAccount) Descriptor() protoreflect.MessageDescriptor { - return md_SnrAccount -} - -// 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_SnrAccount) Type() protoreflect.MessageType { - return _fastReflection_SnrAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SnrAccount) New() protoreflect.Message { - return new(fastReflection_SnrAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SnrAccount) Interface() protoreflect.ProtoMessage { - return (*SnrAccount)(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_SnrAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_SnrAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SnrAccount")) - } - panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SnrAccount")) - } - panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SnrAccount")) - } - panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SnrAccount")) - } - panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SnrAccount")) - } - panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SnrAccount")) - } - panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.SnrAccount", 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_SnrAccount) 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_SnrAccount) 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_SnrAccount) 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_SnrAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SnrAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SnrAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SnrAccount) - 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: SnrAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SnrAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: did/v1/accounts.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type BtcAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *BtcAccount) Reset() { - *x = BtcAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_accounts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BtcAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BtcAccount) ProtoMessage() {} - -// Deprecated: Use BtcAccount.ProtoReflect.Descriptor instead. -func (*BtcAccount) Descriptor() ([]byte, []int) { - return file_did_v1_accounts_proto_rawDescGZIP(), []int{0} -} - -type EthAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *EthAccount) Reset() { - *x = EthAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_accounts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthAccount) ProtoMessage() {} - -// Deprecated: Use EthAccount.ProtoReflect.Descriptor instead. -func (*EthAccount) Descriptor() ([]byte, []int) { - return file_did_v1_accounts_proto_rawDescGZIP(), []int{1} -} - -type IBCAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *IBCAccount) Reset() { - *x = IBCAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_accounts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IBCAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IBCAccount) ProtoMessage() {} - -// Deprecated: Use IBCAccount.ProtoReflect.Descriptor instead. -func (*IBCAccount) Descriptor() ([]byte, []int) { - return file_did_v1_accounts_proto_rawDescGZIP(), []int{2} -} - -type SnrAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SnrAccount) Reset() { - *x = SnrAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_accounts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SnrAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SnrAccount) ProtoMessage() {} - -// Deprecated: Use SnrAccount.ProtoReflect.Descriptor instead. -func (*SnrAccount) Descriptor() ([]byte, []int) { - return file_did_v1_accounts_proto_rawDescGZIP(), []int{3} -} - -var File_did_v1_accounts_proto protoreflect.FileDescriptor - -var file_did_v1_accounts_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x22, - 0x0c, 0x0a, 0x0a, 0x42, 0x74, 0x63, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0c, 0x0a, - 0x0a, 0x45, 0x74, 0x68, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0c, 0x0a, 0x0a, 0x49, - 0x42, 0x43, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0c, 0x0a, 0x0a, 0x53, 0x6e, 0x72, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x7d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 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, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, - 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_did_v1_accounts_proto_rawDescOnce sync.Once - file_did_v1_accounts_proto_rawDescData = file_did_v1_accounts_proto_rawDesc -) - -func file_did_v1_accounts_proto_rawDescGZIP() []byte { - file_did_v1_accounts_proto_rawDescOnce.Do(func() { - file_did_v1_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_accounts_proto_rawDescData) - }) - return file_did_v1_accounts_proto_rawDescData -} - -var file_did_v1_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_did_v1_accounts_proto_goTypes = []interface{}{ - (*BtcAccount)(nil), // 0: did.v1.BtcAccount - (*EthAccount)(nil), // 1: did.v1.EthAccount - (*IBCAccount)(nil), // 2: did.v1.IBCAccount - (*SnrAccount)(nil), // 3: did.v1.SnrAccount -} -var file_did_v1_accounts_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_did_v1_accounts_proto_init() } -func file_did_v1_accounts_proto_init() { - if File_did_v1_accounts_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_did_v1_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BtcAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IBCAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SnrAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_did_v1_accounts_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_did_v1_accounts_proto_goTypes, - DependencyIndexes: file_did_v1_accounts_proto_depIdxs, - MessageInfos: file_did_v1_accounts_proto_msgTypes, - }.Build() - File_did_v1_accounts_proto = out.File - file_did_v1_accounts_proto_rawDesc = nil - file_did_v1_accounts_proto_goTypes = nil - file_did_v1_accounts_proto_depIdxs = nil -} diff --git a/api/did/v1/genesis.pulsar.go b/api/did/v1/genesis.pulsar.go index 0ea43ccb7..565535d86 100644 --- a/api/did/v1/genesis.pulsar.go +++ b/api/did/v1/genesis.pulsar.go @@ -604,49 +604,49 @@ func (x *_Params_3_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_Params_8_list)(nil) +var _ protoreflect.List = (*_Params_7_list)(nil) -type _Params_8_list struct { +type _Params_7_list struct { list *[]string } -func (x *_Params_8_list) Len() int { +func (x *_Params_7_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Params_8_list) Get(i int) protoreflect.Value { +func (x *_Params_7_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_Params_8_list) Set(i int, value protoreflect.Value) { +func (x *_Params_7_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_Params_8_list) Append(value protoreflect.Value) { +func (x *_Params_7_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_Params_8_list) AppendMutable() protoreflect.Value { +func (x *_Params_7_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message Params at list field AttestationFormats as it is not of Message kind")) } -func (x *_Params_8_list) Truncate(n int) { +func (x *_Params_7_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_Params_8_list) NewElement() protoreflect.Value { +func (x *_Params_7_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_Params_8_list) IsValid() bool { +func (x *_Params_7_list) IsValid() bool { return x.list != nil } @@ -655,7 +655,6 @@ var ( fd_Params_whitelisted_assets protoreflect.FieldDescriptor fd_Params_whitelisted_chains protoreflect.FieldDescriptor fd_Params_allowed_public_keys protoreflect.FieldDescriptor - fd_Params_openid_config protoreflect.FieldDescriptor fd_Params_ipfs_active protoreflect.FieldDescriptor fd_Params_localhost_registration_enabled protoreflect.FieldDescriptor fd_Params_conveyance_preference protoreflect.FieldDescriptor @@ -668,7 +667,6 @@ func init() { fd_Params_whitelisted_assets = md_Params.Fields().ByName("whitelisted_assets") fd_Params_whitelisted_chains = md_Params.Fields().ByName("whitelisted_chains") fd_Params_allowed_public_keys = md_Params.Fields().ByName("allowed_public_keys") - fd_Params_openid_config = md_Params.Fields().ByName("openid_config") fd_Params_ipfs_active = md_Params.Fields().ByName("ipfs_active") fd_Params_localhost_registration_enabled = md_Params.Fields().ByName("localhost_registration_enabled") fd_Params_conveyance_preference = md_Params.Fields().ByName("conveyance_preference") @@ -758,12 +756,6 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.OpenidConfig != nil { - value := protoreflect.ValueOfMessage(x.OpenidConfig.ProtoReflect()) - if !f(fd_Params_openid_config, value) { - return - } - } if x.IpfsActive != false { value := protoreflect.ValueOfBool(x.IpfsActive) if !f(fd_Params_ipfs_active, value) { @@ -783,7 +775,7 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto } } if len(x.AttestationFormats) != 0 { - value := protoreflect.ValueOfList(&_Params_8_list{list: &x.AttestationFormats}) + value := protoreflect.ValueOfList(&_Params_7_list{list: &x.AttestationFormats}) if !f(fd_Params_attestation_formats, value) { return } @@ -809,8 +801,6 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return len(x.WhitelistedChains) != 0 case "did.v1.Params.allowed_public_keys": return len(x.AllowedPublicKeys) != 0 - case "did.v1.Params.openid_config": - return x.OpenidConfig != nil case "did.v1.Params.ipfs_active": return x.IpfsActive != false case "did.v1.Params.localhost_registration_enabled": @@ -841,8 +831,6 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.WhitelistedChains = nil case "did.v1.Params.allowed_public_keys": x.AllowedPublicKeys = nil - case "did.v1.Params.openid_config": - x.OpenidConfig = nil case "did.v1.Params.ipfs_active": x.IpfsActive = false case "did.v1.Params.localhost_registration_enabled": @@ -885,9 +873,6 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro } listValue := &_Params_3_list{list: &x.AllowedPublicKeys} return protoreflect.ValueOfList(listValue) - case "did.v1.Params.openid_config": - value := x.OpenidConfig - return protoreflect.ValueOfMessage(value.ProtoReflect()) case "did.v1.Params.ipfs_active": value := x.IpfsActive return protoreflect.ValueOfBool(value) @@ -899,9 +884,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro return protoreflect.ValueOfString(value) case "did.v1.Params.attestation_formats": if len(x.AttestationFormats) == 0 { - return protoreflect.ValueOfList(&_Params_8_list{}) + return protoreflect.ValueOfList(&_Params_7_list{}) } - listValue := &_Params_8_list{list: &x.AttestationFormats} + listValue := &_Params_7_list{list: &x.AttestationFormats} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { @@ -935,8 +920,6 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto lv := value.List() clv := lv.(*_Params_3_list) x.AllowedPublicKeys = *clv.list - case "did.v1.Params.openid_config": - x.OpenidConfig = value.Message().Interface().(*OpenIDConfig) case "did.v1.Params.ipfs_active": x.IpfsActive = value.Bool() case "did.v1.Params.localhost_registration_enabled": @@ -945,7 +928,7 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.ConveyancePreference = value.Interface().(string) case "did.v1.Params.attestation_formats": lv := value.List() - clv := lv.(*_Params_8_list) + clv := lv.(*_Params_7_list) x.AttestationFormats = *clv.list default: if fd.IsExtension() { @@ -985,16 +968,11 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Params_3_list{list: &x.AllowedPublicKeys} return protoreflect.ValueOfList(value) - case "did.v1.Params.openid_config": - if x.OpenidConfig == nil { - x.OpenidConfig = new(OpenIDConfig) - } - return protoreflect.ValueOfMessage(x.OpenidConfig.ProtoReflect()) case "did.v1.Params.attestation_formats": if x.AttestationFormats == nil { x.AttestationFormats = []string{} } - value := &_Params_8_list{list: &x.AttestationFormats} + value := &_Params_7_list{list: &x.AttestationFormats} return protoreflect.ValueOfList(value) case "did.v1.Params.ipfs_active": panic(fmt.Errorf("field ipfs_active of message did.v1.Params is not mutable")) @@ -1024,9 +1002,6 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor case "did.v1.Params.allowed_public_keys": list := []*KeyInfo{} return protoreflect.ValueOfList(&_Params_3_list{list: &list}) - case "did.v1.Params.openid_config": - m := new(OpenIDConfig) - return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.Params.ipfs_active": return protoreflect.ValueOfBool(false) case "did.v1.Params.localhost_registration_enabled": @@ -1035,7 +1010,7 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfString("") case "did.v1.Params.attestation_formats": list := []string{} - return protoreflect.ValueOfList(&_Params_8_list{list: &list}) + return protoreflect.ValueOfList(&_Params_7_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -1123,10 +1098,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.OpenidConfig != nil { - l = options.Size(x.OpenidConfig) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.IpfsActive { n += 2 } @@ -1178,7 +1149,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.AttestationFormats[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationFormats[iNdEx]))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } } if len(x.ConveyancePreference) > 0 { @@ -1186,7 +1157,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.ConveyancePreference) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConveyancePreference))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if x.LocalhostRegistrationEnabled { i-- @@ -1196,7 +1167,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { dAtA[i] = 0 } i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if x.IpfsActive { i-- @@ -1206,21 +1177,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { dAtA[i] = 0 } i-- - dAtA[i] = 0x28 - } - if x.OpenidConfig != nil { - encoded, err := options.Marshal(x.OpenidConfig) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 + dAtA[i] = 0x20 } if len(x.AllowedPublicKeys) > 0 { for iNdEx := len(x.AllowedPublicKeys) - 1; iNdEx >= 0; iNdEx-- { @@ -1422,42 +1379,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OpenidConfig", 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.OpenidConfig == nil { - x.OpenidConfig = &OpenIDConfig{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OpenidConfig); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", wireType) } @@ -1477,7 +1398,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } } x.IpfsActive = bool(v != 0) - case 6: + case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LocalhostRegistrationEnabled", wireType) } @@ -1497,7 +1418,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } } x.LocalhostRegistrationEnabled = bool(v != 0) - case 7: + case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConveyancePreference", wireType) } @@ -1529,7 +1450,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } x.ConveyancePreference = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationFormats", wireType) } @@ -3714,1362 +3635,6 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_OpenIDConfig_5_list)(nil) - -type _OpenIDConfig_5_list struct { - list *[]string -} - -func (x *_OpenIDConfig_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_OpenIDConfig_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_OpenIDConfig_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_OpenIDConfig_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_OpenIDConfig_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field ScopesSupported as it is not of Message kind")) -} - -func (x *_OpenIDConfig_5_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_OpenIDConfig_5_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_OpenIDConfig_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_OpenIDConfig_6_list)(nil) - -type _OpenIDConfig_6_list struct { - list *[]string -} - -func (x *_OpenIDConfig_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_OpenIDConfig_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_OpenIDConfig_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_OpenIDConfig_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_OpenIDConfig_6_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field ResponseTypesSupported as it is not of Message kind")) -} - -func (x *_OpenIDConfig_6_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_OpenIDConfig_6_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_OpenIDConfig_6_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_OpenIDConfig_7_list)(nil) - -type _OpenIDConfig_7_list struct { - list *[]string -} - -func (x *_OpenIDConfig_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_OpenIDConfig_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_OpenIDConfig_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_OpenIDConfig_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_OpenIDConfig_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field ResponseModesSupported as it is not of Message kind")) -} - -func (x *_OpenIDConfig_7_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_OpenIDConfig_7_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_OpenIDConfig_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_OpenIDConfig_8_list)(nil) - -type _OpenIDConfig_8_list struct { - list *[]string -} - -func (x *_OpenIDConfig_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_OpenIDConfig_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_OpenIDConfig_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_OpenIDConfig_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_OpenIDConfig_8_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field GrantTypesSupported as it is not of Message kind")) -} - -func (x *_OpenIDConfig_8_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_OpenIDConfig_8_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_OpenIDConfig_8_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_OpenIDConfig_9_list)(nil) - -type _OpenIDConfig_9_list struct { - list *[]string -} - -func (x *_OpenIDConfig_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_OpenIDConfig_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_OpenIDConfig_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_OpenIDConfig_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_OpenIDConfig_9_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field AcrValuesSupported as it is not of Message kind")) -} - -func (x *_OpenIDConfig_9_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_OpenIDConfig_9_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_OpenIDConfig_9_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_OpenIDConfig_10_list)(nil) - -type _OpenIDConfig_10_list struct { - list *[]string -} - -func (x *_OpenIDConfig_10_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_OpenIDConfig_10_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_OpenIDConfig_10_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_OpenIDConfig_10_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_OpenIDConfig_10_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field SubjectTypesSupported as it is not of Message kind")) -} - -func (x *_OpenIDConfig_10_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_OpenIDConfig_10_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_OpenIDConfig_10_list) IsValid() bool { - return x.list != nil -} - -var ( - md_OpenIDConfig protoreflect.MessageDescriptor - fd_OpenIDConfig_issuer protoreflect.FieldDescriptor - fd_OpenIDConfig_authorization_endpoint protoreflect.FieldDescriptor - fd_OpenIDConfig_token_endpoint protoreflect.FieldDescriptor - fd_OpenIDConfig_userinfo_endpoint protoreflect.FieldDescriptor - fd_OpenIDConfig_scopes_supported protoreflect.FieldDescriptor - fd_OpenIDConfig_response_types_supported protoreflect.FieldDescriptor - fd_OpenIDConfig_response_modes_supported protoreflect.FieldDescriptor - fd_OpenIDConfig_grant_types_supported protoreflect.FieldDescriptor - fd_OpenIDConfig_acr_values_supported protoreflect.FieldDescriptor - fd_OpenIDConfig_subject_types_supported protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_genesis_proto_init() - md_OpenIDConfig = File_did_v1_genesis_proto.Messages().ByName("OpenIDConfig") - fd_OpenIDConfig_issuer = md_OpenIDConfig.Fields().ByName("issuer") - fd_OpenIDConfig_authorization_endpoint = md_OpenIDConfig.Fields().ByName("authorization_endpoint") - fd_OpenIDConfig_token_endpoint = md_OpenIDConfig.Fields().ByName("token_endpoint") - fd_OpenIDConfig_userinfo_endpoint = md_OpenIDConfig.Fields().ByName("userinfo_endpoint") - fd_OpenIDConfig_scopes_supported = md_OpenIDConfig.Fields().ByName("scopes_supported") - fd_OpenIDConfig_response_types_supported = md_OpenIDConfig.Fields().ByName("response_types_supported") - fd_OpenIDConfig_response_modes_supported = md_OpenIDConfig.Fields().ByName("response_modes_supported") - fd_OpenIDConfig_grant_types_supported = md_OpenIDConfig.Fields().ByName("grant_types_supported") - fd_OpenIDConfig_acr_values_supported = md_OpenIDConfig.Fields().ByName("acr_values_supported") - fd_OpenIDConfig_subject_types_supported = md_OpenIDConfig.Fields().ByName("subject_types_supported") -} - -var _ protoreflect.Message = (*fastReflection_OpenIDConfig)(nil) - -type fastReflection_OpenIDConfig OpenIDConfig - -func (x *OpenIDConfig) ProtoReflect() protoreflect.Message { - return (*fastReflection_OpenIDConfig)(x) -} - -func (x *OpenIDConfig) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_OpenIDConfig_messageType fastReflection_OpenIDConfig_messageType -var _ protoreflect.MessageType = fastReflection_OpenIDConfig_messageType{} - -type fastReflection_OpenIDConfig_messageType struct{} - -func (x fastReflection_OpenIDConfig_messageType) Zero() protoreflect.Message { - return (*fastReflection_OpenIDConfig)(nil) -} -func (x fastReflection_OpenIDConfig_messageType) New() protoreflect.Message { - return new(fastReflection_OpenIDConfig) -} -func (x fastReflection_OpenIDConfig_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_OpenIDConfig -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_OpenIDConfig) Descriptor() protoreflect.MessageDescriptor { - return md_OpenIDConfig -} - -// 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_OpenIDConfig) Type() protoreflect.MessageType { - return _fastReflection_OpenIDConfig_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_OpenIDConfig) New() protoreflect.Message { - return new(fastReflection_OpenIDConfig) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_OpenIDConfig) Interface() protoreflect.ProtoMessage { - return (*OpenIDConfig)(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_OpenIDConfig) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Issuer != "" { - value := protoreflect.ValueOfString(x.Issuer) - if !f(fd_OpenIDConfig_issuer, value) { - return - } - } - if x.AuthorizationEndpoint != "" { - value := protoreflect.ValueOfString(x.AuthorizationEndpoint) - if !f(fd_OpenIDConfig_authorization_endpoint, value) { - return - } - } - if x.TokenEndpoint != "" { - value := protoreflect.ValueOfString(x.TokenEndpoint) - if !f(fd_OpenIDConfig_token_endpoint, value) { - return - } - } - if x.UserinfoEndpoint != "" { - value := protoreflect.ValueOfString(x.UserinfoEndpoint) - if !f(fd_OpenIDConfig_userinfo_endpoint, value) { - return - } - } - if len(x.ScopesSupported) != 0 { - value := protoreflect.ValueOfList(&_OpenIDConfig_5_list{list: &x.ScopesSupported}) - if !f(fd_OpenIDConfig_scopes_supported, value) { - return - } - } - if len(x.ResponseTypesSupported) != 0 { - value := protoreflect.ValueOfList(&_OpenIDConfig_6_list{list: &x.ResponseTypesSupported}) - if !f(fd_OpenIDConfig_response_types_supported, value) { - return - } - } - if len(x.ResponseModesSupported) != 0 { - value := protoreflect.ValueOfList(&_OpenIDConfig_7_list{list: &x.ResponseModesSupported}) - if !f(fd_OpenIDConfig_response_modes_supported, value) { - return - } - } - if len(x.GrantTypesSupported) != 0 { - value := protoreflect.ValueOfList(&_OpenIDConfig_8_list{list: &x.GrantTypesSupported}) - if !f(fd_OpenIDConfig_grant_types_supported, value) { - return - } - } - if len(x.AcrValuesSupported) != 0 { - value := protoreflect.ValueOfList(&_OpenIDConfig_9_list{list: &x.AcrValuesSupported}) - if !f(fd_OpenIDConfig_acr_values_supported, value) { - return - } - } - if len(x.SubjectTypesSupported) != 0 { - value := protoreflect.ValueOfList(&_OpenIDConfig_10_list{list: &x.SubjectTypesSupported}) - if !f(fd_OpenIDConfig_subject_types_supported, 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_OpenIDConfig) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.OpenIDConfig.issuer": - return x.Issuer != "" - case "did.v1.OpenIDConfig.authorization_endpoint": - return x.AuthorizationEndpoint != "" - case "did.v1.OpenIDConfig.token_endpoint": - return x.TokenEndpoint != "" - case "did.v1.OpenIDConfig.userinfo_endpoint": - return x.UserinfoEndpoint != "" - case "did.v1.OpenIDConfig.scopes_supported": - return len(x.ScopesSupported) != 0 - case "did.v1.OpenIDConfig.response_types_supported": - return len(x.ResponseTypesSupported) != 0 - case "did.v1.OpenIDConfig.response_modes_supported": - return len(x.ResponseModesSupported) != 0 - case "did.v1.OpenIDConfig.grant_types_supported": - return len(x.GrantTypesSupported) != 0 - case "did.v1.OpenIDConfig.acr_values_supported": - return len(x.AcrValuesSupported) != 0 - case "did.v1.OpenIDConfig.subject_types_supported": - return len(x.SubjectTypesSupported) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) - } - panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.OpenIDConfig.issuer": - x.Issuer = "" - case "did.v1.OpenIDConfig.authorization_endpoint": - x.AuthorizationEndpoint = "" - case "did.v1.OpenIDConfig.token_endpoint": - x.TokenEndpoint = "" - case "did.v1.OpenIDConfig.userinfo_endpoint": - x.UserinfoEndpoint = "" - case "did.v1.OpenIDConfig.scopes_supported": - x.ScopesSupported = nil - case "did.v1.OpenIDConfig.response_types_supported": - x.ResponseTypesSupported = nil - case "did.v1.OpenIDConfig.response_modes_supported": - x.ResponseModesSupported = nil - case "did.v1.OpenIDConfig.grant_types_supported": - x.GrantTypesSupported = nil - case "did.v1.OpenIDConfig.acr_values_supported": - x.AcrValuesSupported = nil - case "did.v1.OpenIDConfig.subject_types_supported": - x.SubjectTypesSupported = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) - } - panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.OpenIDConfig.issuer": - value := x.Issuer - return protoreflect.ValueOfString(value) - case "did.v1.OpenIDConfig.authorization_endpoint": - value := x.AuthorizationEndpoint - return protoreflect.ValueOfString(value) - case "did.v1.OpenIDConfig.token_endpoint": - value := x.TokenEndpoint - return protoreflect.ValueOfString(value) - case "did.v1.OpenIDConfig.userinfo_endpoint": - value := x.UserinfoEndpoint - return protoreflect.ValueOfString(value) - case "did.v1.OpenIDConfig.scopes_supported": - if len(x.ScopesSupported) == 0 { - return protoreflect.ValueOfList(&_OpenIDConfig_5_list{}) - } - listValue := &_OpenIDConfig_5_list{list: &x.ScopesSupported} - return protoreflect.ValueOfList(listValue) - case "did.v1.OpenIDConfig.response_types_supported": - if len(x.ResponseTypesSupported) == 0 { - return protoreflect.ValueOfList(&_OpenIDConfig_6_list{}) - } - listValue := &_OpenIDConfig_6_list{list: &x.ResponseTypesSupported} - return protoreflect.ValueOfList(listValue) - case "did.v1.OpenIDConfig.response_modes_supported": - if len(x.ResponseModesSupported) == 0 { - return protoreflect.ValueOfList(&_OpenIDConfig_7_list{}) - } - listValue := &_OpenIDConfig_7_list{list: &x.ResponseModesSupported} - return protoreflect.ValueOfList(listValue) - case "did.v1.OpenIDConfig.grant_types_supported": - if len(x.GrantTypesSupported) == 0 { - return protoreflect.ValueOfList(&_OpenIDConfig_8_list{}) - } - listValue := &_OpenIDConfig_8_list{list: &x.GrantTypesSupported} - return protoreflect.ValueOfList(listValue) - case "did.v1.OpenIDConfig.acr_values_supported": - if len(x.AcrValuesSupported) == 0 { - return protoreflect.ValueOfList(&_OpenIDConfig_9_list{}) - } - listValue := &_OpenIDConfig_9_list{list: &x.AcrValuesSupported} - return protoreflect.ValueOfList(listValue) - case "did.v1.OpenIDConfig.subject_types_supported": - if len(x.SubjectTypesSupported) == 0 { - return protoreflect.ValueOfList(&_OpenIDConfig_10_list{}) - } - listValue := &_OpenIDConfig_10_list{list: &x.SubjectTypesSupported} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) - } - panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.OpenIDConfig.issuer": - x.Issuer = value.Interface().(string) - case "did.v1.OpenIDConfig.authorization_endpoint": - x.AuthorizationEndpoint = value.Interface().(string) - case "did.v1.OpenIDConfig.token_endpoint": - x.TokenEndpoint = value.Interface().(string) - case "did.v1.OpenIDConfig.userinfo_endpoint": - x.UserinfoEndpoint = value.Interface().(string) - case "did.v1.OpenIDConfig.scopes_supported": - lv := value.List() - clv := lv.(*_OpenIDConfig_5_list) - x.ScopesSupported = *clv.list - case "did.v1.OpenIDConfig.response_types_supported": - lv := value.List() - clv := lv.(*_OpenIDConfig_6_list) - x.ResponseTypesSupported = *clv.list - case "did.v1.OpenIDConfig.response_modes_supported": - lv := value.List() - clv := lv.(*_OpenIDConfig_7_list) - x.ResponseModesSupported = *clv.list - case "did.v1.OpenIDConfig.grant_types_supported": - lv := value.List() - clv := lv.(*_OpenIDConfig_8_list) - x.GrantTypesSupported = *clv.list - case "did.v1.OpenIDConfig.acr_values_supported": - lv := value.List() - clv := lv.(*_OpenIDConfig_9_list) - x.AcrValuesSupported = *clv.list - case "did.v1.OpenIDConfig.subject_types_supported": - lv := value.List() - clv := lv.(*_OpenIDConfig_10_list) - x.SubjectTypesSupported = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) - } - panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.OpenIDConfig.scopes_supported": - if x.ScopesSupported == nil { - x.ScopesSupported = []string{} - } - value := &_OpenIDConfig_5_list{list: &x.ScopesSupported} - return protoreflect.ValueOfList(value) - case "did.v1.OpenIDConfig.response_types_supported": - if x.ResponseTypesSupported == nil { - x.ResponseTypesSupported = []string{} - } - value := &_OpenIDConfig_6_list{list: &x.ResponseTypesSupported} - return protoreflect.ValueOfList(value) - case "did.v1.OpenIDConfig.response_modes_supported": - if x.ResponseModesSupported == nil { - x.ResponseModesSupported = []string{} - } - value := &_OpenIDConfig_7_list{list: &x.ResponseModesSupported} - return protoreflect.ValueOfList(value) - case "did.v1.OpenIDConfig.grant_types_supported": - if x.GrantTypesSupported == nil { - x.GrantTypesSupported = []string{} - } - value := &_OpenIDConfig_8_list{list: &x.GrantTypesSupported} - return protoreflect.ValueOfList(value) - case "did.v1.OpenIDConfig.acr_values_supported": - if x.AcrValuesSupported == nil { - x.AcrValuesSupported = []string{} - } - value := &_OpenIDConfig_9_list{list: &x.AcrValuesSupported} - return protoreflect.ValueOfList(value) - case "did.v1.OpenIDConfig.subject_types_supported": - if x.SubjectTypesSupported == nil { - x.SubjectTypesSupported = []string{} - } - value := &_OpenIDConfig_10_list{list: &x.SubjectTypesSupported} - return protoreflect.ValueOfList(value) - case "did.v1.OpenIDConfig.issuer": - panic(fmt.Errorf("field issuer of message did.v1.OpenIDConfig is not mutable")) - case "did.v1.OpenIDConfig.authorization_endpoint": - panic(fmt.Errorf("field authorization_endpoint of message did.v1.OpenIDConfig is not mutable")) - case "did.v1.OpenIDConfig.token_endpoint": - panic(fmt.Errorf("field token_endpoint of message did.v1.OpenIDConfig is not mutable")) - case "did.v1.OpenIDConfig.userinfo_endpoint": - panic(fmt.Errorf("field userinfo_endpoint of message did.v1.OpenIDConfig is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) - } - panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.OpenIDConfig.issuer": - return protoreflect.ValueOfString("") - case "did.v1.OpenIDConfig.authorization_endpoint": - return protoreflect.ValueOfString("") - case "did.v1.OpenIDConfig.token_endpoint": - return protoreflect.ValueOfString("") - case "did.v1.OpenIDConfig.userinfo_endpoint": - return protoreflect.ValueOfString("") - case "did.v1.OpenIDConfig.scopes_supported": - list := []string{} - return protoreflect.ValueOfList(&_OpenIDConfig_5_list{list: &list}) - case "did.v1.OpenIDConfig.response_types_supported": - list := []string{} - return protoreflect.ValueOfList(&_OpenIDConfig_6_list{list: &list}) - case "did.v1.OpenIDConfig.response_modes_supported": - list := []string{} - return protoreflect.ValueOfList(&_OpenIDConfig_7_list{list: &list}) - case "did.v1.OpenIDConfig.grant_types_supported": - list := []string{} - return protoreflect.ValueOfList(&_OpenIDConfig_8_list{list: &list}) - case "did.v1.OpenIDConfig.acr_values_supported": - list := []string{} - return protoreflect.ValueOfList(&_OpenIDConfig_9_list{list: &list}) - case "did.v1.OpenIDConfig.subject_types_supported": - list := []string{} - return protoreflect.ValueOfList(&_OpenIDConfig_10_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) - } - panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.OpenIDConfig", 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_OpenIDConfig) 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_OpenIDConfig) 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_OpenIDConfig) 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_OpenIDConfig) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*OpenIDConfig) - 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.Issuer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AuthorizationEndpoint) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TokenEndpoint) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.UserinfoEndpoint) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.ScopesSupported) > 0 { - for _, s := range x.ScopesSupported { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.ResponseTypesSupported) > 0 { - for _, s := range x.ResponseTypesSupported { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.ResponseModesSupported) > 0 { - for _, s := range x.ResponseModesSupported { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.GrantTypesSupported) > 0 { - for _, s := range x.GrantTypesSupported { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.AcrValuesSupported) > 0 { - for _, s := range x.AcrValuesSupported { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.SubjectTypesSupported) > 0 { - for _, s := range x.SubjectTypesSupported { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*OpenIDConfig) - 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.SubjectTypesSupported) > 0 { - for iNdEx := len(x.SubjectTypesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.SubjectTypesSupported[iNdEx]) - copy(dAtA[i:], x.SubjectTypesSupported[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SubjectTypesSupported[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if len(x.AcrValuesSupported) > 0 { - for iNdEx := len(x.AcrValuesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.AcrValuesSupported[iNdEx]) - copy(dAtA[i:], x.AcrValuesSupported[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AcrValuesSupported[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(x.GrantTypesSupported) > 0 { - for iNdEx := len(x.GrantTypesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.GrantTypesSupported[iNdEx]) - copy(dAtA[i:], x.GrantTypesSupported[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GrantTypesSupported[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(x.ResponseModesSupported) > 0 { - for iNdEx := len(x.ResponseModesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.ResponseModesSupported[iNdEx]) - copy(dAtA[i:], x.ResponseModesSupported[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ResponseModesSupported[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.ResponseTypesSupported) > 0 { - for iNdEx := len(x.ResponseTypesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.ResponseTypesSupported[iNdEx]) - copy(dAtA[i:], x.ResponseTypesSupported[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ResponseTypesSupported[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(x.ScopesSupported) > 0 { - for iNdEx := len(x.ScopesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.ScopesSupported[iNdEx]) - copy(dAtA[i:], x.ScopesSupported[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ScopesSupported[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.UserinfoEndpoint) > 0 { - i -= len(x.UserinfoEndpoint) - copy(dAtA[i:], x.UserinfoEndpoint) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UserinfoEndpoint))) - i-- - dAtA[i] = 0x22 - } - if len(x.TokenEndpoint) > 0 { - i -= len(x.TokenEndpoint) - copy(dAtA[i:], x.TokenEndpoint) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TokenEndpoint))) - i-- - dAtA[i] = 0x1a - } - if len(x.AuthorizationEndpoint) > 0 { - i -= len(x.AuthorizationEndpoint) - copy(dAtA[i:], x.AuthorizationEndpoint) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthorizationEndpoint))) - i-- - dAtA[i] = 0x12 - } - if len(x.Issuer) > 0 { - i -= len(x.Issuer) - copy(dAtA[i:], x.Issuer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Issuer))) - 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().(*OpenIDConfig) - 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: OpenIDConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OpenIDConfig: 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 Issuer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Issuer = 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 AuthorizationEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AuthorizationEndpoint = 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 TokenEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TokenEndpoint = 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 UserinfoEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UserinfoEndpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ScopesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ScopesSupported = append(x.ScopesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ResponseTypesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ResponseTypesSupported = append(x.ResponseTypesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ResponseModesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ResponseModesSupported = append(x.ResponseModesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GrantTypesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GrantTypesSupported = append(x.GrantTypesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AcrValuesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AcrValuesSupported = append(x.AcrValuesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubjectTypesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SubjectTypesSupported = append(x.SubjectTypesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var _ protoreflect.List = (*_ValidatorInfo_2_list)(nil) type _ValidatorInfo_2_list struct { @@ -5202,7 +3767,7 @@ func (x *ValidatorInfo) ProtoReflect() protoreflect.Message { } func (x *ValidatorInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[6] + mi := &file_did_v1_genesis_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6025,7 +4590,7 @@ func (x *ValidatorInfo_Endpoint) ProtoReflect() protoreflect.Message { } func (x *ValidatorInfo_Endpoint) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[7] + mi := &file_did_v1_genesis_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6499,7 +5064,7 @@ func (x *ValidatorInfo_ExplorerInfo) ProtoReflect() protoreflect.Message { } func (x *ValidatorInfo_ExplorerInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[8] + mi := &file_did_v1_genesis_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7035,7 +5600,7 @@ func (x *ValidatorInfo_FeeInfo) ProtoReflect() protoreflect.Message { } func (x *ValidatorInfo_FeeInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[9] + mi := &file_did_v1_genesis_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7670,7 +6235,7 @@ func (x *ValidatorInfo_IBCChannel) ProtoReflect() protoreflect.Message { } func (x *ValidatorInfo_IBCChannel) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[10] + mi := &file_did_v1_genesis_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8591,6 +7156,55 @@ func (KeyType) EnumDescriptor() ([]byte, []int) { return file_did_v1_genesis_proto_rawDescGZIP(), []int{6} } +type KeyshareRole int32 + +const ( + KeyshareRole_KEYSHARE_ROLE_UNSPECIFIED KeyshareRole = 0 + KeyshareRole_KEYSHARE_ROLE_USER KeyshareRole = 1 + KeyshareRole_KEYSHARE_ROLE_VALIDATOR KeyshareRole = 2 +) + +// Enum value maps for KeyshareRole. +var ( + KeyshareRole_name = map[int32]string{ + 0: "KEYSHARE_ROLE_UNSPECIFIED", + 1: "KEYSHARE_ROLE_USER", + 2: "KEYSHARE_ROLE_VALIDATOR", + } + KeyshareRole_value = map[string]int32{ + "KEYSHARE_ROLE_UNSPECIFIED": 0, + "KEYSHARE_ROLE_USER": 1, + "KEYSHARE_ROLE_VALIDATOR": 2, + } +) + +func (x KeyshareRole) Enum() *KeyshareRole { + p := new(KeyshareRole) + *p = x + return p +} + +func (x KeyshareRole) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KeyshareRole) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_genesis_proto_enumTypes[7].Descriptor() +} + +func (KeyshareRole) Type() protoreflect.EnumType { + return &file_did_v1_genesis_proto_enumTypes[7] +} + +func (x KeyshareRole) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KeyshareRole.Descriptor instead. +func (KeyshareRole) EnumDescriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{7} +} + // PermissionScope define the Capabilities Controllers can grant for Services type PermissionScope int32 @@ -8658,11 +7272,11 @@ func (x PermissionScope) String() string { } func (PermissionScope) Descriptor() protoreflect.EnumDescriptor { - return file_did_v1_genesis_proto_enumTypes[7].Descriptor() + return file_did_v1_genesis_proto_enumTypes[8].Descriptor() } func (PermissionScope) Type() protoreflect.EnumType { - return &file_did_v1_genesis_proto_enumTypes[7] + return &file_did_v1_genesis_proto_enumTypes[8] } func (x PermissionScope) Number() protoreflect.EnumNumber { @@ -8671,7 +7285,7 @@ func (x PermissionScope) Number() protoreflect.EnumNumber { // Deprecated: Use PermissionScope.Descriptor instead. func (PermissionScope) EnumDescriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{7} + return file_did_v1_genesis_proto_rawDescGZIP(), []int{8} } // GenesisState defines the module genesis state @@ -8723,16 +7337,14 @@ type Params struct { WhitelistedChains []*ChainInfo `protobuf:"bytes,2,rep,name=whitelisted_chains,json=whitelistedChains,proto3" json:"whitelisted_chains,omitempty"` // Whitelisted Key Types AllowedPublicKeys []*KeyInfo `protobuf:"bytes,3,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty"` - // OpenIDConfig defines the base openid configuration across all did services - OpenidConfig *OpenIDConfig `protobuf:"bytes,4,opt,name=openid_config,json=openidConfig,proto3" json:"openid_config,omitempty"` // IpfsActive is a flag to enable/disable ipfs - IpfsActive bool `protobuf:"varint,5,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` + IpfsActive bool `protobuf:"varint,4,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` // Localhost Registration Enabled - LocalhostRegistrationEnabled bool `protobuf:"varint,6,opt,name=localhost_registration_enabled,json=localhostRegistrationEnabled,proto3" json:"localhost_registration_enabled,omitempty"` + LocalhostRegistrationEnabled bool `protobuf:"varint,5,opt,name=localhost_registration_enabled,json=localhostRegistrationEnabled,proto3" json:"localhost_registration_enabled,omitempty"` // ConveyancePreference defines the conveyance preference - ConveyancePreference string `protobuf:"bytes,7,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"` + ConveyancePreference string `protobuf:"bytes,6,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"` // AttestationFormats defines the attestation formats - AttestationFormats []string `protobuf:"bytes,8,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"` + AttestationFormats []string `protobuf:"bytes,7,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"` } func (x *Params) Reset() { @@ -8776,13 +7388,6 @@ func (x *Params) GetAllowedPublicKeys() []*KeyInfo { return nil } -func (x *Params) GetOpenidConfig() *OpenIDConfig { - if x != nil { - return x.OpenidConfig - } - return nil -} - func (x *Params) GetIpfsActive() bool { if x != nil { return x.IpfsActive @@ -9038,114 +7643,6 @@ func (x *KeyInfo) GetType_() KeyType { return KeyType_KEY_TYPE_UNSPECIFIED } -// OpenIDConfig defines the base openid configuration across all did services -type OpenIDConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - AuthorizationEndpoint string `protobuf:"bytes,2,opt,name=authorization_endpoint,json=authorizationEndpoint,proto3" json:"authorization_endpoint,omitempty"` - TokenEndpoint string `protobuf:"bytes,3,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` - UserinfoEndpoint string `protobuf:"bytes,4,opt,name=userinfo_endpoint,json=userinfoEndpoint,proto3" json:"userinfo_endpoint,omitempty"` - ScopesSupported []string `protobuf:"bytes,5,rep,name=scopes_supported,json=scopesSupported,proto3" json:"scopes_supported,omitempty"` - ResponseTypesSupported []string `protobuf:"bytes,6,rep,name=response_types_supported,json=responseTypesSupported,proto3" json:"response_types_supported,omitempty"` - ResponseModesSupported []string `protobuf:"bytes,7,rep,name=response_modes_supported,json=responseModesSupported,proto3" json:"response_modes_supported,omitempty"` - GrantTypesSupported []string `protobuf:"bytes,8,rep,name=grant_types_supported,json=grantTypesSupported,proto3" json:"grant_types_supported,omitempty"` - AcrValuesSupported []string `protobuf:"bytes,9,rep,name=acr_values_supported,json=acrValuesSupported,proto3" json:"acr_values_supported,omitempty"` - SubjectTypesSupported []string `protobuf:"bytes,10,rep,name=subject_types_supported,json=subjectTypesSupported,proto3" json:"subject_types_supported,omitempty"` -} - -func (x *OpenIDConfig) Reset() { - *x = OpenIDConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OpenIDConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenIDConfig) ProtoMessage() {} - -// Deprecated: Use OpenIDConfig.ProtoReflect.Descriptor instead. -func (*OpenIDConfig) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{5} -} - -func (x *OpenIDConfig) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *OpenIDConfig) GetAuthorizationEndpoint() string { - if x != nil { - return x.AuthorizationEndpoint - } - return "" -} - -func (x *OpenIDConfig) GetTokenEndpoint() string { - if x != nil { - return x.TokenEndpoint - } - return "" -} - -func (x *OpenIDConfig) GetUserinfoEndpoint() string { - if x != nil { - return x.UserinfoEndpoint - } - return "" -} - -func (x *OpenIDConfig) GetScopesSupported() []string { - if x != nil { - return x.ScopesSupported - } - return nil -} - -func (x *OpenIDConfig) GetResponseTypesSupported() []string { - if x != nil { - return x.ResponseTypesSupported - } - return nil -} - -func (x *OpenIDConfig) GetResponseModesSupported() []string { - if x != nil { - return x.ResponseModesSupported - } - return nil -} - -func (x *OpenIDConfig) GetGrantTypesSupported() []string { - if x != nil { - return x.GrantTypesSupported - } - return nil -} - -func (x *OpenIDConfig) GetAcrValuesSupported() []string { - if x != nil { - return x.AcrValuesSupported - } - return nil -} - -func (x *OpenIDConfig) GetSubjectTypesSupported() []string { - if x != nil { - return x.SubjectTypesSupported - } - return nil -} - // ValidatorInfo defines information for accepted Validator nodes type ValidatorInfo struct { state protoimpl.MessageState @@ -9163,7 +7660,7 @@ type ValidatorInfo struct { func (x *ValidatorInfo) Reset() { *x = ValidatorInfo{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[6] + mi := &file_did_v1_genesis_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9177,7 +7674,7 @@ func (*ValidatorInfo) ProtoMessage() {} // Deprecated: Use ValidatorInfo.ProtoReflect.Descriptor instead. func (*ValidatorInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{6} + return file_did_v1_genesis_proto_rawDescGZIP(), []int{5} } func (x *ValidatorInfo) GetMoniker() string { @@ -9235,7 +7732,7 @@ type ValidatorInfo_Endpoint struct { func (x *ValidatorInfo_Endpoint) Reset() { *x = ValidatorInfo_Endpoint{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[7] + mi := &file_did_v1_genesis_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9249,7 +7746,7 @@ func (*ValidatorInfo_Endpoint) ProtoMessage() {} // Deprecated: Use ValidatorInfo_Endpoint.ProtoReflect.Descriptor instead. func (*ValidatorInfo_Endpoint) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{6, 0} + return file_did_v1_genesis_proto_rawDescGZIP(), []int{5, 0} } func (x *ValidatorInfo_Endpoint) GetUrl() string { @@ -9279,7 +7776,7 @@ type ValidatorInfo_ExplorerInfo struct { func (x *ValidatorInfo_ExplorerInfo) Reset() { *x = ValidatorInfo_ExplorerInfo{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[8] + mi := &file_did_v1_genesis_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9293,7 +7790,7 @@ func (*ValidatorInfo_ExplorerInfo) ProtoMessage() {} // Deprecated: Use ValidatorInfo_ExplorerInfo.ProtoReflect.Descriptor instead. func (*ValidatorInfo_ExplorerInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{6, 1} + return file_did_v1_genesis_proto_rawDescGZIP(), []int{5, 1} } func (x *ValidatorInfo_ExplorerInfo) GetName() string { @@ -9326,7 +7823,7 @@ type ValidatorInfo_FeeInfo struct { func (x *ValidatorInfo_FeeInfo) Reset() { *x = ValidatorInfo_FeeInfo{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[9] + mi := &file_did_v1_genesis_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9340,7 +7837,7 @@ func (*ValidatorInfo_FeeInfo) ProtoMessage() {} // Deprecated: Use ValidatorInfo_FeeInfo.ProtoReflect.Descriptor instead. func (*ValidatorInfo_FeeInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{6, 2} + return file_did_v1_genesis_proto_rawDescGZIP(), []int{5, 2} } func (x *ValidatorInfo_FeeInfo) GetBaseDenom() string { @@ -9391,7 +7888,7 @@ type ValidatorInfo_IBCChannel struct { func (x *ValidatorInfo_IBCChannel) Reset() { *x = ValidatorInfo_IBCChannel{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[10] + mi := &file_did_v1_genesis_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9405,7 +7902,7 @@ func (*ValidatorInfo_IBCChannel) ProtoMessage() {} // Deprecated: Use ValidatorInfo_IBCChannel.ProtoReflect.Descriptor instead. func (*ValidatorInfo_IBCChannel) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{6, 3} + return file_did_v1_genesis_proto_rawDescGZIP(), []int{5, 3} } func (x *ValidatorInfo_IBCChannel) GetId() string { @@ -9433,7 +7930,7 @@ var file_did_v1_genesis_proto_rawDesc = []byte{ 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xee, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xb3, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, @@ -9446,266 +7943,237 @@ var file_did_v1_genesis_proto_rawDesc = []byte{ 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x70, 0x66, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x12, 0x44, 0x0a, 0x1e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x79, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x61, 0x6e, - 0x63, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x13, - 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x3a, 0x17, 0x98, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x72, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x72, 0x70, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x30, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x99, 0x01, - 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x12, 0x35, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xe0, 0x01, 0x0a, 0x07, 0x4b, 0x65, - 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, - 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x61, 0x6c, - 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, - 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x2f, - 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, - 0x26, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x75, 0x72, 0x76, 0x65, - 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, - 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xee, 0x03, 0x0a, - 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, - 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, - 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x16, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x5f, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x29, 0x0a, 0x10, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x73, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, - 0x32, 0x0a, 0x15, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x73, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x63, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x12, 0x61, 0x63, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, - 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x22, 0xcd, 0x05, - 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0e, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x12, 0x45, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, - 0x72, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x65, - 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x2e, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x66, 0x65, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x41, 0x0a, 0x0b, 0x69, 0x62, 0x63, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x49, 0x42, - 0x43, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x0a, 0x69, 0x62, 0x63, 0x43, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x3b, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x1a, 0x34, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x1a, 0xb1, 0x01, 0x0a, 0x07, 0x46, 0x65, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, - 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x47, 0x61, 0x73, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x73, 0x69, 0x6d, 0x75, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, - 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x61, 0x73, 0x5f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, - 0x67, 0x61, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x1a, 0x30, 0x0a, 0x0a, 0x49, - 0x42, 0x43, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x2a, 0xac, 0x01, - 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x41, - 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x53, 0x53, 0x45, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x16, - 0x0a, 0x12, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x52, 0x41, - 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x13, - 0x0a, 0x0f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4f, 0x4f, - 0x4c, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x49, 0x42, 0x43, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x53, 0x53, 0x45, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x57, 0x32, 0x30, 0x10, 0x06, 0x2a, 0xf9, 0x01, 0x0a, - 0x0c, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, - 0x19, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, - 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x50, - 0x46, 0x53, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, - 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x4f, 0x4e, 0x52, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, - 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x49, - 0x54, 0x43, 0x4f, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x49, 0x44, 0x5f, 0x4e, - 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x45, 0x54, 0x48, 0x45, 0x52, 0x45, 0x55, - 0x4d, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, - 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x42, 0x43, 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x49, - 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x57, 0x45, 0x42, 0x41, - 0x55, 0x54, 0x48, 0x4e, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, - 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x44, 0x57, 0x4e, 0x10, 0x07, 0x12, 0x19, 0x0a, - 0x15, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, - 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x2a, 0xc4, 0x01, 0x0a, 0x0c, 0x4b, 0x65, 0x79, - 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x45, 0x59, - 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, - 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x53, 0x32, 0x35, 0x36, 0x10, - 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, - 0x48, 0x4d, 0x5f, 0x45, 0x53, 0x33, 0x38, 0x34, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, - 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x53, 0x35, 0x31, - 0x32, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, - 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x44, 0x44, 0x53, 0x41, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, + 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x70, 0x66, 0x73, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x44, 0x0a, 0x1e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x15, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x79, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x73, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x09, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x10, 0x0a, 0x03, 0x68, 0x72, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x72, + 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x30, 0x0a, 0x0a, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, + 0x72, 0x6c, 0x22, 0x99, 0x01, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x35, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xe0, + 0x01, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x04, 0x72, 0x6f, + 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, + 0x32, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x41, + 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, + 0x74, 0x68, 0x6d, 0x12, 0x2f, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, + 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, + 0x43, 0x75, 0x72, 0x76, 0x65, 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x12, 0x23, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0xcd, 0x05, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x45, 0x0a, + 0x0e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, + 0x73, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x65, + 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x66, + 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x66, 0x65, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x41, 0x0a, 0x0b, 0x69, 0x62, 0x63, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x2e, 0x49, 0x42, 0x43, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x0a, 0x69, 0x62, + 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x3b, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x1a, 0x34, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x1a, 0xb1, 0x01, 0x0a, 0x07, + 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, + 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x69, + 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, + 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x69, 0x73, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x67, 0x61, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x1a, + 0x30, 0x0a, 0x0a, 0x49, 0x42, 0x43, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x2a, 0xac, 0x01, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1a, 0x0a, 0x16, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x41, + 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, + 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x57, 0x52, 0x41, 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x53, + 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4b, 0x49, 0x4e, 0x47, + 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x53, 0x53, 0x45, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x42, 0x43, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x41, + 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x57, 0x32, 0x30, 0x10, 0x06, + 0x2a, 0xf9, 0x01, 0x0a, 0x0c, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, + 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x16, 0x0a, 0x12, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, + 0x45, 0x5f, 0x49, 0x50, 0x46, 0x53, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x49, 0x44, 0x5f, + 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x4f, 0x4e, 0x52, 0x10, 0x02, + 0x12, 0x19, 0x0a, 0x15, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, + 0x45, 0x5f, 0x42, 0x49, 0x54, 0x43, 0x4f, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x44, + 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x45, 0x54, 0x48, + 0x45, 0x52, 0x45, 0x55, 0x4d, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x49, 0x44, 0x5f, 0x4e, + 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x42, 0x43, 0x10, 0x05, 0x12, 0x1a, + 0x0a, 0x16, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, + 0x57, 0x45, 0x42, 0x41, 0x55, 0x54, 0x48, 0x4e, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x49, + 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x44, 0x57, 0x4e, 0x10, + 0x07, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, + 0x43, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x2a, 0xc4, 0x01, 0x0a, + 0x0c, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1d, 0x0a, + 0x19, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x53, - 0x32, 0x35, 0x36, 0x4b, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, - 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, 0x10, 0x06, 0x2a, - 0x81, 0x02, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x43, 0x75, 0x72, 0x76, 0x65, 0x12, 0x19, 0x0a, 0x15, - 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x43, - 0x55, 0x52, 0x56, 0x45, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4b, - 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x50, 0x33, 0x38, 0x34, 0x10, 0x02, 0x12, - 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x50, 0x35, 0x32, - 0x31, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, - 0x5f, 0x58, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x59, - 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x58, 0x34, 0x34, 0x38, 0x10, 0x05, 0x12, 0x15, 0x0a, - 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, - 0x31, 0x39, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, - 0x45, 0x5f, 0x45, 0x44, 0x34, 0x34, 0x38, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, - 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x50, 0x32, 0x35, 0x36, 0x4b, 0x31, - 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, - 0x42, 0x4c, 0x53, 0x31, 0x32, 0x33, 0x38, 0x31, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, - 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x4b, 0x45, 0x43, 0x43, 0x41, 0x4b, 0x32, 0x35, - 0x36, 0x10, 0x0a, 0x2a, 0x73, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, - 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, - 0x5f, 0x52, 0x41, 0x57, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, - 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x45, 0x58, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, - 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x55, 0x4c, - 0x54, 0x49, 0x42, 0x41, 0x53, 0x45, 0x10, 0x03, 0x2a, 0x8a, 0x01, 0x0a, 0x07, 0x4b, 0x65, 0x79, - 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, - 0x0a, 0x17, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x45, - 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4b, - 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x52, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, - 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, - 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x43, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0xd9, 0x01, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, + 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x53, 0x33, 0x38, 0x34, 0x10, 0x02, 0x12, 0x17, + 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, + 0x45, 0x53, 0x35, 0x31, 0x32, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, + 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x44, 0x44, 0x53, 0x41, 0x10, 0x04, + 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, + 0x4d, 0x5f, 0x45, 0x53, 0x32, 0x35, 0x36, 0x4b, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, + 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x43, 0x44, 0x53, + 0x41, 0x10, 0x06, 0x2a, 0x81, 0x02, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x43, 0x75, 0x72, 0x76, 0x65, + 0x12, 0x19, 0x0a, 0x15, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, - 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x54, 0x45, 0x54, 0x10, 0x01, 0x12, - 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4c, 0x4c, 0x49, - 0x50, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x52, 0x53, 0x41, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x4d, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, 0x04, - 0x12, 0x11, 0x0a, 0x0d, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x4d, 0x41, - 0x43, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4d, 0x50, 0x43, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x5a, 0x4b, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, 0x41, 0x55, 0x54, 0x48, 0x4e, 0x10, 0x08, 0x12, 0x12, 0x0a, - 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x49, 0x50, 0x33, 0x32, 0x10, - 0x09, 0x2a, 0xa7, 0x04, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x45, 0x52, 0x4d, 0x49, - 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, - 0x43, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x45, 0x52, 0x4d, - 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, + 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, + 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x50, 0x33, 0x38, + 0x34, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, + 0x5f, 0x50, 0x35, 0x32, 0x31, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, 0x5f, 0x43, + 0x55, 0x52, 0x56, 0x45, 0x5f, 0x58, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x04, 0x12, 0x12, 0x0a, + 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x58, 0x34, 0x34, 0x38, 0x10, + 0x05, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x45, + 0x44, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x45, 0x59, 0x5f, + 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x45, 0x44, 0x34, 0x34, 0x38, 0x10, 0x07, 0x12, 0x17, 0x0a, + 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x50, 0x32, + 0x35, 0x36, 0x4b, 0x31, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, + 0x52, 0x56, 0x45, 0x5f, 0x42, 0x4c, 0x53, 0x31, 0x32, 0x33, 0x38, 0x31, 0x10, 0x09, 0x12, 0x17, + 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x4b, 0x45, 0x43, 0x43, + 0x41, 0x4b, 0x32, 0x35, 0x36, 0x10, 0x0a, 0x2a, 0x73, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x45, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, + 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x4f, + 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x41, 0x57, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, + 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x45, 0x58, 0x10, 0x02, + 0x12, 0x1a, 0x0a, 0x16, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, + 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x42, 0x41, 0x53, 0x45, 0x10, 0x03, 0x2a, 0x8a, 0x01, 0x0a, + 0x07, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x45, 0x59, 0x5f, + 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, + 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, + 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x53, 0x53, 0x45, + 0x52, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x52, + 0x4f, 0x4c, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, + 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x56, + 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0xd9, 0x01, 0x0a, 0x07, 0x4b, 0x65, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x54, 0x45, + 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x4c, 0x4c, 0x49, 0x50, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4b, 0x45, + 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x53, 0x41, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, + 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x4d, 0x4d, 0x45, 0x54, 0x52, + 0x49, 0x43, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x48, 0x4d, 0x41, 0x43, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x4b, 0x45, 0x59, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x50, 0x43, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x59, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x5a, 0x4b, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, + 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, 0x41, 0x55, 0x54, 0x48, 0x4e, 0x10, + 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x49, + 0x50, 0x33, 0x32, 0x10, 0x09, 0x2a, 0x62, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x45, 0x59, 0x53, 0x48, 0x41, 0x52, + 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x53, 0x48, 0x41, 0x52, 0x45, + 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, + 0x4b, 0x45, 0x59, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x2a, 0xa7, 0x04, 0x0a, 0x0f, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x20, 0x0a, + 0x1c, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x1f, 0x0a, 0x1b, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, + 0x4f, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, + 0x12, 0x25, 0x0a, 0x21, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x53, + 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, + 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, + 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x03, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, - 0x4f, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x5f, - 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x03, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, - 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, - 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x12, - 0x27, 0x0a, 0x23, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, - 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, 0x4d, - 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, - 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x06, 0x12, 0x23, 0x0a, 0x1f, 0x50, - 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, - 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, - 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, - 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x53, 0x55, 0x42, - 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, 0x08, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, - 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, - 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x09, 0x12, 0x28, 0x0a, - 0x24, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, - 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x56, - 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x0a, 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x45, 0x52, 0x4d, 0x49, + 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, - 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, - 0x53, 0x54, 0x10, 0x0b, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, - 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x55, - 0x53, 0x45, 0x52, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x0d, 0x42, 0x7c, 0x0a, 0x0a, 0x63, - 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 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, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x05, + 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x41, + 0x44, 0x10, 0x06, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, + 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, + 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, 0x08, + 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, + 0x41, 0x54, 0x45, 0x10, 0x09, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x0a, 0x12, + 0x2b, 0x0a, 0x27, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, + 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, + 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x0b, 0x12, 0x1f, 0x0a, 0x1b, + 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, + 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x0c, 0x12, 0x24, 0x0a, + 0x20, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, + 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, + 0x52, 0x10, 0x0d, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x27, 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, 0x64, 0x69, + 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, + 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -9720,8 +8188,8 @@ func file_did_v1_genesis_proto_rawDescGZIP() []byte { return file_did_v1_genesis_proto_rawDescData } -var file_did_v1_genesis_proto_enumTypes = make([]protoimpl.EnumInfo, 8) -var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_did_v1_genesis_proto_enumTypes = make([]protoimpl.EnumInfo, 9) +var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_did_v1_genesis_proto_goTypes = []interface{}{ (AssetType)(0), // 0: did.v1.AssetType (DIDNamespace)(0), // 1: did.v1.DIDNamespace @@ -9730,13 +8198,13 @@ var file_did_v1_genesis_proto_goTypes = []interface{}{ (KeyEncoding)(0), // 4: did.v1.KeyEncoding (KeyRole)(0), // 5: did.v1.KeyRole (KeyType)(0), // 6: did.v1.KeyType - (PermissionScope)(0), // 7: did.v1.PermissionScope - (*GenesisState)(nil), // 8: did.v1.GenesisState - (*Params)(nil), // 9: did.v1.Params - (*AssetInfo)(nil), // 10: did.v1.AssetInfo - (*ChainInfo)(nil), // 11: did.v1.ChainInfo - (*KeyInfo)(nil), // 12: did.v1.KeyInfo - (*OpenIDConfig)(nil), // 13: did.v1.OpenIDConfig + (KeyshareRole)(0), // 7: did.v1.KeyshareRole + (PermissionScope)(0), // 8: did.v1.PermissionScope + (*GenesisState)(nil), // 9: did.v1.GenesisState + (*Params)(nil), // 10: did.v1.Params + (*AssetInfo)(nil), // 11: did.v1.AssetInfo + (*ChainInfo)(nil), // 12: did.v1.ChainInfo + (*KeyInfo)(nil), // 13: did.v1.KeyInfo (*ValidatorInfo)(nil), // 14: did.v1.ValidatorInfo (*ValidatorInfo_Endpoint)(nil), // 15: did.v1.ValidatorInfo.Endpoint (*ValidatorInfo_ExplorerInfo)(nil), // 16: did.v1.ValidatorInfo.ExplorerInfo @@ -9744,28 +8212,27 @@ var file_did_v1_genesis_proto_goTypes = []interface{}{ (*ValidatorInfo_IBCChannel)(nil), // 18: did.v1.ValidatorInfo.IBCChannel } var file_did_v1_genesis_proto_depIdxs = []int32{ - 9, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params - 10, // 1: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo - 11, // 2: did.v1.Params.whitelisted_chains:type_name -> did.v1.ChainInfo - 12, // 3: did.v1.Params.allowed_public_keys:type_name -> did.v1.KeyInfo - 13, // 4: did.v1.Params.openid_config:type_name -> did.v1.OpenIDConfig - 0, // 5: did.v1.AssetInfo.asset_type:type_name -> did.v1.AssetType - 14, // 6: did.v1.ChainInfo.validators:type_name -> did.v1.ValidatorInfo - 5, // 7: did.v1.KeyInfo.role:type_name -> did.v1.KeyRole - 2, // 8: did.v1.KeyInfo.algorithm:type_name -> did.v1.KeyAlgorithm - 4, // 9: did.v1.KeyInfo.encoding:type_name -> did.v1.KeyEncoding - 3, // 10: did.v1.KeyInfo.curve:type_name -> did.v1.KeyCurve - 6, // 11: did.v1.KeyInfo.type:type_name -> did.v1.KeyType - 15, // 12: did.v1.ValidatorInfo.grpc_endpoints:type_name -> did.v1.ValidatorInfo.Endpoint - 15, // 13: did.v1.ValidatorInfo.rest_endpoints:type_name -> did.v1.ValidatorInfo.Endpoint - 16, // 14: did.v1.ValidatorInfo.explorer:type_name -> did.v1.ValidatorInfo.ExplorerInfo - 17, // 15: did.v1.ValidatorInfo.fee_info:type_name -> did.v1.ValidatorInfo.FeeInfo - 18, // 16: did.v1.ValidatorInfo.ibc_channel:type_name -> did.v1.ValidatorInfo.IBCChannel - 17, // [17:17] is the sub-list for method output_type - 17, // [17:17] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 10, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params + 11, // 1: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo + 12, // 2: did.v1.Params.whitelisted_chains:type_name -> did.v1.ChainInfo + 13, // 3: did.v1.Params.allowed_public_keys:type_name -> did.v1.KeyInfo + 0, // 4: did.v1.AssetInfo.asset_type:type_name -> did.v1.AssetType + 14, // 5: did.v1.ChainInfo.validators:type_name -> did.v1.ValidatorInfo + 5, // 6: did.v1.KeyInfo.role:type_name -> did.v1.KeyRole + 2, // 7: did.v1.KeyInfo.algorithm:type_name -> did.v1.KeyAlgorithm + 4, // 8: did.v1.KeyInfo.encoding:type_name -> did.v1.KeyEncoding + 3, // 9: did.v1.KeyInfo.curve:type_name -> did.v1.KeyCurve + 6, // 10: did.v1.KeyInfo.type:type_name -> did.v1.KeyType + 15, // 11: did.v1.ValidatorInfo.grpc_endpoints:type_name -> did.v1.ValidatorInfo.Endpoint + 15, // 12: did.v1.ValidatorInfo.rest_endpoints:type_name -> did.v1.ValidatorInfo.Endpoint + 16, // 13: did.v1.ValidatorInfo.explorer:type_name -> did.v1.ValidatorInfo.ExplorerInfo + 17, // 14: did.v1.ValidatorInfo.fee_info:type_name -> did.v1.ValidatorInfo.FeeInfo + 18, // 15: did.v1.ValidatorInfo.ibc_channel:type_name -> did.v1.ValidatorInfo.IBCChannel + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_did_v1_genesis_proto_init() } @@ -9835,18 +8302,6 @@ func file_did_v1_genesis_proto_init() { } } file_did_v1_genesis_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenIDConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_genesis_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorInfo); i { case 0: return &v.state @@ -9858,7 +8313,7 @@ func file_did_v1_genesis_proto_init() { return nil } } - file_did_v1_genesis_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_genesis_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorInfo_Endpoint); i { case 0: return &v.state @@ -9870,7 +8325,7 @@ func file_did_v1_genesis_proto_init() { return nil } } - file_did_v1_genesis_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_genesis_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorInfo_ExplorerInfo); i { case 0: return &v.state @@ -9882,7 +8337,7 @@ func file_did_v1_genesis_proto_init() { return nil } } - file_did_v1_genesis_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_genesis_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorInfo_FeeInfo); i { case 0: return &v.state @@ -9894,7 +8349,7 @@ func file_did_v1_genesis_proto_init() { return nil } } - file_did_v1_genesis_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_genesis_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorInfo_IBCChannel); i { case 0: return &v.state @@ -9912,8 +8367,8 @@ func file_did_v1_genesis_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_genesis_proto_rawDesc, - NumEnums: 8, - NumMessages: 11, + NumEnums: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/models.pulsar.go b/api/did/v1/models.pulsar.go index de130b26d..8df41f7af 100644 --- a/api/did/v1/models.pulsar.go +++ b/api/did/v1/models.pulsar.go @@ -15,25 +15,29 @@ import ( ) var ( - md_Accumulator protoreflect.MessageDescriptor - fd_Accumulator_accumulator protoreflect.FieldDescriptor + md_Alias protoreflect.MessageDescriptor + fd_Alias_subject protoreflect.FieldDescriptor + fd_Alias_origin protoreflect.FieldDescriptor + fd_Alias_controller protoreflect.FieldDescriptor ) func init() { file_did_v1_models_proto_init() - md_Accumulator = File_did_v1_models_proto.Messages().ByName("Accumulator") - fd_Accumulator_accumulator = md_Accumulator.Fields().ByName("accumulator") + md_Alias = File_did_v1_models_proto.Messages().ByName("Alias") + fd_Alias_subject = md_Alias.Fields().ByName("subject") + fd_Alias_origin = md_Alias.Fields().ByName("origin") + fd_Alias_controller = md_Alias.Fields().ByName("controller") } -var _ protoreflect.Message = (*fastReflection_Accumulator)(nil) +var _ protoreflect.Message = (*fastReflection_Alias)(nil) -type fastReflection_Accumulator Accumulator +type fastReflection_Alias Alias -func (x *Accumulator) ProtoReflect() protoreflect.Message { - return (*fastReflection_Accumulator)(x) +func (x *Alias) ProtoReflect() protoreflect.Message { + return (*fastReflection_Alias)(x) } -func (x *Accumulator) slowProtoReflect() protoreflect.Message { +func (x *Alias) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_models_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45,43 +49,43 @@ func (x *Accumulator) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Accumulator_messageType fastReflection_Accumulator_messageType -var _ protoreflect.MessageType = fastReflection_Accumulator_messageType{} +var _fastReflection_Alias_messageType fastReflection_Alias_messageType +var _ protoreflect.MessageType = fastReflection_Alias_messageType{} -type fastReflection_Accumulator_messageType struct{} +type fastReflection_Alias_messageType struct{} -func (x fastReflection_Accumulator_messageType) Zero() protoreflect.Message { - return (*fastReflection_Accumulator)(nil) +func (x fastReflection_Alias_messageType) Zero() protoreflect.Message { + return (*fastReflection_Alias)(nil) } -func (x fastReflection_Accumulator_messageType) New() protoreflect.Message { - return new(fastReflection_Accumulator) +func (x fastReflection_Alias_messageType) New() protoreflect.Message { + return new(fastReflection_Alias) } -func (x fastReflection_Accumulator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Accumulator +func (x fastReflection_Alias_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Alias } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Accumulator) Descriptor() protoreflect.MessageDescriptor { - return md_Accumulator +func (x *fastReflection_Alias) Descriptor() protoreflect.MessageDescriptor { + return md_Alias } // 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_Accumulator) Type() protoreflect.MessageType { - return _fastReflection_Accumulator_messageType +func (x *fastReflection_Alias) Type() protoreflect.MessageType { + return _fastReflection_Alias_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Accumulator) New() protoreflect.Message { - return new(fastReflection_Accumulator) +func (x *fastReflection_Alias) New() protoreflect.Message { + return new(fastReflection_Alias) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Accumulator) Interface() protoreflect.ProtoMessage { - return (*Accumulator)(x) +func (x *fastReflection_Alias) Interface() protoreflect.ProtoMessage { + return (*Alias)(x) } // Range iterates over every populated field in an undefined order, @@ -89,10 +93,22 @@ func (x *fastReflection_Accumulator) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Accumulator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Accumulator) != 0 { - value := protoreflect.ValueOfBytes(x.Accumulator) - if !f(fd_Accumulator_accumulator, value) { +func (x *fastReflection_Alias) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_Alias_subject, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_Alias_origin, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Alias_controller, value) { return } } @@ -109,15 +125,19 @@ func (x *fastReflection_Accumulator) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_Accumulator) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Alias) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Accumulator.accumulator": - return len(x.Accumulator) != 0 + case "did.v1.Alias.subject": + return x.Subject != "" + case "did.v1.Alias.origin": + return x.Origin != "" + case "did.v1.Alias.controller": + return x.Controller != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName())) } } @@ -127,15 +147,19 @@ func (x *fastReflection_Accumulator) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Accumulator) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Alias) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Accumulator.accumulator": - x.Accumulator = nil + case "did.v1.Alias.subject": + x.Subject = "" + case "did.v1.Alias.origin": + x.Origin = "" + case "did.v1.Alias.controller": + x.Controller = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName())) } } @@ -145,16 +169,22 @@ func (x *fastReflection_Accumulator) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Accumulator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Alias) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Accumulator.accumulator": - value := x.Accumulator - return protoreflect.ValueOfBytes(value) + case "did.v1.Alias.subject": + value := x.Subject + return protoreflect.ValueOfString(value) + case "did.v1.Alias.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.Alias.controller": + value := x.Controller + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Alias does not contain field %s", descriptor.FullName())) } } @@ -168,15 +198,19 @@ func (x *fastReflection_Accumulator) Get(descriptor protoreflect.FieldDescriptor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Accumulator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Alias) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Accumulator.accumulator": - x.Accumulator = value.Bytes() + case "did.v1.Alias.subject": + x.Subject = value.Interface().(string) + case "did.v1.Alias.origin": + x.Origin = value.Interface().(string) + case "did.v1.Alias.controller": + x.Controller = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName())) } } @@ -190,40 +224,48 @@ func (x *fastReflection_Accumulator) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Accumulator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Alias) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Accumulator.accumulator": - panic(fmt.Errorf("field accumulator of message did.v1.Accumulator is not mutable")) + case "did.v1.Alias.subject": + panic(fmt.Errorf("field subject of message did.v1.Alias is not mutable")) + case "did.v1.Alias.origin": + panic(fmt.Errorf("field origin of message did.v1.Alias is not mutable")) + case "did.v1.Alias.controller": + panic(fmt.Errorf("field controller of message did.v1.Alias is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias 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_Accumulator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Alias) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Accumulator.accumulator": - return protoreflect.ValueOfBytes(nil) + case "did.v1.Alias.subject": + return protoreflect.ValueOfString("") + case "did.v1.Alias.origin": + return protoreflect.ValueOfString("") + case "did.v1.Alias.controller": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias 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_Accumulator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Alias) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Accumulator", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Alias", d.FullName())) } panic("unreachable") } @@ -231,7 +273,7 @@ func (x *fastReflection_Accumulator) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Accumulator) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Alias) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -242,7 +284,7 @@ func (x *fastReflection_Accumulator) 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_Accumulator) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Alias) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -254,7 +296,7 @@ func (x *fastReflection_Accumulator) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Accumulator) IsValid() bool { +func (x *fastReflection_Alias) IsValid() bool { return x != nil } @@ -264,9 +306,9 @@ func (x *fastReflection_Accumulator) 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_Accumulator) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Alias) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Accumulator) + x := input.Message.Interface().(*Alias) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -278,7 +320,15 @@ func (x *fastReflection_Accumulator) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Accumulator) + 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)) + } + l = len(x.Controller) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -292,7 +342,7 @@ func (x *fastReflection_Accumulator) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Accumulator) + x := input.Message.Interface().(*Alias) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -311,10 +361,24 @@ func (x *fastReflection_Accumulator) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Accumulator) > 0 { - i -= len(x.Accumulator) - copy(dAtA[i:], x.Accumulator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Accumulator))) + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0x1a + } + 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] = 0x12 + } + 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] = 0xa } @@ -329,7 +393,7 @@ func (x *fastReflection_Accumulator) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Accumulator) + x := input.Message.Interface().(*Alias) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -361,17 +425,17 @@ func (x *fastReflection_Accumulator) 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: Accumulator: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Alias: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Accumulator: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Alias: 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 Accumulator", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -381,25 +445,87 @@ func (x *fastReflection_Accumulator) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Accumulator = append(x.Accumulator[:0], dAtA[iNdEx:postIndex]...) - if x.Accumulator == nil { - x.Accumulator = []byte{} + x.Subject = 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 Origin", wireType) } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -436,71 +562,83 @@ func (x *fastReflection_Accumulator) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_Credential_4_list)(nil) +var _ protoreflect.List = (*_Credential_6_list)(nil) -type _Credential_4_list struct { +type _Credential_6_list struct { list *[]string } -func (x *_Credential_4_list) Len() int { +func (x *_Credential_6_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Credential_4_list) Get(i int) protoreflect.Value { +func (x *_Credential_6_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_Credential_4_list) Set(i int, value protoreflect.Value) { +func (x *_Credential_6_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_Credential_4_list) Append(value protoreflect.Value) { +func (x *_Credential_6_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_Credential_4_list) AppendMutable() protoreflect.Value { +func (x *_Credential_6_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message Credential at list field Transport as it is not of Message kind")) } -func (x *_Credential_4_list) Truncate(n int) { +func (x *_Credential_6_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_Credential_4_list) NewElement() protoreflect.Value { +func (x *_Credential_6_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_Credential_4_list) IsValid() bool { +func (x *_Credential_6_list) IsValid() bool { return x.list != nil } var ( - md_Credential protoreflect.MessageDescriptor - fd_Credential_id protoreflect.FieldDescriptor - fd_Credential_credential_type protoreflect.FieldDescriptor - fd_Credential_credential_id protoreflect.FieldDescriptor - fd_Credential_transport protoreflect.FieldDescriptor - fd_Credential_subject protoreflect.FieldDescriptor - fd_Credential_controller protoreflect.FieldDescriptor + md_Credential protoreflect.MessageDescriptor + fd_Credential_subject protoreflect.FieldDescriptor + fd_Credential_attestation_type protoreflect.FieldDescriptor + fd_Credential_origin protoreflect.FieldDescriptor + fd_Credential_credential_id protoreflect.FieldDescriptor + fd_Credential_public_key protoreflect.FieldDescriptor + fd_Credential_transport protoreflect.FieldDescriptor + fd_Credential_sign_count protoreflect.FieldDescriptor + fd_Credential_user_present protoreflect.FieldDescriptor + fd_Credential_user_verified protoreflect.FieldDescriptor + fd_Credential_backup_eligible protoreflect.FieldDescriptor + fd_Credential_backup_state protoreflect.FieldDescriptor + fd_Credential_clone_warning protoreflect.FieldDescriptor ) func init() { file_did_v1_models_proto_init() md_Credential = File_did_v1_models_proto.Messages().ByName("Credential") - fd_Credential_id = md_Credential.Fields().ByName("id") - fd_Credential_credential_type = md_Credential.Fields().ByName("credential_type") - fd_Credential_credential_id = md_Credential.Fields().ByName("credential_id") - fd_Credential_transport = md_Credential.Fields().ByName("transport") fd_Credential_subject = md_Credential.Fields().ByName("subject") - fd_Credential_controller = md_Credential.Fields().ByName("controller") + fd_Credential_attestation_type = md_Credential.Fields().ByName("attestation_type") + fd_Credential_origin = md_Credential.Fields().ByName("origin") + fd_Credential_credential_id = md_Credential.Fields().ByName("credential_id") + fd_Credential_public_key = md_Credential.Fields().ByName("public_key") + fd_Credential_transport = md_Credential.Fields().ByName("transport") + fd_Credential_sign_count = md_Credential.Fields().ByName("sign_count") + fd_Credential_user_present = md_Credential.Fields().ByName("user_present") + fd_Credential_user_verified = md_Credential.Fields().ByName("user_verified") + fd_Credential_backup_eligible = md_Credential.Fields().ByName("backup_eligible") + fd_Credential_backup_state = md_Credential.Fields().ByName("backup_state") + fd_Credential_clone_warning = md_Credential.Fields().ByName("clone_warning") } var _ protoreflect.Message = (*fastReflection_Credential)(nil) @@ -568,15 +706,21 @@ func (x *fastReflection_Credential) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Credential_id, value) { + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_Credential_subject, value) { return } } - if x.CredentialType != "" { - value := protoreflect.ValueOfString(x.CredentialType) - if !f(fd_Credential_credential_type, value) { + if x.AttestationType != "" { + value := protoreflect.ValueOfString(x.AttestationType) + if !f(fd_Credential_attestation_type, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_Credential_origin, value) { return } } @@ -586,21 +730,51 @@ func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, p return } } + if len(x.PublicKey) != 0 { + value := protoreflect.ValueOfBytes(x.PublicKey) + if !f(fd_Credential_public_key, value) { + return + } + } if len(x.Transport) != 0 { - value := protoreflect.ValueOfList(&_Credential_4_list{list: &x.Transport}) + value := protoreflect.ValueOfList(&_Credential_6_list{list: &x.Transport}) if !f(fd_Credential_transport, value) { return } } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Credential_subject, value) { + if x.SignCount != uint32(0) { + value := protoreflect.ValueOfUint32(x.SignCount) + if !f(fd_Credential_sign_count, value) { return } } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Credential_controller, value) { + if x.UserPresent != false { + value := protoreflect.ValueOfBool(x.UserPresent) + if !f(fd_Credential_user_present, value) { + return + } + } + if x.UserVerified != false { + value := protoreflect.ValueOfBool(x.UserVerified) + if !f(fd_Credential_user_verified, value) { + return + } + } + if x.BackupEligible != false { + value := protoreflect.ValueOfBool(x.BackupEligible) + if !f(fd_Credential_backup_eligible, value) { + return + } + } + if x.BackupState != false { + value := protoreflect.ValueOfBool(x.BackupState) + if !f(fd_Credential_backup_state, value) { + return + } + } + if x.CloneWarning != false { + value := protoreflect.ValueOfBool(x.CloneWarning) + if !f(fd_Credential_clone_warning, value) { return } } @@ -619,18 +793,30 @@ func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, p // a repeated field is populated if it is non-empty. func (x *fastReflection_Credential) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Credential.id": - return x.Id != "" - case "did.v1.Credential.credential_type": - return x.CredentialType != "" - case "did.v1.Credential.credential_id": - return len(x.CredentialId) != 0 - case "did.v1.Credential.transport": - return len(x.Transport) != 0 case "did.v1.Credential.subject": return x.Subject != "" - case "did.v1.Credential.controller": - return x.Controller != "" + case "did.v1.Credential.attestation_type": + return x.AttestationType != "" + case "did.v1.Credential.origin": + return x.Origin != "" + case "did.v1.Credential.credential_id": + return len(x.CredentialId) != 0 + case "did.v1.Credential.public_key": + return len(x.PublicKey) != 0 + case "did.v1.Credential.transport": + return len(x.Transport) != 0 + case "did.v1.Credential.sign_count": + return x.SignCount != uint32(0) + case "did.v1.Credential.user_present": + return x.UserPresent != false + case "did.v1.Credential.user_verified": + return x.UserVerified != false + case "did.v1.Credential.backup_eligible": + return x.BackupEligible != false + case "did.v1.Credential.backup_state": + return x.BackupState != false + case "did.v1.Credential.clone_warning": + return x.CloneWarning != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) @@ -647,18 +833,30 @@ func (x *fastReflection_Credential) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Credential) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Credential.id": - x.Id = "" - case "did.v1.Credential.credential_type": - x.CredentialType = "" - case "did.v1.Credential.credential_id": - x.CredentialId = nil - case "did.v1.Credential.transport": - x.Transport = nil case "did.v1.Credential.subject": x.Subject = "" - case "did.v1.Credential.controller": - x.Controller = "" + case "did.v1.Credential.attestation_type": + x.AttestationType = "" + case "did.v1.Credential.origin": + x.Origin = "" + case "did.v1.Credential.credential_id": + x.CredentialId = nil + case "did.v1.Credential.public_key": + x.PublicKey = nil + case "did.v1.Credential.transport": + x.Transport = nil + case "did.v1.Credential.sign_count": + x.SignCount = uint32(0) + case "did.v1.Credential.user_present": + x.UserPresent = false + case "did.v1.Credential.user_verified": + x.UserVerified = false + case "did.v1.Credential.backup_eligible": + x.BackupEligible = false + case "did.v1.Credential.backup_state": + x.BackupState = false + case "did.v1.Credential.clone_warning": + x.CloneWarning = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) @@ -675,27 +873,45 @@ func (x *fastReflection_Credential) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Credential) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Credential.id": - value := x.Id + case "did.v1.Credential.subject": + value := x.Subject return protoreflect.ValueOfString(value) - case "did.v1.Credential.credential_type": - value := x.CredentialType + case "did.v1.Credential.attestation_type": + value := x.AttestationType + return protoreflect.ValueOfString(value) + case "did.v1.Credential.origin": + value := x.Origin return protoreflect.ValueOfString(value) case "did.v1.Credential.credential_id": value := x.CredentialId return protoreflect.ValueOfBytes(value) + case "did.v1.Credential.public_key": + value := x.PublicKey + return protoreflect.ValueOfBytes(value) case "did.v1.Credential.transport": if len(x.Transport) == 0 { - return protoreflect.ValueOfList(&_Credential_4_list{}) + return protoreflect.ValueOfList(&_Credential_6_list{}) } - listValue := &_Credential_4_list{list: &x.Transport} + listValue := &_Credential_6_list{list: &x.Transport} return protoreflect.ValueOfList(listValue) - case "did.v1.Credential.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.Credential.controller": - value := x.Controller - return protoreflect.ValueOfString(value) + case "did.v1.Credential.sign_count": + value := x.SignCount + return protoreflect.ValueOfUint32(value) + case "did.v1.Credential.user_present": + value := x.UserPresent + return protoreflect.ValueOfBool(value) + case "did.v1.Credential.user_verified": + value := x.UserVerified + return protoreflect.ValueOfBool(value) + case "did.v1.Credential.backup_eligible": + value := x.BackupEligible + return protoreflect.ValueOfBool(value) + case "did.v1.Credential.backup_state": + value := x.BackupState + return protoreflect.ValueOfBool(value) + case "did.v1.Credential.clone_warning": + value := x.CloneWarning + return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) @@ -716,20 +932,32 @@ func (x *fastReflection_Credential) Get(descriptor protoreflect.FieldDescriptor) // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Credential) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Credential.id": - x.Id = value.Interface().(string) - case "did.v1.Credential.credential_type": - x.CredentialType = value.Interface().(string) - case "did.v1.Credential.credential_id": - x.CredentialId = value.Bytes() - case "did.v1.Credential.transport": - lv := value.List() - clv := lv.(*_Credential_4_list) - x.Transport = *clv.list case "did.v1.Credential.subject": x.Subject = value.Interface().(string) - case "did.v1.Credential.controller": - x.Controller = value.Interface().(string) + case "did.v1.Credential.attestation_type": + x.AttestationType = value.Interface().(string) + case "did.v1.Credential.origin": + x.Origin = value.Interface().(string) + case "did.v1.Credential.credential_id": + x.CredentialId = value.Bytes() + case "did.v1.Credential.public_key": + x.PublicKey = value.Bytes() + case "did.v1.Credential.transport": + lv := value.List() + clv := lv.(*_Credential_6_list) + x.Transport = *clv.list + case "did.v1.Credential.sign_count": + x.SignCount = uint32(value.Uint()) + case "did.v1.Credential.user_present": + x.UserPresent = value.Bool() + case "did.v1.Credential.user_verified": + x.UserVerified = value.Bool() + case "did.v1.Credential.backup_eligible": + x.BackupEligible = value.Bool() + case "did.v1.Credential.backup_state": + x.BackupState = value.Bool() + case "did.v1.Credential.clone_warning": + x.CloneWarning = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) @@ -754,18 +982,30 @@ func (x *fastReflection_Credential) Mutable(fd protoreflect.FieldDescriptor) pro if x.Transport == nil { x.Transport = []string{} } - value := &_Credential_4_list{list: &x.Transport} + value := &_Credential_6_list{list: &x.Transport} return protoreflect.ValueOfList(value) - case "did.v1.Credential.id": - panic(fmt.Errorf("field id of message did.v1.Credential is not mutable")) - case "did.v1.Credential.credential_type": - panic(fmt.Errorf("field credential_type of message did.v1.Credential is not mutable")) - case "did.v1.Credential.credential_id": - panic(fmt.Errorf("field credential_id of message did.v1.Credential is not mutable")) case "did.v1.Credential.subject": panic(fmt.Errorf("field subject of message did.v1.Credential is not mutable")) - case "did.v1.Credential.controller": - panic(fmt.Errorf("field controller of message did.v1.Credential is not mutable")) + case "did.v1.Credential.attestation_type": + panic(fmt.Errorf("field attestation_type of message did.v1.Credential is not mutable")) + case "did.v1.Credential.origin": + panic(fmt.Errorf("field origin of message did.v1.Credential is not mutable")) + case "did.v1.Credential.credential_id": + panic(fmt.Errorf("field credential_id of message did.v1.Credential is not mutable")) + case "did.v1.Credential.public_key": + panic(fmt.Errorf("field public_key of message did.v1.Credential is not mutable")) + case "did.v1.Credential.sign_count": + panic(fmt.Errorf("field sign_count of message did.v1.Credential is not mutable")) + case "did.v1.Credential.user_present": + panic(fmt.Errorf("field user_present of message did.v1.Credential is not mutable")) + case "did.v1.Credential.user_verified": + panic(fmt.Errorf("field user_verified of message did.v1.Credential is not mutable")) + case "did.v1.Credential.backup_eligible": + panic(fmt.Errorf("field backup_eligible of message did.v1.Credential is not mutable")) + case "did.v1.Credential.backup_state": + panic(fmt.Errorf("field backup_state of message did.v1.Credential is not mutable")) + case "did.v1.Credential.clone_warning": + panic(fmt.Errorf("field clone_warning of message did.v1.Credential is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) @@ -779,19 +1019,31 @@ func (x *fastReflection_Credential) Mutable(fd protoreflect.FieldDescriptor) pro // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Credential) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Credential.id": + case "did.v1.Credential.subject": return protoreflect.ValueOfString("") - case "did.v1.Credential.credential_type": + case "did.v1.Credential.attestation_type": + return protoreflect.ValueOfString("") + case "did.v1.Credential.origin": return protoreflect.ValueOfString("") case "did.v1.Credential.credential_id": return protoreflect.ValueOfBytes(nil) + case "did.v1.Credential.public_key": + return protoreflect.ValueOfBytes(nil) case "did.v1.Credential.transport": list := []string{} - return protoreflect.ValueOfList(&_Credential_4_list{list: &list}) - case "did.v1.Credential.subject": - return protoreflect.ValueOfString("") - case "did.v1.Credential.controller": - return protoreflect.ValueOfString("") + return protoreflect.ValueOfList(&_Credential_6_list{list: &list}) + case "did.v1.Credential.sign_count": + return protoreflect.ValueOfUint32(uint32(0)) + case "did.v1.Credential.user_present": + return protoreflect.ValueOfBool(false) + case "did.v1.Credential.user_verified": + return protoreflect.ValueOfBool(false) + case "did.v1.Credential.backup_eligible": + return protoreflect.ValueOfBool(false) + case "did.v1.Credential.backup_state": + return protoreflect.ValueOfBool(false) + case "did.v1.Credential.clone_warning": + return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) @@ -861,11 +1113,15 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Id) + l = len(x.Subject) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.CredentialType) + l = len(x.AttestationType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Origin) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -873,19 +1129,33 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.PublicKey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if len(x.Transport) > 0 { for _, s := range x.Transport { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.SignCount != 0 { + n += 1 + runtime.Sov(uint64(x.SignCount)) } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.UserPresent { + n += 2 + } + if x.UserVerified { + n += 2 + } + if x.BackupEligible { + n += 2 + } + if x.BackupState { + n += 2 + } + if x.CloneWarning { + n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) @@ -916,19 +1186,60 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + if x.CloneWarning { i-- - dAtA[i] = 0x3a + if x.CloneWarning { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 } - if len(x.Subject) > 0 { - i -= len(x.Subject) - copy(dAtA[i:], x.Subject) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) + if x.BackupState { i-- - dAtA[i] = 0x32 + if x.BackupState { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if x.BackupEligible { + i-- + if x.BackupEligible { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if x.UserVerified { + i-- + if x.UserVerified { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if x.UserPresent { + i-- + if x.UserPresent { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if x.SignCount != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SignCount)) + i-- + dAtA[i] = 0x38 } if len(x.Transport) > 0 { for iNdEx := len(x.Transport) - 1; iNdEx >= 0; iNdEx-- { @@ -936,27 +1247,41 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.Transport[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Transport[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } } + if len(x.PublicKey) > 0 { + i -= len(x.PublicKey) + copy(dAtA[i:], x.PublicKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey))) + i-- + dAtA[i] = 0x2a + } if len(x.CredentialId) > 0 { i -= len(x.CredentialId) copy(dAtA[i:], x.CredentialId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId))) i-- + dAtA[i] = 0x22 + } + 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.CredentialType) > 0 { - i -= len(x.CredentialType) - copy(dAtA[i:], x.CredentialType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialType))) + if len(x.AttestationType) > 0 { + i -= len(x.AttestationType) + copy(dAtA[i:], x.AttestationType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationType))) i-- dAtA[i] = 0x12 } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + 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] = 0xa } @@ -1011,7 +1336,7 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + 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 { @@ -1039,11 +1364,11 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Id = string(dAtA[iNdEx:postIndex]) + x.Subject = 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 CredentialType", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1071,9 +1396,41 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.CredentialType = string(dAtA[iNdEx:postIndex]) + x.AttestationType = 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 + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) } @@ -1107,7 +1464,41 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { x.CredentialId = []byte{} } iNdEx = postIndex - case 4: + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if x.PublicKey == nil { + x.PublicKey = []byte{} + } + iNdEx = postIndex + case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) } @@ -1139,43 +1530,11 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { } x.Transport = append(x.Transport, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignCount", wireType) } - var stringLen uint64 + x.SignCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1185,24 +1544,111 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.SignCount |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + case 8: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserPresent", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + 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 + } } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + x.UserPresent = bool(v != 0) + case 9: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserVerified", wireType) } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + 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.UserVerified = bool(v != 0) + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BackupEligible", 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.BackupEligible = bool(v != 0) + case 11: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BackupState", 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.BackupState = bool(v != 0) + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CloneWarning", 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.CloneWarning = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1238,774 +1684,49 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_DID_5_list)(nil) +var _ protoreflect.List = (*_Document_3_list)(nil) -type _DID_5_list struct { +type _Document_3_list struct { list *[]string } -func (x *_DID_5_list) Len() int { +func (x *_Document_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_DID_5_list) Get(i int) protoreflect.Value { +func (x *_Document_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_DID_5_list) Set(i int, value protoreflect.Value) { +func (x *_Document_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_DID_5_list) Append(value protoreflect.Value) { +func (x *_Document_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_DID_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message DID at list field Paths as it is not of Message kind")) +func (x *_Document_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Authentication as it is not of Message kind")) } -func (x *_DID_5_list) Truncate(n int) { +func (x *_Document_3_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_DID_5_list) NewElement() protoreflect.Value { +func (x *_Document_3_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_DID_5_list) IsValid() bool { - return x.list != nil -} - -var ( - md_DID protoreflect.MessageDescriptor - fd_DID_method protoreflect.FieldDescriptor - fd_DID_network protoreflect.FieldDescriptor - fd_DID_subject protoreflect.FieldDescriptor - fd_DID_identifier protoreflect.FieldDescriptor - fd_DID_paths protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_DID = File_did_v1_models_proto.Messages().ByName("DID") - fd_DID_method = md_DID.Fields().ByName("method") - fd_DID_network = md_DID.Fields().ByName("network") - fd_DID_subject = md_DID.Fields().ByName("subject") - fd_DID_identifier = md_DID.Fields().ByName("identifier") - fd_DID_paths = md_DID.Fields().ByName("paths") -} - -var _ protoreflect.Message = (*fastReflection_DID)(nil) - -type fastReflection_DID DID - -func (x *DID) ProtoReflect() protoreflect.Message { - return (*fastReflection_DID)(x) -} - -func (x *DID) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DID_messageType fastReflection_DID_messageType -var _ protoreflect.MessageType = fastReflection_DID_messageType{} - -type fastReflection_DID_messageType struct{} - -func (x fastReflection_DID_messageType) Zero() protoreflect.Message { - return (*fastReflection_DID)(nil) -} -func (x fastReflection_DID_messageType) New() protoreflect.Message { - return new(fastReflection_DID) -} -func (x fastReflection_DID_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DID -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DID) Descriptor() protoreflect.MessageDescriptor { - return md_DID -} - -// 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_DID) Type() protoreflect.MessageType { - return _fastReflection_DID_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DID) New() protoreflect.Message { - return new(fastReflection_DID) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DID) Interface() protoreflect.ProtoMessage { - return (*DID)(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_DID) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Method != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method)) - if !f(fd_DID_method, value) { - return - } - } - if x.Network != "" { - value := protoreflect.ValueOfString(x.Network) - if !f(fd_DID_network, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_DID_subject, value) { - return - } - } - if x.Identifier != "" { - value := protoreflect.ValueOfString(x.Identifier) - if !f(fd_DID_identifier, value) { - return - } - } - if len(x.Paths) != 0 { - value := protoreflect.ValueOfList(&_DID_5_list{list: &x.Paths}) - if !f(fd_DID_paths, 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_DID) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.DID.method": - return x.Method != 0 - case "did.v1.DID.network": - return x.Network != "" - case "did.v1.DID.subject": - return x.Subject != "" - case "did.v1.DID.identifier": - return x.Identifier != "" - case "did.v1.DID.paths": - return len(x.Paths) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) - } - panic(fmt.Errorf("message did.v1.DID 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_DID) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.DID.method": - x.Method = 0 - case "did.v1.DID.network": - x.Network = "" - case "did.v1.DID.subject": - x.Subject = "" - case "did.v1.DID.identifier": - x.Identifier = "" - case "did.v1.DID.paths": - x.Paths = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) - } - panic(fmt.Errorf("message did.v1.DID 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_DID) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.DID.method": - value := x.Method - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "did.v1.DID.network": - value := x.Network - return protoreflect.ValueOfString(value) - case "did.v1.DID.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.DID.identifier": - value := x.Identifier - return protoreflect.ValueOfString(value) - case "did.v1.DID.paths": - if len(x.Paths) == 0 { - return protoreflect.ValueOfList(&_DID_5_list{}) - } - listValue := &_DID_5_list{list: &x.Paths} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) - } - panic(fmt.Errorf("message did.v1.DID 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_DID) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.DID.method": - x.Method = (DIDNamespace)(value.Enum()) - case "did.v1.DID.network": - x.Network = value.Interface().(string) - case "did.v1.DID.subject": - x.Subject = value.Interface().(string) - case "did.v1.DID.identifier": - x.Identifier = value.Interface().(string) - case "did.v1.DID.paths": - lv := value.List() - clv := lv.(*_DID_5_list) - x.Paths = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) - } - panic(fmt.Errorf("message did.v1.DID 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_DID) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.DID.paths": - if x.Paths == nil { - x.Paths = []string{} - } - value := &_DID_5_list{list: &x.Paths} - return protoreflect.ValueOfList(value) - case "did.v1.DID.method": - panic(fmt.Errorf("field method of message did.v1.DID is not mutable")) - case "did.v1.DID.network": - panic(fmt.Errorf("field network of message did.v1.DID is not mutable")) - case "did.v1.DID.subject": - panic(fmt.Errorf("field subject of message did.v1.DID is not mutable")) - case "did.v1.DID.identifier": - panic(fmt.Errorf("field identifier of message did.v1.DID is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) - } - panic(fmt.Errorf("message did.v1.DID 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_DID) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.DID.method": - return protoreflect.ValueOfEnum(0) - case "did.v1.DID.network": - return protoreflect.ValueOfString("") - case "did.v1.DID.subject": - return protoreflect.ValueOfString("") - case "did.v1.DID.identifier": - return protoreflect.ValueOfString("") - case "did.v1.DID.paths": - list := []string{} - return protoreflect.ValueOfList(&_DID_5_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) - } - panic(fmt.Errorf("message did.v1.DID 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_DID) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.DID", 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_DID) 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_DID) 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_DID) 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_DID) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DID) - 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.Method != 0 { - n += 1 + runtime.Sov(uint64(x.Method)) - } - l = len(x.Network) - 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.Identifier) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Paths) > 0 { - for _, s := range x.Paths { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DID) - 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.Paths) > 0 { - for iNdEx := len(x.Paths) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Paths[iNdEx]) - copy(dAtA[i:], x.Paths[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Paths[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.Identifier) > 0 { - i -= len(x.Identifier) - copy(dAtA[i:], x.Identifier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier))) - i-- - dAtA[i] = 0x22 - } - 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] = 0x1a - } - if len(x.Network) > 0 { - i -= len(x.Network) - copy(dAtA[i:], x.Network) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Network))) - i-- - dAtA[i] = 0x12 - } - if x.Method != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Method)) - 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().(*DID) - 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: DID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DID: 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 Method", wireType) - } - x.Method = 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.Method |= DIDNamespace(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Network = 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 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 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Paths = append(x.Paths, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Document_2_list)(nil) - -type _Document_2_list struct { - list *[]*VerificationMethod -} - -func (x *_Document_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Document_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - (*x.list)[i] = concreteValue -} - -func (x *_Document_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_2_list) AppendMutable() protoreflect.Value { - v := new(VerificationMethod) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Document_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Document_2_list) NewElement() protoreflect.Value { - v := new(VerificationMethod) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Document_2_list) IsValid() bool { +func (x *_Document_3_list) IsValid() bool { return x.list != nil } @@ -2039,7 +1760,7 @@ func (x *_Document_4_list) Append(value protoreflect.Value) { } func (x *_Document_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Authentication as it is not of Message kind")) + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field AssertionMethod as it is not of Message kind")) } func (x *_Document_4_list) Truncate(n int) { @@ -2085,7 +1806,7 @@ func (x *_Document_5_list) Append(value protoreflect.Value) { } func (x *_Document_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field AssertionMethod as it is not of Message kind")) + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityDelegation as it is not of Message kind")) } func (x *_Document_5_list) Truncate(n int) { @@ -2101,6 +1822,52 @@ func (x *_Document_5_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Document_6_list)(nil) + +type _Document_6_list struct { + list *[]string +} + +func (x *_Document_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_6_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityInvocation as it is not of Message kind")) +} + +func (x *_Document_6_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_6_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_6_list) IsValid() bool { + return x.list != nil +} + var _ protoreflect.List = (*_Document_7_list)(nil) type _Document_7_list struct { @@ -2131,7 +1898,7 @@ func (x *_Document_7_list) Append(value protoreflect.Value) { } func (x *_Document_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityDelegation as it is not of Message kind")) + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Service as it is not of Message kind")) } func (x *_Document_7_list) Truncate(n int) { @@ -2147,102 +1914,10 @@ func (x *_Document_7_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_Document_8_list)(nil) - -type _Document_8_list struct { - list *[]string -} - -func (x *_Document_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_8_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityInvocation as it is not of Message kind")) -} - -func (x *_Document_8_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_8_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_8_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Document_9_list)(nil) - -type _Document_9_list struct { - list *[]string -} - -func (x *_Document_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_9_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Service as it is not of Message kind")) -} - -func (x *_Document_9_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_9_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_9_list) IsValid() bool { - return x.list != nil -} - var ( md_Document protoreflect.MessageDescriptor fd_Document_id protoreflect.FieldDescriptor - fd_Document_verification_methods protoreflect.FieldDescriptor + fd_Document_controller protoreflect.FieldDescriptor fd_Document_authentication protoreflect.FieldDescriptor fd_Document_assertion_method protoreflect.FieldDescriptor fd_Document_capability_delegation protoreflect.FieldDescriptor @@ -2254,7 +1929,7 @@ func init() { file_did_v1_models_proto_init() md_Document = File_did_v1_models_proto.Messages().ByName("Document") fd_Document_id = md_Document.Fields().ByName("id") - fd_Document_verification_methods = md_Document.Fields().ByName("verification_methods") + fd_Document_controller = md_Document.Fields().ByName("controller") fd_Document_authentication = md_Document.Fields().ByName("authentication") fd_Document_assertion_method = md_Document.Fields().ByName("assertion_method") fd_Document_capability_delegation = md_Document.Fields().ByName("capability_delegation") @@ -2271,7 +1946,7 @@ func (x *Document) ProtoReflect() protoreflect.Message { } func (x *Document) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[3] + mi := &file_did_v1_models_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2333,38 +2008,38 @@ func (x *fastReflection_Document) Range(f func(protoreflect.FieldDescriptor, pro return } } - if len(x.VerificationMethods) != 0 { - value := protoreflect.ValueOfList(&_Document_2_list{list: &x.VerificationMethods}) - if !f(fd_Document_verification_methods, value) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Document_controller, value) { return } } if len(x.Authentication) != 0 { - value := protoreflect.ValueOfList(&_Document_4_list{list: &x.Authentication}) + value := protoreflect.ValueOfList(&_Document_3_list{list: &x.Authentication}) if !f(fd_Document_authentication, value) { return } } if len(x.AssertionMethod) != 0 { - value := protoreflect.ValueOfList(&_Document_5_list{list: &x.AssertionMethod}) + value := protoreflect.ValueOfList(&_Document_4_list{list: &x.AssertionMethod}) if !f(fd_Document_assertion_method, value) { return } } if len(x.CapabilityDelegation) != 0 { - value := protoreflect.ValueOfList(&_Document_7_list{list: &x.CapabilityDelegation}) + value := protoreflect.ValueOfList(&_Document_5_list{list: &x.CapabilityDelegation}) if !f(fd_Document_capability_delegation, value) { return } } if len(x.CapabilityInvocation) != 0 { - value := protoreflect.ValueOfList(&_Document_8_list{list: &x.CapabilityInvocation}) + value := protoreflect.ValueOfList(&_Document_6_list{list: &x.CapabilityInvocation}) if !f(fd_Document_capability_invocation, value) { return } } if len(x.Service) != 0 { - value := protoreflect.ValueOfList(&_Document_9_list{list: &x.Service}) + value := protoreflect.ValueOfList(&_Document_7_list{list: &x.Service}) if !f(fd_Document_service, value) { return } @@ -2386,8 +2061,8 @@ func (x *fastReflection_Document) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "did.v1.Document.id": return x.Id != "" - case "did.v1.Document.verification_methods": - return len(x.VerificationMethods) != 0 + case "did.v1.Document.controller": + return x.Controller != "" case "did.v1.Document.authentication": return len(x.Authentication) != 0 case "did.v1.Document.assertion_method": @@ -2416,8 +2091,8 @@ func (x *fastReflection_Document) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.Document.id": x.Id = "" - case "did.v1.Document.verification_methods": - x.VerificationMethods = nil + case "did.v1.Document.controller": + x.Controller = "" case "did.v1.Document.authentication": x.Authentication = nil case "did.v1.Document.assertion_method": @@ -2447,41 +2122,38 @@ func (x *fastReflection_Document) Get(descriptor protoreflect.FieldDescriptor) p case "did.v1.Document.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Document.verification_methods": - if len(x.VerificationMethods) == 0 { - return protoreflect.ValueOfList(&_Document_2_list{}) - } - listValue := &_Document_2_list{list: &x.VerificationMethods} - return protoreflect.ValueOfList(listValue) + case "did.v1.Document.controller": + value := x.Controller + return protoreflect.ValueOfString(value) case "did.v1.Document.authentication": if len(x.Authentication) == 0 { - return protoreflect.ValueOfList(&_Document_4_list{}) + return protoreflect.ValueOfList(&_Document_3_list{}) } - listValue := &_Document_4_list{list: &x.Authentication} + listValue := &_Document_3_list{list: &x.Authentication} return protoreflect.ValueOfList(listValue) case "did.v1.Document.assertion_method": if len(x.AssertionMethod) == 0 { - return protoreflect.ValueOfList(&_Document_5_list{}) + return protoreflect.ValueOfList(&_Document_4_list{}) } - listValue := &_Document_5_list{list: &x.AssertionMethod} + listValue := &_Document_4_list{list: &x.AssertionMethod} return protoreflect.ValueOfList(listValue) case "did.v1.Document.capability_delegation": if len(x.CapabilityDelegation) == 0 { - return protoreflect.ValueOfList(&_Document_7_list{}) + return protoreflect.ValueOfList(&_Document_5_list{}) } - listValue := &_Document_7_list{list: &x.CapabilityDelegation} + listValue := &_Document_5_list{list: &x.CapabilityDelegation} return protoreflect.ValueOfList(listValue) case "did.v1.Document.capability_invocation": if len(x.CapabilityInvocation) == 0 { - return protoreflect.ValueOfList(&_Document_8_list{}) + return protoreflect.ValueOfList(&_Document_6_list{}) } - listValue := &_Document_8_list{list: &x.CapabilityInvocation} + listValue := &_Document_6_list{list: &x.CapabilityInvocation} return protoreflect.ValueOfList(listValue) case "did.v1.Document.service": if len(x.Service) == 0 { - return protoreflect.ValueOfList(&_Document_9_list{}) + return protoreflect.ValueOfList(&_Document_7_list{}) } - listValue := &_Document_9_list{list: &x.Service} + listValue := &_Document_7_list{list: &x.Service} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { @@ -2505,29 +2177,27 @@ func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value pro switch fd.FullName() { case "did.v1.Document.id": x.Id = value.Interface().(string) - case "did.v1.Document.verification_methods": - lv := value.List() - clv := lv.(*_Document_2_list) - x.VerificationMethods = *clv.list + case "did.v1.Document.controller": + x.Controller = value.Interface().(string) case "did.v1.Document.authentication": lv := value.List() - clv := lv.(*_Document_4_list) + clv := lv.(*_Document_3_list) x.Authentication = *clv.list case "did.v1.Document.assertion_method": lv := value.List() - clv := lv.(*_Document_5_list) + clv := lv.(*_Document_4_list) x.AssertionMethod = *clv.list case "did.v1.Document.capability_delegation": lv := value.List() - clv := lv.(*_Document_7_list) + clv := lv.(*_Document_5_list) x.CapabilityDelegation = *clv.list case "did.v1.Document.capability_invocation": lv := value.List() - clv := lv.(*_Document_8_list) + clv := lv.(*_Document_6_list) x.CapabilityInvocation = *clv.list case "did.v1.Document.service": lv := value.List() - clv := lv.(*_Document_9_list) + clv := lv.(*_Document_7_list) x.Service = *clv.list default: if fd.IsExtension() { @@ -2549,44 +2219,40 @@ func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value pro // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Document) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Document.verification_methods": - if x.VerificationMethods == nil { - x.VerificationMethods = []*VerificationMethod{} - } - value := &_Document_2_list{list: &x.VerificationMethods} - return protoreflect.ValueOfList(value) case "did.v1.Document.authentication": if x.Authentication == nil { x.Authentication = []string{} } - value := &_Document_4_list{list: &x.Authentication} + value := &_Document_3_list{list: &x.Authentication} return protoreflect.ValueOfList(value) case "did.v1.Document.assertion_method": if x.AssertionMethod == nil { x.AssertionMethod = []string{} } - value := &_Document_5_list{list: &x.AssertionMethod} + value := &_Document_4_list{list: &x.AssertionMethod} return protoreflect.ValueOfList(value) case "did.v1.Document.capability_delegation": if x.CapabilityDelegation == nil { x.CapabilityDelegation = []string{} } - value := &_Document_7_list{list: &x.CapabilityDelegation} + value := &_Document_5_list{list: &x.CapabilityDelegation} return protoreflect.ValueOfList(value) case "did.v1.Document.capability_invocation": if x.CapabilityInvocation == nil { x.CapabilityInvocation = []string{} } - value := &_Document_8_list{list: &x.CapabilityInvocation} + value := &_Document_6_list{list: &x.CapabilityInvocation} return protoreflect.ValueOfList(value) case "did.v1.Document.service": if x.Service == nil { x.Service = []string{} } - value := &_Document_9_list{list: &x.Service} + value := &_Document_7_list{list: &x.Service} return protoreflect.ValueOfList(value) case "did.v1.Document.id": panic(fmt.Errorf("field id of message did.v1.Document is not mutable")) + case "did.v1.Document.controller": + panic(fmt.Errorf("field controller of message did.v1.Document is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) @@ -2602,24 +2268,23 @@ func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) prot switch fd.FullName() { case "did.v1.Document.id": return protoreflect.ValueOfString("") - case "did.v1.Document.verification_methods": - list := []*VerificationMethod{} - return protoreflect.ValueOfList(&_Document_2_list{list: &list}) + case "did.v1.Document.controller": + return protoreflect.ValueOfString("") case "did.v1.Document.authentication": list := []string{} - return protoreflect.ValueOfList(&_Document_4_list{list: &list}) + return protoreflect.ValueOfList(&_Document_3_list{list: &list}) case "did.v1.Document.assertion_method": list := []string{} - return protoreflect.ValueOfList(&_Document_5_list{list: &list}) + return protoreflect.ValueOfList(&_Document_4_list{list: &list}) case "did.v1.Document.capability_delegation": list := []string{} - return protoreflect.ValueOfList(&_Document_7_list{list: &list}) + return protoreflect.ValueOfList(&_Document_5_list{list: &list}) case "did.v1.Document.capability_invocation": list := []string{} - return protoreflect.ValueOfList(&_Document_8_list{list: &list}) + return protoreflect.ValueOfList(&_Document_6_list{list: &list}) case "did.v1.Document.service": list := []string{} - return protoreflect.ValueOfList(&_Document_9_list{list: &list}) + return protoreflect.ValueOfList(&_Document_7_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) @@ -2693,11 +2358,9 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.VerificationMethods) > 0 { - for _, e := range x.VerificationMethods { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Authentication) > 0 { for _, s := range x.Authentication { @@ -2764,7 +2427,7 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.Service[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Service[iNdEx]))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x3a } } if len(x.CapabilityInvocation) > 0 { @@ -2773,7 +2436,7 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.CapabilityInvocation[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityInvocation[iNdEx]))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x32 } } if len(x.CapabilityDelegation) > 0 { @@ -2782,7 +2445,7 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.CapabilityDelegation[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityDelegation[iNdEx]))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x2a } } if len(x.AssertionMethod) > 0 { @@ -2791,7 +2454,7 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.AssertionMethod[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssertionMethod[iNdEx]))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } if len(x.Authentication) > 0 { @@ -2800,24 +2463,15 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.Authentication[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authentication[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } } - if len(x.VerificationMethods) > 0 { - for iNdEx := len(x.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.VerificationMethods[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0x12 } if len(x.Id) > 0 { i -= len(x.Id) @@ -2909,9 +2563,9 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2921,27 +2575,25 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.VerificationMethods = append(x.VerificationMethods, &VerificationMethod{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VerificationMethods[len(x.VerificationMethods)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) } @@ -2973,7 +2625,7 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } x.Authentication = append(x.Authentication, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssertionMethod", wireType) } @@ -3005,7 +2657,7 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } x.AssertionMethod = append(x.AssertionMethod, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 7: + case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CapabilityDelegation", wireType) } @@ -3037,7 +2689,7 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } x.CapabilityDelegation = append(x.CapabilityDelegation, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 8: + case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CapabilityInvocation", wireType) } @@ -3069,7 +2721,7 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } x.CapabilityInvocation = append(x.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 9: + case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } @@ -3136,760 +2788,20 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } } -var ( - md_JWK protoreflect.MessageDescriptor - fd_JWK_kty protoreflect.FieldDescriptor - fd_JWK_crv protoreflect.FieldDescriptor - fd_JWK_x protoreflect.FieldDescriptor - fd_JWK_y protoreflect.FieldDescriptor - fd_JWK_n protoreflect.FieldDescriptor - fd_JWK_e protoreflect.FieldDescriptor -) +var _ protoreflect.Map = (*_Keyshare_1_map)(nil) -func init() { - file_did_v1_models_proto_init() - md_JWK = File_did_v1_models_proto.Messages().ByName("JWK") - fd_JWK_kty = md_JWK.Fields().ByName("kty") - fd_JWK_crv = md_JWK.Fields().ByName("crv") - fd_JWK_x = md_JWK.Fields().ByName("x") - fd_JWK_y = md_JWK.Fields().ByName("y") - fd_JWK_n = md_JWK.Fields().ByName("n") - fd_JWK_e = md_JWK.Fields().ByName("e") -} - -var _ protoreflect.Message = (*fastReflection_JWK)(nil) - -type fastReflection_JWK JWK - -func (x *JWK) ProtoReflect() protoreflect.Message { - return (*fastReflection_JWK)(x) -} - -func (x *JWK) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_JWK_messageType fastReflection_JWK_messageType -var _ protoreflect.MessageType = fastReflection_JWK_messageType{} - -type fastReflection_JWK_messageType struct{} - -func (x fastReflection_JWK_messageType) Zero() protoreflect.Message { - return (*fastReflection_JWK)(nil) -} -func (x fastReflection_JWK_messageType) New() protoreflect.Message { - return new(fastReflection_JWK) -} -func (x fastReflection_JWK_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_JWK -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_JWK) Descriptor() protoreflect.MessageDescriptor { - return md_JWK -} - -// 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_JWK) Type() protoreflect.MessageType { - return _fastReflection_JWK_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_JWK) New() protoreflect.Message { - return new(fastReflection_JWK) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_JWK) Interface() protoreflect.ProtoMessage { - return (*JWK)(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_JWK) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Kty != "" { - value := protoreflect.ValueOfString(x.Kty) - if !f(fd_JWK_kty, value) { - return - } - } - if x.Crv != "" { - value := protoreflect.ValueOfString(x.Crv) - if !f(fd_JWK_crv, value) { - return - } - } - if x.X != "" { - value := protoreflect.ValueOfString(x.X) - if !f(fd_JWK_x, value) { - return - } - } - if x.Y != "" { - value := protoreflect.ValueOfString(x.Y) - if !f(fd_JWK_y, value) { - return - } - } - if x.N != "" { - value := protoreflect.ValueOfString(x.N) - if !f(fd_JWK_n, value) { - return - } - } - if x.E != "" { - value := protoreflect.ValueOfString(x.E) - if !f(fd_JWK_e, 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_JWK) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.JWK.kty": - return x.Kty != "" - case "did.v1.JWK.crv": - return x.Crv != "" - case "did.v1.JWK.x": - return x.X != "" - case "did.v1.JWK.y": - return x.Y != "" - case "did.v1.JWK.n": - return x.N != "" - case "did.v1.JWK.e": - return x.E != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.JWK")) - } - panic(fmt.Errorf("message did.v1.JWK 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_JWK) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.JWK.kty": - x.Kty = "" - case "did.v1.JWK.crv": - x.Crv = "" - case "did.v1.JWK.x": - x.X = "" - case "did.v1.JWK.y": - x.Y = "" - case "did.v1.JWK.n": - x.N = "" - case "did.v1.JWK.e": - x.E = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.JWK")) - } - panic(fmt.Errorf("message did.v1.JWK 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_JWK) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.JWK.kty": - value := x.Kty - return protoreflect.ValueOfString(value) - case "did.v1.JWK.crv": - value := x.Crv - return protoreflect.ValueOfString(value) - case "did.v1.JWK.x": - value := x.X - return protoreflect.ValueOfString(value) - case "did.v1.JWK.y": - value := x.Y - return protoreflect.ValueOfString(value) - case "did.v1.JWK.n": - value := x.N - return protoreflect.ValueOfString(value) - case "did.v1.JWK.e": - value := x.E - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.JWK")) - } - panic(fmt.Errorf("message did.v1.JWK 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_JWK) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.JWK.kty": - x.Kty = value.Interface().(string) - case "did.v1.JWK.crv": - x.Crv = value.Interface().(string) - case "did.v1.JWK.x": - x.X = value.Interface().(string) - case "did.v1.JWK.y": - x.Y = value.Interface().(string) - case "did.v1.JWK.n": - x.N = value.Interface().(string) - case "did.v1.JWK.e": - x.E = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.JWK")) - } - panic(fmt.Errorf("message did.v1.JWK 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_JWK) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.JWK.kty": - panic(fmt.Errorf("field kty of message did.v1.JWK is not mutable")) - case "did.v1.JWK.crv": - panic(fmt.Errorf("field crv of message did.v1.JWK is not mutable")) - case "did.v1.JWK.x": - panic(fmt.Errorf("field x of message did.v1.JWK is not mutable")) - case "did.v1.JWK.y": - panic(fmt.Errorf("field y of message did.v1.JWK is not mutable")) - case "did.v1.JWK.n": - panic(fmt.Errorf("field n of message did.v1.JWK is not mutable")) - case "did.v1.JWK.e": - panic(fmt.Errorf("field e of message did.v1.JWK is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.JWK")) - } - panic(fmt.Errorf("message did.v1.JWK 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_JWK) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.JWK.kty": - return protoreflect.ValueOfString("") - case "did.v1.JWK.crv": - return protoreflect.ValueOfString("") - case "did.v1.JWK.x": - return protoreflect.ValueOfString("") - case "did.v1.JWK.y": - return protoreflect.ValueOfString("") - case "did.v1.JWK.n": - return protoreflect.ValueOfString("") - case "did.v1.JWK.e": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.JWK")) - } - panic(fmt.Errorf("message did.v1.JWK 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_JWK) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.JWK", 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_JWK) 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_JWK) 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_JWK) 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_JWK) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*JWK) - 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.Kty) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Crv) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.X) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Y) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.N) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.E) - 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().(*JWK) - 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.E) > 0 { - i -= len(x.E) - copy(dAtA[i:], x.E) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.E))) - i-- - dAtA[i] = 0x32 - } - if len(x.N) > 0 { - i -= len(x.N) - copy(dAtA[i:], x.N) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.N))) - i-- - dAtA[i] = 0x2a - } - if len(x.Y) > 0 { - i -= len(x.Y) - copy(dAtA[i:], x.Y) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Y))) - i-- - dAtA[i] = 0x22 - } - if len(x.X) > 0 { - i -= len(x.X) - copy(dAtA[i:], x.X) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.X))) - i-- - dAtA[i] = 0x1a - } - if len(x.Crv) > 0 { - i -= len(x.Crv) - copy(dAtA[i:], x.Crv) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Crv))) - i-- - dAtA[i] = 0x12 - } - if len(x.Kty) > 0 { - i -= len(x.Kty) - copy(dAtA[i:], x.Kty) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Kty))) - 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().(*JWK) - 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: JWK: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: JWK: 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 Kty", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Kty = 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 Crv", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Crv = 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 X", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.X = 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 Y", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Y = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field N", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.N = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field E", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.E = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.Map = (*_Metadata_2_map)(nil) - -type _Metadata_2_map struct { +type _Keyshare_1_map struct { m *map[string]string } -func (x *_Metadata_2_map) Len() int { +func (x *_Keyshare_1_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } -func (x *_Metadata_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { +func (x *_Keyshare_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } @@ -3902,7 +2814,7 @@ func (x *_Metadata_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) } } -func (x *_Metadata_2_map) Has(key protoreflect.MapKey) bool { +func (x *_Keyshare_1_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } @@ -3912,7 +2824,7 @@ func (x *_Metadata_2_map) Has(key protoreflect.MapKey) bool { return ok } -func (x *_Metadata_2_map) Clear(key protoreflect.MapKey) { +func (x *_Keyshare_1_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } @@ -3921,7 +2833,7 @@ func (x *_Metadata_2_map) Clear(key protoreflect.MapKey) { delete(*x.m, concreteKey) } -func (x *_Metadata_2_map) Get(key protoreflect.MapKey) protoreflect.Value { +func (x *_Keyshare_1_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } @@ -3934,7 +2846,7 @@ func (x *_Metadata_2_map) Get(key protoreflect.MapKey) protoreflect.Value { return protoreflect.ValueOfString(v) } -func (x *_Metadata_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { +func (x *_Keyshare_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } @@ -3945,46 +2857,46 @@ func (x *_Metadata_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) (*x.m)[concreteKey] = concreteValue } -func (x *_Metadata_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { +func (x *_Keyshare_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } -func (x *_Metadata_2_map) NewValue() protoreflect.Value { +func (x *_Keyshare_1_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_Metadata_2_map) IsValid() bool { +func (x *_Keyshare_1_map) IsValid() bool { return x.m != nil } -var _ protoreflect.Map = (*_Metadata_3_map)(nil) +var _ protoreflect.Map = (*_Keyshare_2_map)(nil) -type _Metadata_3_map struct { - m *map[string]*Property +type _Keyshare_2_map struct { + m *map[string][]byte } -func (x *_Metadata_3_map) Len() int { +func (x *_Keyshare_2_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } -func (x *_Metadata_3_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { +func (x *_Keyshare_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) + mapValue := protoreflect.ValueOfBytes(v) if !f(mapKey, mapValue) { break } } } -func (x *_Metadata_3_map) Has(key protoreflect.MapKey) bool { +func (x *_Keyshare_2_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } @@ -3994,7 +2906,7 @@ func (x *_Metadata_3_map) Has(key protoreflect.MapKey) bool { return ok } -func (x *_Metadata_3_map) Clear(key protoreflect.MapKey) { +func (x *_Keyshare_2_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } @@ -4003,7 +2915,7 @@ func (x *_Metadata_3_map) Clear(key protoreflect.MapKey) { delete(*x.m, concreteKey) } -func (x *_Metadata_3_map) Get(key protoreflect.MapKey) protoreflect.Value { +func (x *_Keyshare_2_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } @@ -4013,66 +2925,64 @@ func (x *_Metadata_3_map) Get(key protoreflect.MapKey) protoreflect.Value { if !ok { return protoreflect.Value{} } - return protoreflect.ValueOfMessage(v.ProtoReflect()) + return protoreflect.ValueOfBytes(v) } -func (x *_Metadata_3_map) Set(key protoreflect.MapKey, value protoreflect.Value) { +func (x *_Keyshare_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Property) + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } -func (x *_Metadata_3_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if ok { - return protoreflect.ValueOfMessage(v.ProtoReflect()) - } - newValue := new(Property) - (*x.m)[concreteKey] = newValue - return protoreflect.ValueOfMessage(newValue.ProtoReflect()) +func (x *_Keyshare_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } -func (x *_Metadata_3_map) NewValue() protoreflect.Value { - v := new(Property) - return protoreflect.ValueOfMessage(v.ProtoReflect()) +func (x *_Keyshare_2_map) NewValue() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) } -func (x *_Metadata_3_map) IsValid() bool { +func (x *_Keyshare_2_map) IsValid() bool { return x.m != nil } var ( - md_Metadata protoreflect.MessageDescriptor - fd_Metadata_origin_uri protoreflect.FieldDescriptor - fd_Metadata_public protoreflect.FieldDescriptor - fd_Metadata_private protoreflect.FieldDescriptor + md_Keyshare protoreflect.MessageDescriptor + fd_Keyshare_metadata protoreflect.FieldDescriptor + fd_Keyshare_payloads protoreflect.FieldDescriptor + fd_Keyshare_protocol protoreflect.FieldDescriptor + fd_Keyshare_public_key protoreflect.FieldDescriptor + fd_Keyshare_version protoreflect.FieldDescriptor + fd_Keyshare_role protoreflect.FieldDescriptor ) func init() { file_did_v1_models_proto_init() - md_Metadata = File_did_v1_models_proto.Messages().ByName("Metadata") - fd_Metadata_origin_uri = md_Metadata.Fields().ByName("origin_uri") - fd_Metadata_public = md_Metadata.Fields().ByName("public") - fd_Metadata_private = md_Metadata.Fields().ByName("private") + md_Keyshare = File_did_v1_models_proto.Messages().ByName("Keyshare") + fd_Keyshare_metadata = md_Keyshare.Fields().ByName("metadata") + fd_Keyshare_payloads = md_Keyshare.Fields().ByName("payloads") + fd_Keyshare_protocol = md_Keyshare.Fields().ByName("protocol") + fd_Keyshare_public_key = md_Keyshare.Fields().ByName("public_key") + fd_Keyshare_version = md_Keyshare.Fields().ByName("version") + fd_Keyshare_role = md_Keyshare.Fields().ByName("role") } -var _ protoreflect.Message = (*fastReflection_Metadata)(nil) +var _ protoreflect.Message = (*fastReflection_Keyshare)(nil) -type fastReflection_Metadata Metadata +type fastReflection_Keyshare Keyshare -func (x *Metadata) ProtoReflect() protoreflect.Message { - return (*fastReflection_Metadata)(x) +func (x *Keyshare) ProtoReflect() protoreflect.Message { + return (*fastReflection_Keyshare)(x) } -func (x *Metadata) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[5] +func (x *Keyshare) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4083,43 +2993,43 @@ func (x *Metadata) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Metadata_messageType fastReflection_Metadata_messageType -var _ protoreflect.MessageType = fastReflection_Metadata_messageType{} +var _fastReflection_Keyshare_messageType fastReflection_Keyshare_messageType +var _ protoreflect.MessageType = fastReflection_Keyshare_messageType{} -type fastReflection_Metadata_messageType struct{} +type fastReflection_Keyshare_messageType struct{} -func (x fastReflection_Metadata_messageType) Zero() protoreflect.Message { - return (*fastReflection_Metadata)(nil) +func (x fastReflection_Keyshare_messageType) Zero() protoreflect.Message { + return (*fastReflection_Keyshare)(nil) } -func (x fastReflection_Metadata_messageType) New() protoreflect.Message { - return new(fastReflection_Metadata) +func (x fastReflection_Keyshare_messageType) New() protoreflect.Message { + return new(fastReflection_Keyshare) } -func (x fastReflection_Metadata_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata +func (x fastReflection_Keyshare_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Keyshare } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Metadata) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata +func (x *fastReflection_Keyshare) Descriptor() protoreflect.MessageDescriptor { + return md_Keyshare } // 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_Metadata) Type() protoreflect.MessageType { - return _fastReflection_Metadata_messageType +func (x *fastReflection_Keyshare) Type() protoreflect.MessageType { + return _fastReflection_Keyshare_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Metadata) New() protoreflect.Message { - return new(fastReflection_Metadata) +func (x *fastReflection_Keyshare) New() protoreflect.Message { + return new(fastReflection_Keyshare) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage { - return (*Metadata)(x) +func (x *fastReflection_Keyshare) Interface() protoreflect.ProtoMessage { + return (*Keyshare)(x) } // Range iterates over every populated field in an undefined order, @@ -4127,22 +3037,40 @@ func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Metadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.OriginUri != "" { - value := protoreflect.ValueOfString(x.OriginUri) - if !f(fd_Metadata_origin_uri, value) { +func (x *fastReflection_Keyshare) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Metadata) != 0 { + value := protoreflect.ValueOfMap(&_Keyshare_1_map{m: &x.Metadata}) + if !f(fd_Keyshare_metadata, value) { return } } - if len(x.Public) != 0 { - value := protoreflect.ValueOfMap(&_Metadata_2_map{m: &x.Public}) - if !f(fd_Metadata_public, value) { + if len(x.Payloads) != 0 { + value := protoreflect.ValueOfMap(&_Keyshare_2_map{m: &x.Payloads}) + if !f(fd_Keyshare_payloads, value) { return } } - if len(x.Private) != 0 { - value := protoreflect.ValueOfMap(&_Metadata_3_map{m: &x.Private}) - if !f(fd_Metadata_private, value) { + if x.Protocol != "" { + value := protoreflect.ValueOfString(x.Protocol) + if !f(fd_Keyshare_protocol, value) { + return + } + } + if len(x.PublicKey) != 0 { + value := protoreflect.ValueOfBytes(x.PublicKey) + if !f(fd_Keyshare_public_key, value) { + return + } + } + if x.Version != uint32(0) { + value := protoreflect.ValueOfUint32(x.Version) + if !f(fd_Keyshare_version, value) { + return + } + } + if x.Role != int32(0) { + value := protoreflect.ValueOfInt32(x.Role) + if !f(fd_Keyshare_role, value) { return } } @@ -4159,19 +3087,25 @@ func (x *fastReflection_Metadata) Range(f func(protoreflect.FieldDescriptor, pro // 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_Metadata) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Keyshare) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Metadata.origin_uri": - return x.OriginUri != "" - case "did.v1.Metadata.public": - return len(x.Public) != 0 - case "did.v1.Metadata.private": - return len(x.Private) != 0 + case "did.v1.Keyshare.metadata": + return len(x.Metadata) != 0 + case "did.v1.Keyshare.payloads": + return len(x.Payloads) != 0 + case "did.v1.Keyshare.protocol": + return x.Protocol != "" + case "did.v1.Keyshare.public_key": + return len(x.PublicKey) != 0 + case "did.v1.Keyshare.version": + return x.Version != uint32(0) + case "did.v1.Keyshare.role": + return x.Role != int32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) } - panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", fd.FullName())) } } @@ -4181,19 +3115,25 @@ func (x *fastReflection_Metadata) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Keyshare) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Metadata.origin_uri": - x.OriginUri = "" - case "did.v1.Metadata.public": - x.Public = nil - case "did.v1.Metadata.private": - x.Private = nil + case "did.v1.Keyshare.metadata": + x.Metadata = nil + case "did.v1.Keyshare.payloads": + x.Payloads = nil + case "did.v1.Keyshare.protocol": + x.Protocol = "" + case "did.v1.Keyshare.public_key": + x.PublicKey = nil + case "did.v1.Keyshare.version": + x.Version = uint32(0) + case "did.v1.Keyshare.role": + x.Role = int32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) } - panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", fd.FullName())) } } @@ -4203,28 +3143,37 @@ func (x *fastReflection_Metadata) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Metadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Keyshare) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Metadata.origin_uri": - value := x.OriginUri + case "did.v1.Keyshare.metadata": + if len(x.Metadata) == 0 { + return protoreflect.ValueOfMap(&_Keyshare_1_map{}) + } + mapValue := &_Keyshare_1_map{m: &x.Metadata} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.Keyshare.payloads": + if len(x.Payloads) == 0 { + return protoreflect.ValueOfMap(&_Keyshare_2_map{}) + } + mapValue := &_Keyshare_2_map{m: &x.Payloads} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.Keyshare.protocol": + value := x.Protocol return protoreflect.ValueOfString(value) - case "did.v1.Metadata.public": - if len(x.Public) == 0 { - return protoreflect.ValueOfMap(&_Metadata_2_map{}) - } - mapValue := &_Metadata_2_map{m: &x.Public} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.Metadata.private": - if len(x.Private) == 0 { - return protoreflect.ValueOfMap(&_Metadata_3_map{}) - } - mapValue := &_Metadata_3_map{m: &x.Private} - return protoreflect.ValueOfMap(mapValue) + case "did.v1.Keyshare.public_key": + value := x.PublicKey + return protoreflect.ValueOfBytes(value) + case "did.v1.Keyshare.version": + value := x.Version + return protoreflect.ValueOfUint32(value) + case "did.v1.Keyshare.role": + value := x.Role + return protoreflect.ValueOfInt32(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) } - panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", descriptor.FullName())) } } @@ -4238,23 +3187,29 @@ func (x *fastReflection_Metadata) Get(descriptor protoreflect.FieldDescriptor) p // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Keyshare) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Metadata.origin_uri": - x.OriginUri = value.Interface().(string) - case "did.v1.Metadata.public": + case "did.v1.Keyshare.metadata": mv := value.Map() - cmv := mv.(*_Metadata_2_map) - x.Public = *cmv.m - case "did.v1.Metadata.private": + cmv := mv.(*_Keyshare_1_map) + x.Metadata = *cmv.m + case "did.v1.Keyshare.payloads": mv := value.Map() - cmv := mv.(*_Metadata_3_map) - x.Private = *cmv.m + cmv := mv.(*_Keyshare_2_map) + x.Payloads = *cmv.m + case "did.v1.Keyshare.protocol": + x.Protocol = value.Interface().(string) + case "did.v1.Keyshare.public_key": + x.PublicKey = value.Bytes() + case "did.v1.Keyshare.version": + x.Version = uint32(value.Uint()) + case "did.v1.Keyshare.role": + x.Role = int32(value.Int()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) } - panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", fd.FullName())) } } @@ -4268,58 +3223,70 @@ func (x *fastReflection_Metadata) Set(fd protoreflect.FieldDescriptor, value pro // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Keyshare) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Metadata.public": - if x.Public == nil { - x.Public = make(map[string]string) + case "did.v1.Keyshare.metadata": + if x.Metadata == nil { + x.Metadata = make(map[string]string) } - value := &_Metadata_2_map{m: &x.Public} + value := &_Keyshare_1_map{m: &x.Metadata} return protoreflect.ValueOfMap(value) - case "did.v1.Metadata.private": - if x.Private == nil { - x.Private = make(map[string]*Property) + case "did.v1.Keyshare.payloads": + if x.Payloads == nil { + x.Payloads = make(map[string][]byte) } - value := &_Metadata_3_map{m: &x.Private} + value := &_Keyshare_2_map{m: &x.Payloads} return protoreflect.ValueOfMap(value) - case "did.v1.Metadata.origin_uri": - panic(fmt.Errorf("field origin_uri of message did.v1.Metadata is not mutable")) + case "did.v1.Keyshare.protocol": + panic(fmt.Errorf("field protocol of message did.v1.Keyshare is not mutable")) + case "did.v1.Keyshare.public_key": + panic(fmt.Errorf("field public_key of message did.v1.Keyshare is not mutable")) + case "did.v1.Keyshare.version": + panic(fmt.Errorf("field version of message did.v1.Keyshare is not mutable")) + case "did.v1.Keyshare.role": + panic(fmt.Errorf("field role of message did.v1.Keyshare is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) } - panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Keyshare 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_Metadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Keyshare) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Metadata.origin_uri": - return protoreflect.ValueOfString("") - case "did.v1.Metadata.public": + case "did.v1.Keyshare.metadata": m := make(map[string]string) - return protoreflect.ValueOfMap(&_Metadata_2_map{m: &m}) - case "did.v1.Metadata.private": - m := make(map[string]*Property) - return protoreflect.ValueOfMap(&_Metadata_3_map{m: &m}) + return protoreflect.ValueOfMap(&_Keyshare_1_map{m: &m}) + case "did.v1.Keyshare.payloads": + m := make(map[string][]byte) + return protoreflect.ValueOfMap(&_Keyshare_2_map{m: &m}) + case "did.v1.Keyshare.protocol": + return protoreflect.ValueOfString("") + case "did.v1.Keyshare.public_key": + return protoreflect.ValueOfBytes(nil) + case "did.v1.Keyshare.version": + return protoreflect.ValueOfUint32(uint32(0)) + case "did.v1.Keyshare.role": + return protoreflect.ValueOfInt32(int32(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) } - panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Keyshare 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_Metadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Keyshare) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Metadata", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Keyshare", d.FullName())) } panic("unreachable") } @@ -4327,7 +3294,7 @@ func (x *fastReflection_Metadata) WhichOneof(d protoreflect.OneofDescriptor) pro // 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_Metadata) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Keyshare) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4338,7 +3305,7 @@ func (x *fastReflection_Metadata) 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_Metadata) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Keyshare) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4350,7 +3317,7 @@ func (x *fastReflection_Metadata) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Metadata) IsValid() bool { +func (x *fastReflection_Keyshare) IsValid() bool { return x != nil } @@ -4360,9 +3327,9 @@ func (x *fastReflection_Metadata) 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_Metadata) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Keyshare) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Metadata) + x := input.Message.Interface().(*Keyshare) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4374,57 +3341,63 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.OriginUri) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Public) > 0 { + if len(x.Metadata) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { - sortme := make([]string, 0, len(x.Public)) - for k := range x.Public { + sortme := make([]string, 0, len(x.Metadata)) + for k := range x.Metadata { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { - v := x.Public[k] + v := x.Metadata[k] SiZeMaP(k, v) } } else { - for k, v := range x.Public { + for k, v := range x.Metadata { SiZeMaP(k, v) } } } - if len(x.Private) > 0 { - SiZeMaP := func(k string, v *Property) { - l := 0 - if v != nil { - l = options.Size(v) - } - l += 1 + runtime.Sov(uint64(l)) + if len(x.Payloads) > 0 { + SiZeMaP := func(k string, v []byte) { + l = 1 + len(v) + runtime.Sov(uint64(len(v))) mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { - sortme := make([]string, 0, len(x.Private)) - for k := range x.Private { + sortme := make([]string, 0, len(x.Payloads)) + for k := range x.Payloads { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { - v := x.Private[k] + v := x.Payloads[k] SiZeMaP(k, v) } } else { - for k, v := range x.Private { + for k, v := range x.Payloads { SiZeMaP(k, v) } } } + l = len(x.Protocol) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PublicKey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Version != 0 { + n += 1 + runtime.Sov(uint64(x.Version)) + } + if x.Role != 0 { + n += 1 + runtime.Sov(uint64(x.Role)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4435,7 +3408,7 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Metadata) + x := input.Message.Interface().(*Keyshare) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4454,58 +3427,32 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Private) > 0 { - MaRsHaLmAp := func(k string, v *Property) (protoiface.MarshalOutput, error) { - baseI := i - encoded, err := options.Marshal(v) - 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 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForPrivate := make([]string, 0, len(x.Private)) - for k := range x.Private { - keysForPrivate = append(keysForPrivate, string(k)) - } - sort.Slice(keysForPrivate, func(i, j int) bool { - return keysForPrivate[i] < keysForPrivate[j] - }) - for iNdEx := len(keysForPrivate) - 1; iNdEx >= 0; iNdEx-- { - v := x.Private[string(keysForPrivate[iNdEx])] - out, err := MaRsHaLmAp(keysForPrivate[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Private { - v := x.Private[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } + if x.Role != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Role)) + i-- + dAtA[i] = 0x30 } - if len(x.Public) > 0 { - MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + if x.Version != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Version)) + i-- + dAtA[i] = 0x28 + } + if len(x.PublicKey) > 0 { + i -= len(x.PublicKey) + copy(dAtA[i:], x.PublicKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey))) + i-- + dAtA[i] = 0x22 + } + if len(x.Protocol) > 0 { + i -= len(x.Protocol) + copy(dAtA[i:], x.Protocol) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Protocol))) + i-- + dAtA[i] = 0x1a + } + if len(x.Payloads) > 0 { + MaRsHaLmAp := func(k string, v []byte) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) copy(dAtA[i:], v) @@ -4523,23 +3470,23 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { return protoiface.MarshalOutput{}, nil } if options.Deterministic { - keysForPublic := make([]string, 0, len(x.Public)) - for k := range x.Public { - keysForPublic = append(keysForPublic, string(k)) + keysForPayloads := make([]string, 0, len(x.Payloads)) + for k := range x.Payloads { + keysForPayloads = append(keysForPayloads, string(k)) } - sort.Slice(keysForPublic, func(i, j int) bool { - return keysForPublic[i] < keysForPublic[j] + sort.Slice(keysForPayloads, func(i, j int) bool { + return keysForPayloads[i] < keysForPayloads[j] }) - for iNdEx := len(keysForPublic) - 1; iNdEx >= 0; iNdEx-- { - v := x.Public[string(keysForPublic[iNdEx])] - out, err := MaRsHaLmAp(keysForPublic[iNdEx], v) + for iNdEx := len(keysForPayloads) - 1; iNdEx >= 0; iNdEx-- { + v := x.Payloads[string(keysForPayloads[iNdEx])] + out, err := MaRsHaLmAp(keysForPayloads[iNdEx], v) if err != nil { return out, err } } } else { - for k := range x.Public { - v := x.Public[k] + for k := range x.Payloads { + v := x.Payloads[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err @@ -4547,12 +3494,48 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { } } } - if len(x.OriginUri) > 0 { - i -= len(x.OriginUri) - copy(dAtA[i:], x.OriginUri) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri))) - i-- - dAtA[i] = 0xa + if len(x.Metadata) > 0 { + MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForMetadata := make([]string, 0, len(x.Metadata)) + for k := range x.Metadata { + keysForMetadata = append(keysForMetadata, string(k)) + } + sort.Slice(keysForMetadata, func(i, j int) bool { + return keysForMetadata[i] < keysForMetadata[j] + }) + for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { + v := x.Metadata[string(keysForMetadata[iNdEx])] + out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Metadata { + v := x.Metadata[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -4565,7 +3548,7 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Metadata) + x := input.Message.Interface().(*Keyshare) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4597,47 +3580,15 @@ func (x *fastReflection_Metadata) 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: Metadata: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Keyshare: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Keyshare: 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 OriginUri", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginUri = 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 Public", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4664,8 +3615,8 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Public == nil { - x.Public = make(map[string]string) + if x.Metadata == nil { + x.Metadata = make(map[string]string) } var mapkey string var mapvalue string @@ -4760,11 +3711,11 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { iNdEx += skippy } } - x.Public[mapkey] = mapvalue + x.Metadata[mapkey] = mapvalue iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Private", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payloads", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4791,11 +3742,11 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Private == nil { - x.Private = make(map[string]*Property) + if x.Payloads == nil { + x.Payloads = make(map[string][]byte) } var mapkey string - var mapvalue *Property + var mapvalue []byte for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -4844,7 +3795,7 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var mapmsglen int + var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4854,26 +3805,25 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= int(b&0x7F) << shift + mapbyteLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if mapmsglen < 0 { + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - if postmsgIndex > l { + if postbytesIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - mapvalue = &Property{} - if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postmsgIndex + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4889,8 +3839,112 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { iNdEx += skippy } } - x.Private[mapkey] = mapvalue + x.Payloads[mapkey] = mapvalue iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Protocol = 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 PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if x.PublicKey == nil { + x.PublicKey = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + x.Version = 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.Version |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + x.Role = 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.Role |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5040,7 +4094,7 @@ func (x *Permissions) ProtoReflect() protoreflect.Message { } func (x *Permissions) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[6] + mi := &file_did_v1_models_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5630,1121 +4684,6 @@ func (x *fastReflection_Permissions) ProtoMethods() *protoiface.Methods { } } -var ( - md_Profile protoreflect.MessageDescriptor - fd_Profile_id protoreflect.FieldDescriptor - fd_Profile_subject protoreflect.FieldDescriptor - fd_Profile_controller protoreflect.FieldDescriptor - fd_Profile_metadata protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_Profile = File_did_v1_models_proto.Messages().ByName("Profile") - fd_Profile_id = md_Profile.Fields().ByName("id") - fd_Profile_subject = md_Profile.Fields().ByName("subject") - fd_Profile_controller = md_Profile.Fields().ByName("controller") - fd_Profile_metadata = md_Profile.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_Profile)(nil) - -type fastReflection_Profile Profile - -func (x *Profile) ProtoReflect() protoreflect.Message { - return (*fastReflection_Profile)(x) -} - -func (x *Profile) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Profile_messageType fastReflection_Profile_messageType -var _ protoreflect.MessageType = fastReflection_Profile_messageType{} - -type fastReflection_Profile_messageType struct{} - -func (x fastReflection_Profile_messageType) Zero() protoreflect.Message { - return (*fastReflection_Profile)(nil) -} -func (x fastReflection_Profile_messageType) New() protoreflect.Message { - return new(fastReflection_Profile) -} -func (x fastReflection_Profile_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Profile -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Profile) Descriptor() protoreflect.MessageDescriptor { - return md_Profile -} - -// 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_Profile) Type() protoreflect.MessageType { - return _fastReflection_Profile_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Profile) New() protoreflect.Message { - return new(fastReflection_Profile) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Profile) Interface() protoreflect.ProtoMessage { - return (*Profile)(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_Profile) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Profile_id, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Profile_subject, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Profile_controller, value) { - return - } - } - if x.Metadata != nil { - value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - if !f(fd_Profile_metadata, 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_Profile) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Profile.id": - return x.Id != "" - case "did.v1.Profile.subject": - return x.Subject != "" - case "did.v1.Profile.controller": - return x.Controller != "" - case "did.v1.Profile.metadata": - return x.Metadata != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) - } - panic(fmt.Errorf("message did.v1.Profile 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_Profile) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Profile.id": - x.Id = "" - case "did.v1.Profile.subject": - x.Subject = "" - case "did.v1.Profile.controller": - x.Controller = "" - case "did.v1.Profile.metadata": - x.Metadata = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) - } - panic(fmt.Errorf("message did.v1.Profile 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_Profile) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Profile.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.Profile.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.Profile.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.Profile.metadata": - value := x.Metadata - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) - } - panic(fmt.Errorf("message did.v1.Profile 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_Profile) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Profile.id": - x.Id = value.Interface().(string) - case "did.v1.Profile.subject": - x.Subject = value.Interface().(string) - case "did.v1.Profile.controller": - x.Controller = value.Interface().(string) - case "did.v1.Profile.metadata": - x.Metadata = value.Message().Interface().(*Metadata) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) - } - panic(fmt.Errorf("message did.v1.Profile 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_Profile) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Profile.metadata": - if x.Metadata == nil { - x.Metadata = new(Metadata) - } - return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - case "did.v1.Profile.id": - panic(fmt.Errorf("field id of message did.v1.Profile is not mutable")) - case "did.v1.Profile.subject": - panic(fmt.Errorf("field subject of message did.v1.Profile is not mutable")) - case "did.v1.Profile.controller": - panic(fmt.Errorf("field controller of message did.v1.Profile is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) - } - panic(fmt.Errorf("message did.v1.Profile 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_Profile) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Profile.id": - return protoreflect.ValueOfString("") - case "did.v1.Profile.subject": - return protoreflect.ValueOfString("") - case "did.v1.Profile.controller": - return protoreflect.ValueOfString("") - case "did.v1.Profile.metadata": - m := new(Metadata) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) - } - panic(fmt.Errorf("message did.v1.Profile 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_Profile) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Profile", 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_Profile) 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_Profile) 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_Profile) 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_Profile) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Profile) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Metadata != nil { - l = options.Size(x.Metadata) - 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().(*Profile) - 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.Metadata != nil { - encoded, err := options.Marshal(x.Metadata) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - 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.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Profile) - 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: Profile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = 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 Metadata", 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.Metadata == nil { - x.Metadata = &Metadata{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Property protoreflect.MessageDescriptor - fd_Property_accumulator protoreflect.FieldDescriptor - fd_Property_key protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_Property = File_did_v1_models_proto.Messages().ByName("Property") - fd_Property_accumulator = md_Property.Fields().ByName("accumulator") - fd_Property_key = md_Property.Fields().ByName("key") -} - -var _ protoreflect.Message = (*fastReflection_Property)(nil) - -type fastReflection_Property Property - -func (x *Property) ProtoReflect() protoreflect.Message { - return (*fastReflection_Property)(x) -} - -func (x *Property) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_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_Property_messageType fastReflection_Property_messageType -var _ protoreflect.MessageType = fastReflection_Property_messageType{} - -type fastReflection_Property_messageType struct{} - -func (x fastReflection_Property_messageType) Zero() protoreflect.Message { - return (*fastReflection_Property)(nil) -} -func (x fastReflection_Property_messageType) New() protoreflect.Message { - return new(fastReflection_Property) -} -func (x fastReflection_Property_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Property -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Property) Descriptor() protoreflect.MessageDescriptor { - return md_Property -} - -// 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_Property) Type() protoreflect.MessageType { - return _fastReflection_Property_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Property) New() protoreflect.Message { - return new(fastReflection_Property) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Property) Interface() protoreflect.ProtoMessage { - return (*Property)(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_Property) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Accumulator) != 0 { - value := protoreflect.ValueOfBytes(x.Accumulator) - if !f(fd_Property_accumulator, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_Property_key, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Property) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Property.accumulator": - return len(x.Accumulator) != 0 - case "did.v1.Property.key": - return len(x.Key) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) - } - panic(fmt.Errorf("message did.v1.Property 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_Property) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Property.accumulator": - x.Accumulator = nil - case "did.v1.Property.key": - x.Key = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) - } - panic(fmt.Errorf("message did.v1.Property 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_Property) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Property.accumulator": - value := x.Accumulator - return protoreflect.ValueOfBytes(value) - case "did.v1.Property.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) - } - panic(fmt.Errorf("message did.v1.Property 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_Property) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Property.accumulator": - x.Accumulator = value.Bytes() - case "did.v1.Property.key": - x.Key = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) - } - panic(fmt.Errorf("message did.v1.Property 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_Property) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Property.accumulator": - panic(fmt.Errorf("field accumulator of message did.v1.Property is not mutable")) - case "did.v1.Property.key": - panic(fmt.Errorf("field key of message did.v1.Property is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) - } - panic(fmt.Errorf("message did.v1.Property 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_Property) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Property.accumulator": - return protoreflect.ValueOfBytes(nil) - case "did.v1.Property.key": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) - } - panic(fmt.Errorf("message did.v1.Property 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_Property) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Property", 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_Property) 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_Property) 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_Property) 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_Property) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Property) - 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.Accumulator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Key) - 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().(*Property) - 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.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x12 - } - if len(x.Accumulator) > 0 { - i -= len(x.Accumulator) - copy(dAtA[i:], x.Accumulator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Accumulator))) - 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().(*Property) - 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: Property: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Property: 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 Accumulator", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Accumulator = append(x.Accumulator[:0], dAtA[iNdEx:postIndex]...) - if x.Accumulator == nil { - x.Accumulator = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_PubKey protoreflect.MessageDescriptor fd_PubKey_role protoreflect.FieldDescriptor @@ -6777,7 +4716,7 @@ func (x *PubKey) ProtoReflect() protoreflect.Message { } func (x *PubKey) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[9] + mi := &file_did_v1_models_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7004,7 +4943,7 @@ func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value proto case "did.v1.PubKey.raw": x.Raw = value.Bytes() case "did.v1.PubKey.jwk": - x.Jwk = value.Message().Interface().(*JWK) + x.Jwk = value.Message().Interface().(*PubKey_JWK) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -7027,7 +4966,7 @@ func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protore switch fd.FullName() { case "did.v1.PubKey.jwk": if x.Jwk == nil { - x.Jwk = new(JWK) + x.Jwk = new(PubKey_JWK) } return protoreflect.ValueOfMessage(x.Jwk.ProtoReflect()) case "did.v1.PubKey.role": @@ -7068,7 +5007,7 @@ func (x *fastReflection_PubKey) NewField(fd protoreflect.FieldDescriptor) protor case "did.v1.PubKey.raw": return protoreflect.ValueOfBytes(nil) case "did.v1.PubKey.jwk": - m := new(JWK) + m := new(PubKey_JWK) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { @@ -7445,7 +5384,7 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Jwk == nil { - x.Jwk = &JWK{} + x.Jwk = &PubKey_JWK{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Jwk); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err @@ -7487,24 +5426,848 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { } var ( - md_Service protoreflect.MessageDescriptor - fd_Service_id protoreflect.FieldDescriptor - fd_Service_controller protoreflect.FieldDescriptor - fd_Service_origin protoreflect.FieldDescriptor - fd_Service_permissions protoreflect.FieldDescriptor - fd_Service_openid protoreflect.FieldDescriptor - fd_Service_metadata protoreflect.FieldDescriptor + md_PubKey_JWK protoreflect.MessageDescriptor + fd_PubKey_JWK_kty protoreflect.FieldDescriptor + fd_PubKey_JWK_crv protoreflect.FieldDescriptor + fd_PubKey_JWK_x protoreflect.FieldDescriptor + fd_PubKey_JWK_y protoreflect.FieldDescriptor + fd_PubKey_JWK_n protoreflect.FieldDescriptor + fd_PubKey_JWK_e protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_models_proto_init() + md_PubKey_JWK = File_did_v1_models_proto.Messages().ByName("PubKey").Messages().ByName("JWK") + fd_PubKey_JWK_kty = md_PubKey_JWK.Fields().ByName("kty") + fd_PubKey_JWK_crv = md_PubKey_JWK.Fields().ByName("crv") + fd_PubKey_JWK_x = md_PubKey_JWK.Fields().ByName("x") + fd_PubKey_JWK_y = md_PubKey_JWK.Fields().ByName("y") + fd_PubKey_JWK_n = md_PubKey_JWK.Fields().ByName("n") + fd_PubKey_JWK_e = md_PubKey_JWK.Fields().ByName("e") +} + +var _ protoreflect.Message = (*fastReflection_PubKey_JWK)(nil) + +type fastReflection_PubKey_JWK PubKey_JWK + +func (x *PubKey_JWK) ProtoReflect() protoreflect.Message { + return (*fastReflection_PubKey_JWK)(x) +} + +func (x *PubKey_JWK) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_PubKey_JWK_messageType fastReflection_PubKey_JWK_messageType +var _ protoreflect.MessageType = fastReflection_PubKey_JWK_messageType{} + +type fastReflection_PubKey_JWK_messageType struct{} + +func (x fastReflection_PubKey_JWK_messageType) Zero() protoreflect.Message { + return (*fastReflection_PubKey_JWK)(nil) +} +func (x fastReflection_PubKey_JWK_messageType) New() protoreflect.Message { + return new(fastReflection_PubKey_JWK) +} +func (x fastReflection_PubKey_JWK_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PubKey_JWK +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_PubKey_JWK) Descriptor() protoreflect.MessageDescriptor { + return md_PubKey_JWK +} + +// 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_PubKey_JWK) Type() protoreflect.MessageType { + return _fastReflection_PubKey_JWK_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_PubKey_JWK) New() protoreflect.Message { + return new(fastReflection_PubKey_JWK) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_PubKey_JWK) Interface() protoreflect.ProtoMessage { + return (*PubKey_JWK)(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_PubKey_JWK) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Kty != "" { + value := protoreflect.ValueOfString(x.Kty) + if !f(fd_PubKey_JWK_kty, value) { + return + } + } + if x.Crv != "" { + value := protoreflect.ValueOfString(x.Crv) + if !f(fd_PubKey_JWK_crv, value) { + return + } + } + if x.X != "" { + value := protoreflect.ValueOfString(x.X) + if !f(fd_PubKey_JWK_x, value) { + return + } + } + if x.Y != "" { + value := protoreflect.ValueOfString(x.Y) + if !f(fd_PubKey_JWK_y, value) { + return + } + } + if x.N != "" { + value := protoreflect.ValueOfString(x.N) + if !f(fd_PubKey_JWK_n, value) { + return + } + } + if x.E != "" { + value := protoreflect.ValueOfString(x.E) + if !f(fd_PubKey_JWK_e, 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_PubKey_JWK) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.PubKey.JWK.kty": + return x.Kty != "" + case "did.v1.PubKey.JWK.crv": + return x.Crv != "" + case "did.v1.PubKey.JWK.x": + return x.X != "" + case "did.v1.PubKey.JWK.y": + return x.Y != "" + case "did.v1.PubKey.JWK.n": + return x.N != "" + case "did.v1.PubKey.JWK.e": + return x.E != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) + } + panic(fmt.Errorf("message did.v1.PubKey.JWK 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_PubKey_JWK) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.PubKey.JWK.kty": + x.Kty = "" + case "did.v1.PubKey.JWK.crv": + x.Crv = "" + case "did.v1.PubKey.JWK.x": + x.X = "" + case "did.v1.PubKey.JWK.y": + x.Y = "" + case "did.v1.PubKey.JWK.n": + x.N = "" + case "did.v1.PubKey.JWK.e": + x.E = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) + } + panic(fmt.Errorf("message did.v1.PubKey.JWK 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_PubKey_JWK) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.PubKey.JWK.kty": + value := x.Kty + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.crv": + value := x.Crv + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.x": + value := x.X + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.y": + value := x.Y + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.n": + value := x.N + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.e": + value := x.E + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) + } + panic(fmt.Errorf("message did.v1.PubKey.JWK 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_PubKey_JWK) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.PubKey.JWK.kty": + x.Kty = value.Interface().(string) + case "did.v1.PubKey.JWK.crv": + x.Crv = value.Interface().(string) + case "did.v1.PubKey.JWK.x": + x.X = value.Interface().(string) + case "did.v1.PubKey.JWK.y": + x.Y = value.Interface().(string) + case "did.v1.PubKey.JWK.n": + x.N = value.Interface().(string) + case "did.v1.PubKey.JWK.e": + x.E = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) + } + panic(fmt.Errorf("message did.v1.PubKey.JWK 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_PubKey_JWK) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.PubKey.JWK.kty": + panic(fmt.Errorf("field kty of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.crv": + panic(fmt.Errorf("field crv of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.x": + panic(fmt.Errorf("field x of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.y": + panic(fmt.Errorf("field y of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.n": + panic(fmt.Errorf("field n of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.e": + panic(fmt.Errorf("field e of message did.v1.PubKey.JWK is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) + } + panic(fmt.Errorf("message did.v1.PubKey.JWK 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_PubKey_JWK) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.PubKey.JWK.kty": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.crv": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.x": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.y": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.n": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.e": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) + } + panic(fmt.Errorf("message did.v1.PubKey.JWK 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_PubKey_JWK) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey.JWK", 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_PubKey_JWK) 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_PubKey_JWK) 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_PubKey_JWK) 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_PubKey_JWK) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*PubKey_JWK) + 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.Kty) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Crv) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.X) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Y) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.N) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.E) + 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().(*PubKey_JWK) + 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.E) > 0 { + i -= len(x.E) + copy(dAtA[i:], x.E) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.E))) + i-- + dAtA[i] = 0x32 + } + if len(x.N) > 0 { + i -= len(x.N) + copy(dAtA[i:], x.N) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.N))) + i-- + dAtA[i] = 0x2a + } + if len(x.Y) > 0 { + i -= len(x.Y) + copy(dAtA[i:], x.Y) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Y))) + i-- + dAtA[i] = 0x22 + } + if len(x.X) > 0 { + i -= len(x.X) + copy(dAtA[i:], x.X) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.X))) + i-- + dAtA[i] = 0x1a + } + if len(x.Crv) > 0 { + i -= len(x.Crv) + copy(dAtA[i:], x.Crv) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Crv))) + i-- + dAtA[i] = 0x12 + } + if len(x.Kty) > 0 { + i -= len(x.Kty) + copy(dAtA[i:], x.Kty) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Kty))) + 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().(*PubKey_JWK) + 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: PubKey_JWK: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey_JWK: 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 Kty", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Kty = 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 Crv", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Crv = 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 X", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.X = 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 Y", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Y = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.N = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field E", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.E = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.Map = (*_Service_6_map)(nil) + +type _Service_6_map struct { + m *map[string]string +} + +func (x *_Service_6_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Service_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Service_6_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_Service_6_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Service_6_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_Service_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Service_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_Service_6_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Service_6_map) IsValid() bool { + return x.m != nil +} + +var ( + md_Service protoreflect.MessageDescriptor + fd_Service_id protoreflect.FieldDescriptor + fd_Service_service_type protoreflect.FieldDescriptor + fd_Service_authority protoreflect.FieldDescriptor + fd_Service_origin protoreflect.FieldDescriptor + fd_Service_description protoreflect.FieldDescriptor + fd_Service_service_endpoints protoreflect.FieldDescriptor + fd_Service_permissions protoreflect.FieldDescriptor ) func init() { file_did_v1_models_proto_init() md_Service = File_did_v1_models_proto.Messages().ByName("Service") fd_Service_id = md_Service.Fields().ByName("id") - fd_Service_controller = md_Service.Fields().ByName("controller") + fd_Service_service_type = md_Service.Fields().ByName("service_type") + fd_Service_authority = md_Service.Fields().ByName("authority") fd_Service_origin = md_Service.Fields().ByName("origin") + fd_Service_description = md_Service.Fields().ByName("description") + fd_Service_service_endpoints = md_Service.Fields().ByName("service_endpoints") fd_Service_permissions = md_Service.Fields().ByName("permissions") - fd_Service_openid = md_Service.Fields().ByName("openid") - fd_Service_metadata = md_Service.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_Service)(nil) @@ -7516,7 +6279,7 @@ func (x *Service) ProtoReflect() protoreflect.Message { } func (x *Service) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[10] + mi := &file_did_v1_models_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7578,9 +6341,15 @@ func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, prot return } } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Service_controller, value) { + if x.ServiceType != "" { + value := protoreflect.ValueOfString(x.ServiceType) + if !f(fd_Service_service_type, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Service_authority, value) { return } } @@ -7590,24 +6359,24 @@ func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, prot return } } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_Service_description, value) { + return + } + } + if len(x.ServiceEndpoints) != 0 { + value := protoreflect.ValueOfMap(&_Service_6_map{m: &x.ServiceEndpoints}) + if !f(fd_Service_service_endpoints, value) { + return + } + } if x.Permissions != nil { value := protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) if !f(fd_Service_permissions, value) { return } } - if x.Openid != nil { - value := protoreflect.ValueOfMessage(x.Openid.ProtoReflect()) - if !f(fd_Service_openid, value) { - return - } - } - if x.Metadata != nil { - value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - if !f(fd_Service_metadata, value) { - return - } - } } // Has reports whether a field is populated. @@ -7625,16 +6394,18 @@ func (x *fastReflection_Service) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "did.v1.Service.id": return x.Id != "" - case "did.v1.Service.controller": - return x.Controller != "" + case "did.v1.Service.service_type": + return x.ServiceType != "" + case "did.v1.Service.authority": + return x.Authority != "" case "did.v1.Service.origin": return x.Origin != "" + case "did.v1.Service.description": + return x.Description != "" + case "did.v1.Service.service_endpoints": + return len(x.ServiceEndpoints) != 0 case "did.v1.Service.permissions": return x.Permissions != nil - case "did.v1.Service.openid": - return x.Openid != nil - case "did.v1.Service.metadata": - return x.Metadata != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -7653,16 +6424,18 @@ func (x *fastReflection_Service) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.Service.id": x.Id = "" - case "did.v1.Service.controller": - x.Controller = "" + case "did.v1.Service.service_type": + x.ServiceType = "" + case "did.v1.Service.authority": + x.Authority = "" case "did.v1.Service.origin": x.Origin = "" + case "did.v1.Service.description": + x.Description = "" + case "did.v1.Service.service_endpoints": + x.ServiceEndpoints = nil case "did.v1.Service.permissions": x.Permissions = nil - case "did.v1.Service.openid": - x.Openid = nil - case "did.v1.Service.metadata": - x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -7682,21 +6455,27 @@ func (x *fastReflection_Service) Get(descriptor protoreflect.FieldDescriptor) pr case "did.v1.Service.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Service.controller": - value := x.Controller + case "did.v1.Service.service_type": + value := x.ServiceType + return protoreflect.ValueOfString(value) + case "did.v1.Service.authority": + value := x.Authority return protoreflect.ValueOfString(value) case "did.v1.Service.origin": value := x.Origin return protoreflect.ValueOfString(value) + case "did.v1.Service.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "did.v1.Service.service_endpoints": + if len(x.ServiceEndpoints) == 0 { + return protoreflect.ValueOfMap(&_Service_6_map{}) + } + mapValue := &_Service_6_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(mapValue) case "did.v1.Service.permissions": value := x.Permissions return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.Service.openid": - value := x.Openid - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.Service.metadata": - value := x.Metadata - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -7719,16 +6498,20 @@ func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value prot switch fd.FullName() { case "did.v1.Service.id": x.Id = value.Interface().(string) - case "did.v1.Service.controller": - x.Controller = value.Interface().(string) + case "did.v1.Service.service_type": + x.ServiceType = value.Interface().(string) + case "did.v1.Service.authority": + x.Authority = value.Interface().(string) case "did.v1.Service.origin": x.Origin = value.Interface().(string) + case "did.v1.Service.description": + x.Description = value.Interface().(string) + case "did.v1.Service.service_endpoints": + mv := value.Map() + cmv := mv.(*_Service_6_map) + x.ServiceEndpoints = *cmv.m case "did.v1.Service.permissions": x.Permissions = value.Message().Interface().(*Permissions) - case "did.v1.Service.openid": - x.Openid = value.Message().Interface().(*OpenIDConfig) - case "did.v1.Service.metadata": - x.Metadata = value.Message().Interface().(*Metadata) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -7749,27 +6532,27 @@ func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value prot // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Service) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.Service.service_endpoints": + if x.ServiceEndpoints == nil { + x.ServiceEndpoints = make(map[string]string) + } + value := &_Service_6_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(value) case "did.v1.Service.permissions": if x.Permissions == nil { x.Permissions = new(Permissions) } return protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) - case "did.v1.Service.openid": - if x.Openid == nil { - x.Openid = new(OpenIDConfig) - } - return protoreflect.ValueOfMessage(x.Openid.ProtoReflect()) - case "did.v1.Service.metadata": - if x.Metadata == nil { - x.Metadata = new(Metadata) - } - return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) case "did.v1.Service.id": panic(fmt.Errorf("field id of message did.v1.Service is not mutable")) - case "did.v1.Service.controller": - panic(fmt.Errorf("field controller of message did.v1.Service is not mutable")) + case "did.v1.Service.service_type": + panic(fmt.Errorf("field service_type of message did.v1.Service is not mutable")) + case "did.v1.Service.authority": + panic(fmt.Errorf("field authority of message did.v1.Service is not mutable")) case "did.v1.Service.origin": panic(fmt.Errorf("field origin of message did.v1.Service is not mutable")) + case "did.v1.Service.description": + panic(fmt.Errorf("field description of message did.v1.Service is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -7785,19 +6568,20 @@ func (x *fastReflection_Service) NewField(fd protoreflect.FieldDescriptor) proto switch fd.FullName() { case "did.v1.Service.id": return protoreflect.ValueOfString("") - case "did.v1.Service.controller": + case "did.v1.Service.service_type": + return protoreflect.ValueOfString("") + case "did.v1.Service.authority": return protoreflect.ValueOfString("") case "did.v1.Service.origin": return protoreflect.ValueOfString("") + case "did.v1.Service.description": + return protoreflect.ValueOfString("") + case "did.v1.Service.service_endpoints": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_Service_6_map{m: &m}) case "did.v1.Service.permissions": m := new(Permissions) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.Service.openid": - m := new(OpenIDConfig) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.Service.metadata": - m := new(Metadata) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -7871,7 +6655,11 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Controller) + l = len(x.ServiceType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -7879,18 +6667,35 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.ServiceEndpoints) > 0 { + SiZeMaP := func(k string, v string) { + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.ServiceEndpoints[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.ServiceEndpoints { + SiZeMaP(k, v) + } + } + } if x.Permissions != nil { l = options.Size(x.Permissions) n += 1 + l + runtime.Sov(uint64(l)) } - if x.Openid != nil { - l = options.Size(x.Openid) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Metadata != nil { - l = options.Size(x.Metadata) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -7920,34 +6725,6 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Metadata != nil { - encoded, err := options.Marshal(x.Metadata) - 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] = 0x32 - } - if x.Openid != nil { - encoded, err := options.Marshal(x.Openid) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } if x.Permissions != nil { encoded, err := options.Marshal(x.Permissions) if err != nil { @@ -7960,19 +6737,76 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x3a + } + if len(x.ServiceEndpoints) > 0 { + MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + keysForServiceEndpoints = append(keysForServiceEndpoints, string(k)) + } + sort.Slice(keysForServiceEndpoints, func(i, j int) bool { + return keysForServiceEndpoints[i] < keysForServiceEndpoints[j] + }) + for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- { + v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])] + out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.ServiceEndpoints { + v := x.ServiceEndpoints[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x2a } 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] = 0x22 + } + 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] = 0x1a } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + if len(x.ServiceType) > 0 { + i -= len(x.ServiceType) + copy(dAtA[i:], x.ServiceType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ServiceType))) i-- dAtA[i] = 0x12 } @@ -8066,7 +6900,7 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8094,9 +6928,41 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Controller = string(dAtA[iNdEx:postIndex]) + x.ServiceType = 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 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 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } @@ -8128,7 +6994,166 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { } x.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", 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.ServiceEndpoints == nil { + x.ServiceEndpoints = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + 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) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.ServiceEndpoints[mapkey] = mapvalue + iNdEx = postIndex + case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } @@ -8164,45 +7189,590 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Openid", 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.Openid == nil { - x.Openid = &OpenIDConfig{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Openid); err != nil { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - iNdEx = postIndex - case 6: + 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_ServiceInfo protoreflect.MessageDescriptor + fd_ServiceInfo_exists protoreflect.FieldDescriptor + fd_ServiceInfo_origin protoreflect.FieldDescriptor + fd_ServiceInfo_fingerprint protoreflect.FieldDescriptor + fd_ServiceInfo_service protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_models_proto_init() + md_ServiceInfo = File_did_v1_models_proto.Messages().ByName("ServiceInfo") + fd_ServiceInfo_exists = md_ServiceInfo.Fields().ByName("exists") + fd_ServiceInfo_origin = md_ServiceInfo.Fields().ByName("origin") + fd_ServiceInfo_fingerprint = md_ServiceInfo.Fields().ByName("fingerprint") + fd_ServiceInfo_service = md_ServiceInfo.Fields().ByName("service") +} + +var _ protoreflect.Message = (*fastReflection_ServiceInfo)(nil) + +type fastReflection_ServiceInfo ServiceInfo + +func (x *ServiceInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ServiceInfo)(x) +} + +func (x *ServiceInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ServiceInfo_messageType fastReflection_ServiceInfo_messageType +var _ protoreflect.MessageType = fastReflection_ServiceInfo_messageType{} + +type fastReflection_ServiceInfo_messageType struct{} + +func (x fastReflection_ServiceInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ServiceInfo)(nil) +} +func (x fastReflection_ServiceInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ServiceInfo) +} +func (x fastReflection_ServiceInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ServiceInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ServiceInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ServiceInfo +} + +// 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_ServiceInfo) Type() protoreflect.MessageType { + return _fastReflection_ServiceInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ServiceInfo) New() protoreflect.Message { + return new(fastReflection_ServiceInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ServiceInfo) Interface() protoreflect.ProtoMessage { + return (*ServiceInfo)(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_ServiceInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Exists != false { + value := protoreflect.ValueOfBool(x.Exists) + if !f(fd_ServiceInfo_exists, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_ServiceInfo_origin, value) { + return + } + } + if x.Fingerprint != "" { + value := protoreflect.ValueOfString(x.Fingerprint) + if !f(fd_ServiceInfo_fingerprint, value) { + return + } + } + if x.Service != nil { + value := protoreflect.ValueOfMessage(x.Service.ProtoReflect()) + if !f(fd_ServiceInfo_service, 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_ServiceInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ServiceInfo.exists": + return x.Exists != false + case "did.v1.ServiceInfo.origin": + return x.Origin != "" + case "did.v1.ServiceInfo.fingerprint": + return x.Fingerprint != "" + case "did.v1.ServiceInfo.service": + return x.Service != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) + } + panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ServiceInfo.exists": + x.Exists = false + case "did.v1.ServiceInfo.origin": + x.Origin = "" + case "did.v1.ServiceInfo.fingerprint": + x.Fingerprint = "" + case "did.v1.ServiceInfo.service": + x.Service = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) + } + panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ServiceInfo.exists": + value := x.Exists + return protoreflect.ValueOfBool(value) + case "did.v1.ServiceInfo.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.ServiceInfo.fingerprint": + value := x.Fingerprint + return protoreflect.ValueOfString(value) + case "did.v1.ServiceInfo.service": + value := x.Service + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) + } + panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ServiceInfo.exists": + x.Exists = value.Bool() + case "did.v1.ServiceInfo.origin": + x.Origin = value.Interface().(string) + case "did.v1.ServiceInfo.fingerprint": + x.Fingerprint = value.Interface().(string) + case "did.v1.ServiceInfo.service": + x.Service = value.Message().Interface().(*Service) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) + } + panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ServiceInfo.service": + if x.Service == nil { + x.Service = new(Service) + } + return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) + case "did.v1.ServiceInfo.exists": + panic(fmt.Errorf("field exists of message did.v1.ServiceInfo is not mutable")) + case "did.v1.ServiceInfo.origin": + panic(fmt.Errorf("field origin of message did.v1.ServiceInfo is not mutable")) + case "did.v1.ServiceInfo.fingerprint": + panic(fmt.Errorf("field fingerprint of message did.v1.ServiceInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) + } + panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ServiceInfo.exists": + return protoreflect.ValueOfBool(false) + case "did.v1.ServiceInfo.origin": + return protoreflect.ValueOfString("") + case "did.v1.ServiceInfo.fingerprint": + return protoreflect.ValueOfString("") + case "did.v1.ServiceInfo.service": + m := new(Service) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) + } + panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ServiceInfo", 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_ServiceInfo) 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_ServiceInfo) 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_ServiceInfo) 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_ServiceInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ServiceInfo) + 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.Exists { + n += 2 + } + l = len(x.Origin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Fingerprint) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Service != nil { + l = options.Size(x.Service) + 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().(*ServiceInfo) + 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.Service != nil { + encoded, err := options.Marshal(x.Service) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.Fingerprint) > 0 { + i -= len(x.Fingerprint) + copy(dAtA[i:], x.Fingerprint) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fingerprint))) + i-- + dAtA[i] = 0x1a + } + 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] = 0x12 + } + if x.Exists { + i-- + if x.Exists { + 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().(*ServiceInfo) + 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: ServiceInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceInfo: 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 Exists", 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.Exists = 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 Metadata", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fingerprint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Fingerprint = 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 Service", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8229,10 +7799,10 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Metadata == nil { - x.Metadata = &Metadata{} + if x.Service == nil { + x.Service = &Service{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -8295,7 +7865,7 @@ func (x *Token) ProtoReflect() protoreflect.Message { } func (x *Token) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[11] + mi := &file_did_v1_models_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8821,1103 +8391,6 @@ func (x *fastReflection_Token) ProtoMethods() *protoiface.Methods { } } -var ( - md_VerificationMethod protoreflect.MessageDescriptor - fd_VerificationMethod_method protoreflect.FieldDescriptor - fd_VerificationMethod_id protoreflect.FieldDescriptor - fd_VerificationMethod_controller protoreflect.FieldDescriptor - fd_VerificationMethod_issuer protoreflect.FieldDescriptor - fd_VerificationMethod_public_key protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_VerificationMethod = File_did_v1_models_proto.Messages().ByName("VerificationMethod") - fd_VerificationMethod_method = md_VerificationMethod.Fields().ByName("method") - fd_VerificationMethod_id = md_VerificationMethod.Fields().ByName("id") - fd_VerificationMethod_controller = md_VerificationMethod.Fields().ByName("controller") - fd_VerificationMethod_issuer = md_VerificationMethod.Fields().ByName("issuer") - fd_VerificationMethod_public_key = md_VerificationMethod.Fields().ByName("public_key") -} - -var _ protoreflect.Message = (*fastReflection_VerificationMethod)(nil) - -type fastReflection_VerificationMethod VerificationMethod - -func (x *VerificationMethod) ProtoReflect() protoreflect.Message { - return (*fastReflection_VerificationMethod)(x) -} - -func (x *VerificationMethod) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_VerificationMethod_messageType fastReflection_VerificationMethod_messageType -var _ protoreflect.MessageType = fastReflection_VerificationMethod_messageType{} - -type fastReflection_VerificationMethod_messageType struct{} - -func (x fastReflection_VerificationMethod_messageType) Zero() protoreflect.Message { - return (*fastReflection_VerificationMethod)(nil) -} -func (x fastReflection_VerificationMethod_messageType) New() protoreflect.Message { - return new(fastReflection_VerificationMethod) -} -func (x fastReflection_VerificationMethod_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_VerificationMethod -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_VerificationMethod) Descriptor() protoreflect.MessageDescriptor { - return md_VerificationMethod -} - -// 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_VerificationMethod) Type() protoreflect.MessageType { - return _fastReflection_VerificationMethod_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_VerificationMethod) New() protoreflect.Message { - return new(fastReflection_VerificationMethod) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_VerificationMethod) Interface() protoreflect.ProtoMessage { - return (*VerificationMethod)(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_VerificationMethod) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Method != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method)) - if !f(fd_VerificationMethod_method, value) { - return - } - } - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_VerificationMethod_id, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_VerificationMethod_controller, value) { - return - } - } - if x.Issuer != "" { - value := protoreflect.ValueOfString(x.Issuer) - if !f(fd_VerificationMethod_issuer, value) { - return - } - } - if x.PublicKey != nil { - value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - if !f(fd_VerificationMethod_public_key, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_VerificationMethod) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.VerificationMethod.method": - return x.Method != 0 - case "did.v1.VerificationMethod.id": - return x.Id != "" - case "did.v1.VerificationMethod.controller": - return x.Controller != "" - case "did.v1.VerificationMethod.issuer": - return x.Issuer != "" - case "did.v1.VerificationMethod.public_key": - return x.PublicKey != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.VerificationMethod.method": - x.Method = 0 - case "did.v1.VerificationMethod.id": - x.Id = "" - case "did.v1.VerificationMethod.controller": - x.Controller = "" - case "did.v1.VerificationMethod.issuer": - x.Issuer = "" - case "did.v1.VerificationMethod.public_key": - x.PublicKey = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.VerificationMethod.method": - value := x.Method - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "did.v1.VerificationMethod.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.issuer": - value := x.Issuer - return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.public_key": - value := x.PublicKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.VerificationMethod.method": - x.Method = (DIDNamespace)(value.Enum()) - case "did.v1.VerificationMethod.id": - x.Id = value.Interface().(string) - case "did.v1.VerificationMethod.controller": - x.Controller = value.Interface().(string) - case "did.v1.VerificationMethod.issuer": - x.Issuer = value.Interface().(string) - case "did.v1.VerificationMethod.public_key": - x.PublicKey = value.Message().Interface().(*PubKey) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.VerificationMethod.public_key": - if x.PublicKey == nil { - x.PublicKey = new(PubKey) - } - return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - case "did.v1.VerificationMethod.method": - panic(fmt.Errorf("field method of message did.v1.VerificationMethod is not mutable")) - case "did.v1.VerificationMethod.id": - panic(fmt.Errorf("field id of message did.v1.VerificationMethod is not mutable")) - case "did.v1.VerificationMethod.controller": - panic(fmt.Errorf("field controller of message did.v1.VerificationMethod is not mutable")) - case "did.v1.VerificationMethod.issuer": - panic(fmt.Errorf("field issuer of message did.v1.VerificationMethod is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.VerificationMethod.method": - return protoreflect.ValueOfEnum(0) - case "did.v1.VerificationMethod.id": - return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.controller": - return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.issuer": - return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.public_key": - m := new(PubKey) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.VerificationMethod", 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_VerificationMethod) 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_VerificationMethod) 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_VerificationMethod) 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_VerificationMethod) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*VerificationMethod) - 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.Method != 0 { - n += 1 + runtime.Sov(uint64(x.Method)) - } - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Issuer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PublicKey != nil { - l = options.Size(x.PublicKey) - 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().(*VerificationMethod) - 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.PublicKey != nil { - encoded, err := options.Marshal(x.PublicKey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.Issuer) > 0 { - i -= len(x.Issuer) - copy(dAtA[i:], x.Issuer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Issuer))) - i-- - dAtA[i] = 0x22 - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0x1a - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0x12 - } - if x.Method != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Method)) - 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().(*VerificationMethod) - 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: VerificationMethod: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VerificationMethod: 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 Method", wireType) - } - x.Method = 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.Method |= DIDNamespace(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = 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 Issuer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Issuer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", 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.PublicKey == nil { - x.PublicKey = &PubKey{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Witness protoreflect.MessageDescriptor - fd_Witness_witness protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_Witness = File_did_v1_models_proto.Messages().ByName("Witness") - fd_Witness_witness = md_Witness.Fields().ByName("witness") -} - -var _ protoreflect.Message = (*fastReflection_Witness)(nil) - -type fastReflection_Witness Witness - -func (x *Witness) ProtoReflect() protoreflect.Message { - return (*fastReflection_Witness)(x) -} - -func (x *Witness) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Witness_messageType fastReflection_Witness_messageType -var _ protoreflect.MessageType = fastReflection_Witness_messageType{} - -type fastReflection_Witness_messageType struct{} - -func (x fastReflection_Witness_messageType) Zero() protoreflect.Message { - return (*fastReflection_Witness)(nil) -} -func (x fastReflection_Witness_messageType) New() protoreflect.Message { - return new(fastReflection_Witness) -} -func (x fastReflection_Witness_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Witness -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Witness) Descriptor() protoreflect.MessageDescriptor { - return md_Witness -} - -// 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_Witness) Type() protoreflect.MessageType { - return _fastReflection_Witness_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Witness) New() protoreflect.Message { - return new(fastReflection_Witness) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Witness) Interface() protoreflect.ProtoMessage { - return (*Witness)(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_Witness) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Witness) != 0 { - value := protoreflect.ValueOfBytes(x.Witness) - if !f(fd_Witness_witness, 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_Witness) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Witness.witness": - return len(x.Witness) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) - } - panic(fmt.Errorf("message did.v1.Witness 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_Witness) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Witness.witness": - x.Witness = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) - } - panic(fmt.Errorf("message did.v1.Witness 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_Witness) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Witness.witness": - value := x.Witness - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) - } - panic(fmt.Errorf("message did.v1.Witness 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_Witness) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Witness.witness": - x.Witness = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) - } - panic(fmt.Errorf("message did.v1.Witness 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_Witness) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Witness.witness": - panic(fmt.Errorf("field witness of message did.v1.Witness is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) - } - panic(fmt.Errorf("message did.v1.Witness 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_Witness) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Witness.witness": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) - } - panic(fmt.Errorf("message did.v1.Witness 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_Witness) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Witness", 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_Witness) 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_Witness) 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_Witness) 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_Witness) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Witness) - 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.Witness) - 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().(*Witness) - 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.Witness) > 0 { - i -= len(x.Witness) - copy(dAtA[i:], x.Witness) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Witness))) - 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().(*Witness) - 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: Witness: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Witness: 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 Witness", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Witness = append(x.Witness[:0], dAtA[iNdEx:postIndex]...) - if x.Witness == nil { - x.Witness = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -9931,17 +8404,19 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Accumulator defines a BLS accumulator -type Accumulator struct { +// Alias defines a subject/origin pair +type Alias struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"` + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` } -func (x *Accumulator) Reset() { - *x = Accumulator{} +func (x *Alias) Reset() { + *x = Alias{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_models_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9949,36 +8424,55 @@ func (x *Accumulator) Reset() { } } -func (x *Accumulator) String() string { +func (x *Alias) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Accumulator) ProtoMessage() {} +func (*Alias) ProtoMessage() {} -// Deprecated: Use Accumulator.ProtoReflect.Descriptor instead. -func (*Accumulator) Descriptor() ([]byte, []int) { +// Deprecated: Use Alias.ProtoReflect.Descriptor instead. +func (*Alias) Descriptor() ([]byte, []int) { return file_did_v1_models_proto_rawDescGZIP(), []int{0} } -func (x *Accumulator) GetAccumulator() []byte { +func (x *Alias) GetSubject() string { if x != nil { - return x.Accumulator + return x.Subject } - return nil + return "" +} + +func (x *Alias) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *Alias) GetController() string { + if x != nil { + return x.Controller + } + return "" } -// Credential defines a WebAuthn credential type Credential struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` - CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` - Subject string `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + AttestationType string `protobuf:"bytes,2,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + CredentialId []byte `protobuf:"bytes,4,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + PublicKey []byte `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Transport []string `protobuf:"bytes,6,rep,name=transport,proto3" json:"transport,omitempty"` + SignCount uint32 `protobuf:"varint,7,opt,name=sign_count,json=signCount,proto3" json:"sign_count,omitempty"` + UserPresent bool `protobuf:"varint,8,opt,name=user_present,json=userPresent,proto3" json:"user_present,omitempty"` + UserVerified bool `protobuf:"varint,9,opt,name=user_verified,json=userVerified,proto3" json:"user_verified,omitempty"` + BackupEligible bool `protobuf:"varint,10,opt,name=backup_eligible,json=backupEligible,proto3" json:"backup_eligible,omitempty"` + BackupState bool `protobuf:"varint,11,opt,name=backup_state,json=backupState,proto3" json:"backup_state,omitempty"` + CloneWarning bool `protobuf:"varint,12,opt,name=clone_warning,json=cloneWarning,proto3" json:"clone_warning,omitempty"` } func (x *Credential) Reset() { @@ -10001,16 +8495,23 @@ func (*Credential) Descriptor() ([]byte, []int) { return file_did_v1_models_proto_rawDescGZIP(), []int{1} } -func (x *Credential) GetId() string { +func (x *Credential) GetSubject() string { if x != nil { - return x.Id + return x.Subject } return "" } -func (x *Credential) GetCredentialType() string { +func (x *Credential) GetAttestationType() string { if x != nil { - return x.CredentialType + return x.AttestationType + } + return "" +} + +func (x *Credential) GetOrigin() string { + if x != nil { + return x.Origin } return "" } @@ -10022,6 +8523,13 @@ func (x *Credential) GetCredentialId() []byte { return nil } +func (x *Credential) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + func (x *Credential) GetTransport() []string { if x != nil { return x.Transport @@ -10029,86 +8537,46 @@ func (x *Credential) GetTransport() []string { return nil } -func (x *Credential) GetSubject() string { +func (x *Credential) GetSignCount() uint32 { if x != nil { - return x.Subject + return x.SignCount } - return "" + return 0 } -func (x *Credential) GetController() string { +func (x *Credential) GetUserPresent() bool { if x != nil { - return x.Controller + return x.UserPresent } - return "" + return false } -// DID defines a parsed DID string -type DID struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Method DIDNamespace `protobuf:"varint,1,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` - Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` - Paths []string `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` -} - -func (x *DID) Reset() { - *x = DID{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DID) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DID) ProtoMessage() {} - -// Deprecated: Use DID.ProtoReflect.Descriptor instead. -func (*DID) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{2} -} - -func (x *DID) GetMethod() DIDNamespace { +func (x *Credential) GetUserVerified() bool { if x != nil { - return x.Method + return x.UserVerified } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED + return false } -func (x *DID) GetNetwork() string { +func (x *Credential) GetBackupEligible() bool { if x != nil { - return x.Network + return x.BackupEligible } - return "" + return false } -func (x *DID) GetSubject() string { +func (x *Credential) GetBackupState() bool { if x != nil { - return x.Subject + return x.BackupState } - return "" + return false } -func (x *DID) GetIdentifier() string { +func (x *Credential) GetCloneWarning() bool { if x != nil { - return x.Identifier + return x.CloneWarning } - return "" -} - -func (x *DID) GetPaths() []string { - if x != nil { - return x.Paths - } - return nil + return false } // Document defines a DID document @@ -10117,19 +8585,19 @@ type Document struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` - Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` - Service []string `protobuf:"bytes,9,rep,name=service,proto3" json:"service,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // The DID of the controller + Authentication []string `protobuf:"bytes,3,rep,name=authentication,proto3" json:"authentication,omitempty"` + AssertionMethod []string `protobuf:"bytes,4,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` + CapabilityDelegation []string `protobuf:"bytes,5,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` + CapabilityInvocation []string `protobuf:"bytes,6,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` + Service []string `protobuf:"bytes,7,rep,name=service,proto3" json:"service,omitempty"` } func (x *Document) Reset() { *x = Document{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[3] + mi := &file_did_v1_models_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10143,7 +8611,7 @@ func (*Document) ProtoMessage() {} // Deprecated: Use Document.ProtoReflect.Descriptor instead. func (*Document) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{3} + return file_did_v1_models_proto_rawDescGZIP(), []int{2} } func (x *Document) GetId() string { @@ -10153,11 +8621,11 @@ func (x *Document) GetId() string { return "" } -func (x *Document) GetVerificationMethods() []*VerificationMethod { +func (x *Document) GetController() string { if x != nil { - return x.VerificationMethods + return x.Controller } - return nil + return "" } func (x *Document) GetAuthentication() []string { @@ -10195,134 +8663,82 @@ func (x *Document) GetService() []string { return nil } -// JWK represents a JSON Web Key -type JWK struct { +// Keyshare defines a keyshare from the MPC protocol +type Keyshare struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` // Key Type - Crv string `protobuf:"bytes,2,opt,name=crv,proto3" json:"crv,omitempty"` // Curve (for EC and OKP keys) - X string `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"` // X coordinate (for EC and OKP keys) - Y string `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"` // Y coordinate (for EC keys) - N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` // Modulus (for RSA keys) - E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` // Exponent (for RSA keys) + Metadata map[string]string `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Payloads map[string][]byte `protobuf:"bytes,2,rep,name=payloads,proto3" json:"payloads,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"` + PublicKey []byte `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Version uint32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + Role int32 `protobuf:"varint,6,opt,name=role,proto3" json:"role,omitempty"` // 0 =none, 1 = validator, 2 = user } -func (x *JWK) Reset() { - *x = JWK{} +func (x *Keyshare) Reset() { + *x = Keyshare{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[4] + mi := &file_did_v1_models_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *JWK) String() string { +func (x *Keyshare) String() string { return protoimpl.X.MessageStringOf(x) } -func (*JWK) ProtoMessage() {} +func (*Keyshare) ProtoMessage() {} -// Deprecated: Use JWK.ProtoReflect.Descriptor instead. -func (*JWK) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{4} +// Deprecated: Use Keyshare.ProtoReflect.Descriptor instead. +func (*Keyshare) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{3} } -func (x *JWK) GetKty() string { +func (x *Keyshare) GetMetadata() map[string]string { if x != nil { - return x.Kty - } - return "" -} - -func (x *JWK) GetCrv() string { - if x != nil { - return x.Crv - } - return "" -} - -func (x *JWK) GetX() string { - if x != nil { - return x.X - } - return "" -} - -func (x *JWK) GetY() string { - if x != nil { - return x.Y - } - return "" -} - -func (x *JWK) GetN() string { - if x != nil { - return x.N - } - return "" -} - -func (x *JWK) GetE() string { - if x != nil { - return x.E - } - return "" -} - -// Metadata defines additional information provided to a did -type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OriginUri string `protobuf:"bytes,1,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - Public map[string]string `protobuf:"bytes,2,rep,name=public,proto3" json:"public,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Private map[string]*Property `protobuf:"bytes,3,rep,name=private,proto3" json:"private,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Metadata) Reset() { - *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{5} -} - -func (x *Metadata) GetOriginUri() string { - if x != nil { - return x.OriginUri - } - return "" -} - -func (x *Metadata) GetPublic() map[string]string { - if x != nil { - return x.Public + return x.Metadata } return nil } -func (x *Metadata) GetPrivate() map[string]*Property { +func (x *Keyshare) GetPayloads() map[string][]byte { if x != nil { - return x.Private + return x.Payloads } return nil } +func (x *Keyshare) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +func (x *Keyshare) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *Keyshare) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Keyshare) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + // Permissions contains a list of grants and access control rules for // a Service. type Permissions struct { @@ -10337,7 +8753,7 @@ type Permissions struct { func (x *Permissions) Reset() { *x = Permissions{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[6] + mi := &file_did_v1_models_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10351,7 +8767,7 @@ func (*Permissions) ProtoMessage() {} // Deprecated: Use Permissions.ProtoReflect.Descriptor instead. func (*Permissions) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{6} + return file_did_v1_models_proto_rawDescGZIP(), []int{4} } func (x *Permissions) GetGrants() []DIDNamespace { @@ -10368,111 +8784,6 @@ func (x *Permissions) GetScopes() []PermissionScope { return nil } -// Profile defines an associated public identity for a did subject -type Profile struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *Profile) Reset() { - *x = Profile{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Profile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Profile) ProtoMessage() {} - -// Deprecated: Use Profile.ProtoReflect.Descriptor instead. -func (*Profile) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{7} -} - -func (x *Profile) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Profile) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *Profile) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *Profile) GetMetadata() *Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -// Property defines a Zero-Knowledge accumulator which can be used to -// anonymously prove a given value to a DID subject -type Property struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *Property) Reset() { - *x = Property{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Property) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Property) ProtoMessage() {} - -// Deprecated: Use Property.ProtoReflect.Descriptor instead. -func (*Property) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{8} -} - -func (x *Property) GetAccumulator() []byte { - if x != nil { - return x.Accumulator - } - return nil -} - -func (x *Property) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - // PubKey defines a public key for a did type PubKey struct { state protoimpl.MessageState @@ -10485,13 +8796,13 @@ type PubKey struct { Curve KeyCurve `protobuf:"varint,4,opt,name=curve,proto3,enum=did.v1.KeyCurve" json:"curve,omitempty"` KeyType KeyType `protobuf:"varint,5,opt,name=key_type,json=keyType,proto3,enum=did.v1.KeyType" json:"key_type,omitempty"` Raw []byte `protobuf:"bytes,6,opt,name=raw,proto3" json:"raw,omitempty"` - Jwk *JWK `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"` + Jwk *PubKey_JWK `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"` } func (x *PubKey) Reset() { *x = PubKey{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[9] + mi := &file_did_v1_models_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10505,7 +8816,7 @@ func (*PubKey) ProtoMessage() {} // Deprecated: Use PubKey.ProtoReflect.Descriptor instead. func (*PubKey) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{9} + return file_did_v1_models_proto_rawDescGZIP(), []int{5} } func (x *PubKey) GetRole() KeyRole { @@ -10550,7 +8861,7 @@ func (x *PubKey) GetRaw() []byte { return nil } -func (x *PubKey) GetJwk() *JWK { +func (x *PubKey) GetJwk() *PubKey_JWK { if x != nil { return x.Jwk } @@ -10563,18 +8874,19 @@ type Service struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - Permissions *Permissions `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"` - Openid *OpenIDConfig `protobuf:"bytes,5,opt,name=openid,proto3" json:"openid,omitempty"` - Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + ServiceEndpoints map[string]string `protobuf:"bytes,6,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"` } func (x *Service) Reset() { *x = Service{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[10] + mi := &file_did_v1_models_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10588,7 +8900,7 @@ func (*Service) ProtoMessage() {} // Deprecated: Use Service.ProtoReflect.Descriptor instead. func (*Service) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{10} + return file_did_v1_models_proto_rawDescGZIP(), []int{6} } func (x *Service) GetId() string { @@ -10598,9 +8910,16 @@ func (x *Service) GetId() string { return "" } -func (x *Service) GetController() string { +func (x *Service) GetServiceType() string { if x != nil { - return x.Controller + return x.ServiceType + } + return "" +} + +func (x *Service) GetAuthority() string { + if x != nil { + return x.Authority } return "" } @@ -10612,6 +8931,20 @@ func (x *Service) GetOrigin() string { return "" } +func (x *Service) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Service) GetServiceEndpoints() map[string]string { + if x != nil { + return x.ServiceEndpoints + } + return nil +} + func (x *Service) GetPermissions() *Permissions { if x != nil { return x.Permissions @@ -10619,16 +8952,62 @@ func (x *Service) GetPermissions() *Permissions { return nil } -func (x *Service) GetOpenid() *OpenIDConfig { - if x != nil { - return x.Openid - } - return nil +// ServicceInfo defines a Decentralized Service on the Sonr Blockchain +type ServiceInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Fingerprint string `protobuf:"bytes,3,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + Service *Service `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` } -func (x *Service) GetMetadata() *Metadata { +func (x *ServiceInfo) Reset() { + *x = ServiceInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_models_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceInfo) ProtoMessage() {} + +// Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead. +func (*ServiceInfo) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{7} +} + +func (x *ServiceInfo) GetExists() bool { if x != nil { - return x.Metadata + return x.Exists + } + return false +} + +func (x *ServiceInfo) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *ServiceInfo) GetFingerprint() string { + if x != nil { + return x.Fingerprint + } + return "" +} + +func (x *ServiceInfo) GetService() *Service { + if x != nil { + return x.Service } return nil } @@ -10647,7 +9026,7 @@ type Token struct { func (x *Token) Reset() { *x = Token{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[11] + mi := &file_did_v1_models_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10661,7 +9040,7 @@ func (*Token) ProtoMessage() {} // Deprecated: Use Token.ProtoReflect.Descriptor instead. func (*Token) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{11} + return file_did_v1_models_proto_rawDescGZIP(), []int{8} } func (x *Token) GetId() string { @@ -10685,108 +9064,80 @@ func (x *Token) GetMacron() []byte { return nil } -// VerificationMethod defines a verification method -type VerificationMethod struct { +// JWK represents a JSON Web Key +type PubKey_JWK struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Method DIDNamespace `protobuf:"varint,1,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"` - PublicKey *PubKey `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` // Key Type + Crv string `protobuf:"bytes,2,opt,name=crv,proto3" json:"crv,omitempty"` // Curve (for EC and OKP keys) + X string `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"` // X coordinate (for EC and OKP keys) + Y string `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"` // Y coordinate (for EC keys) + N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` // Modulus (for RSA keys) + E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` // Exponent (for RSA keys) } -func (x *VerificationMethod) Reset() { - *x = VerificationMethod{} +func (x *PubKey_JWK) Reset() { + *x = PubKey_JWK{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[12] + mi := &file_did_v1_models_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VerificationMethod) String() string { +func (x *PubKey_JWK) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VerificationMethod) ProtoMessage() {} +func (*PubKey_JWK) ProtoMessage() {} -// Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead. -func (*VerificationMethod) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{12} +// Deprecated: Use PubKey_JWK.ProtoReflect.Descriptor instead. +func (*PubKey_JWK) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{5, 0} } -func (x *VerificationMethod) GetMethod() DIDNamespace { +func (x *PubKey_JWK) GetKty() string { if x != nil { - return x.Method - } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED -} - -func (x *VerificationMethod) GetId() string { - if x != nil { - return x.Id + return x.Kty } return "" } -func (x *VerificationMethod) GetController() string { +func (x *PubKey_JWK) GetCrv() string { if x != nil { - return x.Controller + return x.Crv } return "" } -func (x *VerificationMethod) GetIssuer() string { +func (x *PubKey_JWK) GetX() string { if x != nil { - return x.Issuer + return x.X } return "" } -func (x *VerificationMethod) GetPublicKey() *PubKey { +func (x *PubKey_JWK) GetY() string { if x != nil { - return x.PublicKey + return x.Y } - return nil + return "" } -// Witness defines a BLS witness -type Witness struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Witness []byte `protobuf:"bytes,1,opt,name=witness,proto3" json:"witness,omitempty"` -} - -func (x *Witness) Reset() { - *x = Witness{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Witness) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Witness) ProtoMessage() {} - -// Deprecated: Use Witness.ProtoReflect.Descriptor instead. -func (*Witness) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{13} -} - -func (x *Witness) GetWitness() []byte { +func (x *PubKey_JWK) GetN() string { if x != nil { - return x.Witness + return x.N } - return nil + return "" +} + +func (x *PubKey_JWK) GetE() string { + if x != nil { + return x.E + } + return "" } var File_did_v1_models_proto protoreflect.FileDescriptor @@ -10796,156 +9147,155 @@ var file_did_v1_models_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x0a, 0x0b, 0x41, 0x63, 0x63, - 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, - 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, - 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x22, 0xc2, 0x01, 0x0a, 0x0a, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, - 0x9d, 0x01, 0x0a, 0x03, 0x44, 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, - 0x68, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, - 0xc0, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, 0x0a, 0x14, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, - 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, - 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, - 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x22, 0x61, 0x0a, 0x03, 0x4a, 0x57, 0x4b, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x63, - 0x72, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x72, 0x76, 0x12, 0x0c, 0x0a, - 0x01, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x6e, 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x01, 0x65, 0x22, 0xa1, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, 0x72, - 0x69, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x37, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x0c, 0x50, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6c, 0x0a, 0x0b, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, - 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 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, 0x1e, 0x0a, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x2c, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3e, 0x0a, 0x08, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x63, - 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x97, 0x02, 0x0a, 0x06, - 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, - 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x61, - 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, - 0x2f, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, - 0x12, 0x26, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x75, 0x72, 0x76, - 0x65, 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x6b, 0x65, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x1d, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x57, 0x4b, - 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x22, 0xe4, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x35, 0x0a, 0x0b, 0x70, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x2c, 0x0a, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x12, 0x2c, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4f, 0x0a, 0x05, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x05, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x22, 0xa3, 0x03, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a, + 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, + 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x75, 0x73, 0x65, + 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x5f, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, + 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x77, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x6c, + 0x6f, 0x6e, 0x65, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x91, 0x02, 0x0a, 0x08, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, + 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xe5, + 0x02, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6c, 0x0a, 0x0b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x06, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x22, 0x81, 0x03, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, + 0x23, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, + 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x2f, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, + 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x0a, 0x05, 0x63, 0x75, 0x72, + 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x75, 0x72, 0x76, 0x65, 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, + 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, + 0x24, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x2e, 0x4a, 0x57, 0x4b, + 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x1a, 0x61, 0x0a, 0x03, 0x4a, 0x57, 0x4b, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x74, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x63, 0x72, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x72, 0x76, + 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x12, 0x0c, + 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, 0x01, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x6e, 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x65, 0x22, 0xe4, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x52, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x8a, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, + 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, + 0x74, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x22, 0xb9, 0x01, - 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, - 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x23, 0x0a, 0x07, 0x57, 0x69, 0x74, - 0x6e, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x42, 0x7b, - 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, - 0x64, 0x65, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 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, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, - 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, - 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x42, 0x7b, 0x0a, + 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 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, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, + 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, + 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -10960,58 +9310,48 @@ func file_did_v1_models_proto_rawDescGZIP() []byte { return file_did_v1_models_proto_rawDescData } -var file_did_v1_models_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_did_v1_models_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_did_v1_models_proto_goTypes = []interface{}{ - (*Accumulator)(nil), // 0: did.v1.Accumulator - (*Credential)(nil), // 1: did.v1.Credential - (*DID)(nil), // 2: did.v1.DID - (*Document)(nil), // 3: did.v1.Document - (*JWK)(nil), // 4: did.v1.JWK - (*Metadata)(nil), // 5: did.v1.Metadata - (*Permissions)(nil), // 6: did.v1.Permissions - (*Profile)(nil), // 7: did.v1.Profile - (*Property)(nil), // 8: did.v1.Property - (*PubKey)(nil), // 9: did.v1.PubKey - (*Service)(nil), // 10: did.v1.Service - (*Token)(nil), // 11: did.v1.Token - (*VerificationMethod)(nil), // 12: did.v1.VerificationMethod - (*Witness)(nil), // 13: did.v1.Witness - nil, // 14: did.v1.Metadata.PublicEntry - nil, // 15: did.v1.Metadata.PrivateEntry - (DIDNamespace)(0), // 16: did.v1.DIDNamespace - (PermissionScope)(0), // 17: did.v1.PermissionScope - (KeyRole)(0), // 18: did.v1.KeyRole - (KeyAlgorithm)(0), // 19: did.v1.KeyAlgorithm - (KeyEncoding)(0), // 20: did.v1.KeyEncoding - (KeyCurve)(0), // 21: did.v1.KeyCurve - (KeyType)(0), // 22: did.v1.KeyType - (*OpenIDConfig)(nil), // 23: did.v1.OpenIDConfig + (*Alias)(nil), // 0: did.v1.Alias + (*Credential)(nil), // 1: did.v1.Credential + (*Document)(nil), // 2: did.v1.Document + (*Keyshare)(nil), // 3: did.v1.Keyshare + (*Permissions)(nil), // 4: did.v1.Permissions + (*PubKey)(nil), // 5: did.v1.PubKey + (*Service)(nil), // 6: did.v1.Service + (*ServiceInfo)(nil), // 7: did.v1.ServiceInfo + (*Token)(nil), // 8: did.v1.Token + nil, // 9: did.v1.Keyshare.MetadataEntry + nil, // 10: did.v1.Keyshare.PayloadsEntry + (*PubKey_JWK)(nil), // 11: did.v1.PubKey.JWK + nil, // 12: did.v1.Service.ServiceEndpointsEntry + (DIDNamespace)(0), // 13: did.v1.DIDNamespace + (PermissionScope)(0), // 14: did.v1.PermissionScope + (KeyRole)(0), // 15: did.v1.KeyRole + (KeyAlgorithm)(0), // 16: did.v1.KeyAlgorithm + (KeyEncoding)(0), // 17: did.v1.KeyEncoding + (KeyCurve)(0), // 18: did.v1.KeyCurve + (KeyType)(0), // 19: did.v1.KeyType } var file_did_v1_models_proto_depIdxs = []int32{ - 16, // 0: did.v1.DID.method:type_name -> did.v1.DIDNamespace - 12, // 1: did.v1.Document.verification_methods:type_name -> did.v1.VerificationMethod - 14, // 2: did.v1.Metadata.public:type_name -> did.v1.Metadata.PublicEntry - 15, // 3: did.v1.Metadata.private:type_name -> did.v1.Metadata.PrivateEntry - 16, // 4: did.v1.Permissions.grants:type_name -> did.v1.DIDNamespace - 17, // 5: did.v1.Permissions.scopes:type_name -> did.v1.PermissionScope - 5, // 6: did.v1.Profile.metadata:type_name -> did.v1.Metadata - 18, // 7: did.v1.PubKey.role:type_name -> did.v1.KeyRole - 19, // 8: did.v1.PubKey.algorithm:type_name -> did.v1.KeyAlgorithm - 20, // 9: did.v1.PubKey.encoding:type_name -> did.v1.KeyEncoding - 21, // 10: did.v1.PubKey.curve:type_name -> did.v1.KeyCurve - 22, // 11: did.v1.PubKey.key_type:type_name -> did.v1.KeyType - 4, // 12: did.v1.PubKey.jwk:type_name -> did.v1.JWK - 6, // 13: did.v1.Service.permissions:type_name -> did.v1.Permissions - 23, // 14: did.v1.Service.openid:type_name -> did.v1.OpenIDConfig - 5, // 15: did.v1.Service.metadata:type_name -> did.v1.Metadata - 16, // 16: did.v1.VerificationMethod.method:type_name -> did.v1.DIDNamespace - 9, // 17: did.v1.VerificationMethod.public_key:type_name -> did.v1.PubKey - 8, // 18: did.v1.Metadata.PrivateEntry.value:type_name -> did.v1.Property - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 9, // 0: did.v1.Keyshare.metadata:type_name -> did.v1.Keyshare.MetadataEntry + 10, // 1: did.v1.Keyshare.payloads:type_name -> did.v1.Keyshare.PayloadsEntry + 13, // 2: did.v1.Permissions.grants:type_name -> did.v1.DIDNamespace + 14, // 3: did.v1.Permissions.scopes:type_name -> did.v1.PermissionScope + 15, // 4: did.v1.PubKey.role:type_name -> did.v1.KeyRole + 16, // 5: did.v1.PubKey.algorithm:type_name -> did.v1.KeyAlgorithm + 17, // 6: did.v1.PubKey.encoding:type_name -> did.v1.KeyEncoding + 18, // 7: did.v1.PubKey.curve:type_name -> did.v1.KeyCurve + 19, // 8: did.v1.PubKey.key_type:type_name -> did.v1.KeyType + 11, // 9: did.v1.PubKey.jwk:type_name -> did.v1.PubKey.JWK + 12, // 10: did.v1.Service.service_endpoints:type_name -> did.v1.Service.ServiceEndpointsEntry + 4, // 11: did.v1.Service.permissions:type_name -> did.v1.Permissions + 6, // 12: did.v1.ServiceInfo.service:type_name -> did.v1.Service + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_did_v1_models_proto_init() } @@ -11022,7 +9362,7 @@ func file_did_v1_models_proto_init() { file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Accumulator); i { + switch v := v.(*Alias); i { case 0: return &v.state case 1: @@ -11046,18 +9386,6 @@ func file_did_v1_models_proto_init() { } } file_did_v1_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Document); i { case 0: return &v.state @@ -11069,31 +9397,19 @@ func file_did_v1_models_proto_init() { return nil } } + file_did_v1_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Keyshare); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_did_v1_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JWK); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Permissions); i { case 0: return &v.state @@ -11105,31 +9421,7 @@ func file_did_v1_models_proto_init() { return nil } } - file_did_v1_models_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Profile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_models_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_models_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PubKey); i { case 0: return &v.state @@ -11141,7 +9433,7 @@ func file_did_v1_models_proto_init() { return nil } } - file_did_v1_models_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Service); i { case 0: return &v.state @@ -11153,7 +9445,19 @@ func file_did_v1_models_proto_init() { return nil } } - file_did_v1_models_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_models_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_models_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Token); i { case 0: return &v.state @@ -11165,20 +9469,8 @@ func file_did_v1_models_proto_init() { return nil } } - file_did_v1_models_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerificationMethod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_models_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Witness); i { + file_did_v1_models_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubKey_JWK); i { case 0: return &v.state case 1: @@ -11196,7 +9488,7 @@ func file_did_v1_models_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_models_proto_rawDesc, NumEnums: 0, - NumMessages: 16, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index 3dc25f521..5fec065d9 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -5,7 +5,6 @@ import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "google.golang.org/genproto/googleapis/api/annotations" - _ "google.golang.org/genproto/googleapis/api/httpbody" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -15,11 +14,9 @@ import ( ) var ( - md_QueryRequest protoreflect.MessageDescriptor - fd_QueryRequest_did protoreflect.FieldDescriptor - fd_QueryRequest_origin protoreflect.FieldDescriptor - fd_QueryRequest_subject protoreflect.FieldDescriptor - fd_QueryRequest_endpoint protoreflect.FieldDescriptor + md_QueryRequest protoreflect.MessageDescriptor + fd_QueryRequest_did protoreflect.FieldDescriptor + fd_QueryRequest_origin protoreflect.FieldDescriptor ) func init() { @@ -27,8 +24,6 @@ func init() { md_QueryRequest = File_did_v1_query_proto.Messages().ByName("QueryRequest") fd_QueryRequest_did = md_QueryRequest.Fields().ByName("did") fd_QueryRequest_origin = md_QueryRequest.Fields().ByName("origin") - fd_QueryRequest_subject = md_QueryRequest.Fields().ByName("subject") - fd_QueryRequest_endpoint = md_QueryRequest.Fields().ByName("endpoint") } var _ protoreflect.Message = (*fastReflection_QueryRequest)(nil) @@ -108,18 +103,6 @@ func (x *fastReflection_QueryRequest) Range(f func(protoreflect.FieldDescriptor, return } } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_QueryRequest_subject, value) { - return - } - } - if x.Endpoint != "" { - value := protoreflect.ValueOfString(x.Endpoint) - if !f(fd_QueryRequest_endpoint, value) { - return - } - } } // Has reports whether a field is populated. @@ -139,10 +122,6 @@ func (x *fastReflection_QueryRequest) Has(fd protoreflect.FieldDescriptor) bool return x.Did != "" case "did.v1.QueryRequest.origin": return x.Origin != "" - case "did.v1.QueryRequest.subject": - return x.Subject != "" - case "did.v1.QueryRequest.endpoint": - return x.Endpoint != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) @@ -163,10 +142,6 @@ func (x *fastReflection_QueryRequest) Clear(fd protoreflect.FieldDescriptor) { x.Did = "" case "did.v1.QueryRequest.origin": x.Origin = "" - case "did.v1.QueryRequest.subject": - x.Subject = "" - case "did.v1.QueryRequest.endpoint": - x.Endpoint = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) @@ -189,12 +164,6 @@ func (x *fastReflection_QueryRequest) Get(descriptor protoreflect.FieldDescripto case "did.v1.QueryRequest.origin": value := x.Origin return protoreflect.ValueOfString(value) - case "did.v1.QueryRequest.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.QueryRequest.endpoint": - value := x.Endpoint - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) @@ -219,10 +188,6 @@ func (x *fastReflection_QueryRequest) Set(fd protoreflect.FieldDescriptor, value x.Did = value.Interface().(string) case "did.v1.QueryRequest.origin": x.Origin = value.Interface().(string) - case "did.v1.QueryRequest.subject": - x.Subject = value.Interface().(string) - case "did.v1.QueryRequest.endpoint": - x.Endpoint = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) @@ -247,10 +212,6 @@ func (x *fastReflection_QueryRequest) Mutable(fd protoreflect.FieldDescriptor) p panic(fmt.Errorf("field did of message did.v1.QueryRequest is not mutable")) case "did.v1.QueryRequest.origin": panic(fmt.Errorf("field origin of message did.v1.QueryRequest is not mutable")) - case "did.v1.QueryRequest.subject": - panic(fmt.Errorf("field subject of message did.v1.QueryRequest is not mutable")) - case "did.v1.QueryRequest.endpoint": - panic(fmt.Errorf("field endpoint of message did.v1.QueryRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) @@ -268,10 +229,6 @@ func (x *fastReflection_QueryRequest) NewField(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfString("") case "did.v1.QueryRequest.origin": return protoreflect.ValueOfString("") - case "did.v1.QueryRequest.subject": - return protoreflect.ValueOfString("") - case "did.v1.QueryRequest.endpoint": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) @@ -349,14 +306,6 @@ func (x *fastReflection_QueryRequest) ProtoMethods() *protoiface.Methods { 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.Endpoint) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -386,20 +335,6 @@ func (x *fastReflection_QueryRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Endpoint) > 0 { - i -= len(x.Endpoint) - copy(dAtA[i:], x.Endpoint) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Endpoint))) - i-- - dAtA[i] = 0x22 - } - 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] = 0x1a - } if len(x.Origin) > 0 { i -= len(x.Origin) copy(dAtA[i:], x.Origin) @@ -527,70 +462,6 @@ func (x *fastReflection_QueryRequest) ProtoMethods() *protoiface.Methods { } x.Origin = 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 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 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Endpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -627,518 +498,22 @@ func (x *fastReflection_QueryRequest) ProtoMethods() *protoiface.Methods { } var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryParamsResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) - -type fastReflection_QueryParamsResponse QueryParamsResponse - -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) -} - -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} - -type fastReflection_QueryParamsResponse_messageType struct{} - -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) -} -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryResponse_8_list)(nil) - -type _QueryResponse_8_list struct { - list *[]*Credential -} - -func (x *_QueryResponse_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryResponse_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryResponse_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - (*x.list)[i] = concreteValue -} - -func (x *_QueryResponse_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryResponse_8_list) AppendMutable() protoreflect.Value { - v := new(Credential) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryResponse_8_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryResponse_8_list) NewElement() protoreflect.Value { - v := new(Credential) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryResponse_8_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryResponse protoreflect.MessageDescriptor - fd_QueryResponse_success protoreflect.FieldDescriptor - fd_QueryResponse_subject protoreflect.FieldDescriptor - fd_QueryResponse_origin protoreflect.FieldDescriptor - fd_QueryResponse_ipfs_active protoreflect.FieldDescriptor - fd_QueryResponse_params protoreflect.FieldDescriptor - fd_QueryResponse_document protoreflect.FieldDescriptor - fd_QueryResponse_service protoreflect.FieldDescriptor - fd_QueryResponse_credentials protoreflect.FieldDescriptor - fd_QueryResponse_token protoreflect.FieldDescriptor - fd_QueryResponse_error protoreflect.FieldDescriptor + md_QueryResponse protoreflect.MessageDescriptor + fd_QueryResponse_success protoreflect.FieldDescriptor + fd_QueryResponse_query protoreflect.FieldDescriptor + fd_QueryResponse_document protoreflect.FieldDescriptor + fd_QueryResponse_service protoreflect.FieldDescriptor + fd_QueryResponse_params protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() md_QueryResponse = File_did_v1_query_proto.Messages().ByName("QueryResponse") fd_QueryResponse_success = md_QueryResponse.Fields().ByName("success") - fd_QueryResponse_subject = md_QueryResponse.Fields().ByName("subject") - fd_QueryResponse_origin = md_QueryResponse.Fields().ByName("origin") - fd_QueryResponse_ipfs_active = md_QueryResponse.Fields().ByName("ipfs_active") - fd_QueryResponse_params = md_QueryResponse.Fields().ByName("params") + fd_QueryResponse_query = md_QueryResponse.Fields().ByName("query") fd_QueryResponse_document = md_QueryResponse.Fields().ByName("document") fd_QueryResponse_service = md_QueryResponse.Fields().ByName("service") - fd_QueryResponse_credentials = md_QueryResponse.Fields().ByName("credentials") - fd_QueryResponse_token = md_QueryResponse.Fields().ByName("token") - fd_QueryResponse_error = md_QueryResponse.Fields().ByName("error") + fd_QueryResponse_params = md_QueryResponse.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_QueryResponse)(nil) @@ -1150,7 +525,7 @@ func (x *QueryResponse) ProtoReflect() protoreflect.Message { } func (x *QueryResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[2] + mi := &file_did_v1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1212,27 +587,9 @@ func (x *fastReflection_QueryResponse) Range(f func(protoreflect.FieldDescriptor return } } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_QueryResponse_subject, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_QueryResponse_origin, value) { - return - } - } - if x.IpfsActive != false { - value := protoreflect.ValueOfBool(x.IpfsActive) - if !f(fd_QueryResponse_ipfs_active, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryResponse_params, value) { + if x.Query != "" { + value := protoreflect.ValueOfString(x.Query) + if !f(fd_QueryResponse_query, value) { return } } @@ -1248,21 +605,9 @@ func (x *fastReflection_QueryResponse) Range(f func(protoreflect.FieldDescriptor return } } - if len(x.Credentials) != 0 { - value := protoreflect.ValueOfList(&_QueryResponse_8_list{list: &x.Credentials}) - if !f(fd_QueryResponse_credentials, value) { - return - } - } - if x.Token != nil { - value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - if !f(fd_QueryResponse_token, value) { - return - } - } - if x.Error != "" { - value := protoreflect.ValueOfString(x.Error) - if !f(fd_QueryResponse_error, value) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryResponse_params, value) { return } } @@ -1283,24 +628,14 @@ func (x *fastReflection_QueryResponse) Has(fd protoreflect.FieldDescriptor) bool switch fd.FullName() { case "did.v1.QueryResponse.success": return x.Success != false - case "did.v1.QueryResponse.subject": - return x.Subject != "" - case "did.v1.QueryResponse.origin": - return x.Origin != "" - case "did.v1.QueryResponse.ipfs_active": - return x.IpfsActive != false - case "did.v1.QueryResponse.params": - return x.Params != nil + case "did.v1.QueryResponse.query": + return x.Query != "" case "did.v1.QueryResponse.document": return x.Document != nil case "did.v1.QueryResponse.service": return x.Service != nil - case "did.v1.QueryResponse.credentials": - return len(x.Credentials) != 0 - case "did.v1.QueryResponse.token": - return x.Token != nil - case "did.v1.QueryResponse.error": - return x.Error != "" + case "did.v1.QueryResponse.params": + return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResponse")) @@ -1319,24 +654,14 @@ func (x *fastReflection_QueryResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.QueryResponse.success": x.Success = false - case "did.v1.QueryResponse.subject": - x.Subject = "" - case "did.v1.QueryResponse.origin": - x.Origin = "" - case "did.v1.QueryResponse.ipfs_active": - x.IpfsActive = false - case "did.v1.QueryResponse.params": - x.Params = nil + case "did.v1.QueryResponse.query": + x.Query = "" case "did.v1.QueryResponse.document": x.Document = nil case "did.v1.QueryResponse.service": x.Service = nil - case "did.v1.QueryResponse.credentials": - x.Credentials = nil - case "did.v1.QueryResponse.token": - x.Token = nil - case "did.v1.QueryResponse.error": - x.Error = "" + case "did.v1.QueryResponse.params": + x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResponse")) @@ -1356,36 +681,18 @@ func (x *fastReflection_QueryResponse) Get(descriptor protoreflect.FieldDescript case "did.v1.QueryResponse.success": value := x.Success return protoreflect.ValueOfBool(value) - case "did.v1.QueryResponse.subject": - value := x.Subject + case "did.v1.QueryResponse.query": + value := x.Query return protoreflect.ValueOfString(value) - case "did.v1.QueryResponse.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.QueryResponse.ipfs_active": - value := x.IpfsActive - return protoreflect.ValueOfBool(value) - case "did.v1.QueryResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) case "did.v1.QueryResponse.document": value := x.Document return protoreflect.ValueOfMessage(value.ProtoReflect()) case "did.v1.QueryResponse.service": value := x.Service return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.QueryResponse.credentials": - if len(x.Credentials) == 0 { - return protoreflect.ValueOfList(&_QueryResponse_8_list{}) - } - listValue := &_QueryResponse_8_list{list: &x.Credentials} - return protoreflect.ValueOfList(listValue) - case "did.v1.QueryResponse.token": - value := x.Token + case "did.v1.QueryResponse.params": + value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.QueryResponse.error": - value := x.Error - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResponse")) @@ -1408,26 +715,14 @@ func (x *fastReflection_QueryResponse) Set(fd protoreflect.FieldDescriptor, valu switch fd.FullName() { case "did.v1.QueryResponse.success": x.Success = value.Bool() - case "did.v1.QueryResponse.subject": - x.Subject = value.Interface().(string) - case "did.v1.QueryResponse.origin": - x.Origin = value.Interface().(string) - case "did.v1.QueryResponse.ipfs_active": - x.IpfsActive = value.Bool() - case "did.v1.QueryResponse.params": - x.Params = value.Message().Interface().(*Params) + case "did.v1.QueryResponse.query": + x.Query = value.Interface().(string) case "did.v1.QueryResponse.document": x.Document = value.Message().Interface().(*Document) case "did.v1.QueryResponse.service": - x.Service = value.Message().Interface().(*Service) - case "did.v1.QueryResponse.credentials": - lv := value.List() - clv := lv.(*_QueryResponse_8_list) - x.Credentials = *clv.list - case "did.v1.QueryResponse.token": - x.Token = value.Message().Interface().(*Token) - case "did.v1.QueryResponse.error": - x.Error = value.Interface().(string) + x.Service = value.Message().Interface().(*ServiceInfo) + case "did.v1.QueryResponse.params": + x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResponse")) @@ -1448,11 +743,6 @@ func (x *fastReflection_QueryResponse) Set(fd protoreflect.FieldDescriptor, valu // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "did.v1.QueryResponse.document": if x.Document == nil { x.Document = new(Document) @@ -1460,30 +750,18 @@ func (x *fastReflection_QueryResponse) Mutable(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfMessage(x.Document.ProtoReflect()) case "did.v1.QueryResponse.service": if x.Service == nil { - x.Service = new(Service) + x.Service = new(ServiceInfo) } return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) - case "did.v1.QueryResponse.credentials": - if x.Credentials == nil { - x.Credentials = []*Credential{} + case "did.v1.QueryResponse.params": + if x.Params == nil { + x.Params = new(Params) } - value := &_QueryResponse_8_list{list: &x.Credentials} - return protoreflect.ValueOfList(value) - case "did.v1.QueryResponse.token": - if x.Token == nil { - x.Token = new(Token) - } - return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "did.v1.QueryResponse.success": panic(fmt.Errorf("field success of message did.v1.QueryResponse is not mutable")) - case "did.v1.QueryResponse.subject": - panic(fmt.Errorf("field subject of message did.v1.QueryResponse is not mutable")) - case "did.v1.QueryResponse.origin": - panic(fmt.Errorf("field origin of message did.v1.QueryResponse is not mutable")) - case "did.v1.QueryResponse.ipfs_active": - panic(fmt.Errorf("field ipfs_active of message did.v1.QueryResponse is not mutable")) - case "did.v1.QueryResponse.error": - panic(fmt.Errorf("field error of message did.v1.QueryResponse is not mutable")) + case "did.v1.QueryResponse.query": + panic(fmt.Errorf("field query of message did.v1.QueryResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResponse")) @@ -1499,29 +777,17 @@ func (x *fastReflection_QueryResponse) NewField(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "did.v1.QueryResponse.success": return protoreflect.ValueOfBool(false) - case "did.v1.QueryResponse.subject": + case "did.v1.QueryResponse.query": return protoreflect.ValueOfString("") - case "did.v1.QueryResponse.origin": - return protoreflect.ValueOfString("") - case "did.v1.QueryResponse.ipfs_active": - return protoreflect.ValueOfBool(false) - case "did.v1.QueryResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.QueryResponse.document": m := new(Document) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.QueryResponse.service": - m := new(Service) + m := new(ServiceInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.QueryResponse.credentials": - list := []*Credential{} - return protoreflect.ValueOfList(&_QueryResponse_8_list{list: &list}) - case "did.v1.QueryResponse.token": - m := new(Token) + case "did.v1.QueryResponse.params": + m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.QueryResponse.error": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResponse")) @@ -1594,21 +860,10 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { if x.Success { n += 2 } - l = len(x.Subject) + l = len(x.Query) 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.IpfsActive { - n += 2 - } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.Document != nil { l = options.Size(x.Document) n += 1 + l + runtime.Sov(uint64(l)) @@ -1617,18 +872,8 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { l = options.Size(x.Service) n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Credentials) > 0 { - for _, e := range x.Credentials { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Token != nil { - l = options.Size(x.Token) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Error) - if l > 0 { + if x.Params != nil { + l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -1660,71 +905,6 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Error) > 0 { - i -= len(x.Error) - copy(dAtA[i:], x.Error) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) - i-- - dAtA[i] = 0x52 - } - if x.Token != nil { - encoded, err := options.Marshal(x.Token) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if len(x.Credentials) > 0 { - for iNdEx := len(x.Credentials) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Credentials[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - } - if x.Service != nil { - encoded, err := options.Marshal(x.Service) - 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] = 0x3a - } - if x.Document != nil { - encoded, err := options.Marshal(x.Document) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { @@ -1739,27 +919,38 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x2a } - if x.IpfsActive { - i-- - if x.IpfsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if x.Service != nil { + encoded, err := options.Marshal(x.Service) + 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] = 0x20 + dAtA[i] = 0x22 } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + if x.Document != nil { + encoded, err := options.Marshal(x.Document) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } - if len(x.Subject) > 0 { - i -= len(x.Subject) - copy(dAtA[i:], x.Subject) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) + if len(x.Query) > 0 { + i -= len(x.Query) + copy(dAtA[i:], x.Query) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Query))) i-- dAtA[i] = 0x12 } @@ -1844,7 +1035,7 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { 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 Subject", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1872,97 +1063,9 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Subject = string(dAtA[iNdEx:postIndex]) + x.Query = 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 - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", 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.IpfsActive = bool(v != 0) - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } @@ -1998,7 +1101,7 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 7: + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } @@ -2028,939 +1131,12 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Service == nil { - x.Service = &Service{} + x.Service = &ServiceInfo{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Credentials = append(x.Credentials, &Credential{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Credentials[len(x.Credentials)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token == nil { - x.Token = &Token{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryResolveResponse_7_list)(nil) - -type _QueryResolveResponse_7_list struct { - list *[]*Credential -} - -func (x *_QueryResolveResponse_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryResolveResponse_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryResolveResponse_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - (*x.list)[i] = concreteValue -} - -func (x *_QueryResolveResponse_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryResolveResponse_7_list) AppendMutable() protoreflect.Value { - v := new(Credential) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryResolveResponse_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryResolveResponse_7_list) NewElement() protoreflect.Value { - v := new(Credential) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryResolveResponse_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryResolveResponse protoreflect.MessageDescriptor - fd_QueryResolveResponse_success protoreflect.FieldDescriptor - fd_QueryResolveResponse_subject protoreflect.FieldDescriptor - fd_QueryResolveResponse_origin protoreflect.FieldDescriptor - fd_QueryResolveResponse_ipfs_active protoreflect.FieldDescriptor - fd_QueryResolveResponse_params protoreflect.FieldDescriptor - fd_QueryResolveResponse_document protoreflect.FieldDescriptor - fd_QueryResolveResponse_credentials protoreflect.FieldDescriptor - fd_QueryResolveResponse_token protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryResolveResponse = File_did_v1_query_proto.Messages().ByName("QueryResolveResponse") - fd_QueryResolveResponse_success = md_QueryResolveResponse.Fields().ByName("success") - fd_QueryResolveResponse_subject = md_QueryResolveResponse.Fields().ByName("subject") - fd_QueryResolveResponse_origin = md_QueryResolveResponse.Fields().ByName("origin") - fd_QueryResolveResponse_ipfs_active = md_QueryResolveResponse.Fields().ByName("ipfs_active") - fd_QueryResolveResponse_params = md_QueryResolveResponse.Fields().ByName("params") - fd_QueryResolveResponse_document = md_QueryResolveResponse.Fields().ByName("document") - fd_QueryResolveResponse_credentials = md_QueryResolveResponse.Fields().ByName("credentials") - fd_QueryResolveResponse_token = md_QueryResolveResponse.Fields().ByName("token") -} - -var _ protoreflect.Message = (*fastReflection_QueryResolveResponse)(nil) - -type fastReflection_QueryResolveResponse QueryResolveResponse - -func (x *QueryResolveResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryResolveResponse)(x) -} - -func (x *QueryResolveResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryResolveResponse_messageType fastReflection_QueryResolveResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryResolveResponse_messageType{} - -type fastReflection_QueryResolveResponse_messageType struct{} - -func (x fastReflection_QueryResolveResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryResolveResponse)(nil) -} -func (x fastReflection_QueryResolveResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryResolveResponse) -} -func (x fastReflection_QueryResolveResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryResolveResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryResolveResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryResolveResponse -} - -// 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_QueryResolveResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryResolveResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryResolveResponse) New() protoreflect.Message { - return new(fastReflection_QueryResolveResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryResolveResponse) Interface() protoreflect.ProtoMessage { - return (*QueryResolveResponse)(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_QueryResolveResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_QueryResolveResponse_success, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_QueryResolveResponse_subject, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_QueryResolveResponse_origin, value) { - return - } - } - if x.IpfsActive != false { - value := protoreflect.ValueOfBool(x.IpfsActive) - if !f(fd_QueryResolveResponse_ipfs_active, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryResolveResponse_params, value) { - return - } - } - if x.Document != nil { - value := protoreflect.ValueOfMessage(x.Document.ProtoReflect()) - if !f(fd_QueryResolveResponse_document, value) { - return - } - } - if len(x.Credentials) != 0 { - value := protoreflect.ValueOfList(&_QueryResolveResponse_7_list{list: &x.Credentials}) - if !f(fd_QueryResolveResponse_credentials, value) { - return - } - } - if x.Token != nil { - value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - if !f(fd_QueryResolveResponse_token, 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_QueryResolveResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryResolveResponse.success": - return x.Success != false - case "did.v1.QueryResolveResponse.subject": - return x.Subject != "" - case "did.v1.QueryResolveResponse.origin": - return x.Origin != "" - case "did.v1.QueryResolveResponse.ipfs_active": - return x.IpfsActive != false - case "did.v1.QueryResolveResponse.params": - return x.Params != nil - case "did.v1.QueryResolveResponse.document": - return x.Document != nil - case "did.v1.QueryResolveResponse.credentials": - return len(x.Credentials) != 0 - case "did.v1.QueryResolveResponse.token": - return x.Token != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) - } - panic(fmt.Errorf("message did.v1.QueryResolveResponse 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_QueryResolveResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryResolveResponse.success": - x.Success = false - case "did.v1.QueryResolveResponse.subject": - x.Subject = "" - case "did.v1.QueryResolveResponse.origin": - x.Origin = "" - case "did.v1.QueryResolveResponse.ipfs_active": - x.IpfsActive = false - case "did.v1.QueryResolveResponse.params": - x.Params = nil - case "did.v1.QueryResolveResponse.document": - x.Document = nil - case "did.v1.QueryResolveResponse.credentials": - x.Credentials = nil - case "did.v1.QueryResolveResponse.token": - x.Token = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) - } - panic(fmt.Errorf("message did.v1.QueryResolveResponse 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_QueryResolveResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryResolveResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - case "did.v1.QueryResolveResponse.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.QueryResolveResponse.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.QueryResolveResponse.ipfs_active": - value := x.IpfsActive - return protoreflect.ValueOfBool(value) - case "did.v1.QueryResolveResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.QueryResolveResponse.document": - value := x.Document - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.QueryResolveResponse.credentials": - if len(x.Credentials) == 0 { - return protoreflect.ValueOfList(&_QueryResolveResponse_7_list{}) - } - listValue := &_QueryResolveResponse_7_list{list: &x.Credentials} - return protoreflect.ValueOfList(listValue) - case "did.v1.QueryResolveResponse.token": - value := x.Token - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) - } - panic(fmt.Errorf("message did.v1.QueryResolveResponse 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_QueryResolveResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryResolveResponse.success": - x.Success = value.Bool() - case "did.v1.QueryResolveResponse.subject": - x.Subject = value.Interface().(string) - case "did.v1.QueryResolveResponse.origin": - x.Origin = value.Interface().(string) - case "did.v1.QueryResolveResponse.ipfs_active": - x.IpfsActive = value.Bool() - case "did.v1.QueryResolveResponse.params": - x.Params = value.Message().Interface().(*Params) - case "did.v1.QueryResolveResponse.document": - x.Document = value.Message().Interface().(*Document) - case "did.v1.QueryResolveResponse.credentials": - lv := value.List() - clv := lv.(*_QueryResolveResponse_7_list) - x.Credentials = *clv.list - case "did.v1.QueryResolveResponse.token": - x.Token = value.Message().Interface().(*Token) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) - } - panic(fmt.Errorf("message did.v1.QueryResolveResponse 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_QueryResolveResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryResolveResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "did.v1.QueryResolveResponse.document": - if x.Document == nil { - x.Document = new(Document) - } - return protoreflect.ValueOfMessage(x.Document.ProtoReflect()) - case "did.v1.QueryResolveResponse.credentials": - if x.Credentials == nil { - x.Credentials = []*Credential{} - } - value := &_QueryResolveResponse_7_list{list: &x.Credentials} - return protoreflect.ValueOfList(value) - case "did.v1.QueryResolveResponse.token": - if x.Token == nil { - x.Token = new(Token) - } - return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - case "did.v1.QueryResolveResponse.success": - panic(fmt.Errorf("field success of message did.v1.QueryResolveResponse is not mutable")) - case "did.v1.QueryResolveResponse.subject": - panic(fmt.Errorf("field subject of message did.v1.QueryResolveResponse is not mutable")) - case "did.v1.QueryResolveResponse.origin": - panic(fmt.Errorf("field origin of message did.v1.QueryResolveResponse is not mutable")) - case "did.v1.QueryResolveResponse.ipfs_active": - panic(fmt.Errorf("field ipfs_active of message did.v1.QueryResolveResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) - } - panic(fmt.Errorf("message did.v1.QueryResolveResponse 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_QueryResolveResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryResolveResponse.success": - return protoreflect.ValueOfBool(false) - case "did.v1.QueryResolveResponse.subject": - return protoreflect.ValueOfString("") - case "did.v1.QueryResolveResponse.origin": - return protoreflect.ValueOfString("") - case "did.v1.QueryResolveResponse.ipfs_active": - return protoreflect.ValueOfBool(false) - case "did.v1.QueryResolveResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.QueryResolveResponse.document": - m := new(Document) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.QueryResolveResponse.credentials": - list := []*Credential{} - return protoreflect.ValueOfList(&_QueryResolveResponse_7_list{list: &list}) - case "did.v1.QueryResolveResponse.token": - m := new(Token) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) - } - panic(fmt.Errorf("message did.v1.QueryResolveResponse 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_QueryResolveResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryResolveResponse", 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_QueryResolveResponse) 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_QueryResolveResponse) 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_QueryResolveResponse) 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_QueryResolveResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryResolveResponse) - 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 - } - 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.IpfsActive { - n += 2 - } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Document != nil { - l = options.Size(x.Document) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Credentials) > 0 { - for _, e := range x.Credentials { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Token != nil { - l = options.Size(x.Token) - 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().(*QueryResolveResponse) - 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.Token != nil { - encoded, err := options.Marshal(x.Token) - 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] = 0x42 - } - if len(x.Credentials) > 0 { - for iNdEx := len(x.Credentials) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Credentials[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if x.Document != nil { - encoded, err := options.Marshal(x.Document) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.IpfsActive { - i-- - if x.IpfsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - 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 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().(*QueryResolveResponse) - 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: QueryResolveResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolveResponse: 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 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 - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", 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.IpfsActive = bool(v != 0) case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) @@ -2997,862 +1173,6 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Document == nil { - x.Document = &Document{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Document); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Credentials = append(x.Credentials, &Credential{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Credentials[len(x.Credentials)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token == nil { - x.Token = &Token{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryServiceResponse protoreflect.MessageDescriptor - fd_QueryServiceResponse_success protoreflect.FieldDescriptor - fd_QueryServiceResponse_subject protoreflect.FieldDescriptor - fd_QueryServiceResponse_origin protoreflect.FieldDescriptor - fd_QueryServiceResponse_ipfs_active protoreflect.FieldDescriptor - fd_QueryServiceResponse_params protoreflect.FieldDescriptor - fd_QueryServiceResponse_service protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryServiceResponse = File_did_v1_query_proto.Messages().ByName("QueryServiceResponse") - fd_QueryServiceResponse_success = md_QueryServiceResponse.Fields().ByName("success") - fd_QueryServiceResponse_subject = md_QueryServiceResponse.Fields().ByName("subject") - fd_QueryServiceResponse_origin = md_QueryServiceResponse.Fields().ByName("origin") - fd_QueryServiceResponse_ipfs_active = md_QueryServiceResponse.Fields().ByName("ipfs_active") - fd_QueryServiceResponse_params = md_QueryServiceResponse.Fields().ByName("params") - fd_QueryServiceResponse_service = md_QueryServiceResponse.Fields().ByName("service") -} - -var _ protoreflect.Message = (*fastReflection_QueryServiceResponse)(nil) - -type fastReflection_QueryServiceResponse QueryServiceResponse - -func (x *QueryServiceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryServiceResponse)(x) -} - -func (x *QueryServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryServiceResponse_messageType fastReflection_QueryServiceResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryServiceResponse_messageType{} - -type fastReflection_QueryServiceResponse_messageType struct{} - -func (x fastReflection_QueryServiceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryServiceResponse)(nil) -} -func (x fastReflection_QueryServiceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryServiceResponse) -} -func (x fastReflection_QueryServiceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServiceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryServiceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServiceResponse -} - -// 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_QueryServiceResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryServiceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryServiceResponse) New() protoreflect.Message { - return new(fastReflection_QueryServiceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryServiceResponse) Interface() protoreflect.ProtoMessage { - return (*QueryServiceResponse)(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_QueryServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_QueryServiceResponse_success, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_QueryServiceResponse_subject, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_QueryServiceResponse_origin, value) { - return - } - } - if x.IpfsActive != false { - value := protoreflect.ValueOfBool(x.IpfsActive) - if !f(fd_QueryServiceResponse_ipfs_active, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryServiceResponse_params, value) { - return - } - } - if x.Service != nil { - value := protoreflect.ValueOfMessage(x.Service.ProtoReflect()) - if !f(fd_QueryServiceResponse_service, 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_QueryServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryServiceResponse.success": - return x.Success != false - case "did.v1.QueryServiceResponse.subject": - return x.Subject != "" - case "did.v1.QueryServiceResponse.origin": - return x.Origin != "" - case "did.v1.QueryServiceResponse.ipfs_active": - return x.IpfsActive != false - case "did.v1.QueryServiceResponse.params": - return x.Params != nil - case "did.v1.QueryServiceResponse.service": - return x.Service != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryServiceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryServiceResponse.success": - x.Success = false - case "did.v1.QueryServiceResponse.subject": - x.Subject = "" - case "did.v1.QueryServiceResponse.origin": - x.Origin = "" - case "did.v1.QueryServiceResponse.ipfs_active": - x.IpfsActive = false - case "did.v1.QueryServiceResponse.params": - x.Params = nil - case "did.v1.QueryServiceResponse.service": - x.Service = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryServiceResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - case "did.v1.QueryServiceResponse.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.QueryServiceResponse.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.QueryServiceResponse.ipfs_active": - value := x.IpfsActive - return protoreflect.ValueOfBool(value) - case "did.v1.QueryServiceResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.QueryServiceResponse.service": - value := x.Service - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryServiceResponse.success": - x.Success = value.Bool() - case "did.v1.QueryServiceResponse.subject": - x.Subject = value.Interface().(string) - case "did.v1.QueryServiceResponse.origin": - x.Origin = value.Interface().(string) - case "did.v1.QueryServiceResponse.ipfs_active": - x.IpfsActive = value.Bool() - case "did.v1.QueryServiceResponse.params": - x.Params = value.Message().Interface().(*Params) - case "did.v1.QueryServiceResponse.service": - x.Service = value.Message().Interface().(*Service) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryServiceResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "did.v1.QueryServiceResponse.service": - if x.Service == nil { - x.Service = new(Service) - } - return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) - case "did.v1.QueryServiceResponse.success": - panic(fmt.Errorf("field success of message did.v1.QueryServiceResponse is not mutable")) - case "did.v1.QueryServiceResponse.subject": - panic(fmt.Errorf("field subject of message did.v1.QueryServiceResponse is not mutable")) - case "did.v1.QueryServiceResponse.origin": - panic(fmt.Errorf("field origin of message did.v1.QueryServiceResponse is not mutable")) - case "did.v1.QueryServiceResponse.ipfs_active": - panic(fmt.Errorf("field ipfs_active of message did.v1.QueryServiceResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryServiceResponse.success": - return protoreflect.ValueOfBool(false) - case "did.v1.QueryServiceResponse.subject": - return protoreflect.ValueOfString("") - case "did.v1.QueryServiceResponse.origin": - return protoreflect.ValueOfString("") - case "did.v1.QueryServiceResponse.ipfs_active": - return protoreflect.ValueOfBool(false) - case "did.v1.QueryServiceResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.QueryServiceResponse.service": - m := new(Service) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryServiceResponse", 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_QueryServiceResponse) 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_QueryServiceResponse) 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_QueryServiceResponse) 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_QueryServiceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryServiceResponse) - 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 - } - 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.IpfsActive { - n += 2 - } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Service != nil { - l = options.Size(x.Service) - 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().(*QueryServiceResponse) - 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.Service != nil { - encoded, err := options.Marshal(x.Service) - 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] = 0x32 - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.IpfsActive { - i-- - if x.IpfsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - 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 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().(*QueryServiceResponse) - 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: QueryServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceResponse: 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 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 - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", 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.IpfsActive = bool(v != 0) - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", 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.Service == nil { - x.Service = &Service{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3907,10 +1227,8 @@ type QueryRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - Endpoint string `protobuf:"bytes,4,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` } func (x *QueryRequest) Reset() { @@ -3947,79 +1265,23 @@ func (x *QueryRequest) GetOrigin() string { return "" } -func (x *QueryRequest) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *QueryRequest) GetEndpoint() string { - if x != nil { - return x.Endpoint - } - return "" -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// QueryResponse is the response type for the Query/Exists RPC method. +// QueryResolveResponse is the response type for the Query/Resolve RPC method. type QueryResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - IpfsActive bool `protobuf:"varint,4,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` - Document *Document `protobuf:"bytes,6,opt,name=document,proto3" json:"document,omitempty"` - Service *Service `protobuf:"bytes,7,opt,name=service,proto3" json:"service,omitempty"` - Credentials []*Credential `protobuf:"bytes,8,rep,name=credentials,proto3" json:"credentials,omitempty"` - Token *Token `protobuf:"bytes,9,opt,name=token,proto3" json:"token,omitempty"` - Error string `protobuf:"bytes,10,opt,name=error,proto3" json:"error,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + Document *Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` + Service *ServiceInfo `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` } func (x *QueryResponse) Reset() { *x = QueryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[2] + mi := &file_did_v1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4033,7 +1295,7 @@ func (*QueryResponse) ProtoMessage() {} // Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. func (*QueryResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{2} + return file_did_v1_query_proto_rawDescGZIP(), []int{1} } func (x *QueryResponse) GetSuccess() bool { @@ -4043,34 +1305,13 @@ func (x *QueryResponse) GetSuccess() bool { return false } -func (x *QueryResponse) GetSubject() string { +func (x *QueryResponse) GetQuery() string { if x != nil { - return x.Subject + return x.Query } return "" } -func (x *QueryResponse) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *QueryResponse) GetIpfsActive() bool { - if x != nil { - return x.IpfsActive - } - return false -} - -func (x *QueryResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - func (x *QueryResponse) GetDocument() *Document { if x != nil { return x.Document @@ -4078,202 +1319,20 @@ func (x *QueryResponse) GetDocument() *Document { return nil } -func (x *QueryResponse) GetService() *Service { +func (x *QueryResponse) GetService() *ServiceInfo { if x != nil { return x.Service } return nil } -func (x *QueryResponse) GetCredentials() []*Credential { - if x != nil { - return x.Credentials - } - return nil -} - -func (x *QueryResponse) GetToken() *Token { - if x != nil { - return x.Token - } - return nil -} - -func (x *QueryResponse) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -// QueryResolveResponse is the response type for the Query/Resolve RPC method. -type QueryResolveResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - IpfsActive bool `protobuf:"varint,4,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` - Document *Document `protobuf:"bytes,6,opt,name=document,proto3" json:"document,omitempty"` - Credentials []*Credential `protobuf:"bytes,7,rep,name=credentials,proto3" json:"credentials,omitempty"` - Token *Token `protobuf:"bytes,8,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *QueryResolveResponse) Reset() { - *x = QueryResolveResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryResolveResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryResolveResponse) ProtoMessage() {} - -// Deprecated: Use QueryResolveResponse.ProtoReflect.Descriptor instead. -func (*QueryResolveResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryResolveResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *QueryResolveResponse) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *QueryResolveResponse) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *QueryResolveResponse) GetIpfsActive() bool { - if x != nil { - return x.IpfsActive - } - return false -} - -func (x *QueryResolveResponse) GetParams() *Params { +func (x *QueryResponse) GetParams() *Params { if x != nil { return x.Params } return nil } -func (x *QueryResolveResponse) GetDocument() *Document { - if x != nil { - return x.Document - } - return nil -} - -func (x *QueryResolveResponse) GetCredentials() []*Credential { - if x != nil { - return x.Credentials - } - return nil -} - -func (x *QueryResolveResponse) GetToken() *Token { - if x != nil { - return x.Token - } - return nil -} - -// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -type QueryServiceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - IpfsActive bool `protobuf:"varint,4,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` - Service *Service `protobuf:"bytes,6,opt,name=service,proto3" json:"service,omitempty"` -} - -func (x *QueryServiceResponse) Reset() { - *x = QueryServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryServiceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryServiceResponse) ProtoMessage() {} - -// Deprecated: Use QueryServiceResponse.ProtoReflect.Descriptor instead. -func (*QueryServiceResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryServiceResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *QueryServiceResponse) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *QueryServiceResponse) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *QueryServiceResponse) GetIpfsActive() bool { - if x != nil { - return x.IpfsActive - } - return false -} - -func (x *QueryServiceResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -func (x *QueryServiceResponse) GetService() *Service { - if x != nil { - return x.Service - } - return nil -} - var File_did_v1_query_proto protoreflect.FileDescriptor var file_did_v1_query_proto_rawDesc = []byte{ @@ -4283,100 +1342,46 @@ var file_did_v1_query_proto_rawDesc = []byte{ 0x74, 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 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, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x6e, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x22, 0x3d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, - 0xee, 0x02, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, + 0xc4, 0x01, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 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, 0x12, 0x1f, 0x0a, - 0x0b, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x69, 0x70, 0x66, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x26, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x2d, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x34, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x22, 0xb4, 0x02, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x12, 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, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x70, 0x66, 0x73, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2c, - 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x0b, - 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd6, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 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, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x70, 0x66, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x69, 0x70, 0x66, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x26, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x32, 0x86, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x50, 0x0a, 0x06, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, - 0x0b, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x07, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, - 0x58, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0xf2, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x4a, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, - 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, - 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1a, 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, + 0x0b, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x07, + 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, + 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x51, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x42, 0x7a, 0x0a, 0x0a, 0x63, + 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, + 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4391,43 +1396,29 @@ func file_did_v1_query_proto_rawDescGZIP() []byte { return file_did_v1_query_proto_rawDescData } -var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_did_v1_query_proto_goTypes = []interface{}{ - (*QueryRequest)(nil), // 0: did.v1.QueryRequest - (*QueryParamsResponse)(nil), // 1: did.v1.QueryParamsResponse - (*QueryResponse)(nil), // 2: did.v1.QueryResponse - (*QueryResolveResponse)(nil), // 3: did.v1.QueryResolveResponse - (*QueryServiceResponse)(nil), // 4: did.v1.QueryServiceResponse - (*Params)(nil), // 5: did.v1.Params - (*Document)(nil), // 6: did.v1.Document - (*Service)(nil), // 7: did.v1.Service - (*Credential)(nil), // 8: did.v1.Credential - (*Token)(nil), // 9: did.v1.Token + (*QueryRequest)(nil), // 0: did.v1.QueryRequest + (*QueryResponse)(nil), // 1: did.v1.QueryResponse + (*Document)(nil), // 2: did.v1.Document + (*ServiceInfo)(nil), // 3: did.v1.ServiceInfo + (*Params)(nil), // 4: did.v1.Params } var file_did_v1_query_proto_depIdxs = []int32{ - 5, // 0: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params - 5, // 1: did.v1.QueryResponse.params:type_name -> did.v1.Params - 6, // 2: did.v1.QueryResponse.document:type_name -> did.v1.Document - 7, // 3: did.v1.QueryResponse.service:type_name -> did.v1.Service - 8, // 4: did.v1.QueryResponse.credentials:type_name -> did.v1.Credential - 9, // 5: did.v1.QueryResponse.token:type_name -> did.v1.Token - 5, // 6: did.v1.QueryResolveResponse.params:type_name -> did.v1.Params - 6, // 7: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document - 8, // 8: did.v1.QueryResolveResponse.credentials:type_name -> did.v1.Credential - 9, // 9: did.v1.QueryResolveResponse.token:type_name -> did.v1.Token - 5, // 10: did.v1.QueryServiceResponse.params:type_name -> did.v1.Params - 7, // 11: did.v1.QueryServiceResponse.service:type_name -> did.v1.Service - 0, // 12: did.v1.Query.Params:input_type -> did.v1.QueryRequest - 0, // 13: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest - 0, // 14: did.v1.Query.Service:input_type -> did.v1.QueryRequest - 1, // 15: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse - 3, // 16: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse - 4, // 17: did.v1.Query.Service:output_type -> did.v1.QueryServiceResponse - 15, // [15:18] is the sub-list for method output_type - 12, // [12:15] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 2, // 0: did.v1.QueryResponse.document:type_name -> did.v1.Document + 3, // 1: did.v1.QueryResponse.service:type_name -> did.v1.ServiceInfo + 4, // 2: did.v1.QueryResponse.params:type_name -> did.v1.Params + 0, // 3: did.v1.Query.Params:input_type -> did.v1.QueryRequest + 0, // 4: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest + 0, // 5: did.v1.Query.Service:input_type -> did.v1.QueryRequest + 1, // 6: did.v1.Query.Params:output_type -> did.v1.QueryResponse + 1, // 7: did.v1.Query.Resolve:output_type -> did.v1.QueryResponse + 1, // 8: did.v1.Query.Service:output_type -> did.v1.QueryResponse + 6, // [6:9] is the sub-list for method output_type + 3, // [3:6] 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_did_v1_query_proto_init() } @@ -4451,18 +1442,6 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryResponse); i { case 0: return &v.state @@ -4474,30 +1453,6 @@ func file_did_v1_query_proto_init() { return nil } } - file_did_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryResolveResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryServiceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -4505,7 +1460,7 @@ func file_did_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/query_grpc.pb.go b/api/did/v1/query_grpc.pb.go index 37cd4173b..139aec38d 100644 --- a/api/did/v1/query_grpc.pb.go +++ b/api/did/v1/query_grpc.pb.go @@ -29,11 +29,13 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type QueryClient interface { // Params queries all parameters of the module. - Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // Resolve queries the DID document by its id. - Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) + Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // Service returns associated ServiceInfo for a given Origin - Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) + // if the servie is not found, a fingerprint is generated to be used + // as a TXT record in DNS. v=sonr, o=origin, p=protocol + Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) } type queryClient struct { @@ -44,8 +46,8 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } -func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) +func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { + out := new(QueryResponse) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) if err != nil { return nil, err @@ -53,8 +55,8 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc return out, nil } -func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { - out := new(QueryResolveResponse) +func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { + out := new(QueryResponse) err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, opts...) if err != nil { return nil, err @@ -62,8 +64,8 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp return out, nil } -func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) { - out := new(QueryServiceResponse) +func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { + out := new(QueryResponse) err := c.cc.Invoke(ctx, Query_Service_FullMethodName, in, out, opts...) if err != nil { return nil, err @@ -76,11 +78,13 @@ func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grp // for forward compatibility type QueryServer interface { // Params queries all parameters of the module. - Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) + Params(context.Context, *QueryRequest) (*QueryResponse, error) // Resolve queries the DID document by its id. - Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) + Resolve(context.Context, *QueryRequest) (*QueryResponse, error) // Service returns associated ServiceInfo for a given Origin - Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) + // if the servie is not found, a fingerprint is generated to be used + // as a TXT record in DNS. v=sonr, o=origin, p=protocol + Service(context.Context, *QueryRequest) (*QueryResponse, error) mustEmbedUnimplementedQueryServer() } @@ -88,13 +92,13 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) { +func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) { +func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") } -func (UnimplementedQueryServer) Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) { +func (UnimplementedQueryServer) Service(context.Context, *QueryRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} diff --git a/api/did/v1/state.cosmos_orm.go b/api/did/v1/state.cosmos_orm.go index 006c4f92a..3d49ef01a 100644 --- a/api/did/v1/state.cosmos_orm.go +++ b/api/did/v1/state.cosmos_orm.go @@ -9,165 +9,170 @@ import ( ormerrors "cosmossdk.io/orm/types/ormerrors" ) -type AuthenticationTable interface { - Insert(ctx context.Context, authentication *Authentication) error - Update(ctx context.Context, authentication *Authentication) error - Save(ctx context.Context, authentication *Authentication) error - Delete(ctx context.Context, authentication *Authentication) error +type AccountTable interface { + Insert(ctx context.Context, account *Account) error + Update(ctx context.Context, account *Account) error + Save(ctx context.Context, account *Account) error + Delete(ctx context.Context, account *Account) error Has(ctx context.Context, id string) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - Get(ctx context.Context, id string) (*Authentication, error) - HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) - // GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Authentication, error) - HasByControllerOrigin(ctx context.Context, controller string, origin string) (found bool, err error) - // GetByControllerOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerOrigin(ctx context.Context, controller string, origin string) (*Authentication, error) - HasByControllerCredentialLabel(ctx context.Context, controller string, credential_label string) (found bool, err error) - // GetByControllerCredentialLabel returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerCredentialLabel(ctx context.Context, controller string, credential_label string) (*Authentication, error) - List(ctx context.Context, prefixKey AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) - ListRange(ctx context.Context, from, to AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) - DeleteBy(ctx context.Context, prefixKey AuthenticationIndexKey) error - DeleteRange(ctx context.Context, from, to AuthenticationIndexKey) error + Get(ctx context.Context, id string) (*Account, error) + HasByControllerLabel(ctx context.Context, controller string, label string) (found bool, err error) + // GetByControllerLabel returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerLabel(ctx context.Context, controller string, label string) (*Account, error) + HasByControllerAddress(ctx context.Context, controller string, address string) (found bool, err error) + // GetByControllerAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerAddress(ctx context.Context, controller string, address string) (*Account, error) + HasByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (found bool, err error) + // GetByControllerChainCodeIndex returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (*Account, error) + List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) + ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) + DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error + DeleteRange(ctx context.Context, from, to AccountIndexKey) error doNotImplement() } -type AuthenticationIterator struct { +type AccountIterator struct { ormtable.Iterator } -func (i AuthenticationIterator) Value() (*Authentication, error) { - var authentication Authentication - err := i.UnmarshalMessage(&authentication) - return &authentication, err +func (i AccountIterator) Value() (*Account, error) { + var account Account + err := i.UnmarshalMessage(&account) + return &account, err } -type AuthenticationIndexKey interface { +type AccountIndexKey interface { id() uint32 values() []interface{} - authenticationIndexKey() + accountIndexKey() } // primary key starting index.. -type AuthenticationPrimaryKey = AuthenticationIdIndexKey +type AccountPrimaryKey = AccountIdIndexKey -type AuthenticationIdIndexKey struct { +type AccountIdIndexKey struct { vs []interface{} } -func (x AuthenticationIdIndexKey) id() uint32 { return 0 } -func (x AuthenticationIdIndexKey) values() []interface{} { return x.vs } -func (x AuthenticationIdIndexKey) authenticationIndexKey() {} +func (x AccountIdIndexKey) id() uint32 { return 0 } +func (x AccountIdIndexKey) values() []interface{} { return x.vs } +func (x AccountIdIndexKey) accountIndexKey() {} -func (this AuthenticationIdIndexKey) WithId(id string) AuthenticationIdIndexKey { +func (this AccountIdIndexKey) WithId(id string) AccountIdIndexKey { this.vs = []interface{}{id} return this } -type AuthenticationSubjectOriginIndexKey struct { +type AccountControllerLabelIndexKey struct { vs []interface{} } -func (x AuthenticationSubjectOriginIndexKey) id() uint32 { return 1 } -func (x AuthenticationSubjectOriginIndexKey) values() []interface{} { return x.vs } -func (x AuthenticationSubjectOriginIndexKey) authenticationIndexKey() {} +func (x AccountControllerLabelIndexKey) id() uint32 { return 1 } +func (x AccountControllerLabelIndexKey) values() []interface{} { return x.vs } +func (x AccountControllerLabelIndexKey) accountIndexKey() {} -func (this AuthenticationSubjectOriginIndexKey) WithSubject(subject string) AuthenticationSubjectOriginIndexKey { - this.vs = []interface{}{subject} - return this -} - -func (this AuthenticationSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) AuthenticationSubjectOriginIndexKey { - this.vs = []interface{}{subject, origin} - return this -} - -type AuthenticationControllerOriginIndexKey struct { - vs []interface{} -} - -func (x AuthenticationControllerOriginIndexKey) id() uint32 { return 2 } -func (x AuthenticationControllerOriginIndexKey) values() []interface{} { return x.vs } -func (x AuthenticationControllerOriginIndexKey) authenticationIndexKey() {} - -func (this AuthenticationControllerOriginIndexKey) WithController(controller string) AuthenticationControllerOriginIndexKey { +func (this AccountControllerLabelIndexKey) WithController(controller string) AccountControllerLabelIndexKey { this.vs = []interface{}{controller} return this } -func (this AuthenticationControllerOriginIndexKey) WithControllerOrigin(controller string, origin string) AuthenticationControllerOriginIndexKey { - this.vs = []interface{}{controller, origin} +func (this AccountControllerLabelIndexKey) WithControllerLabel(controller string, label string) AccountControllerLabelIndexKey { + this.vs = []interface{}{controller, label} return this } -type AuthenticationControllerCredentialLabelIndexKey struct { +type AccountControllerAddressIndexKey struct { vs []interface{} } -func (x AuthenticationControllerCredentialLabelIndexKey) id() uint32 { return 3 } -func (x AuthenticationControllerCredentialLabelIndexKey) values() []interface{} { return x.vs } -func (x AuthenticationControllerCredentialLabelIndexKey) authenticationIndexKey() {} +func (x AccountControllerAddressIndexKey) id() uint32 { return 2 } +func (x AccountControllerAddressIndexKey) values() []interface{} { return x.vs } +func (x AccountControllerAddressIndexKey) accountIndexKey() {} -func (this AuthenticationControllerCredentialLabelIndexKey) WithController(controller string) AuthenticationControllerCredentialLabelIndexKey { +func (this AccountControllerAddressIndexKey) WithController(controller string) AccountControllerAddressIndexKey { this.vs = []interface{}{controller} return this } -func (this AuthenticationControllerCredentialLabelIndexKey) WithControllerCredentialLabel(controller string, credential_label string) AuthenticationControllerCredentialLabelIndexKey { - this.vs = []interface{}{controller, credential_label} +func (this AccountControllerAddressIndexKey) WithControllerAddress(controller string, address string) AccountControllerAddressIndexKey { + this.vs = []interface{}{controller, address} return this } -type authenticationTable struct { +type AccountControllerChainCodeIndexIndexKey struct { + vs []interface{} +} + +func (x AccountControllerChainCodeIndexIndexKey) id() uint32 { return 3 } +func (x AccountControllerChainCodeIndexIndexKey) values() []interface{} { return x.vs } +func (x AccountControllerChainCodeIndexIndexKey) accountIndexKey() {} + +func (this AccountControllerChainCodeIndexIndexKey) WithController(controller string) AccountControllerChainCodeIndexIndexKey { + this.vs = []interface{}{controller} + return this +} + +func (this AccountControllerChainCodeIndexIndexKey) WithControllerChainCode(controller string, chain_code uint32) AccountControllerChainCodeIndexIndexKey { + this.vs = []interface{}{controller, chain_code} + return this +} + +func (this AccountControllerChainCodeIndexIndexKey) WithControllerChainCodeIndex(controller string, chain_code uint32, index uint32) AccountControllerChainCodeIndexIndexKey { + this.vs = []interface{}{controller, chain_code, index} + return this +} + +type accountTable struct { table ormtable.Table } -func (this authenticationTable) Insert(ctx context.Context, authentication *Authentication) error { - return this.table.Insert(ctx, authentication) +func (this accountTable) Insert(ctx context.Context, account *Account) error { + return this.table.Insert(ctx, account) } -func (this authenticationTable) Update(ctx context.Context, authentication *Authentication) error { - return this.table.Update(ctx, authentication) +func (this accountTable) Update(ctx context.Context, account *Account) error { + return this.table.Update(ctx, account) } -func (this authenticationTable) Save(ctx context.Context, authentication *Authentication) error { - return this.table.Save(ctx, authentication) +func (this accountTable) Save(ctx context.Context, account *Account) error { + return this.table.Save(ctx, account) } -func (this authenticationTable) Delete(ctx context.Context, authentication *Authentication) error { - return this.table.Delete(ctx, authentication) +func (this accountTable) Delete(ctx context.Context, account *Account) error { + return this.table.Delete(ctx, account) } -func (this authenticationTable) Has(ctx context.Context, id string) (found bool, err error) { +func (this accountTable) Has(ctx context.Context, id string) (found bool, err error) { return this.table.PrimaryKey().Has(ctx, id) } -func (this authenticationTable) Get(ctx context.Context, id string) (*Authentication, error) { - var authentication Authentication - found, err := this.table.PrimaryKey().Get(ctx, &authentication, id) +func (this accountTable) Get(ctx context.Context, id string) (*Account, error) { + var account Account + found, err := this.table.PrimaryKey().Get(ctx, &account, id) if err != nil { return nil, err } if !found { return nil, ormerrors.NotFound } - return &authentication, nil + return &account, nil } -func (this authenticationTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) { +func (this accountTable) HasByControllerLabel(ctx context.Context, controller string, label string) (found bool, err error) { return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - subject, - origin, + controller, + label, ) } -func (this authenticationTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Authentication, error) { - var authentication Authentication - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &authentication, - subject, - origin, +func (this accountTable) GetByControllerLabel(ctx context.Context, controller string, label string) (*Account, error) { + var account Account + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account, + controller, + label, ) if err != nil { return nil, err @@ -175,21 +180,21 @@ func (this authenticationTable) GetBySubjectOrigin(ctx context.Context, subject if !found { return nil, ormerrors.NotFound } - return &authentication, nil + return &account, nil } -func (this authenticationTable) HasByControllerOrigin(ctx context.Context, controller string, origin string) (found bool, err error) { +func (this accountTable) HasByControllerAddress(ctx context.Context, controller string, address string) (found bool, err error) { return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, controller, - origin, + address, ) } -func (this authenticationTable) GetByControllerOrigin(ctx context.Context, controller string, origin string) (*Authentication, error) { - var authentication Authentication - found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &authentication, +func (this accountTable) GetByControllerAddress(ctx context.Context, controller string, address string) (*Account, error) { + var account Account + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &account, controller, - origin, + address, ) if err != nil { return nil, err @@ -197,21 +202,23 @@ func (this authenticationTable) GetByControllerOrigin(ctx context.Context, contr if !found { return nil, ormerrors.NotFound } - return &authentication, nil + return &account, nil } -func (this authenticationTable) HasByControllerCredentialLabel(ctx context.Context, controller string, credential_label string) (found bool, err error) { +func (this accountTable) HasByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (found bool, err error) { return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx, controller, - credential_label, + chain_code, + index, ) } -func (this authenticationTable) GetByControllerCredentialLabel(ctx context.Context, controller string, credential_label string) (*Authentication, error) { - var authentication Authentication - found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &authentication, +func (this accountTable) GetByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (*Account, error) { + var account Account + found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &account, controller, - credential_label, + chain_code, + index, ) if err != nil { return nil, err @@ -219,237 +226,37 @@ func (this authenticationTable) GetByControllerCredentialLabel(ctx context.Conte if !found { return nil, ormerrors.NotFound } - return &authentication, nil + return &account, nil } -func (this authenticationTable) List(ctx context.Context, prefixKey AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) { +func (this accountTable) List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return AuthenticationIterator{it}, err + return AccountIterator{it}, err } -func (this authenticationTable) ListRange(ctx context.Context, from, to AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) { +func (this accountTable) ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) { it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return AuthenticationIterator{it}, err + return AccountIterator{it}, err } -func (this authenticationTable) DeleteBy(ctx context.Context, prefixKey AuthenticationIndexKey) error { +func (this accountTable) DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error { return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) } -func (this authenticationTable) DeleteRange(ctx context.Context, from, to AuthenticationIndexKey) error { +func (this accountTable) DeleteRange(ctx context.Context, from, to AccountIndexKey) error { return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) } -func (this authenticationTable) doNotImplement() {} +func (this accountTable) doNotImplement() {} -var _ AuthenticationTable = authenticationTable{} +var _ AccountTable = accountTable{} -func NewAuthenticationTable(db ormtable.Schema) (AuthenticationTable, error) { - table := db.GetTable(&Authentication{}) +func NewAccountTable(db ormtable.Schema) (AccountTable, error) { + table := db.GetTable(&Account{}) if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Authentication{}).ProtoReflect().Descriptor().FullName())) + return nil, ormerrors.TableNotFound.Wrap(string((&Account{}).ProtoReflect().Descriptor().FullName())) } - return authenticationTable{table}, nil -} - -type AssertionTable interface { - Insert(ctx context.Context, assertion *Assertion) error - Update(ctx context.Context, assertion *Assertion) error - Save(ctx context.Context, assertion *Assertion) error - Delete(ctx context.Context, assertion *Assertion) error - Has(ctx context.Context, id string) (found bool, err error) - // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - Get(ctx context.Context, id string) (*Assertion, error) - HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) - // GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Assertion, error) - HasByControllerOrigin(ctx context.Context, controller string, origin string) (found bool, err error) - // GetByControllerOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerOrigin(ctx context.Context, controller string, origin string) (*Assertion, error) - List(ctx context.Context, prefixKey AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) - ListRange(ctx context.Context, from, to AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) - DeleteBy(ctx context.Context, prefixKey AssertionIndexKey) error - DeleteRange(ctx context.Context, from, to AssertionIndexKey) error - - doNotImplement() -} - -type AssertionIterator struct { - ormtable.Iterator -} - -func (i AssertionIterator) Value() (*Assertion, error) { - var assertion Assertion - err := i.UnmarshalMessage(&assertion) - return &assertion, err -} - -type AssertionIndexKey interface { - id() uint32 - values() []interface{} - assertionIndexKey() -} - -// primary key starting index.. -type AssertionPrimaryKey = AssertionIdIndexKey - -type AssertionIdIndexKey struct { - vs []interface{} -} - -func (x AssertionIdIndexKey) id() uint32 { return 0 } -func (x AssertionIdIndexKey) values() []interface{} { return x.vs } -func (x AssertionIdIndexKey) assertionIndexKey() {} - -func (this AssertionIdIndexKey) WithId(id string) AssertionIdIndexKey { - this.vs = []interface{}{id} - return this -} - -type AssertionSubjectOriginIndexKey struct { - vs []interface{} -} - -func (x AssertionSubjectOriginIndexKey) id() uint32 { return 1 } -func (x AssertionSubjectOriginIndexKey) values() []interface{} { return x.vs } -func (x AssertionSubjectOriginIndexKey) assertionIndexKey() {} - -func (this AssertionSubjectOriginIndexKey) WithSubject(subject string) AssertionSubjectOriginIndexKey { - this.vs = []interface{}{subject} - return this -} - -func (this AssertionSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) AssertionSubjectOriginIndexKey { - this.vs = []interface{}{subject, origin} - return this -} - -type AssertionControllerOriginIndexKey struct { - vs []interface{} -} - -func (x AssertionControllerOriginIndexKey) id() uint32 { return 2 } -func (x AssertionControllerOriginIndexKey) values() []interface{} { return x.vs } -func (x AssertionControllerOriginIndexKey) assertionIndexKey() {} - -func (this AssertionControllerOriginIndexKey) WithController(controller string) AssertionControllerOriginIndexKey { - this.vs = []interface{}{controller} - return this -} - -func (this AssertionControllerOriginIndexKey) WithControllerOrigin(controller string, origin string) AssertionControllerOriginIndexKey { - this.vs = []interface{}{controller, origin} - return this -} - -type assertionTable struct { - table ormtable.Table -} - -func (this assertionTable) Insert(ctx context.Context, assertion *Assertion) error { - return this.table.Insert(ctx, assertion) -} - -func (this assertionTable) Update(ctx context.Context, assertion *Assertion) error { - return this.table.Update(ctx, assertion) -} - -func (this assertionTable) Save(ctx context.Context, assertion *Assertion) error { - return this.table.Save(ctx, assertion) -} - -func (this assertionTable) Delete(ctx context.Context, assertion *Assertion) error { - return this.table.Delete(ctx, assertion) -} - -func (this assertionTable) Has(ctx context.Context, id string) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, id) -} - -func (this assertionTable) Get(ctx context.Context, id string) (*Assertion, error) { - var assertion Assertion - found, err := this.table.PrimaryKey().Get(ctx, &assertion, id) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &assertion, nil -} - -func (this assertionTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - subject, - origin, - ) -} - -func (this assertionTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Assertion, error) { - var assertion Assertion - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &assertion, - subject, - origin, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &assertion, nil -} - -func (this assertionTable) HasByControllerOrigin(ctx context.Context, controller string, origin string) (found bool, err error) { - return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, - controller, - origin, - ) -} - -func (this assertionTable) GetByControllerOrigin(ctx context.Context, controller string, origin string) (*Assertion, error) { - var assertion Assertion - found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &assertion, - controller, - origin, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &assertion, nil -} - -func (this assertionTable) List(ctx context.Context, prefixKey AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return AssertionIterator{it}, err -} - -func (this assertionTable) ListRange(ctx context.Context, from, to AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return AssertionIterator{it}, err -} - -func (this assertionTable) DeleteBy(ctx context.Context, prefixKey AssertionIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this assertionTable) DeleteRange(ctx context.Context, from, to AssertionIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this assertionTable) doNotImplement() {} - -var _ AssertionTable = assertionTable{} - -func NewAssertionTable(db ormtable.Schema) (AssertionTable, error) { - table := db.GetTable(&Assertion{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Assertion{}).ProtoReflect().Descriptor().FullName())) - } - return assertionTable{table}, nil + return accountTable{table}, nil } type ControllerTable interface { @@ -638,162 +445,130 @@ func NewControllerTable(db ormtable.Schema) (ControllerTable, error) { return controllerTable{table}, nil } -type DelegationTable interface { - Insert(ctx context.Context, delegation *Delegation) error - Update(ctx context.Context, delegation *Delegation) error - Save(ctx context.Context, delegation *Delegation) error - Delete(ctx context.Context, delegation *Delegation) error +type ProofTable interface { + Insert(ctx context.Context, proof *Proof) error + Update(ctx context.Context, proof *Proof) error + Save(ctx context.Context, proof *Proof) error + Delete(ctx context.Context, proof *Proof) error Has(ctx context.Context, id string) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - Get(ctx context.Context, id string) (*Delegation, error) - HasByAccountAddressChainId(ctx context.Context, account_address string, chain_id string) (found bool, err error) - // GetByAccountAddressChainId returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByAccountAddressChainId(ctx context.Context, account_address string, chain_id string) (*Delegation, error) - HasByControllerAccountLabel(ctx context.Context, controller string, account_label string) (found bool, err error) - // GetByControllerAccountLabel returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerAccountLabel(ctx context.Context, controller string, account_label string) (*Delegation, error) - List(ctx context.Context, prefixKey DelegationIndexKey, opts ...ormlist.Option) (DelegationIterator, error) - ListRange(ctx context.Context, from, to DelegationIndexKey, opts ...ormlist.Option) (DelegationIterator, error) - DeleteBy(ctx context.Context, prefixKey DelegationIndexKey) error - DeleteRange(ctx context.Context, from, to DelegationIndexKey) error + Get(ctx context.Context, id string) (*Proof, error) + HasByControllerIssuerProperty(ctx context.Context, controller string, issuer string, property string) (found bool, err error) + // GetByControllerIssuerProperty returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerIssuerProperty(ctx context.Context, controller string, issuer string, property string) (*Proof, error) + List(ctx context.Context, prefixKey ProofIndexKey, opts ...ormlist.Option) (ProofIterator, error) + ListRange(ctx context.Context, from, to ProofIndexKey, opts ...ormlist.Option) (ProofIterator, error) + DeleteBy(ctx context.Context, prefixKey ProofIndexKey) error + DeleteRange(ctx context.Context, from, to ProofIndexKey) error doNotImplement() } -type DelegationIterator struct { +type ProofIterator struct { ormtable.Iterator } -func (i DelegationIterator) Value() (*Delegation, error) { - var delegation Delegation - err := i.UnmarshalMessage(&delegation) - return &delegation, err +func (i ProofIterator) Value() (*Proof, error) { + var proof Proof + err := i.UnmarshalMessage(&proof) + return &proof, err } -type DelegationIndexKey interface { +type ProofIndexKey interface { id() uint32 values() []interface{} - delegationIndexKey() + proofIndexKey() } // primary key starting index.. -type DelegationPrimaryKey = DelegationIdIndexKey +type ProofPrimaryKey = ProofIdIndexKey -type DelegationIdIndexKey struct { +type ProofIdIndexKey struct { vs []interface{} } -func (x DelegationIdIndexKey) id() uint32 { return 0 } -func (x DelegationIdIndexKey) values() []interface{} { return x.vs } -func (x DelegationIdIndexKey) delegationIndexKey() {} +func (x ProofIdIndexKey) id() uint32 { return 0 } +func (x ProofIdIndexKey) values() []interface{} { return x.vs } +func (x ProofIdIndexKey) proofIndexKey() {} -func (this DelegationIdIndexKey) WithId(id string) DelegationIdIndexKey { +func (this ProofIdIndexKey) WithId(id string) ProofIdIndexKey { this.vs = []interface{}{id} return this } -type DelegationAccountAddressChainIdIndexKey struct { +type ProofControllerIssuerPropertyIndexKey struct { vs []interface{} } -func (x DelegationAccountAddressChainIdIndexKey) id() uint32 { return 1 } -func (x DelegationAccountAddressChainIdIndexKey) values() []interface{} { return x.vs } -func (x DelegationAccountAddressChainIdIndexKey) delegationIndexKey() {} +func (x ProofControllerIssuerPropertyIndexKey) id() uint32 { return 1 } +func (x ProofControllerIssuerPropertyIndexKey) values() []interface{} { return x.vs } +func (x ProofControllerIssuerPropertyIndexKey) proofIndexKey() {} -func (this DelegationAccountAddressChainIdIndexKey) WithAccountAddress(account_address string) DelegationAccountAddressChainIdIndexKey { - this.vs = []interface{}{account_address} - return this -} - -func (this DelegationAccountAddressChainIdIndexKey) WithAccountAddressChainId(account_address string, chain_id string) DelegationAccountAddressChainIdIndexKey { - this.vs = []interface{}{account_address, chain_id} - return this -} - -type DelegationControllerAccountLabelIndexKey struct { - vs []interface{} -} - -func (x DelegationControllerAccountLabelIndexKey) id() uint32 { return 2 } -func (x DelegationControllerAccountLabelIndexKey) values() []interface{} { return x.vs } -func (x DelegationControllerAccountLabelIndexKey) delegationIndexKey() {} - -func (this DelegationControllerAccountLabelIndexKey) WithController(controller string) DelegationControllerAccountLabelIndexKey { +func (this ProofControllerIssuerPropertyIndexKey) WithController(controller string) ProofControllerIssuerPropertyIndexKey { this.vs = []interface{}{controller} return this } -func (this DelegationControllerAccountLabelIndexKey) WithControllerAccountLabel(controller string, account_label string) DelegationControllerAccountLabelIndexKey { - this.vs = []interface{}{controller, account_label} +func (this ProofControllerIssuerPropertyIndexKey) WithControllerIssuer(controller string, issuer string) ProofControllerIssuerPropertyIndexKey { + this.vs = []interface{}{controller, issuer} return this } -type DelegationControllerChainIdIndexKey struct { - vs []interface{} -} - -func (x DelegationControllerChainIdIndexKey) id() uint32 { return 3 } -func (x DelegationControllerChainIdIndexKey) values() []interface{} { return x.vs } -func (x DelegationControllerChainIdIndexKey) delegationIndexKey() {} - -func (this DelegationControllerChainIdIndexKey) WithController(controller string) DelegationControllerChainIdIndexKey { - this.vs = []interface{}{controller} +func (this ProofControllerIssuerPropertyIndexKey) WithControllerIssuerProperty(controller string, issuer string, property string) ProofControllerIssuerPropertyIndexKey { + this.vs = []interface{}{controller, issuer, property} return this } -func (this DelegationControllerChainIdIndexKey) WithControllerChainId(controller string, chain_id string) DelegationControllerChainIdIndexKey { - this.vs = []interface{}{controller, chain_id} - return this -} - -type delegationTable struct { +type proofTable struct { table ormtable.Table } -func (this delegationTable) Insert(ctx context.Context, delegation *Delegation) error { - return this.table.Insert(ctx, delegation) +func (this proofTable) Insert(ctx context.Context, proof *Proof) error { + return this.table.Insert(ctx, proof) } -func (this delegationTable) Update(ctx context.Context, delegation *Delegation) error { - return this.table.Update(ctx, delegation) +func (this proofTable) Update(ctx context.Context, proof *Proof) error { + return this.table.Update(ctx, proof) } -func (this delegationTable) Save(ctx context.Context, delegation *Delegation) error { - return this.table.Save(ctx, delegation) +func (this proofTable) Save(ctx context.Context, proof *Proof) error { + return this.table.Save(ctx, proof) } -func (this delegationTable) Delete(ctx context.Context, delegation *Delegation) error { - return this.table.Delete(ctx, delegation) +func (this proofTable) Delete(ctx context.Context, proof *Proof) error { + return this.table.Delete(ctx, proof) } -func (this delegationTable) Has(ctx context.Context, id string) (found bool, err error) { +func (this proofTable) Has(ctx context.Context, id string) (found bool, err error) { return this.table.PrimaryKey().Has(ctx, id) } -func (this delegationTable) Get(ctx context.Context, id string) (*Delegation, error) { - var delegation Delegation - found, err := this.table.PrimaryKey().Get(ctx, &delegation, id) +func (this proofTable) Get(ctx context.Context, id string) (*Proof, error) { + var proof Proof + found, err := this.table.PrimaryKey().Get(ctx, &proof, id) if err != nil { return nil, err } if !found { return nil, ormerrors.NotFound } - return &delegation, nil + return &proof, nil } -func (this delegationTable) HasByAccountAddressChainId(ctx context.Context, account_address string, chain_id string) (found bool, err error) { +func (this proofTable) HasByControllerIssuerProperty(ctx context.Context, controller string, issuer string, property string) (found bool, err error) { return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - account_address, - chain_id, + controller, + issuer, + property, ) } -func (this delegationTable) GetByAccountAddressChainId(ctx context.Context, account_address string, chain_id string) (*Delegation, error) { - var delegation Delegation - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &delegation, - account_address, - chain_id, +func (this proofTable) GetByControllerIssuerProperty(ctx context.Context, controller string, issuer string, property string) (*Proof, error) { + var proof Proof + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &proof, + controller, + issuer, + property, ) if err != nil { return nil, err @@ -801,59 +576,37 @@ func (this delegationTable) GetByAccountAddressChainId(ctx context.Context, acco if !found { return nil, ormerrors.NotFound } - return &delegation, nil + return &proof, nil } -func (this delegationTable) HasByControllerAccountLabel(ctx context.Context, controller string, account_label string) (found bool, err error) { - return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, - controller, - account_label, - ) -} - -func (this delegationTable) GetByControllerAccountLabel(ctx context.Context, controller string, account_label string) (*Delegation, error) { - var delegation Delegation - found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &delegation, - controller, - account_label, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &delegation, nil -} - -func (this delegationTable) List(ctx context.Context, prefixKey DelegationIndexKey, opts ...ormlist.Option) (DelegationIterator, error) { +func (this proofTable) List(ctx context.Context, prefixKey ProofIndexKey, opts ...ormlist.Option) (ProofIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return DelegationIterator{it}, err + return ProofIterator{it}, err } -func (this delegationTable) ListRange(ctx context.Context, from, to DelegationIndexKey, opts ...ormlist.Option) (DelegationIterator, error) { +func (this proofTable) ListRange(ctx context.Context, from, to ProofIndexKey, opts ...ormlist.Option) (ProofIterator, error) { it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return DelegationIterator{it}, err + return ProofIterator{it}, err } -func (this delegationTable) DeleteBy(ctx context.Context, prefixKey DelegationIndexKey) error { +func (this proofTable) DeleteBy(ctx context.Context, prefixKey ProofIndexKey) error { return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) } -func (this delegationTable) DeleteRange(ctx context.Context, from, to DelegationIndexKey) error { +func (this proofTable) DeleteRange(ctx context.Context, from, to ProofIndexKey) error { return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) } -func (this delegationTable) doNotImplement() {} +func (this proofTable) doNotImplement() {} -var _ DelegationTable = delegationTable{} +var _ ProofTable = proofTable{} -func NewDelegationTable(db ormtable.Schema) (DelegationTable, error) { - table := db.GetTable(&Delegation{}) +func NewProofTable(db ormtable.Schema) (ProofTable, error) { + table := db.GetTable(&Proof{}) if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Delegation{}).ProtoReflect().Descriptor().FullName())) + return nil, ormerrors.TableNotFound.Wrap(string((&Proof{}).ProtoReflect().Descriptor().FullName())) } - return delegationTable{table}, nil + return proofTable{table}, nil } type ServiceRecordTable interface { @@ -864,12 +617,12 @@ type ServiceRecordTable interface { Has(ctx context.Context, id string) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id string) (*ServiceRecord, error) - HasByOriginUri(ctx context.Context, origin_uri string) (found bool, err error) - // GetByOriginUri returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByOriginUri(ctx context.Context, origin_uri string) (*ServiceRecord, error) - HasByControllerOriginUri(ctx context.Context, controller string, origin_uri string) (found bool, err error) - // GetByControllerOriginUri returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerOriginUri(ctx context.Context, controller string, origin_uri string) (*ServiceRecord, error) + HasByOrigin(ctx context.Context, origin string) (found bool, err error) + // GetByOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByOrigin(ctx context.Context, origin string) (*ServiceRecord, error) + HasByAuthorityOrigin(ctx context.Context, authority string, origin string) (found bool, err error) + // GetByAuthorityOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByAuthorityOrigin(ctx context.Context, authority string, origin string) (*ServiceRecord, error) List(ctx context.Context, prefixKey ServiceRecordIndexKey, opts ...ormlist.Option) (ServiceRecordIterator, error) ListRange(ctx context.Context, from, to ServiceRecordIndexKey, opts ...ormlist.Option) (ServiceRecordIterator, error) DeleteBy(ctx context.Context, prefixKey ServiceRecordIndexKey) error @@ -910,34 +663,34 @@ func (this ServiceRecordIdIndexKey) WithId(id string) ServiceRecordIdIndexKey { return this } -type ServiceRecordOriginUriIndexKey struct { +type ServiceRecordOriginIndexKey struct { vs []interface{} } -func (x ServiceRecordOriginUriIndexKey) id() uint32 { return 1 } -func (x ServiceRecordOriginUriIndexKey) values() []interface{} { return x.vs } -func (x ServiceRecordOriginUriIndexKey) serviceRecordIndexKey() {} +func (x ServiceRecordOriginIndexKey) id() uint32 { return 1 } +func (x ServiceRecordOriginIndexKey) values() []interface{} { return x.vs } +func (x ServiceRecordOriginIndexKey) serviceRecordIndexKey() {} -func (this ServiceRecordOriginUriIndexKey) WithOriginUri(origin_uri string) ServiceRecordOriginUriIndexKey { - this.vs = []interface{}{origin_uri} +func (this ServiceRecordOriginIndexKey) WithOrigin(origin string) ServiceRecordOriginIndexKey { + this.vs = []interface{}{origin} return this } -type ServiceRecordControllerOriginUriIndexKey struct { +type ServiceRecordAuthorityOriginIndexKey struct { vs []interface{} } -func (x ServiceRecordControllerOriginUriIndexKey) id() uint32 { return 2 } -func (x ServiceRecordControllerOriginUriIndexKey) values() []interface{} { return x.vs } -func (x ServiceRecordControllerOriginUriIndexKey) serviceRecordIndexKey() {} +func (x ServiceRecordAuthorityOriginIndexKey) id() uint32 { return 2 } +func (x ServiceRecordAuthorityOriginIndexKey) values() []interface{} { return x.vs } +func (x ServiceRecordAuthorityOriginIndexKey) serviceRecordIndexKey() {} -func (this ServiceRecordControllerOriginUriIndexKey) WithController(controller string) ServiceRecordControllerOriginUriIndexKey { - this.vs = []interface{}{controller} +func (this ServiceRecordAuthorityOriginIndexKey) WithAuthority(authority string) ServiceRecordAuthorityOriginIndexKey { + this.vs = []interface{}{authority} return this } -func (this ServiceRecordControllerOriginUriIndexKey) WithControllerOriginUri(controller string, origin_uri string) ServiceRecordControllerOriginUriIndexKey { - this.vs = []interface{}{controller, origin_uri} +func (this ServiceRecordAuthorityOriginIndexKey) WithAuthorityOrigin(authority string, origin string) ServiceRecordAuthorityOriginIndexKey { + this.vs = []interface{}{authority, origin} return this } @@ -977,16 +730,16 @@ func (this serviceRecordTable) Get(ctx context.Context, id string) (*ServiceReco return &serviceRecord, nil } -func (this serviceRecordTable) HasByOriginUri(ctx context.Context, origin_uri string) (found bool, err error) { +func (this serviceRecordTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) { return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - origin_uri, + origin, ) } -func (this serviceRecordTable) GetByOriginUri(ctx context.Context, origin_uri string) (*ServiceRecord, error) { +func (this serviceRecordTable) GetByOrigin(ctx context.Context, origin string) (*ServiceRecord, error) { var serviceRecord ServiceRecord found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &serviceRecord, - origin_uri, + origin, ) if err != nil { return nil, err @@ -997,18 +750,18 @@ func (this serviceRecordTable) GetByOriginUri(ctx context.Context, origin_uri st return &serviceRecord, nil } -func (this serviceRecordTable) HasByControllerOriginUri(ctx context.Context, controller string, origin_uri string) (found bool, err error) { +func (this serviceRecordTable) HasByAuthorityOrigin(ctx context.Context, authority string, origin string) (found bool, err error) { return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, - controller, - origin_uri, + authority, + origin, ) } -func (this serviceRecordTable) GetByControllerOriginUri(ctx context.Context, controller string, origin_uri string) (*ServiceRecord, error) { +func (this serviceRecordTable) GetByAuthorityOrigin(ctx context.Context, authority string, origin string) (*ServiceRecord, error) { var serviceRecord ServiceRecord found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &serviceRecord, - controller, - origin_uri, + authority, + origin, ) if err != nil { return nil, err @@ -1049,55 +802,221 @@ func NewServiceRecordTable(db ormtable.Schema) (ServiceRecordTable, error) { return serviceRecordTable{table}, nil } +type VerificationMethodTable interface { + Insert(ctx context.Context, verificationMethod *VerificationMethod) error + Update(ctx context.Context, verificationMethod *VerificationMethod) error + Save(ctx context.Context, verificationMethod *VerificationMethod) error + Delete(ctx context.Context, verificationMethod *VerificationMethod) error + Has(ctx context.Context, id string) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, id string) (*VerificationMethod, error) + HasByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (found bool, err error) + // GetByControllerMethodIssuerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (*VerificationMethod, error) + List(ctx context.Context, prefixKey VerificationMethodIndexKey, opts ...ormlist.Option) (VerificationMethodIterator, error) + ListRange(ctx context.Context, from, to VerificationMethodIndexKey, opts ...ormlist.Option) (VerificationMethodIterator, error) + DeleteBy(ctx context.Context, prefixKey VerificationMethodIndexKey) error + DeleteRange(ctx context.Context, from, to VerificationMethodIndexKey) error + + doNotImplement() +} + +type VerificationMethodIterator struct { + ormtable.Iterator +} + +func (i VerificationMethodIterator) Value() (*VerificationMethod, error) { + var verificationMethod VerificationMethod + err := i.UnmarshalMessage(&verificationMethod) + return &verificationMethod, err +} + +type VerificationMethodIndexKey interface { + id() uint32 + values() []interface{} + verificationMethodIndexKey() +} + +// primary key starting index.. +type VerificationMethodPrimaryKey = VerificationMethodIdIndexKey + +type VerificationMethodIdIndexKey struct { + vs []interface{} +} + +func (x VerificationMethodIdIndexKey) id() uint32 { return 0 } +func (x VerificationMethodIdIndexKey) values() []interface{} { return x.vs } +func (x VerificationMethodIdIndexKey) verificationMethodIndexKey() {} + +func (this VerificationMethodIdIndexKey) WithId(id string) VerificationMethodIdIndexKey { + this.vs = []interface{}{id} + return this +} + +type VerificationMethodControllerMethodIssuerSubjectIndexKey struct { + vs []interface{} +} + +func (x VerificationMethodControllerMethodIssuerSubjectIndexKey) id() uint32 { return 1 } +func (x VerificationMethodControllerMethodIssuerSubjectIndexKey) values() []interface{} { return x.vs } +func (x VerificationMethodControllerMethodIssuerSubjectIndexKey) verificationMethodIndexKey() {} + +func (this VerificationMethodControllerMethodIssuerSubjectIndexKey) WithController(controller string) VerificationMethodControllerMethodIssuerSubjectIndexKey { + this.vs = []interface{}{controller} + return this +} + +func (this VerificationMethodControllerMethodIssuerSubjectIndexKey) WithControllerMethod(controller string, method DIDNamespace) VerificationMethodControllerMethodIssuerSubjectIndexKey { + this.vs = []interface{}{controller, method} + return this +} + +func (this VerificationMethodControllerMethodIssuerSubjectIndexKey) WithControllerMethodIssuer(controller string, method DIDNamespace, issuer string) VerificationMethodControllerMethodIssuerSubjectIndexKey { + this.vs = []interface{}{controller, method, issuer} + return this +} + +func (this VerificationMethodControllerMethodIssuerSubjectIndexKey) WithControllerMethodIssuerSubject(controller string, method DIDNamespace, issuer string, subject string) VerificationMethodControllerMethodIssuerSubjectIndexKey { + this.vs = []interface{}{controller, method, issuer, subject} + return this +} + +type verificationMethodTable struct { + table ormtable.Table +} + +func (this verificationMethodTable) Insert(ctx context.Context, verificationMethod *VerificationMethod) error { + return this.table.Insert(ctx, verificationMethod) +} + +func (this verificationMethodTable) Update(ctx context.Context, verificationMethod *VerificationMethod) error { + return this.table.Update(ctx, verificationMethod) +} + +func (this verificationMethodTable) Save(ctx context.Context, verificationMethod *VerificationMethod) error { + return this.table.Save(ctx, verificationMethod) +} + +func (this verificationMethodTable) Delete(ctx context.Context, verificationMethod *VerificationMethod) error { + return this.table.Delete(ctx, verificationMethod) +} + +func (this verificationMethodTable) Has(ctx context.Context, id string) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, id) +} + +func (this verificationMethodTable) Get(ctx context.Context, id string) (*VerificationMethod, error) { + var verificationMethod VerificationMethod + found, err := this.table.PrimaryKey().Get(ctx, &verificationMethod, id) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &verificationMethod, nil +} + +func (this verificationMethodTable) HasByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + controller, + method, + issuer, + subject, + ) +} + +func (this verificationMethodTable) GetByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (*VerificationMethod, error) { + var verificationMethod VerificationMethod + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &verificationMethod, + controller, + method, + issuer, + subject, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &verificationMethod, nil +} + +func (this verificationMethodTable) List(ctx context.Context, prefixKey VerificationMethodIndexKey, opts ...ormlist.Option) (VerificationMethodIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return VerificationMethodIterator{it}, err +} + +func (this verificationMethodTable) ListRange(ctx context.Context, from, to VerificationMethodIndexKey, opts ...ormlist.Option) (VerificationMethodIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return VerificationMethodIterator{it}, err +} + +func (this verificationMethodTable) DeleteBy(ctx context.Context, prefixKey VerificationMethodIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this verificationMethodTable) DeleteRange(ctx context.Context, from, to VerificationMethodIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this verificationMethodTable) doNotImplement() {} + +var _ VerificationMethodTable = verificationMethodTable{} + +func NewVerificationMethodTable(db ormtable.Schema) (VerificationMethodTable, error) { + table := db.GetTable(&VerificationMethod{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&VerificationMethod{}).ProtoReflect().Descriptor().FullName())) + } + return verificationMethodTable{table}, nil +} + type StateStore interface { - AuthenticationTable() AuthenticationTable - AssertionTable() AssertionTable + AccountTable() AccountTable ControllerTable() ControllerTable - DelegationTable() DelegationTable + ProofTable() ProofTable ServiceRecordTable() ServiceRecordTable + VerificationMethodTable() VerificationMethodTable doNotImplement() } type stateStore struct { - authentication AuthenticationTable - assertion AssertionTable - controller ControllerTable - delegation DelegationTable - serviceRecord ServiceRecordTable + account AccountTable + controller ControllerTable + proof ProofTable + serviceRecord ServiceRecordTable + verificationMethod VerificationMethodTable } -func (x stateStore) AuthenticationTable() AuthenticationTable { - return x.authentication -} - -func (x stateStore) AssertionTable() AssertionTable { - return x.assertion +func (x stateStore) AccountTable() AccountTable { + return x.account } func (x stateStore) ControllerTable() ControllerTable { return x.controller } -func (x stateStore) DelegationTable() DelegationTable { - return x.delegation +func (x stateStore) ProofTable() ProofTable { + return x.proof } func (x stateStore) ServiceRecordTable() ServiceRecordTable { return x.serviceRecord } +func (x stateStore) VerificationMethodTable() VerificationMethodTable { + return x.verificationMethod +} + func (stateStore) doNotImplement() {} var _ StateStore = stateStore{} func NewStateStore(db ormtable.Schema) (StateStore, error) { - authenticationTable, err := NewAuthenticationTable(db) - if err != nil { - return nil, err - } - - assertionTable, err := NewAssertionTable(db) + accountTable, err := NewAccountTable(db) if err != nil { return nil, err } @@ -1107,7 +1026,7 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { return nil, err } - delegationTable, err := NewDelegationTable(db) + proofTable, err := NewProofTable(db) if err != nil { return nil, err } @@ -1117,11 +1036,16 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { return nil, err } + verificationMethodTable, err := NewVerificationMethodTable(db) + if err != nil { + return nil, err + } + return stateStore{ - authenticationTable, - assertionTable, + accountTable, controllerTable, - delegationTable, + proofTable, serviceRecordTable, + verificationMethodTable, }, nil } diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 2e5d48abf..5c558cc22 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -14,90 +14,86 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_Authentication_8_list)(nil) +var _ protoreflect.List = (*_Account_8_list)(nil) -type _Authentication_8_list struct { +type _Account_8_list struct { list *[]string } -func (x *_Authentication_8_list) Len() int { +func (x *_Account_8_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Authentication_8_list) Get(i int) protoreflect.Value { +func (x *_Account_8_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_Authentication_8_list) Set(i int, value protoreflect.Value) { +func (x *_Account_8_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_Authentication_8_list) Append(value protoreflect.Value) { +func (x *_Account_8_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_Authentication_8_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Authentication at list field CredentialTransport as it is not of Message kind")) +func (x *_Account_8_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Account at list field Chains as it is not of Message kind")) } -func (x *_Authentication_8_list) Truncate(n int) { +func (x *_Account_8_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_Authentication_8_list) NewElement() protoreflect.Value { +func (x *_Account_8_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_Authentication_8_list) IsValid() bool { +func (x *_Account_8_list) IsValid() bool { return x.list != nil } var ( - md_Authentication protoreflect.MessageDescriptor - fd_Authentication_id protoreflect.FieldDescriptor - fd_Authentication_controller protoreflect.FieldDescriptor - fd_Authentication_public_key protoreflect.FieldDescriptor - fd_Authentication_origin protoreflect.FieldDescriptor - fd_Authentication_subject protoreflect.FieldDescriptor - fd_Authentication_credential_id protoreflect.FieldDescriptor - fd_Authentication_credential_label protoreflect.FieldDescriptor - fd_Authentication_credential_transport protoreflect.FieldDescriptor - fd_Authentication_attestation_type protoreflect.FieldDescriptor - fd_Authentication_metadata protoreflect.FieldDescriptor + md_Account protoreflect.MessageDescriptor + fd_Account_id protoreflect.FieldDescriptor + fd_Account_controller protoreflect.FieldDescriptor + fd_Account_public_key protoreflect.FieldDescriptor + fd_Account_address protoreflect.FieldDescriptor + fd_Account_label protoreflect.FieldDescriptor + fd_Account_chain_code protoreflect.FieldDescriptor + fd_Account_index protoreflect.FieldDescriptor + fd_Account_chains protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() - md_Authentication = File_did_v1_state_proto.Messages().ByName("Authentication") - fd_Authentication_id = md_Authentication.Fields().ByName("id") - fd_Authentication_controller = md_Authentication.Fields().ByName("controller") - fd_Authentication_public_key = md_Authentication.Fields().ByName("public_key") - fd_Authentication_origin = md_Authentication.Fields().ByName("origin") - fd_Authentication_subject = md_Authentication.Fields().ByName("subject") - fd_Authentication_credential_id = md_Authentication.Fields().ByName("credential_id") - fd_Authentication_credential_label = md_Authentication.Fields().ByName("credential_label") - fd_Authentication_credential_transport = md_Authentication.Fields().ByName("credential_transport") - fd_Authentication_attestation_type = md_Authentication.Fields().ByName("attestation_type") - fd_Authentication_metadata = md_Authentication.Fields().ByName("metadata") + md_Account = File_did_v1_state_proto.Messages().ByName("Account") + fd_Account_id = md_Account.Fields().ByName("id") + fd_Account_controller = md_Account.Fields().ByName("controller") + fd_Account_public_key = md_Account.Fields().ByName("public_key") + fd_Account_address = md_Account.Fields().ByName("address") + fd_Account_label = md_Account.Fields().ByName("label") + fd_Account_chain_code = md_Account.Fields().ByName("chain_code") + fd_Account_index = md_Account.Fields().ByName("index") + fd_Account_chains = md_Account.Fields().ByName("chains") } -var _ protoreflect.Message = (*fastReflection_Authentication)(nil) +var _ protoreflect.Message = (*fastReflection_Account)(nil) -type fastReflection_Authentication Authentication +type fastReflection_Account Account -func (x *Authentication) ProtoReflect() protoreflect.Message { - return (*fastReflection_Authentication)(x) +func (x *Account) ProtoReflect() protoreflect.Message { + return (*fastReflection_Account)(x) } -func (x *Authentication) slowProtoReflect() protoreflect.Message { +func (x *Account) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_state_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -109,43 +105,43 @@ func (x *Authentication) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Authentication_messageType fastReflection_Authentication_messageType -var _ protoreflect.MessageType = fastReflection_Authentication_messageType{} +var _fastReflection_Account_messageType fastReflection_Account_messageType +var _ protoreflect.MessageType = fastReflection_Account_messageType{} -type fastReflection_Authentication_messageType struct{} +type fastReflection_Account_messageType struct{} -func (x fastReflection_Authentication_messageType) Zero() protoreflect.Message { - return (*fastReflection_Authentication)(nil) +func (x fastReflection_Account_messageType) Zero() protoreflect.Message { + return (*fastReflection_Account)(nil) } -func (x fastReflection_Authentication_messageType) New() protoreflect.Message { - return new(fastReflection_Authentication) +func (x fastReflection_Account_messageType) New() protoreflect.Message { + return new(fastReflection_Account) } -func (x fastReflection_Authentication_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Authentication +func (x fastReflection_Account_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Account } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Authentication) Descriptor() protoreflect.MessageDescriptor { - return md_Authentication +func (x *fastReflection_Account) Descriptor() protoreflect.MessageDescriptor { + return md_Account } // 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_Authentication) Type() protoreflect.MessageType { - return _fastReflection_Authentication_messageType +func (x *fastReflection_Account) Type() protoreflect.MessageType { + return _fastReflection_Account_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Authentication) New() protoreflect.Message { - return new(fastReflection_Authentication) +func (x *fastReflection_Account) New() protoreflect.Message { + return new(fastReflection_Account) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Authentication) Interface() protoreflect.ProtoMessage { - return (*Authentication)(x) +func (x *fastReflection_Account) Interface() protoreflect.ProtoMessage { + return (*Account)(x) } // Range iterates over every populated field in an undefined order, @@ -153,64 +149,52 @@ func (x *fastReflection_Authentication) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Authentication) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Account) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_Authentication_id, value) { + if !f(fd_Account_id, value) { return } } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Authentication_controller, value) { + if !f(fd_Account_controller, value) { return } } if x.PublicKey != nil { value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - if !f(fd_Authentication_public_key, value) { + if !f(fd_Account_public_key, value) { return } } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Authentication_origin, value) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_Account_address, value) { return } } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Authentication_subject, value) { + if x.Label != "" { + value := protoreflect.ValueOfString(x.Label) + if !f(fd_Account_label, value) { return } } - if len(x.CredentialId) != 0 { - value := protoreflect.ValueOfBytes(x.CredentialId) - if !f(fd_Authentication_credential_id, value) { + if x.ChainCode != uint32(0) { + value := protoreflect.ValueOfUint32(x.ChainCode) + if !f(fd_Account_chain_code, value) { return } } - if x.CredentialLabel != "" { - value := protoreflect.ValueOfString(x.CredentialLabel) - if !f(fd_Authentication_credential_label, value) { + if x.Index != uint32(0) { + value := protoreflect.ValueOfUint32(x.Index) + if !f(fd_Account_index, value) { return } } - if len(x.CredentialTransport) != 0 { - value := protoreflect.ValueOfList(&_Authentication_8_list{list: &x.CredentialTransport}) - if !f(fd_Authentication_credential_transport, value) { - return - } - } - if x.AttestationType != "" { - value := protoreflect.ValueOfString(x.AttestationType) - if !f(fd_Authentication_attestation_type, value) { - return - } - } - if x.Metadata != nil { - value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - if !f(fd_Authentication_metadata, value) { + if len(x.Chains) != 0 { + value := protoreflect.ValueOfList(&_Account_8_list{list: &x.Chains}) + if !f(fd_Account_chains, value) { return } } @@ -227,33 +211,29 @@ func (x *fastReflection_Authentication) Range(f func(protoreflect.FieldDescripto // 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_Authentication) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Account) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Authentication.id": + case "did.v1.Account.id": return x.Id != "" - case "did.v1.Authentication.controller": + case "did.v1.Account.controller": return x.Controller != "" - case "did.v1.Authentication.public_key": + case "did.v1.Account.public_key": return x.PublicKey != nil - case "did.v1.Authentication.origin": - return x.Origin != "" - case "did.v1.Authentication.subject": - return x.Subject != "" - case "did.v1.Authentication.credential_id": - return len(x.CredentialId) != 0 - case "did.v1.Authentication.credential_label": - return x.CredentialLabel != "" - case "did.v1.Authentication.credential_transport": - return len(x.CredentialTransport) != 0 - case "did.v1.Authentication.attestation_type": - return x.AttestationType != "" - case "did.v1.Authentication.metadata": - return x.Metadata != nil + case "did.v1.Account.address": + return x.Address != "" + case "did.v1.Account.label": + return x.Label != "" + case "did.v1.Account.chain_code": + return x.ChainCode != uint32(0) + case "did.v1.Account.index": + return x.Index != uint32(0) + case "did.v1.Account.chains": + return len(x.Chains) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) } } @@ -263,33 +243,29 @@ func (x *fastReflection_Authentication) Has(fd protoreflect.FieldDescriptor) boo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Authentication) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Account) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Authentication.id": + case "did.v1.Account.id": x.Id = "" - case "did.v1.Authentication.controller": + case "did.v1.Account.controller": x.Controller = "" - case "did.v1.Authentication.public_key": + case "did.v1.Account.public_key": x.PublicKey = nil - case "did.v1.Authentication.origin": - x.Origin = "" - case "did.v1.Authentication.subject": - x.Subject = "" - case "did.v1.Authentication.credential_id": - x.CredentialId = nil - case "did.v1.Authentication.credential_label": - x.CredentialLabel = "" - case "did.v1.Authentication.credential_transport": - x.CredentialTransport = nil - case "did.v1.Authentication.attestation_type": - x.AttestationType = "" - case "did.v1.Authentication.metadata": - x.Metadata = nil + case "did.v1.Account.address": + x.Address = "" + case "did.v1.Account.label": + x.Label = "" + case "did.v1.Account.chain_code": + x.ChainCode = uint32(0) + case "did.v1.Account.index": + x.Index = uint32(0) + case "did.v1.Account.chains": + x.Chains = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) } } @@ -299,46 +275,40 @@ func (x *fastReflection_Authentication) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Authentication) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Account) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Authentication.id": + case "did.v1.Account.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Authentication.controller": + case "did.v1.Account.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.Authentication.public_key": + case "did.v1.Account.public_key": value := x.PublicKey return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.Authentication.origin": - value := x.Origin + case "did.v1.Account.address": + value := x.Address return protoreflect.ValueOfString(value) - case "did.v1.Authentication.subject": - value := x.Subject + case "did.v1.Account.label": + value := x.Label return protoreflect.ValueOfString(value) - case "did.v1.Authentication.credential_id": - value := x.CredentialId - return protoreflect.ValueOfBytes(value) - case "did.v1.Authentication.credential_label": - value := x.CredentialLabel - return protoreflect.ValueOfString(value) - case "did.v1.Authentication.credential_transport": - if len(x.CredentialTransport) == 0 { - return protoreflect.ValueOfList(&_Authentication_8_list{}) + case "did.v1.Account.chain_code": + value := x.ChainCode + return protoreflect.ValueOfUint32(value) + case "did.v1.Account.index": + value := x.Index + return protoreflect.ValueOfUint32(value) + case "did.v1.Account.chains": + if len(x.Chains) == 0 { + return protoreflect.ValueOfList(&_Account_8_list{}) } - listValue := &_Authentication_8_list{list: &x.CredentialTransport} + listValue := &_Account_8_list{list: &x.Chains} return protoreflect.ValueOfList(listValue) - case "did.v1.Authentication.attestation_type": - value := x.AttestationType - return protoreflect.ValueOfString(value) - case "did.v1.Authentication.metadata": - value := x.Metadata - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", descriptor.FullName())) } } @@ -352,35 +322,31 @@ func (x *fastReflection_Authentication) Get(descriptor protoreflect.FieldDescrip // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Authentication) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Account) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Authentication.id": + case "did.v1.Account.id": x.Id = value.Interface().(string) - case "did.v1.Authentication.controller": + case "did.v1.Account.controller": x.Controller = value.Interface().(string) - case "did.v1.Authentication.public_key": + case "did.v1.Account.public_key": x.PublicKey = value.Message().Interface().(*PubKey) - case "did.v1.Authentication.origin": - x.Origin = value.Interface().(string) - case "did.v1.Authentication.subject": - x.Subject = value.Interface().(string) - case "did.v1.Authentication.credential_id": - x.CredentialId = value.Bytes() - case "did.v1.Authentication.credential_label": - x.CredentialLabel = value.Interface().(string) - case "did.v1.Authentication.credential_transport": + case "did.v1.Account.address": + x.Address = value.Interface().(string) + case "did.v1.Account.label": + x.Label = value.Interface().(string) + case "did.v1.Account.chain_code": + x.ChainCode = uint32(value.Uint()) + case "did.v1.Account.index": + x.Index = uint32(value.Uint()) + case "did.v1.Account.chains": lv := value.List() - clv := lv.(*_Authentication_8_list) - x.CredentialTransport = *clv.list - case "did.v1.Authentication.attestation_type": - x.AttestationType = value.Interface().(string) - case "did.v1.Authentication.metadata": - x.Metadata = value.Message().Interface().(*Metadata) + clv := lv.(*_Account_8_list) + x.Chains = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) } } @@ -394,89 +360,77 @@ func (x *fastReflection_Authentication) Set(fd protoreflect.FieldDescriptor, val // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Authentication) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Account) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Authentication.public_key": + case "did.v1.Account.public_key": if x.PublicKey == nil { x.PublicKey = new(PubKey) } return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - case "did.v1.Authentication.credential_transport": - if x.CredentialTransport == nil { - x.CredentialTransport = []string{} + case "did.v1.Account.chains": + if x.Chains == nil { + x.Chains = []string{} } - value := &_Authentication_8_list{list: &x.CredentialTransport} + value := &_Account_8_list{list: &x.Chains} return protoreflect.ValueOfList(value) - case "did.v1.Authentication.metadata": - if x.Metadata == nil { - x.Metadata = new(Metadata) - } - return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - case "did.v1.Authentication.id": - panic(fmt.Errorf("field id of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.controller": - panic(fmt.Errorf("field controller of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.origin": - panic(fmt.Errorf("field origin of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.subject": - panic(fmt.Errorf("field subject of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.credential_id": - panic(fmt.Errorf("field credential_id of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.credential_label": - panic(fmt.Errorf("field credential_label of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.attestation_type": - panic(fmt.Errorf("field attestation_type of message did.v1.Authentication is not mutable")) + case "did.v1.Account.id": + panic(fmt.Errorf("field id of message did.v1.Account is not mutable")) + case "did.v1.Account.controller": + panic(fmt.Errorf("field controller of message did.v1.Account is not mutable")) + case "did.v1.Account.address": + panic(fmt.Errorf("field address of message did.v1.Account is not mutable")) + case "did.v1.Account.label": + panic(fmt.Errorf("field label of message did.v1.Account is not mutable")) + case "did.v1.Account.chain_code": + panic(fmt.Errorf("field chain_code of message did.v1.Account is not mutable")) + case "did.v1.Account.index": + panic(fmt.Errorf("field index of message did.v1.Account is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account 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_Authentication) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Account) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Authentication.id": + case "did.v1.Account.id": return protoreflect.ValueOfString("") - case "did.v1.Authentication.controller": + case "did.v1.Account.controller": return protoreflect.ValueOfString("") - case "did.v1.Authentication.public_key": + case "did.v1.Account.public_key": m := new(PubKey) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.Authentication.origin": + case "did.v1.Account.address": return protoreflect.ValueOfString("") - case "did.v1.Authentication.subject": + case "did.v1.Account.label": return protoreflect.ValueOfString("") - case "did.v1.Authentication.credential_id": - return protoreflect.ValueOfBytes(nil) - case "did.v1.Authentication.credential_label": - return protoreflect.ValueOfString("") - case "did.v1.Authentication.credential_transport": + case "did.v1.Account.chain_code": + return protoreflect.ValueOfUint32(uint32(0)) + case "did.v1.Account.index": + return protoreflect.ValueOfUint32(uint32(0)) + case "did.v1.Account.chains": list := []string{} - return protoreflect.ValueOfList(&_Authentication_8_list{list: &list}) - case "did.v1.Authentication.attestation_type": - return protoreflect.ValueOfString("") - case "did.v1.Authentication.metadata": - m := new(Metadata) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + return protoreflect.ValueOfList(&_Account_8_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account 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_Authentication) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Account) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Authentication", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Account", d.FullName())) } panic("unreachable") } @@ -484,7 +438,7 @@ func (x *fastReflection_Authentication) WhichOneof(d protoreflect.OneofDescripto // 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_Authentication) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Account) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -495,7 +449,7 @@ func (x *fastReflection_Authentication) 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_Authentication) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Account) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -507,7 +461,7 @@ func (x *fastReflection_Authentication) SetUnknown(fields protoreflect.RawFields // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Authentication) IsValid() bool { +func (x *fastReflection_Account) IsValid() bool { return x != nil } @@ -517,9 +471,9 @@ func (x *fastReflection_Authentication) 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_Authentication) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Authentication) + x := input.Message.Interface().(*Account) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -543,36 +497,26 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { l = options.Size(x.PublicKey) n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Origin) + l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Subject) + l = len(x.Label) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.CredentialId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.ChainCode != 0 { + n += 1 + runtime.Sov(uint64(x.ChainCode)) } - l = len(x.CredentialLabel) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.Index != 0 { + n += 1 + runtime.Sov(uint64(x.Index)) } - if len(x.CredentialTransport) > 0 { - for _, s := range x.CredentialTransport { + if len(x.Chains) > 0 { + for _, s := range x.Chains { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } - l = len(x.AttestationType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Metadata != nil { - l = options.Size(x.Metadata) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -583,7 +527,7 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Authentication) + x := input.Message.Interface().(*Account) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -602,61 +546,36 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Metadata != nil { - encoded, err := options.Marshal(x.Metadata) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x52 - } - if len(x.AttestationType) > 0 { - i -= len(x.AttestationType) - copy(dAtA[i:], x.AttestationType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationType))) - i-- - dAtA[i] = 0x4a - } - if len(x.CredentialTransport) > 0 { - for iNdEx := len(x.CredentialTransport) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.CredentialTransport[iNdEx]) - copy(dAtA[i:], x.CredentialTransport[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialTransport[iNdEx]))) + if len(x.Chains) > 0 { + for iNdEx := len(x.Chains) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Chains[iNdEx]) + copy(dAtA[i:], x.Chains[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Chains[iNdEx]))) i-- dAtA[i] = 0x42 } } - if len(x.CredentialLabel) > 0 { - i -= len(x.CredentialLabel) - copy(dAtA[i:], x.CredentialLabel) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialLabel))) + if x.Index != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x38 } - if len(x.CredentialId) > 0 { - i -= len(x.CredentialId) - copy(dAtA[i:], x.CredentialId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId))) + if x.ChainCode != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ChainCode)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x30 } - if len(x.Subject) > 0 { - i -= len(x.Subject) - copy(dAtA[i:], x.Subject) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) + if len(x.Label) > 0 { + i -= len(x.Label) + copy(dAtA[i:], x.Label) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Label))) i-- dAtA[i] = 0x2a } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + 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] = 0x22 } @@ -699,7 +618,7 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Authentication) + x := input.Message.Interface().(*Account) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -731,10 +650,10 @@ func (x *fastReflection_Authentication) 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: Authentication: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Account: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Authentication: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -839,7 +758,7 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + 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 { @@ -867,11 +786,11 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Origin = string(dAtA[iNdEx:postIndex]) + x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -899,13 +818,13 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Subject = string(dAtA[iNdEx:postIndex]) + x.Label = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainCode", wireType) } - var byteLen int + x.ChainCode = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -915,31 +834,16 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + x.ChainCode |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...) - if x.CredentialId == nil { - x.CredentialId = []byte{} - } - iNdEx = postIndex case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialLabel", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } - var stringLen uint64 + x.Index = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -949,27 +853,14 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.Index |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CredentialLabel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 8: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialTransport", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Chains", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -997,845 +888,7 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.CredentialTransport = append(x.CredentialTransport, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AttestationType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { - x.Metadata = &Metadata{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Assertion protoreflect.MessageDescriptor - fd_Assertion_id protoreflect.FieldDescriptor - fd_Assertion_controller protoreflect.FieldDescriptor - fd_Assertion_public_key protoreflect.FieldDescriptor - fd_Assertion_origin protoreflect.FieldDescriptor - fd_Assertion_subject protoreflect.FieldDescriptor - fd_Assertion_metadata protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_state_proto_init() - md_Assertion = File_did_v1_state_proto.Messages().ByName("Assertion") - fd_Assertion_id = md_Assertion.Fields().ByName("id") - fd_Assertion_controller = md_Assertion.Fields().ByName("controller") - fd_Assertion_public_key = md_Assertion.Fields().ByName("public_key") - fd_Assertion_origin = md_Assertion.Fields().ByName("origin") - fd_Assertion_subject = md_Assertion.Fields().ByName("subject") - fd_Assertion_metadata = md_Assertion.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_Assertion)(nil) - -type fastReflection_Assertion Assertion - -func (x *Assertion) ProtoReflect() protoreflect.Message { - return (*fastReflection_Assertion)(x) -} - -func (x *Assertion) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_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_Assertion_messageType fastReflection_Assertion_messageType -var _ protoreflect.MessageType = fastReflection_Assertion_messageType{} - -type fastReflection_Assertion_messageType struct{} - -func (x fastReflection_Assertion_messageType) Zero() protoreflect.Message { - return (*fastReflection_Assertion)(nil) -} -func (x fastReflection_Assertion_messageType) New() protoreflect.Message { - return new(fastReflection_Assertion) -} -func (x fastReflection_Assertion_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Assertion -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Assertion) Descriptor() protoreflect.MessageDescriptor { - return md_Assertion -} - -// 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_Assertion) Type() protoreflect.MessageType { - return _fastReflection_Assertion_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Assertion) New() protoreflect.Message { - return new(fastReflection_Assertion) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Assertion) Interface() protoreflect.ProtoMessage { - return (*Assertion)(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_Assertion) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Assertion_id, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Assertion_controller, value) { - return - } - } - if x.PublicKey != nil { - value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - if !f(fd_Assertion_public_key, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Assertion_origin, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Assertion_subject, value) { - return - } - } - if x.Metadata != nil { - value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - if !f(fd_Assertion_metadata, 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_Assertion) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Assertion.id": - return x.Id != "" - case "did.v1.Assertion.controller": - return x.Controller != "" - case "did.v1.Assertion.public_key": - return x.PublicKey != nil - case "did.v1.Assertion.origin": - return x.Origin != "" - case "did.v1.Assertion.subject": - return x.Subject != "" - case "did.v1.Assertion.metadata": - return x.Metadata != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) - } - panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Assertion.id": - x.Id = "" - case "did.v1.Assertion.controller": - x.Controller = "" - case "did.v1.Assertion.public_key": - x.PublicKey = nil - case "did.v1.Assertion.origin": - x.Origin = "" - case "did.v1.Assertion.subject": - x.Subject = "" - case "did.v1.Assertion.metadata": - x.Metadata = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) - } - panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Assertion.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.Assertion.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.Assertion.public_key": - value := x.PublicKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.Assertion.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.Assertion.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.Assertion.metadata": - value := x.Metadata - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) - } - panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Assertion.id": - x.Id = value.Interface().(string) - case "did.v1.Assertion.controller": - x.Controller = value.Interface().(string) - case "did.v1.Assertion.public_key": - x.PublicKey = value.Message().Interface().(*PubKey) - case "did.v1.Assertion.origin": - x.Origin = value.Interface().(string) - case "did.v1.Assertion.subject": - x.Subject = value.Interface().(string) - case "did.v1.Assertion.metadata": - x.Metadata = value.Message().Interface().(*Metadata) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) - } - panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Assertion.public_key": - if x.PublicKey == nil { - x.PublicKey = new(PubKey) - } - return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - case "did.v1.Assertion.metadata": - if x.Metadata == nil { - x.Metadata = new(Metadata) - } - return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - case "did.v1.Assertion.id": - panic(fmt.Errorf("field id of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.controller": - panic(fmt.Errorf("field controller of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.origin": - panic(fmt.Errorf("field origin of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.subject": - panic(fmt.Errorf("field subject of message did.v1.Assertion is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) - } - panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Assertion.id": - return protoreflect.ValueOfString("") - case "did.v1.Assertion.controller": - return protoreflect.ValueOfString("") - case "did.v1.Assertion.public_key": - m := new(PubKey) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.Assertion.origin": - return protoreflect.ValueOfString("") - case "did.v1.Assertion.subject": - return protoreflect.ValueOfString("") - case "did.v1.Assertion.metadata": - m := new(Metadata) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) - } - panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Assertion", 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_Assertion) 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_Assertion) 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_Assertion) 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_Assertion) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Assertion) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PublicKey != nil { - l = options.Size(x.PublicKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Metadata != nil { - l = options.Size(x.Metadata) - 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().(*Assertion) - 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.Metadata != nil { - encoded, err := options.Marshal(x.Metadata) - 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] = 0x32 - } - 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] = 0x2a - } - 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] = 0x22 - } - if x.PublicKey != nil { - encoded, err := options.Marshal(x.PublicKey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Assertion) - 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: Assertion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Assertion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = 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 PublicKey", 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.PublicKey == nil { - x.PublicKey = &PubKey{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - 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 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { - x.Metadata = &Metadata{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.Chains = append(x.Chains, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -1875,7 +928,7 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { var _ protoreflect.List = (*_Controller_3_list)(nil) type _Controller_3_list struct { - list *[]string + list *[]*Alias } func (x *_Controller_3_list) Len() int { @@ -1886,45 +939,102 @@ func (x *_Controller_3_list) Len() int { } func (x *_Controller_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_Controller_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Alias) (*x.list)[i] = concreteValue } func (x *_Controller_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Alias) *x.list = append(*x.list, concreteValue) } func (x *_Controller_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Controller at list field Aliases as it is not of Message kind")) + v := new(Alias) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Controller_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } *x.list = (*x.list)[:n] } func (x *_Controller_3_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) + v := new(Alias) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Controller_3_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Controller_6_list)(nil) + +type _Controller_6_list struct { + list *[]*Credential +} + +func (x *_Controller_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Controller_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Controller_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + (*x.list)[i] = concreteValue +} + +func (x *_Controller_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Controller_6_list) AppendMutable() protoreflect.Value { + v := new(Credential) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Controller_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Controller_6_list) NewElement() protoreflect.Value { + v := new(Credential) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Controller_6_list) IsValid() bool { + return x.list != nil +} + var ( - md_Controller protoreflect.MessageDescriptor - fd_Controller_id protoreflect.FieldDescriptor - fd_Controller_address protoreflect.FieldDescriptor - fd_Controller_aliases protoreflect.FieldDescriptor - fd_Controller_public_key protoreflect.FieldDescriptor - fd_Controller_vault_cid protoreflect.FieldDescriptor + md_Controller protoreflect.MessageDescriptor + fd_Controller_id protoreflect.FieldDescriptor + fd_Controller_address protoreflect.FieldDescriptor + fd_Controller_aliases protoreflect.FieldDescriptor + fd_Controller_public_key protoreflect.FieldDescriptor + fd_Controller_vault_cid protoreflect.FieldDescriptor + fd_Controller_authentication protoreflect.FieldDescriptor ) func init() { @@ -1935,6 +1045,7 @@ func init() { fd_Controller_aliases = md_Controller.Fields().ByName("aliases") fd_Controller_public_key = md_Controller.Fields().ByName("public_key") fd_Controller_vault_cid = md_Controller.Fields().ByName("vault_cid") + fd_Controller_authentication = md_Controller.Fields().ByName("authentication") } var _ protoreflect.Message = (*fastReflection_Controller)(nil) @@ -1946,7 +1057,7 @@ func (x *Controller) ProtoReflect() protoreflect.Message { } func (x *Controller) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[2] + mi := &file_did_v1_state_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2032,6 +1143,12 @@ func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, p return } } + if len(x.Authentication) != 0 { + value := protoreflect.ValueOfList(&_Controller_6_list{list: &x.Authentication}) + if !f(fd_Controller_authentication, value) { + return + } + } } // Has reports whether a field is populated. @@ -2057,6 +1174,8 @@ func (x *fastReflection_Controller) Has(fd protoreflect.FieldDescriptor) bool { return x.PublicKey != nil case "did.v1.Controller.vault_cid": return x.VaultCid != "" + case "did.v1.Controller.authentication": + return len(x.Authentication) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2083,6 +1202,8 @@ func (x *fastReflection_Controller) Clear(fd protoreflect.FieldDescriptor) { x.PublicKey = nil case "did.v1.Controller.vault_cid": x.VaultCid = "" + case "did.v1.Controller.authentication": + x.Authentication = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2117,6 +1238,12 @@ func (x *fastReflection_Controller) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.Controller.vault_cid": value := x.VaultCid return protoreflect.ValueOfString(value) + case "did.v1.Controller.authentication": + if len(x.Authentication) == 0 { + return protoreflect.ValueOfList(&_Controller_6_list{}) + } + listValue := &_Controller_6_list{list: &x.Authentication} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2149,6 +1276,10 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p x.PublicKey = value.Message().Interface().(*PubKey) case "did.v1.Controller.vault_cid": x.VaultCid = value.Interface().(string) + case "did.v1.Controller.authentication": + lv := value.List() + clv := lv.(*_Controller_6_list) + x.Authentication = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2171,7 +1302,7 @@ func (x *fastReflection_Controller) Mutable(fd protoreflect.FieldDescriptor) pro switch fd.FullName() { case "did.v1.Controller.aliases": if x.Aliases == nil { - x.Aliases = []string{} + x.Aliases = []*Alias{} } value := &_Controller_3_list{list: &x.Aliases} return protoreflect.ValueOfList(value) @@ -2180,6 +1311,12 @@ func (x *fastReflection_Controller) Mutable(fd protoreflect.FieldDescriptor) pro x.PublicKey = new(PubKey) } return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + case "did.v1.Controller.authentication": + if x.Authentication == nil { + x.Authentication = []*Credential{} + } + value := &_Controller_6_list{list: &x.Authentication} + return protoreflect.ValueOfList(value) case "did.v1.Controller.id": panic(fmt.Errorf("field id of message did.v1.Controller is not mutable")) case "did.v1.Controller.address": @@ -2204,13 +1341,16 @@ func (x *fastReflection_Controller) NewField(fd protoreflect.FieldDescriptor) pr case "did.v1.Controller.address": return protoreflect.ValueOfString("") case "did.v1.Controller.aliases": - list := []string{} + list := []*Alias{} return protoreflect.ValueOfList(&_Controller_3_list{list: &list}) case "did.v1.Controller.public_key": m := new(PubKey) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.Controller.vault_cid": return protoreflect.ValueOfString("") + case "did.v1.Controller.authentication": + list := []*Credential{} + return protoreflect.ValueOfList(&_Controller_6_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2289,8 +1429,8 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Aliases) > 0 { - for _, s := range x.Aliases { - l = len(s) + for _, e := range x.Aliases { + l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } @@ -2302,6 +1442,12 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if len(x.Authentication) > 0 { + for _, e := range x.Authentication { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2331,6 +1477,22 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Authentication) > 0 { + for iNdEx := len(x.Authentication) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Authentication[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + } if len(x.VaultCid) > 0 { i -= len(x.VaultCid) copy(dAtA[i:], x.VaultCid) @@ -2354,9 +1516,16 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } if len(x.Aliases) > 0 { for iNdEx := len(x.Aliases) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Aliases[iNdEx]) - copy(dAtA[i:], x.Aliases[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Aliases[iNdEx]))) + encoded, err := options.Marshal(x.Aliases[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } @@ -2492,7 +1661,7 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2502,23 +1671,25 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Aliases = append(x.Aliases, string(dAtA[iNdEx:postIndex])) + x.Aliases = append(x.Aliases, &Alias{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Aliases[len(x.Aliases)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex case 4: if wireType != 2 { @@ -2588,6 +1759,40 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } x.VaultCid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authentication = append(x.Authentication, &Credential{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Authentication[len(x.Authentication)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2624,38 +1829,36 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } var ( - md_Delegation protoreflect.MessageDescriptor - fd_Delegation_id protoreflect.FieldDescriptor - fd_Delegation_controller protoreflect.FieldDescriptor - fd_Delegation_chain_index protoreflect.FieldDescriptor - fd_Delegation_public_key protoreflect.FieldDescriptor - fd_Delegation_account_address protoreflect.FieldDescriptor - fd_Delegation_account_label protoreflect.FieldDescriptor - fd_Delegation_chain_id protoreflect.FieldDescriptor + md_Proof protoreflect.MessageDescriptor + fd_Proof_id protoreflect.FieldDescriptor + fd_Proof_controller protoreflect.FieldDescriptor + fd_Proof_issuer protoreflect.FieldDescriptor + fd_Proof_property protoreflect.FieldDescriptor + fd_Proof_accumulator protoreflect.FieldDescriptor + fd_Proof_key protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() - md_Delegation = File_did_v1_state_proto.Messages().ByName("Delegation") - fd_Delegation_id = md_Delegation.Fields().ByName("id") - fd_Delegation_controller = md_Delegation.Fields().ByName("controller") - fd_Delegation_chain_index = md_Delegation.Fields().ByName("chain_index") - fd_Delegation_public_key = md_Delegation.Fields().ByName("public_key") - fd_Delegation_account_address = md_Delegation.Fields().ByName("account_address") - fd_Delegation_account_label = md_Delegation.Fields().ByName("account_label") - fd_Delegation_chain_id = md_Delegation.Fields().ByName("chain_id") + md_Proof = File_did_v1_state_proto.Messages().ByName("Proof") + fd_Proof_id = md_Proof.Fields().ByName("id") + fd_Proof_controller = md_Proof.Fields().ByName("controller") + fd_Proof_issuer = md_Proof.Fields().ByName("issuer") + fd_Proof_property = md_Proof.Fields().ByName("property") + fd_Proof_accumulator = md_Proof.Fields().ByName("accumulator") + fd_Proof_key = md_Proof.Fields().ByName("key") } -var _ protoreflect.Message = (*fastReflection_Delegation)(nil) +var _ protoreflect.Message = (*fastReflection_Proof)(nil) -type fastReflection_Delegation Delegation +type fastReflection_Proof Proof -func (x *Delegation) ProtoReflect() protoreflect.Message { - return (*fastReflection_Delegation)(x) +func (x *Proof) ProtoReflect() protoreflect.Message { + return (*fastReflection_Proof)(x) } -func (x *Delegation) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[3] +func (x *Proof) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_state_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2666,43 +1869,43 @@ func (x *Delegation) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Delegation_messageType fastReflection_Delegation_messageType -var _ protoreflect.MessageType = fastReflection_Delegation_messageType{} +var _fastReflection_Proof_messageType fastReflection_Proof_messageType +var _ protoreflect.MessageType = fastReflection_Proof_messageType{} -type fastReflection_Delegation_messageType struct{} +type fastReflection_Proof_messageType struct{} -func (x fastReflection_Delegation_messageType) Zero() protoreflect.Message { - return (*fastReflection_Delegation)(nil) +func (x fastReflection_Proof_messageType) Zero() protoreflect.Message { + return (*fastReflection_Proof)(nil) } -func (x fastReflection_Delegation_messageType) New() protoreflect.Message { - return new(fastReflection_Delegation) +func (x fastReflection_Proof_messageType) New() protoreflect.Message { + return new(fastReflection_Proof) } -func (x fastReflection_Delegation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Delegation +func (x fastReflection_Proof_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Proof } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Delegation) Descriptor() protoreflect.MessageDescriptor { - return md_Delegation +func (x *fastReflection_Proof) Descriptor() protoreflect.MessageDescriptor { + return md_Proof } // 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_Delegation) Type() protoreflect.MessageType { - return _fastReflection_Delegation_messageType +func (x *fastReflection_Proof) Type() protoreflect.MessageType { + return _fastReflection_Proof_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Delegation) New() protoreflect.Message { - return new(fastReflection_Delegation) +func (x *fastReflection_Proof) New() protoreflect.Message { + return new(fastReflection_Proof) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Delegation) Interface() protoreflect.ProtoMessage { - return (*Delegation)(x) +func (x *fastReflection_Proof) Interface() protoreflect.ProtoMessage { + return (*Proof)(x) } // Range iterates over every populated field in an undefined order, @@ -2710,46 +1913,40 @@ func (x *fastReflection_Delegation) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Delegation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Proof) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_Delegation_id, value) { + if !f(fd_Proof_id, value) { return } } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Delegation_controller, value) { + if !f(fd_Proof_controller, value) { return } } - if x.ChainIndex != "" { - value := protoreflect.ValueOfString(x.ChainIndex) - if !f(fd_Delegation_chain_index, value) { + if x.Issuer != "" { + value := protoreflect.ValueOfString(x.Issuer) + if !f(fd_Proof_issuer, value) { return } } - if x.PublicKey != nil { - value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - if !f(fd_Delegation_public_key, value) { + if x.Property != "" { + value := protoreflect.ValueOfString(x.Property) + if !f(fd_Proof_property, value) { return } } - if x.AccountAddress != "" { - value := protoreflect.ValueOfString(x.AccountAddress) - if !f(fd_Delegation_account_address, value) { + if len(x.Accumulator) != 0 { + value := protoreflect.ValueOfBytes(x.Accumulator) + if !f(fd_Proof_accumulator, value) { return } } - if x.AccountLabel != "" { - value := protoreflect.ValueOfString(x.AccountLabel) - if !f(fd_Delegation_account_label, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_Delegation_chain_id, value) { + if len(x.Key) != 0 { + value := protoreflect.ValueOfBytes(x.Key) + if !f(fd_Proof_key, value) { return } } @@ -2766,27 +1963,25 @@ func (x *fastReflection_Delegation) Range(f func(protoreflect.FieldDescriptor, p // 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_Delegation) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Proof) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Delegation.id": + case "did.v1.Proof.id": return x.Id != "" - case "did.v1.Delegation.controller": + case "did.v1.Proof.controller": return x.Controller != "" - case "did.v1.Delegation.chain_index": - return x.ChainIndex != "" - case "did.v1.Delegation.public_key": - return x.PublicKey != nil - case "did.v1.Delegation.account_address": - return x.AccountAddress != "" - case "did.v1.Delegation.account_label": - return x.AccountLabel != "" - case "did.v1.Delegation.chain_id": - return x.ChainId != "" + case "did.v1.Proof.issuer": + return x.Issuer != "" + case "did.v1.Proof.property": + return x.Property != "" + case "did.v1.Proof.accumulator": + return len(x.Accumulator) != 0 + case "did.v1.Proof.key": + return len(x.Key) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) } - panic(fmt.Errorf("message did.v1.Delegation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Proof does not contain field %s", fd.FullName())) } } @@ -2796,27 +1991,25 @@ func (x *fastReflection_Delegation) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Delegation) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Proof) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Delegation.id": + case "did.v1.Proof.id": x.Id = "" - case "did.v1.Delegation.controller": + case "did.v1.Proof.controller": x.Controller = "" - case "did.v1.Delegation.chain_index": - x.ChainIndex = "" - case "did.v1.Delegation.public_key": - x.PublicKey = nil - case "did.v1.Delegation.account_address": - x.AccountAddress = "" - case "did.v1.Delegation.account_label": - x.AccountLabel = "" - case "did.v1.Delegation.chain_id": - x.ChainId = "" + case "did.v1.Proof.issuer": + x.Issuer = "" + case "did.v1.Proof.property": + x.Property = "" + case "did.v1.Proof.accumulator": + x.Accumulator = nil + case "did.v1.Proof.key": + x.Key = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) } - panic(fmt.Errorf("message did.v1.Delegation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Proof does not contain field %s", fd.FullName())) } } @@ -2826,34 +2019,31 @@ func (x *fastReflection_Delegation) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Delegation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Proof) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Delegation.id": + case "did.v1.Proof.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Delegation.controller": + case "did.v1.Proof.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.Delegation.chain_index": - value := x.ChainIndex + case "did.v1.Proof.issuer": + value := x.Issuer return protoreflect.ValueOfString(value) - case "did.v1.Delegation.public_key": - value := x.PublicKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.Delegation.account_address": - value := x.AccountAddress - return protoreflect.ValueOfString(value) - case "did.v1.Delegation.account_label": - value := x.AccountLabel - return protoreflect.ValueOfString(value) - case "did.v1.Delegation.chain_id": - value := x.ChainId + case "did.v1.Proof.property": + value := x.Property return protoreflect.ValueOfString(value) + case "did.v1.Proof.accumulator": + value := x.Accumulator + return protoreflect.ValueOfBytes(value) + case "did.v1.Proof.key": + value := x.Key + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) } - panic(fmt.Errorf("message did.v1.Delegation does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Proof does not contain field %s", descriptor.FullName())) } } @@ -2867,27 +2057,25 @@ func (x *fastReflection_Delegation) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Delegation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Proof) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Delegation.id": + case "did.v1.Proof.id": x.Id = value.Interface().(string) - case "did.v1.Delegation.controller": + case "did.v1.Proof.controller": x.Controller = value.Interface().(string) - case "did.v1.Delegation.chain_index": - x.ChainIndex = value.Interface().(string) - case "did.v1.Delegation.public_key": - x.PublicKey = value.Message().Interface().(*PubKey) - case "did.v1.Delegation.account_address": - x.AccountAddress = value.Interface().(string) - case "did.v1.Delegation.account_label": - x.AccountLabel = value.Interface().(string) - case "did.v1.Delegation.chain_id": - x.ChainId = value.Interface().(string) + case "did.v1.Proof.issuer": + x.Issuer = value.Interface().(string) + case "did.v1.Proof.property": + x.Property = value.Interface().(string) + case "did.v1.Proof.accumulator": + x.Accumulator = value.Bytes() + case "did.v1.Proof.key": + x.Key = value.Bytes() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) } - panic(fmt.Errorf("message did.v1.Delegation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Proof does not contain field %s", fd.FullName())) } } @@ -2901,68 +2089,60 @@ func (x *fastReflection_Delegation) Set(fd protoreflect.FieldDescriptor, value p // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Delegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Proof) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Delegation.public_key": - if x.PublicKey == nil { - x.PublicKey = new(PubKey) - } - return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - case "did.v1.Delegation.id": - panic(fmt.Errorf("field id of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.controller": - panic(fmt.Errorf("field controller of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.chain_index": - panic(fmt.Errorf("field chain_index of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.account_address": - panic(fmt.Errorf("field account_address of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.account_label": - panic(fmt.Errorf("field account_label of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.chain_id": - panic(fmt.Errorf("field chain_id of message did.v1.Delegation is not mutable")) + case "did.v1.Proof.id": + panic(fmt.Errorf("field id of message did.v1.Proof is not mutable")) + case "did.v1.Proof.controller": + panic(fmt.Errorf("field controller of message did.v1.Proof is not mutable")) + case "did.v1.Proof.issuer": + panic(fmt.Errorf("field issuer of message did.v1.Proof is not mutable")) + case "did.v1.Proof.property": + panic(fmt.Errorf("field property of message did.v1.Proof is not mutable")) + case "did.v1.Proof.accumulator": + panic(fmt.Errorf("field accumulator of message did.v1.Proof is not mutable")) + case "did.v1.Proof.key": + panic(fmt.Errorf("field key of message did.v1.Proof is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) } - panic(fmt.Errorf("message did.v1.Delegation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Proof 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_Delegation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Proof) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Delegation.id": + case "did.v1.Proof.id": return protoreflect.ValueOfString("") - case "did.v1.Delegation.controller": + case "did.v1.Proof.controller": return protoreflect.ValueOfString("") - case "did.v1.Delegation.chain_index": + case "did.v1.Proof.issuer": return protoreflect.ValueOfString("") - case "did.v1.Delegation.public_key": - m := new(PubKey) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.Delegation.account_address": - return protoreflect.ValueOfString("") - case "did.v1.Delegation.account_label": - return protoreflect.ValueOfString("") - case "did.v1.Delegation.chain_id": + case "did.v1.Proof.property": return protoreflect.ValueOfString("") + case "did.v1.Proof.accumulator": + return protoreflect.ValueOfBytes(nil) + case "did.v1.Proof.key": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) } - panic(fmt.Errorf("message did.v1.Delegation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Proof 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_Delegation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Proof) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Delegation", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Proof", d.FullName())) } panic("unreachable") } @@ -2970,7 +2150,7 @@ func (x *fastReflection_Delegation) WhichOneof(d protoreflect.OneofDescriptor) p // 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_Delegation) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Proof) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2981,7 +2161,7 @@ func (x *fastReflection_Delegation) 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_Delegation) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Proof) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2993,7 +2173,7 @@ func (x *fastReflection_Delegation) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Delegation) IsValid() bool { +func (x *fastReflection_Proof) IsValid() bool { return x != nil } @@ -3003,9 +2183,9 @@ func (x *fastReflection_Delegation) 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_Delegation) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Proof) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Delegation) + x := input.Message.Interface().(*Proof) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3025,23 +2205,19 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ChainIndex) + l = len(x.Issuer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.PublicKey != nil { - l = options.Size(x.PublicKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AccountAddress) + l = len(x.Property) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.AccountLabel) + l = len(x.Accumulator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ChainId) + l = len(x.Key) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -3055,7 +2231,7 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Delegation) + x := input.Message.Interface().(*Proof) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3074,45 +2250,31 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { 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] = 0x3a - } - if len(x.AccountLabel) > 0 { - i -= len(x.AccountLabel) - copy(dAtA[i:], x.AccountLabel) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountLabel))) + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) i-- dAtA[i] = 0x32 } - if len(x.AccountAddress) > 0 { - i -= len(x.AccountAddress) - copy(dAtA[i:], x.AccountAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountAddress))) + if len(x.Accumulator) > 0 { + i -= len(x.Accumulator) + copy(dAtA[i:], x.Accumulator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Accumulator))) i-- dAtA[i] = 0x2a } - if x.PublicKey != nil { - encoded, err := options.Marshal(x.PublicKey) - 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))) + if len(x.Property) > 0 { + i -= len(x.Property) + copy(dAtA[i:], x.Property) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Property))) i-- dAtA[i] = 0x22 } - if len(x.ChainIndex) > 0 { - i -= len(x.ChainIndex) - copy(dAtA[i:], x.ChainIndex) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainIndex))) + if len(x.Issuer) > 0 { + i -= len(x.Issuer) + copy(dAtA[i:], x.Issuer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Issuer))) i-- dAtA[i] = 0x1a } @@ -3141,7 +2303,7 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Delegation) + x := input.Message.Interface().(*Proof) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3173,10 +2335,10 @@ func (x *fastReflection_Delegation) 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: Delegation: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Proof: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Delegation: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3245,7 +2407,7 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainIndex", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3273,13 +2435,13 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.ChainIndex = string(dAtA[iNdEx:postIndex]) + x.Issuer = 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 PublicKey", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3289,33 +2451,29 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return 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.PublicKey == nil { - x.PublicKey = &PubKey{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.Property = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accumulator", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3325,29 +2483,31 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.AccountAddress = string(dAtA[iNdEx:postIndex]) + x.Accumulator = append(x.Accumulator[:0], dAtA[iNdEx:postIndex]...) + if x.Accumulator == nil { + x.Accumulator = []byte{} + } iNdEx = postIndex case 6: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountLabel", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3357,55 +2517,25 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.AccountLabel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) + if x.Key == nil { + x.Key = []byte{} } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.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 @@ -3528,12 +2658,11 @@ var ( md_ServiceRecord protoreflect.MessageDescriptor fd_ServiceRecord_id protoreflect.FieldDescriptor fd_ServiceRecord_service_type protoreflect.FieldDescriptor - fd_ServiceRecord_controller protoreflect.FieldDescriptor - fd_ServiceRecord_origin_uri protoreflect.FieldDescriptor + fd_ServiceRecord_authority protoreflect.FieldDescriptor + fd_ServiceRecord_origin protoreflect.FieldDescriptor fd_ServiceRecord_description protoreflect.FieldDescriptor fd_ServiceRecord_service_endpoints protoreflect.FieldDescriptor fd_ServiceRecord_permissions protoreflect.FieldDescriptor - fd_ServiceRecord_metadata protoreflect.FieldDescriptor ) func init() { @@ -3541,12 +2670,11 @@ func init() { md_ServiceRecord = File_did_v1_state_proto.Messages().ByName("ServiceRecord") fd_ServiceRecord_id = md_ServiceRecord.Fields().ByName("id") fd_ServiceRecord_service_type = md_ServiceRecord.Fields().ByName("service_type") - fd_ServiceRecord_controller = md_ServiceRecord.Fields().ByName("controller") - fd_ServiceRecord_origin_uri = md_ServiceRecord.Fields().ByName("origin_uri") + fd_ServiceRecord_authority = md_ServiceRecord.Fields().ByName("authority") + fd_ServiceRecord_origin = md_ServiceRecord.Fields().ByName("origin") fd_ServiceRecord_description = md_ServiceRecord.Fields().ByName("description") fd_ServiceRecord_service_endpoints = md_ServiceRecord.Fields().ByName("service_endpoints") fd_ServiceRecord_permissions = md_ServiceRecord.Fields().ByName("permissions") - fd_ServiceRecord_metadata = md_ServiceRecord.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_ServiceRecord)(nil) @@ -3558,7 +2686,7 @@ func (x *ServiceRecord) ProtoReflect() protoreflect.Message { } func (x *ServiceRecord) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[4] + mi := &file_did_v1_state_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3626,15 +2754,15 @@ func (x *fastReflection_ServiceRecord) Range(f func(protoreflect.FieldDescriptor return } } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_ServiceRecord_controller, value) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_ServiceRecord_authority, value) { return } } - if x.OriginUri != "" { - value := protoreflect.ValueOfString(x.OriginUri) - if !f(fd_ServiceRecord_origin_uri, value) { + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_ServiceRecord_origin, value) { return } } @@ -3656,12 +2784,6 @@ func (x *fastReflection_ServiceRecord) Range(f func(protoreflect.FieldDescriptor return } } - if x.Metadata != nil { - value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - if !f(fd_ServiceRecord_metadata, value) { - return - } - } } // Has reports whether a field is populated. @@ -3681,18 +2803,16 @@ func (x *fastReflection_ServiceRecord) Has(fd protoreflect.FieldDescriptor) bool return x.Id != "" case "did.v1.ServiceRecord.service_type": return x.ServiceType != "" - case "did.v1.ServiceRecord.controller": - return x.Controller != "" - case "did.v1.ServiceRecord.origin_uri": - return x.OriginUri != "" + case "did.v1.ServiceRecord.authority": + return x.Authority != "" + case "did.v1.ServiceRecord.origin": + return x.Origin != "" case "did.v1.ServiceRecord.description": return x.Description != "" case "did.v1.ServiceRecord.service_endpoints": return len(x.ServiceEndpoints) != 0 case "did.v1.ServiceRecord.permissions": return x.Permissions != nil - case "did.v1.ServiceRecord.metadata": - return x.Metadata != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) @@ -3713,18 +2833,16 @@ func (x *fastReflection_ServiceRecord) Clear(fd protoreflect.FieldDescriptor) { x.Id = "" case "did.v1.ServiceRecord.service_type": x.ServiceType = "" - case "did.v1.ServiceRecord.controller": - x.Controller = "" - case "did.v1.ServiceRecord.origin_uri": - x.OriginUri = "" + case "did.v1.ServiceRecord.authority": + x.Authority = "" + case "did.v1.ServiceRecord.origin": + x.Origin = "" case "did.v1.ServiceRecord.description": x.Description = "" case "did.v1.ServiceRecord.service_endpoints": x.ServiceEndpoints = nil case "did.v1.ServiceRecord.permissions": x.Permissions = nil - case "did.v1.ServiceRecord.metadata": - x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) @@ -3747,11 +2865,11 @@ func (x *fastReflection_ServiceRecord) Get(descriptor protoreflect.FieldDescript case "did.v1.ServiceRecord.service_type": value := x.ServiceType return protoreflect.ValueOfString(value) - case "did.v1.ServiceRecord.controller": - value := x.Controller + case "did.v1.ServiceRecord.authority": + value := x.Authority return protoreflect.ValueOfString(value) - case "did.v1.ServiceRecord.origin_uri": - value := x.OriginUri + case "did.v1.ServiceRecord.origin": + value := x.Origin return protoreflect.ValueOfString(value) case "did.v1.ServiceRecord.description": value := x.Description @@ -3765,9 +2883,6 @@ func (x *fastReflection_ServiceRecord) Get(descriptor protoreflect.FieldDescript case "did.v1.ServiceRecord.permissions": value := x.Permissions return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.ServiceRecord.metadata": - value := x.Metadata - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) @@ -3792,10 +2907,10 @@ func (x *fastReflection_ServiceRecord) Set(fd protoreflect.FieldDescriptor, valu x.Id = value.Interface().(string) case "did.v1.ServiceRecord.service_type": x.ServiceType = value.Interface().(string) - case "did.v1.ServiceRecord.controller": - x.Controller = value.Interface().(string) - case "did.v1.ServiceRecord.origin_uri": - x.OriginUri = value.Interface().(string) + case "did.v1.ServiceRecord.authority": + x.Authority = value.Interface().(string) + case "did.v1.ServiceRecord.origin": + x.Origin = value.Interface().(string) case "did.v1.ServiceRecord.description": x.Description = value.Interface().(string) case "did.v1.ServiceRecord.service_endpoints": @@ -3804,8 +2919,6 @@ func (x *fastReflection_ServiceRecord) Set(fd protoreflect.FieldDescriptor, valu x.ServiceEndpoints = *cmv.m case "did.v1.ServiceRecord.permissions": x.Permissions = value.Message().Interface().(*Permissions) - case "did.v1.ServiceRecord.metadata": - x.Metadata = value.Message().Interface().(*Metadata) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) @@ -3837,19 +2950,14 @@ func (x *fastReflection_ServiceRecord) Mutable(fd protoreflect.FieldDescriptor) x.Permissions = new(Permissions) } return protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) - case "did.v1.ServiceRecord.metadata": - if x.Metadata == nil { - x.Metadata = new(Metadata) - } - return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) case "did.v1.ServiceRecord.id": panic(fmt.Errorf("field id of message did.v1.ServiceRecord is not mutable")) case "did.v1.ServiceRecord.service_type": panic(fmt.Errorf("field service_type of message did.v1.ServiceRecord is not mutable")) - case "did.v1.ServiceRecord.controller": - panic(fmt.Errorf("field controller of message did.v1.ServiceRecord is not mutable")) - case "did.v1.ServiceRecord.origin_uri": - panic(fmt.Errorf("field origin_uri of message did.v1.ServiceRecord is not mutable")) + case "did.v1.ServiceRecord.authority": + panic(fmt.Errorf("field authority of message did.v1.ServiceRecord is not mutable")) + case "did.v1.ServiceRecord.origin": + panic(fmt.Errorf("field origin of message did.v1.ServiceRecord is not mutable")) case "did.v1.ServiceRecord.description": panic(fmt.Errorf("field description of message did.v1.ServiceRecord is not mutable")) default: @@ -3869,9 +2977,9 @@ func (x *fastReflection_ServiceRecord) NewField(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfString("") case "did.v1.ServiceRecord.service_type": return protoreflect.ValueOfString("") - case "did.v1.ServiceRecord.controller": + case "did.v1.ServiceRecord.authority": return protoreflect.ValueOfString("") - case "did.v1.ServiceRecord.origin_uri": + case "did.v1.ServiceRecord.origin": return protoreflect.ValueOfString("") case "did.v1.ServiceRecord.description": return protoreflect.ValueOfString("") @@ -3881,9 +2989,6 @@ func (x *fastReflection_ServiceRecord) NewField(fd protoreflect.FieldDescriptor) case "did.v1.ServiceRecord.permissions": m := new(Permissions) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.ServiceRecord.metadata": - m := new(Metadata) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) @@ -3961,11 +3066,11 @@ func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Controller) + l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.OriginUri) + l = len(x.Origin) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -3998,10 +3103,6 @@ func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { l = options.Size(x.Permissions) n += 1 + l + runtime.Sov(uint64(l)) } - if x.Metadata != nil { - l = options.Size(x.Metadata) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4031,20 +3132,6 @@ func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Metadata != nil { - encoded, err := options.Marshal(x.Metadata) - 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] = 0x42 - } if x.Permissions != nil { encoded, err := options.Marshal(x.Permissions) if err != nil { @@ -4109,17 +3196,17 @@ func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x2a } - if len(x.OriginUri) > 0 { - i -= len(x.OriginUri) - copy(dAtA[i:], x.OriginUri) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri))) + 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] = 0x22 } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + 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] = 0x1a } @@ -4252,7 +3339,7 @@ func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + 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 { @@ -4280,11 +3367,11 @@ func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Controller = string(dAtA[iNdEx:postIndex]) + x.Authority = 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 OriginUri", wireType) + 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 { @@ -4312,7 +3399,7 @@ func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.OriginUri = string(dAtA[iNdEx:postIndex]) + x.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { @@ -4509,9 +3596,712 @@ func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 8: + 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_VerificationMethod protoreflect.MessageDescriptor + fd_VerificationMethod_id protoreflect.FieldDescriptor + fd_VerificationMethod_controller protoreflect.FieldDescriptor + fd_VerificationMethod_method protoreflect.FieldDescriptor + fd_VerificationMethod_issuer protoreflect.FieldDescriptor + fd_VerificationMethod_subject protoreflect.FieldDescriptor + fd_VerificationMethod_public_key protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_state_proto_init() + md_VerificationMethod = File_did_v1_state_proto.Messages().ByName("VerificationMethod") + fd_VerificationMethod_id = md_VerificationMethod.Fields().ByName("id") + fd_VerificationMethod_controller = md_VerificationMethod.Fields().ByName("controller") + fd_VerificationMethod_method = md_VerificationMethod.Fields().ByName("method") + fd_VerificationMethod_issuer = md_VerificationMethod.Fields().ByName("issuer") + fd_VerificationMethod_subject = md_VerificationMethod.Fields().ByName("subject") + fd_VerificationMethod_public_key = md_VerificationMethod.Fields().ByName("public_key") +} + +var _ protoreflect.Message = (*fastReflection_VerificationMethod)(nil) + +type fastReflection_VerificationMethod VerificationMethod + +func (x *VerificationMethod) ProtoReflect() protoreflect.Message { + return (*fastReflection_VerificationMethod)(x) +} + +func (x *VerificationMethod) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_state_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_VerificationMethod_messageType fastReflection_VerificationMethod_messageType +var _ protoreflect.MessageType = fastReflection_VerificationMethod_messageType{} + +type fastReflection_VerificationMethod_messageType struct{} + +func (x fastReflection_VerificationMethod_messageType) Zero() protoreflect.Message { + return (*fastReflection_VerificationMethod)(nil) +} +func (x fastReflection_VerificationMethod_messageType) New() protoreflect.Message { + return new(fastReflection_VerificationMethod) +} +func (x fastReflection_VerificationMethod_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_VerificationMethod +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_VerificationMethod) Descriptor() protoreflect.MessageDescriptor { + return md_VerificationMethod +} + +// 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_VerificationMethod) Type() protoreflect.MessageType { + return _fastReflection_VerificationMethod_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_VerificationMethod) New() protoreflect.Message { + return new(fastReflection_VerificationMethod) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_VerificationMethod) Interface() protoreflect.ProtoMessage { + return (*VerificationMethod)(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_VerificationMethod) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_VerificationMethod_id, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_VerificationMethod_controller, value) { + return + } + } + if x.Method != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method)) + if !f(fd_VerificationMethod_method, value) { + return + } + } + if x.Issuer != "" { + value := protoreflect.ValueOfString(x.Issuer) + if !f(fd_VerificationMethod_issuer, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_VerificationMethod_subject, value) { + return + } + } + if x.PublicKey != nil { + value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + if !f(fd_VerificationMethod_public_key, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_VerificationMethod) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.VerificationMethod.id": + return x.Id != "" + case "did.v1.VerificationMethod.controller": + return x.Controller != "" + case "did.v1.VerificationMethod.method": + return x.Method != 0 + case "did.v1.VerificationMethod.issuer": + return x.Issuer != "" + case "did.v1.VerificationMethod.subject": + return x.Subject != "" + case "did.v1.VerificationMethod.public_key": + return x.PublicKey != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + } + panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.VerificationMethod.id": + x.Id = "" + case "did.v1.VerificationMethod.controller": + x.Controller = "" + case "did.v1.VerificationMethod.method": + x.Method = 0 + case "did.v1.VerificationMethod.issuer": + x.Issuer = "" + case "did.v1.VerificationMethod.subject": + x.Subject = "" + case "did.v1.VerificationMethod.public_key": + x.PublicKey = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + } + panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.VerificationMethod.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.VerificationMethod.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.VerificationMethod.method": + value := x.Method + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.VerificationMethod.issuer": + value := x.Issuer + return protoreflect.ValueOfString(value) + case "did.v1.VerificationMethod.subject": + value := x.Subject + return protoreflect.ValueOfString(value) + case "did.v1.VerificationMethod.public_key": + value := x.PublicKey + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + } + panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.VerificationMethod.id": + x.Id = value.Interface().(string) + case "did.v1.VerificationMethod.controller": + x.Controller = value.Interface().(string) + case "did.v1.VerificationMethod.method": + x.Method = (DIDNamespace)(value.Enum()) + case "did.v1.VerificationMethod.issuer": + x.Issuer = value.Interface().(string) + case "did.v1.VerificationMethod.subject": + x.Subject = value.Interface().(string) + case "did.v1.VerificationMethod.public_key": + x.PublicKey = value.Message().Interface().(*PubKey) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + } + panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.VerificationMethod.public_key": + if x.PublicKey == nil { + x.PublicKey = new(PubKey) + } + return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + case "did.v1.VerificationMethod.id": + panic(fmt.Errorf("field id of message did.v1.VerificationMethod is not mutable")) + case "did.v1.VerificationMethod.controller": + panic(fmt.Errorf("field controller of message did.v1.VerificationMethod is not mutable")) + case "did.v1.VerificationMethod.method": + panic(fmt.Errorf("field method of message did.v1.VerificationMethod is not mutable")) + case "did.v1.VerificationMethod.issuer": + panic(fmt.Errorf("field issuer of message did.v1.VerificationMethod is not mutable")) + case "did.v1.VerificationMethod.subject": + panic(fmt.Errorf("field subject of message did.v1.VerificationMethod is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + } + panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.VerificationMethod.id": + return protoreflect.ValueOfString("") + case "did.v1.VerificationMethod.controller": + return protoreflect.ValueOfString("") + case "did.v1.VerificationMethod.method": + return protoreflect.ValueOfEnum(0) + case "did.v1.VerificationMethod.issuer": + return protoreflect.ValueOfString("") + case "did.v1.VerificationMethod.subject": + return protoreflect.ValueOfString("") + case "did.v1.VerificationMethod.public_key": + m := new(PubKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + } + panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.VerificationMethod", 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_VerificationMethod) 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_VerificationMethod) 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_VerificationMethod) 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_VerificationMethod) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*VerificationMethod) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Method != 0 { + n += 1 + runtime.Sov(uint64(x.Method)) + } + l = len(x.Issuer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Subject) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.PublicKey != nil { + l = options.Size(x.PublicKey) + 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().(*VerificationMethod) + 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.PublicKey != nil { + encoded, err := options.Marshal(x.PublicKey) + 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] = 0x32 + } + 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] = 0x2a + } + if len(x.Issuer) > 0 { + i -= len(x.Issuer) + copy(dAtA[i:], x.Issuer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Issuer))) + i-- + dAtA[i] = 0x22 + } + if x.Method != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Method)) + i-- + dAtA[i] = 0x18 + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*VerificationMethod) + 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: VerificationMethod: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VerificationMethod: 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 Metadata", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + x.Method = 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.Method |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Issuer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4538,10 +4328,10 @@ func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Metadata == nil { - x.Metadata = &Metadata{} + if x.PublicKey == nil { + x.PublicKey = &PubKey{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -4593,36 +4383,32 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Authentication represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) -type Authentication struct { +// Account represents a wallet account associated with a DID Controller +type Account struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique identifier of the attestation + // The unique identifier of the account Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The controller of the attestation + // The controller of the account Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave") - PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The origin of the attestation - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` - // The subject of the attestation - Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // The value of the linked identifier - CredentialId []byte `protobuf:"bytes,6,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - // The credential label - CredentialLabel string `protobuf:"bytes,7,opt,name=credential_label,json=credentialLabel,proto3" json:"credential_label,omitempty"` - // The display label of the attestation - CredentialTransport []string `protobuf:"bytes,8,rep,name=credential_transport,json=credentialTransport,proto3" json:"credential_transport,omitempty"` - // The attestationtype of the attestation - AttestationType string `protobuf:"bytes,9,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` - // Metadata is optional additional information about the assertion - Metadata *Metadata `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` + PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The address of the account + Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` + // The label of the account + Label string `protobuf:"bytes,5,opt,name=label,proto3" json:"label,omitempty"` + // The bip32 chain code + ChainCode uint32 `protobuf:"varint,6,opt,name=chain_code,json=chainCode,proto3" json:"chain_code,omitempty"` + // The index of the account + Index uint32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` + // The supported chains of the account + Chains []string `protobuf:"bytes,8,rep,name=chains,proto3" json:"chains,omitempty"` } -func (x *Authentication) Reset() { - *x = Authentication{} +func (x *Account) Reset() { + *x = Account{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_state_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4630,165 +4416,69 @@ func (x *Authentication) Reset() { } } -func (x *Authentication) String() string { +func (x *Account) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Authentication) ProtoMessage() {} +func (*Account) ProtoMessage() {} -// Deprecated: Use Authentication.ProtoReflect.Descriptor instead. -func (*Authentication) Descriptor() ([]byte, []int) { +// Deprecated: Use Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { return file_did_v1_state_proto_rawDescGZIP(), []int{0} } -func (x *Authentication) GetId() string { +func (x *Account) GetId() string { if x != nil { return x.Id } return "" } -func (x *Authentication) GetController() string { +func (x *Account) GetController() string { if x != nil { return x.Controller } return "" } -func (x *Authentication) GetPublicKey() *PubKey { +func (x *Account) GetPublicKey() *PubKey { if x != nil { return x.PublicKey } return nil } -func (x *Authentication) GetOrigin() string { +func (x *Account) GetAddress() string { if x != nil { - return x.Origin + return x.Address } return "" } -func (x *Authentication) GetSubject() string { +func (x *Account) GetLabel() string { if x != nil { - return x.Subject + return x.Label } return "" } -func (x *Authentication) GetCredentialId() []byte { +func (x *Account) GetChainCode() uint32 { if x != nil { - return x.CredentialId + return x.ChainCode } - return nil + return 0 } -func (x *Authentication) GetCredentialLabel() string { +func (x *Account) GetIndex() uint32 { if x != nil { - return x.CredentialLabel + return x.Index } - return "" + return 0 } -func (x *Authentication) GetCredentialTransport() []string { +func (x *Account) GetChains() []string { if x != nil { - return x.CredentialTransport - } - return nil -} - -func (x *Authentication) GetAttestationType() string { - if x != nil { - return x.AttestationType - } - return "" -} - -func (x *Authentication) GetMetadata() *Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -// Assertion represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) -type Assertion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier of the attestation - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The type of the linked identifier (e.g., "crypto", "github", "email", "phone") - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // The value of the linked identifier - PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The origin of the attestation - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` - // The subject of the attestation - Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` - // The controller of the attestation - Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *Assertion) Reset() { - *x = Assertion{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Assertion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Assertion) ProtoMessage() {} - -// Deprecated: Use Assertion.ProtoReflect.Descriptor instead. -func (*Assertion) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{1} -} - -func (x *Assertion) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Assertion) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *Assertion) GetPublicKey() *PubKey { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *Assertion) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Assertion) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *Assertion) GetMetadata() *Metadata { - if x != nil { - return x.Metadata + return x.Chains } return nil } @@ -4804,17 +4494,19 @@ type Controller struct { // The DID of the controller Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Aliases of the controller - Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` + Aliases []*Alias `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` // PubKey is the verification method PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The vault address or identifier VaultCid string `protobuf:"bytes,5,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` + // The Authentications of the controller + Authentication []*Credential `protobuf:"bytes,6,rep,name=authentication,proto3" json:"authentication,omitempty"` } func (x *Controller) Reset() { *x = Controller{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[2] + mi := &file_did_v1_state_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4828,7 +4520,7 @@ func (*Controller) ProtoMessage() {} // Deprecated: Use Controller.ProtoReflect.Descriptor instead. func (*Controller) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{2} + return file_did_v1_state_proto_rawDescGZIP(), []int{1} } func (x *Controller) GetId() string { @@ -4845,7 +4537,7 @@ func (x *Controller) GetAddress() string { return "" } -func (x *Controller) GetAliases() []string { +func (x *Controller) GetAliases() []*Alias { if x != nil { return x.Aliases } @@ -4866,95 +4558,93 @@ func (x *Controller) GetVaultCid() string { return "" } -// Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC) -type Delegation struct { +func (x *Controller) GetAuthentication() []*Credential { + if x != nil { + return x.Authentication + } + return nil +} + +// Proof represents a verifiable credential +type Proof struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique identifier of the delegation + // The unique identifier of the proof Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The Decentralized Identifier of the delegated account + // The controller of the proof Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Resolved from module parameters - ChainIndex string `protobuf:"bytes,3,opt,name=chain_index,json=chainIndex,proto3" json:"chain_index,omitempty"` - // The delegation proof or verification method - PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The Account Address - AccountAddress string `protobuf:"bytes,5,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` - // The Account label - AccountLabel string `protobuf:"bytes,6,opt,name=account_label,json=accountLabel,proto3" json:"account_label,omitempty"` - // The Chain ID - ChainId string `protobuf:"bytes,7,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // The value of the linked identifier + Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"` + // The property of the proof + Property string `protobuf:"bytes,4,opt,name=property,proto3" json:"property,omitempty"` + // The accumulator of the proof + Accumulator []byte `protobuf:"bytes,5,opt,name=accumulator,proto3" json:"accumulator,omitempty"` + // The secret key of the proof + Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` } -func (x *Delegation) Reset() { - *x = Delegation{} +func (x *Proof) Reset() { + *x = Proof{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[3] + mi := &file_did_v1_state_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Delegation) String() string { +func (x *Proof) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Delegation) ProtoMessage() {} +func (*Proof) ProtoMessage() {} -// Deprecated: Use Delegation.ProtoReflect.Descriptor instead. -func (*Delegation) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{3} +// Deprecated: Use Proof.ProtoReflect.Descriptor instead. +func (*Proof) Descriptor() ([]byte, []int) { + return file_did_v1_state_proto_rawDescGZIP(), []int{2} } -func (x *Delegation) GetId() string { +func (x *Proof) GetId() string { if x != nil { return x.Id } return "" } -func (x *Delegation) GetController() string { +func (x *Proof) GetController() string { if x != nil { return x.Controller } return "" } -func (x *Delegation) GetChainIndex() string { +func (x *Proof) GetIssuer() string { if x != nil { - return x.ChainIndex + return x.Issuer } return "" } -func (x *Delegation) GetPublicKey() *PubKey { +func (x *Proof) GetProperty() string { if x != nil { - return x.PublicKey + return x.Property + } + return "" +} + +func (x *Proof) GetAccumulator() []byte { + if x != nil { + return x.Accumulator } return nil } -func (x *Delegation) GetAccountAddress() string { +func (x *Proof) GetKey() []byte { if x != nil { - return x.AccountAddress + return x.Key } - return "" -} - -func (x *Delegation) GetAccountLabel() string { - if x != nil { - return x.AccountLabel - } - return "" -} - -func (x *Delegation) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" + return nil } // ServiceRecord represents a decentralized service in a DID Document @@ -4967,24 +4657,22 @@ type ServiceRecord struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the service ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` - // The controller DID of the service - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` + // The authority DID of the service + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` // The domain name of the service - OriginUri string `protobuf:"bytes,4,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` // The description of the service Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // The service endpoint ServiceEndpoints map[string]string `protobuf:"bytes,6,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Scopes is the Authorization Grants of the service Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"` - // Metadata is optional additional information about the service - Metadata *Metadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *ServiceRecord) Reset() { *x = ServiceRecord{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[4] + mi := &file_did_v1_state_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4998,7 +4686,7 @@ func (*ServiceRecord) ProtoMessage() {} // Deprecated: Use ServiceRecord.ProtoReflect.Descriptor instead. func (*ServiceRecord) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{4} + return file_did_v1_state_proto_rawDescGZIP(), []int{3} } func (x *ServiceRecord) GetId() string { @@ -5015,16 +4703,16 @@ func (x *ServiceRecord) GetServiceType() string { return "" } -func (x *ServiceRecord) GetController() string { +func (x *ServiceRecord) GetAuthority() string { if x != nil { - return x.Controller + return x.Authority } return "" } -func (x *ServiceRecord) GetOriginUri() string { +func (x *ServiceRecord) GetOrigin() string { if x != nil { - return x.OriginUri + return x.Origin } return "" } @@ -5050,9 +4738,84 @@ func (x *ServiceRecord) GetPermissions() *Permissions { return nil } -func (x *ServiceRecord) GetMetadata() *Metadata { +// Verification reprsents a method of verifying membership in a DID +type VerificationMethod struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the verification + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The controller of the verification + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + // The DIDNamespace of the verification + Method DIDNamespace `protobuf:"varint,3,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + // The value of the linked identifier + Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"` + // The subject of the verification + Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` + // The public key of the verification + PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (x *VerificationMethod) Reset() { + *x = VerificationMethod{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_state_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VerificationMethod) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerificationMethod) ProtoMessage() {} + +// Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead. +func (*VerificationMethod) Descriptor() ([]byte, []int) { + return file_did_v1_state_proto_rawDescGZIP(), []int{4} +} + +func (x *VerificationMethod) GetId() string { if x != nil { - return x.Metadata + return x.Id + } + return "" +} + +func (x *VerificationMethod) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *VerificationMethod) GetMethod() DIDNamespace { + if x != nil { + return x.Method + } + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED +} + +func (x *VerificationMethod) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +func (x *VerificationMethod) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *VerificationMethod) GetPublicKey() *PubKey { + if x != nil { + return x.PublicKey } return nil } @@ -5066,127 +4829,110 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xdf, 0x03, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x12, 0x31, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x13, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x3a, 0x60, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x5a, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x14, - 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x10, 0x01, 0x18, 0x01, 0x12, 0x17, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x02, 0x18, 0x01, 0x12, 0x21, 0x0a, - 0x1b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x63, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x10, 0x03, 0x18, 0x01, - 0x18, 0x01, 0x22, 0x89, 0x02, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, - 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, - 0x3d, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x37, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, - 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, - 0x01, 0x18, 0x01, 0x12, 0x17, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x02, 0x18, 0x01, 0x18, 0x02, 0x22, 0xcc, - 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, - 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x3a, 0x2e, 0xf2, - 0x9e, 0xd3, 0x8e, 0x03, 0x28, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0d, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x18, 0x01, 0x12, 0x0f, 0x0a, 0x09, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x10, 0x02, 0x18, 0x01, 0x18, 0x03, 0x22, 0xde, 0x02, - 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x22, 0xca, 0x02, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2d, 0x0a, - 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, - 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x0f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x49, 0x64, 0x3a, 0x67, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x61, 0x0a, 0x04, 0x0a, - 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x18, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x10, - 0x01, 0x18, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x10, - 0x02, 0x18, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x10, 0x03, 0x18, 0x04, 0x22, 0xe6, - 0x03, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, - 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, - 0x72, 0x69, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x35, - 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x3d, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x37, - 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x5f, 0x75, 0x72, 0x69, 0x10, 0x01, 0x18, 0x01, 0x12, 0x1b, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, - 0x69, 0x10, 0x02, 0x18, 0x01, 0x18, 0x05, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x27, 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, - 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, - 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, - 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0a, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, + 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x3a, 0x63, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x5d, + 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x10, 0x01, 0x18, 0x01, 0x12, 0x18, + 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x2c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x03, 0x18, 0x01, 0x18, 0x01, 0x22, 0x97, 0x02, + 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, + 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, + 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1b, + 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0e, 0x61, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x2e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x28, 0x0a, + 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x10, 0x01, 0x18, 0x01, 0x12, 0x0f, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, + 0x64, 0x10, 0x02, 0x18, 0x01, 0x18, 0x02, 0x22, 0xd1, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, + 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x30, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, + 0x2a, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x2c, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x10, 0x01, 0x18, 0x01, 0x18, 0x04, 0x22, 0xa6, 0x03, 0x0a, 0x0d, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x12, 0x35, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x34, + 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x2e, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x06, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x02, + 0x18, 0x01, 0x18, 0x03, 0x22, 0x8b, 0x02, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x06, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x3a, 0x36, 0xf2, 0x9e, 0xd3, 0x8e, + 0x03, 0x30, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, + 0x18, 0x05, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, + 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, 0x64, 0x69, 0x64, 0x2f, 0x76, + 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, + 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5203,31 +4949,32 @@ func file_did_v1_state_proto_rawDescGZIP() []byte { var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_did_v1_state_proto_goTypes = []interface{}{ - (*Authentication)(nil), // 0: did.v1.Authentication - (*Assertion)(nil), // 1: did.v1.Assertion - (*Controller)(nil), // 2: did.v1.Controller - (*Delegation)(nil), // 3: did.v1.Delegation - (*ServiceRecord)(nil), // 4: did.v1.ServiceRecord - nil, // 5: did.v1.ServiceRecord.ServiceEndpointsEntry - (*PubKey)(nil), // 6: did.v1.PubKey - (*Metadata)(nil), // 7: did.v1.Metadata - (*Permissions)(nil), // 8: did.v1.Permissions + (*Account)(nil), // 0: did.v1.Account + (*Controller)(nil), // 1: did.v1.Controller + (*Proof)(nil), // 2: did.v1.Proof + (*ServiceRecord)(nil), // 3: did.v1.ServiceRecord + (*VerificationMethod)(nil), // 4: did.v1.VerificationMethod + nil, // 5: did.v1.ServiceRecord.ServiceEndpointsEntry + (*PubKey)(nil), // 6: did.v1.PubKey + (*Alias)(nil), // 7: did.v1.Alias + (*Credential)(nil), // 8: did.v1.Credential + (*Permissions)(nil), // 9: did.v1.Permissions + (DIDNamespace)(0), // 10: did.v1.DIDNamespace } var file_did_v1_state_proto_depIdxs = []int32{ - 6, // 0: did.v1.Authentication.public_key:type_name -> did.v1.PubKey - 7, // 1: did.v1.Authentication.metadata:type_name -> did.v1.Metadata - 6, // 2: did.v1.Assertion.public_key:type_name -> did.v1.PubKey - 7, // 3: did.v1.Assertion.metadata:type_name -> did.v1.Metadata - 6, // 4: did.v1.Controller.public_key:type_name -> did.v1.PubKey - 6, // 5: did.v1.Delegation.public_key:type_name -> did.v1.PubKey - 5, // 6: did.v1.ServiceRecord.service_endpoints:type_name -> did.v1.ServiceRecord.ServiceEndpointsEntry - 8, // 7: did.v1.ServiceRecord.permissions:type_name -> did.v1.Permissions - 7, // 8: did.v1.ServiceRecord.metadata:type_name -> did.v1.Metadata - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 6, // 0: did.v1.Account.public_key:type_name -> did.v1.PubKey + 7, // 1: did.v1.Controller.aliases:type_name -> did.v1.Alias + 6, // 2: did.v1.Controller.public_key:type_name -> did.v1.PubKey + 8, // 3: did.v1.Controller.authentication:type_name -> did.v1.Credential + 5, // 4: did.v1.ServiceRecord.service_endpoints:type_name -> did.v1.ServiceRecord.ServiceEndpointsEntry + 9, // 5: did.v1.ServiceRecord.permissions:type_name -> did.v1.Permissions + 10, // 6: did.v1.VerificationMethod.method:type_name -> did.v1.DIDNamespace + 6, // 7: did.v1.VerificationMethod.public_key:type_name -> did.v1.PubKey + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_did_v1_state_proto_init() } @@ -5239,7 +4986,7 @@ func file_did_v1_state_proto_init() { file_did_v1_models_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Authentication); i { + switch v := v.(*Account); i { case 0: return &v.state case 1: @@ -5251,18 +4998,6 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Assertion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Controller); i { case 0: return &v.state @@ -5274,8 +5009,20 @@ func file_did_v1_state_proto_init() { return nil } } + file_did_v1_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Proof); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_did_v1_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Delegation); i { + switch v := v.(*ServiceRecord); i { case 0: return &v.state case 1: @@ -5287,7 +5034,7 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServiceRecord); i { + switch v := v.(*VerificationMethod); i { case 0: return &v.state case 1: diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index 18eadecba..bee6ba4bc 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -1503,6 +1503,7 @@ var ( fd_MsgAllocateVaultResponse_cid protoreflect.FieldDescriptor fd_MsgAllocateVaultResponse_expiry_block protoreflect.FieldDescriptor fd_MsgAllocateVaultResponse_registration_options protoreflect.FieldDescriptor + fd_MsgAllocateVaultResponse_localhost protoreflect.FieldDescriptor ) func init() { @@ -1511,6 +1512,7 @@ func init() { fd_MsgAllocateVaultResponse_cid = md_MsgAllocateVaultResponse.Fields().ByName("cid") fd_MsgAllocateVaultResponse_expiry_block = md_MsgAllocateVaultResponse.Fields().ByName("expiry_block") fd_MsgAllocateVaultResponse_registration_options = md_MsgAllocateVaultResponse.Fields().ByName("registration_options") + fd_MsgAllocateVaultResponse_localhost = md_MsgAllocateVaultResponse.Fields().ByName("localhost") } var _ protoreflect.Message = (*fastReflection_MsgAllocateVaultResponse)(nil) @@ -1596,6 +1598,12 @@ func (x *fastReflection_MsgAllocateVaultResponse) Range(f func(protoreflect.Fiel return } } + if x.Localhost != false { + value := protoreflect.ValueOfBool(x.Localhost) + if !f(fd_MsgAllocateVaultResponse_localhost, value) { + return + } + } } // Has reports whether a field is populated. @@ -1617,6 +1625,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) Has(fd protoreflect.FieldDescr return x.ExpiryBlock != int64(0) case "did.v1.MsgAllocateVaultResponse.registration_options": return x.RegistrationOptions != "" + case "did.v1.MsgAllocateVaultResponse.localhost": + return x.Localhost != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) @@ -1639,6 +1649,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) Clear(fd protoreflect.FieldDes x.ExpiryBlock = int64(0) case "did.v1.MsgAllocateVaultResponse.registration_options": x.RegistrationOptions = "" + case "did.v1.MsgAllocateVaultResponse.localhost": + x.Localhost = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) @@ -1664,6 +1676,9 @@ func (x *fastReflection_MsgAllocateVaultResponse) Get(descriptor protoreflect.Fi case "did.v1.MsgAllocateVaultResponse.registration_options": value := x.RegistrationOptions return protoreflect.ValueOfString(value) + case "did.v1.MsgAllocateVaultResponse.localhost": + value := x.Localhost + return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) @@ -1690,6 +1705,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) Set(fd protoreflect.FieldDescr x.ExpiryBlock = value.Int() case "did.v1.MsgAllocateVaultResponse.registration_options": x.RegistrationOptions = value.Interface().(string) + case "did.v1.MsgAllocateVaultResponse.localhost": + x.Localhost = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) @@ -1716,6 +1733,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) Mutable(fd protoreflect.FieldD panic(fmt.Errorf("field expiry_block of message did.v1.MsgAllocateVaultResponse is not mutable")) case "did.v1.MsgAllocateVaultResponse.registration_options": panic(fmt.Errorf("field registration_options of message did.v1.MsgAllocateVaultResponse is not mutable")) + case "did.v1.MsgAllocateVaultResponse.localhost": + panic(fmt.Errorf("field localhost of message did.v1.MsgAllocateVaultResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) @@ -1735,6 +1754,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) NewField(fd protoreflect.Field return protoreflect.ValueOfInt64(int64(0)) case "did.v1.MsgAllocateVaultResponse.registration_options": return protoreflect.ValueOfString("") + case "did.v1.MsgAllocateVaultResponse.localhost": + return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) @@ -1815,6 +1836,9 @@ func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Met if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.Localhost { + n += 2 + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1844,6 +1868,16 @@ func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Met 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.RegistrationOptions) > 0 { i -= len(x.RegistrationOptions) copy(dAtA[i:], x.RegistrationOptions) @@ -1995,6 +2029,26 @@ func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Met } x.RegistrationOptions = 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:]) @@ -3134,27 +3188,27 @@ func (x *fastReflection_MsgProveWitnessResponse) ProtoMethods() *protoiface.Meth } var ( - md_MsgSyncVault protoreflect.MessageDescriptor - fd_MsgSyncVault_controller protoreflect.FieldDescriptor - fd_MsgSyncVault_token protoreflect.FieldDescriptor + md_MsgSyncController protoreflect.MessageDescriptor + fd_MsgSyncController_controller protoreflect.FieldDescriptor + fd_MsgSyncController_token protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgSyncVault = File_did_v1_tx_proto.Messages().ByName("MsgSyncVault") - fd_MsgSyncVault_controller = md_MsgSyncVault.Fields().ByName("controller") - fd_MsgSyncVault_token = md_MsgSyncVault.Fields().ByName("token") + md_MsgSyncController = File_did_v1_tx_proto.Messages().ByName("MsgSyncController") + fd_MsgSyncController_controller = md_MsgSyncController.Fields().ByName("controller") + fd_MsgSyncController_token = md_MsgSyncController.Fields().ByName("token") } -var _ protoreflect.Message = (*fastReflection_MsgSyncVault)(nil) +var _ protoreflect.Message = (*fastReflection_MsgSyncController)(nil) -type fastReflection_MsgSyncVault MsgSyncVault +type fastReflection_MsgSyncController MsgSyncController -func (x *MsgSyncVault) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSyncVault)(x) +func (x *MsgSyncController) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSyncController)(x) } -func (x *MsgSyncVault) slowProtoReflect() protoreflect.Message { +func (x *MsgSyncController) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3166,43 +3220,43 @@ func (x *MsgSyncVault) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSyncVault_messageType fastReflection_MsgSyncVault_messageType -var _ protoreflect.MessageType = fastReflection_MsgSyncVault_messageType{} +var _fastReflection_MsgSyncController_messageType fastReflection_MsgSyncController_messageType +var _ protoreflect.MessageType = fastReflection_MsgSyncController_messageType{} -type fastReflection_MsgSyncVault_messageType struct{} +type fastReflection_MsgSyncController_messageType struct{} -func (x fastReflection_MsgSyncVault_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSyncVault)(nil) +func (x fastReflection_MsgSyncController_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSyncController)(nil) } -func (x fastReflection_MsgSyncVault_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSyncVault) +func (x fastReflection_MsgSyncController_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSyncController) } -func (x fastReflection_MsgSyncVault_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncVault +func (x fastReflection_MsgSyncController_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSyncController } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSyncVault) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncVault +func (x *fastReflection_MsgSyncController) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSyncController } // 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_MsgSyncVault) Type() protoreflect.MessageType { - return _fastReflection_MsgSyncVault_messageType +func (x *fastReflection_MsgSyncController) Type() protoreflect.MessageType { + return _fastReflection_MsgSyncController_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSyncVault) New() protoreflect.Message { - return new(fastReflection_MsgSyncVault) +func (x *fastReflection_MsgSyncController) New() protoreflect.Message { + return new(fastReflection_MsgSyncController) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSyncVault) Interface() protoreflect.ProtoMessage { - return (*MsgSyncVault)(x) +func (x *fastReflection_MsgSyncController) Interface() protoreflect.ProtoMessage { + return (*MsgSyncController)(x) } // Range iterates over every populated field in an undefined order, @@ -3210,16 +3264,16 @@ func (x *fastReflection_MsgSyncVault) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSyncVault) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgSyncController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgSyncVault_controller, value) { + if !f(fd_MsgSyncController_controller, value) { return } } if x.Token != nil { value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - if !f(fd_MsgSyncVault_token, value) { + if !f(fd_MsgSyncController_token, value) { return } } @@ -3236,17 +3290,17 @@ func (x *fastReflection_MsgSyncVault) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSyncVault) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgSyncController) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgSyncVault.controller": + case "did.v1.MsgSyncController.controller": return x.Controller != "" - case "did.v1.MsgSyncVault.token": + case "did.v1.MsgSyncController.token": return x.Token != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", fd.FullName())) } } @@ -3256,17 +3310,17 @@ func (x *fastReflection_MsgSyncVault) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVault) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgSyncController) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgSyncVault.controller": + case "did.v1.MsgSyncController.controller": x.Controller = "" - case "did.v1.MsgSyncVault.token": + case "did.v1.MsgSyncController.token": x.Token = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", fd.FullName())) } } @@ -3276,19 +3330,19 @@ func (x *fastReflection_MsgSyncVault) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSyncVault) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSyncController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgSyncVault.controller": + case "did.v1.MsgSyncController.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.MsgSyncVault.token": + case "did.v1.MsgSyncController.token": value := x.Token return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", descriptor.FullName())) } } @@ -3302,17 +3356,17 @@ func (x *fastReflection_MsgSyncVault) Get(descriptor protoreflect.FieldDescripto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVault) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgSyncController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgSyncVault.controller": + case "did.v1.MsgSyncController.controller": x.Controller = value.Interface().(string) - case "did.v1.MsgSyncVault.token": + case "did.v1.MsgSyncController.token": x.Token = value.Message().Interface().(*Token) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", fd.FullName())) } } @@ -3326,48 +3380,48 @@ func (x *fastReflection_MsgSyncVault) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVault) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSyncController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgSyncVault.token": + case "did.v1.MsgSyncController.token": if x.Token == nil { x.Token = new(Token) } return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - case "did.v1.MsgSyncVault.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgSyncVault is not mutable")) + case "did.v1.MsgSyncController.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgSyncController is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncController 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_MsgSyncVault) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSyncController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgSyncVault.controller": + case "did.v1.MsgSyncController.controller": return protoreflect.ValueOfString("") - case "did.v1.MsgSyncVault.token": + case "did.v1.MsgSyncController.token": m := new(Token) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncController 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_MsgSyncVault) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgSyncController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncVault", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncController", d.FullName())) } panic("unreachable") } @@ -3375,7 +3429,7 @@ func (x *fastReflection_MsgSyncVault) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSyncVault) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgSyncController) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3386,7 +3440,7 @@ func (x *fastReflection_MsgSyncVault) 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_MsgSyncVault) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgSyncController) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3398,7 +3452,7 @@ func (x *fastReflection_MsgSyncVault) SetUnknown(fields protoreflect.RawFields) // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgSyncVault) IsValid() bool { +func (x *fastReflection_MsgSyncController) IsValid() bool { return x != nil } @@ -3408,9 +3462,9 @@ func (x *fastReflection_MsgSyncVault) 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_MsgSyncVault) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgSyncController) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSyncVault) + x := input.Message.Interface().(*MsgSyncController) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3440,7 +3494,7 @@ func (x *fastReflection_MsgSyncVault) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncVault) + x := input.Message.Interface().(*MsgSyncController) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3491,7 +3545,7 @@ func (x *fastReflection_MsgSyncVault) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncVault) + x := input.Message.Interface().(*MsgSyncController) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3523,10 +3577,10 @@ func (x *fastReflection_MsgSyncVault) 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: MsgSyncVault: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncController: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVault: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncController: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3633,25 +3687,25 @@ func (x *fastReflection_MsgSyncVault) ProtoMethods() *protoiface.Methods { } var ( - md_MsgSyncVaultResponse protoreflect.MessageDescriptor - fd_MsgSyncVaultResponse_success protoreflect.FieldDescriptor + md_MsgSyncControllerResponse protoreflect.MessageDescriptor + fd_MsgSyncControllerResponse_success protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgSyncVaultResponse = File_did_v1_tx_proto.Messages().ByName("MsgSyncVaultResponse") - fd_MsgSyncVaultResponse_success = md_MsgSyncVaultResponse.Fields().ByName("success") + md_MsgSyncControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgSyncControllerResponse") + fd_MsgSyncControllerResponse_success = md_MsgSyncControllerResponse.Fields().ByName("success") } -var _ protoreflect.Message = (*fastReflection_MsgSyncVaultResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgSyncControllerResponse)(nil) -type fastReflection_MsgSyncVaultResponse MsgSyncVaultResponse +type fastReflection_MsgSyncControllerResponse MsgSyncControllerResponse -func (x *MsgSyncVaultResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSyncVaultResponse)(x) +func (x *MsgSyncControllerResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSyncControllerResponse)(x) } -func (x *MsgSyncVaultResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgSyncControllerResponse) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3663,43 +3717,43 @@ func (x *MsgSyncVaultResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSyncVaultResponse_messageType fastReflection_MsgSyncVaultResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSyncVaultResponse_messageType{} +var _fastReflection_MsgSyncControllerResponse_messageType fastReflection_MsgSyncControllerResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSyncControllerResponse_messageType{} -type fastReflection_MsgSyncVaultResponse_messageType struct{} +type fastReflection_MsgSyncControllerResponse_messageType struct{} -func (x fastReflection_MsgSyncVaultResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSyncVaultResponse)(nil) +func (x fastReflection_MsgSyncControllerResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSyncControllerResponse)(nil) } -func (x fastReflection_MsgSyncVaultResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSyncVaultResponse) +func (x fastReflection_MsgSyncControllerResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSyncControllerResponse) } -func (x fastReflection_MsgSyncVaultResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncVaultResponse +func (x fastReflection_MsgSyncControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSyncControllerResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSyncVaultResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncVaultResponse +func (x *fastReflection_MsgSyncControllerResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSyncControllerResponse } // 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_MsgSyncVaultResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSyncVaultResponse_messageType +func (x *fastReflection_MsgSyncControllerResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSyncControllerResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSyncVaultResponse) New() protoreflect.Message { - return new(fastReflection_MsgSyncVaultResponse) +func (x *fastReflection_MsgSyncControllerResponse) New() protoreflect.Message { + return new(fastReflection_MsgSyncControllerResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSyncVaultResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSyncVaultResponse)(x) +func (x *fastReflection_MsgSyncControllerResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSyncControllerResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3707,10 +3761,10 @@ func (x *fastReflection_MsgSyncVaultResponse) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSyncVaultResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgSyncControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Success != false { value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgSyncVaultResponse_success, value) { + if !f(fd_MsgSyncControllerResponse_success, value) { return } } @@ -3727,15 +3781,15 @@ func (x *fastReflection_MsgSyncVaultResponse) Range(f func(protoreflect.FieldDes // 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_MsgSyncVaultResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgSyncControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": + case "did.v1.MsgSyncControllerResponse.success": return x.Success != false default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", fd.FullName())) } } @@ -3745,15 +3799,15 @@ func (x *fastReflection_MsgSyncVaultResponse) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVaultResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgSyncControllerResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": + case "did.v1.MsgSyncControllerResponse.success": x.Success = false default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", fd.FullName())) } } @@ -3763,16 +3817,16 @@ func (x *fastReflection_MsgSyncVaultResponse) Clear(fd protoreflect.FieldDescrip // 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_MsgSyncVaultResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSyncControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgSyncVaultResponse.success": + case "did.v1.MsgSyncControllerResponse.success": value := x.Success return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", descriptor.FullName())) } } @@ -3786,15 +3840,15 @@ func (x *fastReflection_MsgSyncVaultResponse) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVaultResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgSyncControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": + case "did.v1.MsgSyncControllerResponse.success": x.Success = value.Bool() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", fd.FullName())) } } @@ -3808,40 +3862,40 @@ func (x *fastReflection_MsgSyncVaultResponse) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVaultResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSyncControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": - panic(fmt.Errorf("field success of message did.v1.MsgSyncVaultResponse is not mutable")) + case "did.v1.MsgSyncControllerResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgSyncControllerResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse 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_MsgSyncVaultResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSyncControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": + case "did.v1.MsgSyncControllerResponse.success": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse 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_MsgSyncVaultResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgSyncControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncVaultResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncControllerResponse", d.FullName())) } panic("unreachable") } @@ -3849,7 +3903,7 @@ func (x *fastReflection_MsgSyncVaultResponse) WhichOneof(d protoreflect.OneofDes // 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_MsgSyncVaultResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgSyncControllerResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3860,7 +3914,7 @@ func (x *fastReflection_MsgSyncVaultResponse) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVaultResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgSyncControllerResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3872,7 +3926,7 @@ func (x *fastReflection_MsgSyncVaultResponse) SetUnknown(fields protoreflect.Raw // 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_MsgSyncVaultResponse) IsValid() bool { +func (x *fastReflection_MsgSyncControllerResponse) IsValid() bool { return x != nil } @@ -3882,9 +3936,9 @@ func (x *fastReflection_MsgSyncVaultResponse) 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_MsgSyncVaultResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgSyncControllerResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSyncVaultResponse) + x := input.Message.Interface().(*MsgSyncControllerResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3909,7 +3963,7 @@ func (x *fastReflection_MsgSyncVaultResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncVaultResponse) + x := input.Message.Interface().(*MsgSyncControllerResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3949,7 +4003,7 @@ func (x *fastReflection_MsgSyncVaultResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncVaultResponse) + x := input.Message.Interface().(*MsgSyncControllerResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3981,10 +4035,10 @@ func (x *fastReflection_MsgSyncVaultResponse) 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: MsgSyncVaultResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncControllerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4042,64 +4096,12 @@ func (x *fastReflection_MsgSyncVaultResponse) ProtoMethods() *protoiface.Methods } } -var _ protoreflect.List = (*_MsgRegisterController_4_list)(nil) - -type _MsgRegisterController_4_list struct { - list *[]*Credential -} - -func (x *_MsgRegisterController_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgRegisterController_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgRegisterController_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - (*x.list)[i] = concreteValue -} - -func (x *_MsgRegisterController_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgRegisterController_4_list) AppendMutable() protoreflect.Value { - v := new(Credential) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgRegisterController_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgRegisterController_4_list) NewElement() protoreflect.Value { - v := new(Credential) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgRegisterController_4_list) IsValid() bool { - return x.list != nil -} - var ( - md_MsgRegisterController protoreflect.MessageDescriptor - fd_MsgRegisterController_authority protoreflect.FieldDescriptor - fd_MsgRegisterController_cid protoreflect.FieldDescriptor - fd_MsgRegisterController_origin protoreflect.FieldDescriptor - fd_MsgRegisterController_authentication protoreflect.FieldDescriptor - fd_MsgRegisterController_token protoreflect.FieldDescriptor + md_MsgRegisterController protoreflect.MessageDescriptor + fd_MsgRegisterController_authority protoreflect.FieldDescriptor + fd_MsgRegisterController_cid protoreflect.FieldDescriptor + fd_MsgRegisterController_origin protoreflect.FieldDescriptor + fd_MsgRegisterController_credential_creation_response protoreflect.FieldDescriptor ) func init() { @@ -4108,8 +4110,7 @@ func init() { fd_MsgRegisterController_authority = md_MsgRegisterController.Fields().ByName("authority") fd_MsgRegisterController_cid = md_MsgRegisterController.Fields().ByName("cid") fd_MsgRegisterController_origin = md_MsgRegisterController.Fields().ByName("origin") - fd_MsgRegisterController_authentication = md_MsgRegisterController.Fields().ByName("authentication") - fd_MsgRegisterController_token = md_MsgRegisterController.Fields().ByName("token") + fd_MsgRegisterController_credential_creation_response = md_MsgRegisterController.Fields().ByName("credential_creation_response") } var _ protoreflect.Message = (*fastReflection_MsgRegisterController)(nil) @@ -4195,15 +4196,9 @@ func (x *fastReflection_MsgRegisterController) Range(f func(protoreflect.FieldDe return } } - if len(x.Authentication) != 0 { - value := protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &x.Authentication}) - if !f(fd_MsgRegisterController_authentication, value) { - return - } - } - if x.Token != nil { - value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - if !f(fd_MsgRegisterController_token, value) { + if x.CredentialCreationResponse != "" { + value := protoreflect.ValueOfString(x.CredentialCreationResponse) + if !f(fd_MsgRegisterController_credential_creation_response, value) { return } } @@ -4228,10 +4223,8 @@ func (x *fastReflection_MsgRegisterController) Has(fd protoreflect.FieldDescript return x.Cid != "" case "did.v1.MsgRegisterController.origin": return x.Origin != "" - case "did.v1.MsgRegisterController.authentication": - return len(x.Authentication) != 0 - case "did.v1.MsgRegisterController.token": - return x.Token != nil + case "did.v1.MsgRegisterController.credential_creation_response": + return x.CredentialCreationResponse != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4254,10 +4247,8 @@ func (x *fastReflection_MsgRegisterController) Clear(fd protoreflect.FieldDescri x.Cid = "" case "did.v1.MsgRegisterController.origin": x.Origin = "" - case "did.v1.MsgRegisterController.authentication": - x.Authentication = nil - case "did.v1.MsgRegisterController.token": - x.Token = nil + case "did.v1.MsgRegisterController.credential_creation_response": + x.CredentialCreationResponse = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4283,15 +4274,9 @@ func (x *fastReflection_MsgRegisterController) Get(descriptor protoreflect.Field case "did.v1.MsgRegisterController.origin": value := x.Origin return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterController.authentication": - if len(x.Authentication) == 0 { - return protoreflect.ValueOfList(&_MsgRegisterController_4_list{}) - } - listValue := &_MsgRegisterController_4_list{list: &x.Authentication} - return protoreflect.ValueOfList(listValue) - case "did.v1.MsgRegisterController.token": - value := x.Token - return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.MsgRegisterController.credential_creation_response": + value := x.CredentialCreationResponse + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4318,12 +4303,8 @@ func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescript x.Cid = value.Interface().(string) case "did.v1.MsgRegisterController.origin": x.Origin = value.Interface().(string) - case "did.v1.MsgRegisterController.authentication": - lv := value.List() - clv := lv.(*_MsgRegisterController_4_list) - x.Authentication = *clv.list - case "did.v1.MsgRegisterController.token": - x.Token = value.Message().Interface().(*Token) + case "did.v1.MsgRegisterController.credential_creation_response": + x.CredentialCreationResponse = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4344,23 +4325,14 @@ func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescript // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterController.authentication": - if x.Authentication == nil { - x.Authentication = []*Credential{} - } - value := &_MsgRegisterController_4_list{list: &x.Authentication} - return protoreflect.ValueOfList(value) - case "did.v1.MsgRegisterController.token": - if x.Token == nil { - x.Token = new(Token) - } - return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) case "did.v1.MsgRegisterController.authority": panic(fmt.Errorf("field authority of message did.v1.MsgRegisterController is not mutable")) case "did.v1.MsgRegisterController.cid": panic(fmt.Errorf("field cid of message did.v1.MsgRegisterController is not mutable")) case "did.v1.MsgRegisterController.origin": panic(fmt.Errorf("field origin of message did.v1.MsgRegisterController is not mutable")) + case "did.v1.MsgRegisterController.credential_creation_response": + panic(fmt.Errorf("field credential_creation_response of message did.v1.MsgRegisterController is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4380,12 +4352,8 @@ func (x *fastReflection_MsgRegisterController) NewField(fd protoreflect.FieldDes return protoreflect.ValueOfString("") case "did.v1.MsgRegisterController.origin": return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterController.authentication": - list := []*Credential{} - return protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &list}) - case "did.v1.MsgRegisterController.token": - m := new(Token) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.MsgRegisterController.credential_creation_response": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4467,14 +4435,8 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Authentication) > 0 { - for _, e := range x.Authentication { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Token != nil { - l = options.Size(x.Token) + l = len(x.CredentialCreationResponse) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -4506,35 +4468,12 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Token != nil { - encoded, err := options.Marshal(x.Token) - 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))) + if len(x.CredentialCreationResponse) > 0 { + i -= len(x.CredentialCreationResponse) + copy(dAtA[i:], x.CredentialCreationResponse) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialCreationResponse))) i-- - dAtA[i] = 0x2a - } - if len(x.Authentication) > 0 { - for iNdEx := len(x.Authentication) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Authentication[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } + dAtA[i] = 0x22 } if len(x.Origin) > 0 { i -= len(x.Origin) @@ -4704,9 +4643,9 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method iNdEx = postIndex case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialCreationResponse", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4716,61 +4655,23 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Authentication = append(x.Authentication, &Credential{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Authentication[len(x.Authentication)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token == nil { - x.Token = &Token{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.CredentialCreationResponse = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5586,33 +5487,31 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac } var ( - md_MsgAuthorize protoreflect.MessageDescriptor - fd_MsgAuthorize_authority protoreflect.FieldDescriptor - fd_MsgAuthorize_controller protoreflect.FieldDescriptor - fd_MsgAuthorize_address protoreflect.FieldDescriptor - fd_MsgAuthorize_origin protoreflect.FieldDescriptor - fd_MsgAuthorize_token protoreflect.FieldDescriptor + md_MsgAuthorizeService protoreflect.MessageDescriptor + fd_MsgAuthorizeService_controller protoreflect.FieldDescriptor + fd_MsgAuthorizeService_origin protoreflect.FieldDescriptor + fd_MsgAuthorizeService_scopes protoreflect.FieldDescriptor + fd_MsgAuthorizeService_token protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgAuthorize = File_did_v1_tx_proto.Messages().ByName("MsgAuthorize") - fd_MsgAuthorize_authority = md_MsgAuthorize.Fields().ByName("authority") - fd_MsgAuthorize_controller = md_MsgAuthorize.Fields().ByName("controller") - fd_MsgAuthorize_address = md_MsgAuthorize.Fields().ByName("address") - fd_MsgAuthorize_origin = md_MsgAuthorize.Fields().ByName("origin") - fd_MsgAuthorize_token = md_MsgAuthorize.Fields().ByName("token") + md_MsgAuthorizeService = File_did_v1_tx_proto.Messages().ByName("MsgAuthorizeService") + fd_MsgAuthorizeService_controller = md_MsgAuthorizeService.Fields().ByName("controller") + fd_MsgAuthorizeService_origin = md_MsgAuthorizeService.Fields().ByName("origin") + fd_MsgAuthorizeService_scopes = md_MsgAuthorizeService.Fields().ByName("scopes") + fd_MsgAuthorizeService_token = md_MsgAuthorizeService.Fields().ByName("token") } -var _ protoreflect.Message = (*fastReflection_MsgAuthorize)(nil) +var _ protoreflect.Message = (*fastReflection_MsgAuthorizeService)(nil) -type fastReflection_MsgAuthorize MsgAuthorize +type fastReflection_MsgAuthorizeService MsgAuthorizeService -func (x *MsgAuthorize) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthorize)(x) +func (x *MsgAuthorizeService) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAuthorizeService)(x) } -func (x *MsgAuthorize) slowProtoReflect() protoreflect.Message { +func (x *MsgAuthorizeService) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -5624,43 +5523,43 @@ func (x *MsgAuthorize) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgAuthorize_messageType fastReflection_MsgAuthorize_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthorize_messageType{} +var _fastReflection_MsgAuthorizeService_messageType fastReflection_MsgAuthorizeService_messageType +var _ protoreflect.MessageType = fastReflection_MsgAuthorizeService_messageType{} -type fastReflection_MsgAuthorize_messageType struct{} +type fastReflection_MsgAuthorizeService_messageType struct{} -func (x fastReflection_MsgAuthorize_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthorize)(nil) +func (x fastReflection_MsgAuthorizeService_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAuthorizeService)(nil) } -func (x fastReflection_MsgAuthorize_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthorize) +func (x fastReflection_MsgAuthorizeService_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAuthorizeService) } -func (x fastReflection_MsgAuthorize_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthorize +func (x fastReflection_MsgAuthorizeService_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthorizeService } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgAuthorize) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthorize +func (x *fastReflection_MsgAuthorizeService) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthorizeService } // 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_MsgAuthorize) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthorize_messageType +func (x *fastReflection_MsgAuthorizeService) Type() protoreflect.MessageType { + return _fastReflection_MsgAuthorizeService_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthorize) New() protoreflect.Message { - return new(fastReflection_MsgAuthorize) +func (x *fastReflection_MsgAuthorizeService) New() protoreflect.Message { + return new(fastReflection_MsgAuthorizeService) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAuthorize) Interface() protoreflect.ProtoMessage { - return (*MsgAuthorize)(x) +func (x *fastReflection_MsgAuthorizeService) Interface() protoreflect.ProtoMessage { + return (*MsgAuthorizeService)(x) } // Range iterates over every populated field in an undefined order, @@ -5668,34 +5567,28 @@ func (x *fastReflection_MsgAuthorize) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgAuthorize) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgAuthorize_authority, value) { - return - } - } +func (x *fastReflection_MsgAuthorizeService) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgAuthorize_controller, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgAuthorize_address, value) { + if !f(fd_MsgAuthorizeService_controller, value) { return } } if x.Origin != "" { value := protoreflect.ValueOfString(x.Origin) - if !f(fd_MsgAuthorize_origin, value) { + if !f(fd_MsgAuthorizeService_origin, value) { + return + } + } + if x.Scopes != nil { + value := protoreflect.ValueOfMessage(x.Scopes.ProtoReflect()) + if !f(fd_MsgAuthorizeService_scopes, value) { return } } if x.Token != nil { value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - if !f(fd_MsgAuthorize_token, value) { + if !f(fd_MsgAuthorizeService_token, value) { return } } @@ -5712,23 +5605,21 @@ func (x *fastReflection_MsgAuthorize) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgAuthorize) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgAuthorizeService) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgAuthorize.authority": - return x.Authority != "" - case "did.v1.MsgAuthorize.controller": + case "did.v1.MsgAuthorizeService.controller": return x.Controller != "" - case "did.v1.MsgAuthorize.address": - return x.Address != "" - case "did.v1.MsgAuthorize.origin": + case "did.v1.MsgAuthorizeService.origin": return x.Origin != "" - case "did.v1.MsgAuthorize.token": + case "did.v1.MsgAuthorizeService.scopes": + return x.Scopes != nil + case "did.v1.MsgAuthorizeService.token": return x.Token != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeService")) } - panic(fmt.Errorf("message did.v1.MsgAuthorize does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeService does not contain field %s", fd.FullName())) } } @@ -5738,23 +5629,21 @@ func (x *fastReflection_MsgAuthorize) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthorize) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgAuthorizeService) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgAuthorize.authority": - x.Authority = "" - case "did.v1.MsgAuthorize.controller": + case "did.v1.MsgAuthorizeService.controller": x.Controller = "" - case "did.v1.MsgAuthorize.address": - x.Address = "" - case "did.v1.MsgAuthorize.origin": + case "did.v1.MsgAuthorizeService.origin": x.Origin = "" - case "did.v1.MsgAuthorize.token": + case "did.v1.MsgAuthorizeService.scopes": + x.Scopes = nil + case "did.v1.MsgAuthorizeService.token": x.Token = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeService")) } - panic(fmt.Errorf("message did.v1.MsgAuthorize does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeService does not contain field %s", fd.FullName())) } } @@ -5764,28 +5653,25 @@ func (x *fastReflection_MsgAuthorize) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgAuthorize) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthorizeService) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgAuthorize.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthorize.controller": + case "did.v1.MsgAuthorizeService.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthorize.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthorize.origin": + case "did.v1.MsgAuthorizeService.origin": value := x.Origin return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthorize.token": + case "did.v1.MsgAuthorizeService.scopes": + value := x.Scopes + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.MsgAuthorizeService.token": value := x.Token return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeService")) } - panic(fmt.Errorf("message did.v1.MsgAuthorize does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeService does not contain field %s", descriptor.FullName())) } } @@ -5799,23 +5685,21 @@ func (x *fastReflection_MsgAuthorize) Get(descriptor protoreflect.FieldDescripto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthorize) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgAuthorizeService) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgAuthorize.authority": - x.Authority = value.Interface().(string) - case "did.v1.MsgAuthorize.controller": + case "did.v1.MsgAuthorizeService.controller": x.Controller = value.Interface().(string) - case "did.v1.MsgAuthorize.address": - x.Address = value.Interface().(string) - case "did.v1.MsgAuthorize.origin": + case "did.v1.MsgAuthorizeService.origin": x.Origin = value.Interface().(string) - case "did.v1.MsgAuthorize.token": + case "did.v1.MsgAuthorizeService.scopes": + x.Scopes = value.Message().Interface().(*Permissions) + case "did.v1.MsgAuthorizeService.token": x.Token = value.Message().Interface().(*Token) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeService")) } - panic(fmt.Errorf("message did.v1.MsgAuthorize does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeService does not contain field %s", fd.FullName())) } } @@ -5829,60 +5713,60 @@ func (x *fastReflection_MsgAuthorize) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthorize) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthorizeService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthorize.token": + case "did.v1.MsgAuthorizeService.scopes": + if x.Scopes == nil { + x.Scopes = new(Permissions) + } + return protoreflect.ValueOfMessage(x.Scopes.ProtoReflect()) + case "did.v1.MsgAuthorizeService.token": if x.Token == nil { x.Token = new(Token) } return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - case "did.v1.MsgAuthorize.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgAuthorize is not mutable")) - case "did.v1.MsgAuthorize.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgAuthorize is not mutable")) - case "did.v1.MsgAuthorize.address": - panic(fmt.Errorf("field address of message did.v1.MsgAuthorize is not mutable")) - case "did.v1.MsgAuthorize.origin": - panic(fmt.Errorf("field origin of message did.v1.MsgAuthorize is not mutable")) + case "did.v1.MsgAuthorizeService.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgAuthorizeService is not mutable")) + case "did.v1.MsgAuthorizeService.origin": + panic(fmt.Errorf("field origin of message did.v1.MsgAuthorizeService is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeService")) } - panic(fmt.Errorf("message did.v1.MsgAuthorize does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeService 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_MsgAuthorize) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthorizeService) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthorize.authority": + case "did.v1.MsgAuthorizeService.controller": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthorize.controller": + case "did.v1.MsgAuthorizeService.origin": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthorize.address": - return protoreflect.ValueOfString("") - case "did.v1.MsgAuthorize.origin": - return protoreflect.ValueOfString("") - case "did.v1.MsgAuthorize.token": + case "did.v1.MsgAuthorizeService.scopes": + m := new(Permissions) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.MsgAuthorizeService.token": m := new(Token) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeService")) } - panic(fmt.Errorf("message did.v1.MsgAuthorize does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeService 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_MsgAuthorize) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgAuthorizeService) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthorize", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthorizeService", d.FullName())) } panic("unreachable") } @@ -5890,7 +5774,7 @@ func (x *fastReflection_MsgAuthorize) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgAuthorize) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgAuthorizeService) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5901,7 +5785,7 @@ func (x *fastReflection_MsgAuthorize) 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_MsgAuthorize) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgAuthorizeService) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5913,7 +5797,7 @@ func (x *fastReflection_MsgAuthorize) SetUnknown(fields protoreflect.RawFields) // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgAuthorize) IsValid() bool { +func (x *fastReflection_MsgAuthorizeService) IsValid() bool { return x != nil } @@ -5923,9 +5807,9 @@ func (x *fastReflection_MsgAuthorize) 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_MsgAuthorize) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgAuthorizeService) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthorize) + x := input.Message.Interface().(*MsgAuthorizeService) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5937,22 +5821,18 @@ func (x *fastReflection_MsgAuthorize) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.Controller) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Address) - 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.Scopes != nil { + l = options.Size(x.Scopes) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.Token != nil { l = options.Size(x.Token) n += 1 + l + runtime.Sov(uint64(l)) @@ -5967,7 +5847,7 @@ func (x *fastReflection_MsgAuthorize) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthorize) + x := input.Message.Interface().(*MsgAuthorizeService) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5998,34 +5878,34 @@ func (x *fastReflection_MsgAuthorize) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 + } + if x.Scopes != nil { + encoded, err := options.Marshal(x.Scopes) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a } if len(x.Origin) > 0 { i -= len(x.Origin) copy(dAtA[i:], x.Origin) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) 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 + dAtA[i] = 0x12 } if len(x.Controller) > 0 { i -= len(x.Controller) copy(dAtA[i:], x.Controller) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) 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 { @@ -6039,7 +5919,7 @@ func (x *fastReflection_MsgAuthorize) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthorize) + x := input.Message.Interface().(*MsgAuthorizeService) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6071,45 +5951,13 @@ func (x *fastReflection_MsgAuthorize) 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: MsgAuthorize: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthorizeService: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthorize: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthorizeService: 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 Controller", wireType) } @@ -6141,39 +5989,7 @@ func (x *fastReflection_MsgAuthorize) ProtoMethods() *protoiface.Methods { } x.Controller = 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 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: + case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } @@ -6205,7 +6021,43 @@ func (x *fastReflection_MsgAuthorize) ProtoMethods() *protoiface.Methods { } x.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", 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.Scopes == nil { + x.Scopes = &Permissions{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Scopes); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } @@ -6277,27 +6129,27 @@ func (x *fastReflection_MsgAuthorize) ProtoMethods() *protoiface.Methods { } var ( - md_MsgAuthorizeResponse protoreflect.MessageDescriptor - fd_MsgAuthorizeResponse_success protoreflect.FieldDescriptor - fd_MsgAuthorizeResponse_token protoreflect.FieldDescriptor + md_MsgAuthorizeServiceResponse protoreflect.MessageDescriptor + fd_MsgAuthorizeServiceResponse_success protoreflect.FieldDescriptor + fd_MsgAuthorizeServiceResponse_token protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgAuthorizeResponse = File_did_v1_tx_proto.Messages().ByName("MsgAuthorizeResponse") - fd_MsgAuthorizeResponse_success = md_MsgAuthorizeResponse.Fields().ByName("success") - fd_MsgAuthorizeResponse_token = md_MsgAuthorizeResponse.Fields().ByName("token") + md_MsgAuthorizeServiceResponse = File_did_v1_tx_proto.Messages().ByName("MsgAuthorizeServiceResponse") + fd_MsgAuthorizeServiceResponse_success = md_MsgAuthorizeServiceResponse.Fields().ByName("success") + fd_MsgAuthorizeServiceResponse_token = md_MsgAuthorizeServiceResponse.Fields().ByName("token") } -var _ protoreflect.Message = (*fastReflection_MsgAuthorizeResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgAuthorizeServiceResponse)(nil) -type fastReflection_MsgAuthorizeResponse MsgAuthorizeResponse +type fastReflection_MsgAuthorizeServiceResponse MsgAuthorizeServiceResponse -func (x *MsgAuthorizeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthorizeResponse)(x) +func (x *MsgAuthorizeServiceResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAuthorizeServiceResponse)(x) } -func (x *MsgAuthorizeResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgAuthorizeServiceResponse) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -6309,43 +6161,43 @@ func (x *MsgAuthorizeResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgAuthorizeResponse_messageType fastReflection_MsgAuthorizeResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthorizeResponse_messageType{} +var _fastReflection_MsgAuthorizeServiceResponse_messageType fastReflection_MsgAuthorizeServiceResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAuthorizeServiceResponse_messageType{} -type fastReflection_MsgAuthorizeResponse_messageType struct{} +type fastReflection_MsgAuthorizeServiceResponse_messageType struct{} -func (x fastReflection_MsgAuthorizeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthorizeResponse)(nil) +func (x fastReflection_MsgAuthorizeServiceResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAuthorizeServiceResponse)(nil) } -func (x fastReflection_MsgAuthorizeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthorizeResponse) +func (x fastReflection_MsgAuthorizeServiceResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAuthorizeServiceResponse) } -func (x fastReflection_MsgAuthorizeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthorizeResponse +func (x fastReflection_MsgAuthorizeServiceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthorizeServiceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgAuthorizeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthorizeResponse +func (x *fastReflection_MsgAuthorizeServiceResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthorizeServiceResponse } // 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_MsgAuthorizeResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthorizeResponse_messageType +func (x *fastReflection_MsgAuthorizeServiceResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAuthorizeServiceResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthorizeResponse) New() protoreflect.Message { - return new(fastReflection_MsgAuthorizeResponse) +func (x *fastReflection_MsgAuthorizeServiceResponse) New() protoreflect.Message { + return new(fastReflection_MsgAuthorizeServiceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAuthorizeResponse) Interface() protoreflect.ProtoMessage { - return (*MsgAuthorizeResponse)(x) +func (x *fastReflection_MsgAuthorizeServiceResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAuthorizeServiceResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -6353,16 +6205,16 @@ func (x *fastReflection_MsgAuthorizeResponse) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgAuthorizeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgAuthorizeServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Success != false { value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgAuthorizeResponse_success, value) { + if !f(fd_MsgAuthorizeServiceResponse_success, value) { return } } if x.Token != nil { value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - if !f(fd_MsgAuthorizeResponse_token, value) { + if !f(fd_MsgAuthorizeServiceResponse_token, value) { return } } @@ -6379,17 +6231,17 @@ func (x *fastReflection_MsgAuthorizeResponse) Range(f func(protoreflect.FieldDes // 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_MsgAuthorizeResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgAuthorizeServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgAuthorizeResponse.success": + case "did.v1.MsgAuthorizeServiceResponse.success": return x.Success != false - case "did.v1.MsgAuthorizeResponse.token": + case "did.v1.MsgAuthorizeServiceResponse.token": return x.Token != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeServiceResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeServiceResponse does not contain field %s", fd.FullName())) } } @@ -6399,17 +6251,17 @@ func (x *fastReflection_MsgAuthorizeResponse) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthorizeResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgAuthorizeServiceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgAuthorizeResponse.success": + case "did.v1.MsgAuthorizeServiceResponse.success": x.Success = false - case "did.v1.MsgAuthorizeResponse.token": + case "did.v1.MsgAuthorizeServiceResponse.token": x.Token = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeServiceResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeServiceResponse does not contain field %s", fd.FullName())) } } @@ -6419,19 +6271,19 @@ func (x *fastReflection_MsgAuthorizeResponse) Clear(fd protoreflect.FieldDescrip // 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_MsgAuthorizeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthorizeServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgAuthorizeResponse.success": + case "did.v1.MsgAuthorizeServiceResponse.success": value := x.Success return protoreflect.ValueOfBool(value) - case "did.v1.MsgAuthorizeResponse.token": + case "did.v1.MsgAuthorizeServiceResponse.token": value := x.Token return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeServiceResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeServiceResponse does not contain field %s", descriptor.FullName())) } } @@ -6445,17 +6297,17 @@ func (x *fastReflection_MsgAuthorizeResponse) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthorizeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgAuthorizeServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgAuthorizeResponse.success": + case "did.v1.MsgAuthorizeServiceResponse.success": x.Success = value.Bool() - case "did.v1.MsgAuthorizeResponse.token": + case "did.v1.MsgAuthorizeServiceResponse.token": x.Token = value.Message().Interface().(*Token) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeServiceResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeServiceResponse does not contain field %s", fd.FullName())) } } @@ -6469,48 +6321,48 @@ func (x *fastReflection_MsgAuthorizeResponse) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthorizeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthorizeServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthorizeResponse.token": + case "did.v1.MsgAuthorizeServiceResponse.token": if x.Token == nil { x.Token = new(Token) } return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) - case "did.v1.MsgAuthorizeResponse.success": - panic(fmt.Errorf("field success of message did.v1.MsgAuthorizeResponse is not mutable")) + case "did.v1.MsgAuthorizeServiceResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgAuthorizeServiceResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeServiceResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeServiceResponse 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_MsgAuthorizeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthorizeServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthorizeResponse.success": + case "did.v1.MsgAuthorizeServiceResponse.success": return protoreflect.ValueOfBool(false) - case "did.v1.MsgAuthorizeResponse.token": + case "did.v1.MsgAuthorizeServiceResponse.token": m := new(Token) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeServiceResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthorizeServiceResponse 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_MsgAuthorizeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgAuthorizeServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthorizeResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthorizeServiceResponse", d.FullName())) } panic("unreachable") } @@ -6518,7 +6370,7 @@ func (x *fastReflection_MsgAuthorizeResponse) WhichOneof(d protoreflect.OneofDes // 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_MsgAuthorizeResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgAuthorizeServiceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -6529,7 +6381,7 @@ func (x *fastReflection_MsgAuthorizeResponse) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthorizeResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgAuthorizeServiceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -6541,7 +6393,7 @@ func (x *fastReflection_MsgAuthorizeResponse) SetUnknown(fields protoreflect.Raw // 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_MsgAuthorizeResponse) IsValid() bool { +func (x *fastReflection_MsgAuthorizeServiceResponse) IsValid() bool { return x != nil } @@ -6551,9 +6403,9 @@ func (x *fastReflection_MsgAuthorizeResponse) 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_MsgAuthorizeResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgAuthorizeServiceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthorizeResponse) + x := input.Message.Interface().(*MsgAuthorizeServiceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6582,7 +6434,7 @@ func (x *fastReflection_MsgAuthorizeResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthorizeResponse) + x := input.Message.Interface().(*MsgAuthorizeServiceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6636,7 +6488,7 @@ func (x *fastReflection_MsgAuthorizeResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthorizeResponse) + x := input.Message.Interface().(*MsgAuthorizeServiceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6668,10 +6520,10 @@ func (x *fastReflection_MsgAuthorizeResponse) 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: MsgAuthorizeResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthorizeServiceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthorizeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthorizeServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6765,108 +6617,18 @@ func (x *fastReflection_MsgAuthorizeResponse) ProtoMethods() *protoiface.Methods } } -var _ protoreflect.Map = (*_MsgRegisterService_5_map)(nil) - -type _MsgRegisterService_5_map struct { - m *map[string]string -} - -func (x *_MsgRegisterService_5_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_MsgRegisterService_5_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfString(v) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_MsgRegisterService_5_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_MsgRegisterService_5_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_MsgRegisterService_5_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfString(v) -} - -func (x *_MsgRegisterService_5_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -func (x *_MsgRegisterService_5_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") -} - -func (x *_MsgRegisterService_5_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_MsgRegisterService_5_map) IsValid() bool { - return x.m != nil -} - var ( - md_MsgRegisterService protoreflect.MessageDescriptor - fd_MsgRegisterService_controller protoreflect.FieldDescriptor - fd_MsgRegisterService_origin_uri protoreflect.FieldDescriptor - fd_MsgRegisterService_scopes protoreflect.FieldDescriptor - fd_MsgRegisterService_description protoreflect.FieldDescriptor - fd_MsgRegisterService_service_endpoints protoreflect.FieldDescriptor - fd_MsgRegisterService_metadata protoreflect.FieldDescriptor - fd_MsgRegisterService_token protoreflect.FieldDescriptor + md_MsgRegisterService protoreflect.MessageDescriptor + fd_MsgRegisterService_controller protoreflect.FieldDescriptor + fd_MsgRegisterService_service protoreflect.FieldDescriptor + fd_MsgRegisterService_token protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() md_MsgRegisterService = File_did_v1_tx_proto.Messages().ByName("MsgRegisterService") fd_MsgRegisterService_controller = md_MsgRegisterService.Fields().ByName("controller") - fd_MsgRegisterService_origin_uri = md_MsgRegisterService.Fields().ByName("origin_uri") - fd_MsgRegisterService_scopes = md_MsgRegisterService.Fields().ByName("scopes") - fd_MsgRegisterService_description = md_MsgRegisterService.Fields().ByName("description") - fd_MsgRegisterService_service_endpoints = md_MsgRegisterService.Fields().ByName("service_endpoints") - fd_MsgRegisterService_metadata = md_MsgRegisterService.Fields().ByName("metadata") + fd_MsgRegisterService_service = md_MsgRegisterService.Fields().ByName("service") fd_MsgRegisterService_token = md_MsgRegisterService.Fields().ByName("token") } @@ -6941,33 +6703,9 @@ func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescr return } } - if x.OriginUri != "" { - value := protoreflect.ValueOfString(x.OriginUri) - if !f(fd_MsgRegisterService_origin_uri, value) { - return - } - } - if x.Scopes != nil { - value := protoreflect.ValueOfMessage(x.Scopes.ProtoReflect()) - if !f(fd_MsgRegisterService_scopes, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_MsgRegisterService_description, value) { - return - } - } - if len(x.ServiceEndpoints) != 0 { - value := protoreflect.ValueOfMap(&_MsgRegisterService_5_map{m: &x.ServiceEndpoints}) - if !f(fd_MsgRegisterService_service_endpoints, value) { - return - } - } - if x.Metadata != nil { - value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - if !f(fd_MsgRegisterService_metadata, value) { + if x.Service != nil { + value := protoreflect.ValueOfMessage(x.Service.ProtoReflect()) + if !f(fd_MsgRegisterService_service, value) { return } } @@ -6994,16 +6732,8 @@ func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "did.v1.MsgRegisterService.controller": return x.Controller != "" - case "did.v1.MsgRegisterService.origin_uri": - return x.OriginUri != "" - case "did.v1.MsgRegisterService.scopes": - return x.Scopes != nil - case "did.v1.MsgRegisterService.description": - return x.Description != "" - case "did.v1.MsgRegisterService.service_endpoints": - return len(x.ServiceEndpoints) != 0 - case "did.v1.MsgRegisterService.metadata": - return x.Metadata != nil + case "did.v1.MsgRegisterService.service": + return x.Service != nil case "did.v1.MsgRegisterService.token": return x.Token != nil default: @@ -7024,16 +6754,8 @@ func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescripto switch fd.FullName() { case "did.v1.MsgRegisterService.controller": x.Controller = "" - case "did.v1.MsgRegisterService.origin_uri": - x.OriginUri = "" - case "did.v1.MsgRegisterService.scopes": - x.Scopes = nil - case "did.v1.MsgRegisterService.description": - x.Description = "" - case "did.v1.MsgRegisterService.service_endpoints": - x.ServiceEndpoints = nil - case "did.v1.MsgRegisterService.metadata": - x.Metadata = nil + case "did.v1.MsgRegisterService.service": + x.Service = nil case "did.v1.MsgRegisterService.token": x.Token = nil default: @@ -7055,23 +6777,8 @@ func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDes case "did.v1.MsgRegisterService.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterService.origin_uri": - value := x.OriginUri - return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterService.scopes": - value := x.Scopes - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.MsgRegisterService.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterService.service_endpoints": - if len(x.ServiceEndpoints) == 0 { - return protoreflect.ValueOfMap(&_MsgRegisterService_5_map{}) - } - mapValue := &_MsgRegisterService_5_map{m: &x.ServiceEndpoints} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.MsgRegisterService.metadata": - value := x.Metadata + case "did.v1.MsgRegisterService.service": + value := x.Service return protoreflect.ValueOfMessage(value.ProtoReflect()) case "did.v1.MsgRegisterService.token": value := x.Token @@ -7098,18 +6805,8 @@ func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, switch fd.FullName() { case "did.v1.MsgRegisterService.controller": x.Controller = value.Interface().(string) - case "did.v1.MsgRegisterService.origin_uri": - x.OriginUri = value.Interface().(string) - case "did.v1.MsgRegisterService.scopes": - x.Scopes = value.Message().Interface().(*Permissions) - case "did.v1.MsgRegisterService.description": - x.Description = value.Interface().(string) - case "did.v1.MsgRegisterService.service_endpoints": - mv := value.Map() - cmv := mv.(*_MsgRegisterService_5_map) - x.ServiceEndpoints = *cmv.m - case "did.v1.MsgRegisterService.metadata": - x.Metadata = value.Message().Interface().(*Metadata) + case "did.v1.MsgRegisterService.service": + x.Service = value.Message().Interface().(*Service) case "did.v1.MsgRegisterService.token": x.Token = value.Message().Interface().(*Token) default: @@ -7132,22 +6829,11 @@ func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterService.scopes": - if x.Scopes == nil { - x.Scopes = new(Permissions) + case "did.v1.MsgRegisterService.service": + if x.Service == nil { + x.Service = new(Service) } - return protoreflect.ValueOfMessage(x.Scopes.ProtoReflect()) - case "did.v1.MsgRegisterService.service_endpoints": - if x.ServiceEndpoints == nil { - x.ServiceEndpoints = make(map[string]string) - } - value := &_MsgRegisterService_5_map{m: &x.ServiceEndpoints} - return protoreflect.ValueOfMap(value) - case "did.v1.MsgRegisterService.metadata": - if x.Metadata == nil { - x.Metadata = new(Metadata) - } - return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) case "did.v1.MsgRegisterService.token": if x.Token == nil { x.Token = new(Token) @@ -7155,10 +6841,6 @@ func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescrip return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) case "did.v1.MsgRegisterService.controller": panic(fmt.Errorf("field controller of message did.v1.MsgRegisterService is not mutable")) - case "did.v1.MsgRegisterService.origin_uri": - panic(fmt.Errorf("field origin_uri of message did.v1.MsgRegisterService is not mutable")) - case "did.v1.MsgRegisterService.description": - panic(fmt.Errorf("field description of message did.v1.MsgRegisterService is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -7174,18 +6856,8 @@ func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescri switch fd.FullName() { case "did.v1.MsgRegisterService.controller": return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterService.origin_uri": - return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterService.scopes": - m := new(Permissions) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.MsgRegisterService.description": - return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterService.service_endpoints": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_MsgRegisterService_5_map{m: &m}) - case "did.v1.MsgRegisterService.metadata": - m := new(Metadata) + case "did.v1.MsgRegisterService.service": + m := new(Service) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.MsgRegisterService.token": m := new(Token) @@ -7263,41 +6935,8 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.OriginUri) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Scopes != nil { - l = options.Size(x.Scopes) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.ServiceEndpoints) > 0 { - SiZeMaP := func(k string, v string) { - mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]string, 0, len(x.ServiceEndpoints)) - for k := range x.ServiceEndpoints { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.ServiceEndpoints[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.ServiceEndpoints { - SiZeMaP(k, v) - } - } - } - if x.Metadata != nil { - l = options.Size(x.Metadata) + if x.Service != nil { + l = options.Size(x.Service) n += 1 + l + runtime.Sov(uint64(l)) } if x.Token != nil { @@ -7345,90 +6984,19 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x3a - } - if x.Metadata != nil { - encoded, err := options.Marshal(x.Metadata) - 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] = 0x32 - } - if len(x.ServiceEndpoints) > 0 { - MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints)) - for k := range x.ServiceEndpoints { - keysForServiceEndpoints = append(keysForServiceEndpoints, string(k)) - } - sort.Slice(keysForServiceEndpoints, func(i, j int) bool { - return keysForServiceEndpoints[i] < keysForServiceEndpoints[j] - }) - for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- { - v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])] - out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.ServiceEndpoints { - v := x.ServiceEndpoints[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x22 - } - if x.Scopes != nil { - encoded, err := options.Marshal(x.Scopes) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- dAtA[i] = 0x1a } - if len(x.OriginUri) > 0 { - i -= len(x.OriginUri) - copy(dAtA[i:], x.OriginUri) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri))) + if x.Service != nil { + encoded, err := options.Marshal(x.Service) + 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 } @@ -7522,9 +7090,9 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -7534,256 +7102,29 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.OriginUri = string(dAtA[iNdEx:postIndex]) + if x.Service == nil { + x.Service = &Service{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); 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 Scopes", 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.Scopes == nil { - x.Scopes = &Permissions{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Scopes); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", 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.ServiceEndpoints == nil { - x.ServiceEndpoints = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - 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) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.ServiceEndpoints[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { - x.Metadata = &Metadata{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } @@ -8495,6 +7836,8 @@ type MsgAllocateVaultResponse struct { 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 RegistrationOptions string `protobuf:"bytes,3,opt,name=registration_options,json=registrationOptions,proto3" json:"registration_options,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() { @@ -8538,6 +7881,13 @@ func (x *MsgAllocateVaultResponse) GetRegistrationOptions() string { return "" } +func (x *MsgAllocateVaultResponse) GetLocalhost() bool { + if x != nil { + return x.Localhost + } + return false +} + // MsgProveWitness is the message type for the ProveWitness RPC. type MsgProveWitness struct { state protoimpl.MessageState @@ -8646,8 +7996,8 @@ func (x *MsgProveWitnessResponse) GetProperty() string { return "" } -// MsgSyncVault is the message type for the SyncVault RPC. -type MsgSyncVault struct { +// MsgSyncController is the message type for the SyncController RPC. +type MsgSyncController struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -8658,8 +8008,8 @@ type MsgSyncVault struct { Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } -func (x *MsgSyncVault) Reset() { - *x = MsgSyncVault{} +func (x *MsgSyncController) Reset() { + *x = MsgSyncController{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8667,33 +8017,33 @@ func (x *MsgSyncVault) Reset() { } } -func (x *MsgSyncVault) String() string { +func (x *MsgSyncController) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSyncVault) ProtoMessage() {} +func (*MsgSyncController) ProtoMessage() {} -// Deprecated: Use MsgSyncVault.ProtoReflect.Descriptor instead. -func (*MsgSyncVault) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgSyncController.ProtoReflect.Descriptor instead. +func (*MsgSyncController) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{6} } -func (x *MsgSyncVault) GetController() string { +func (x *MsgSyncController) GetController() string { if x != nil { return x.Controller } return "" } -func (x *MsgSyncVault) GetToken() *Token { +func (x *MsgSyncController) GetToken() *Token { if x != nil { return x.Token } return nil } -// MsgSyncVaultResponse is the response type for the SyncVault RPC. -type MsgSyncVaultResponse struct { +// MsgSyncControllerResponse is the response type for the SyncController RPC. +type MsgSyncControllerResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -8701,8 +8051,8 @@ type MsgSyncVaultResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` } -func (x *MsgSyncVaultResponse) Reset() { - *x = MsgSyncVaultResponse{} +func (x *MsgSyncControllerResponse) Reset() { + *x = MsgSyncControllerResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8710,18 +8060,18 @@ func (x *MsgSyncVaultResponse) Reset() { } } -func (x *MsgSyncVaultResponse) String() string { +func (x *MsgSyncControllerResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSyncVaultResponse) ProtoMessage() {} +func (*MsgSyncControllerResponse) ProtoMessage() {} -// Deprecated: Use MsgSyncVaultResponse.ProtoReflect.Descriptor instead. -func (*MsgSyncVaultResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgSyncControllerResponse.ProtoReflect.Descriptor instead. +func (*MsgSyncControllerResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{7} } -func (x *MsgSyncVaultResponse) GetSuccess() bool { +func (x *MsgSyncControllerResponse) GetSuccess() bool { if x != nil { return x.Success } @@ -8741,9 +8091,7 @@ type MsgRegisterController struct { // Origin is the origin of the request in wildcard form. Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` // Credential is the list of keyshares to initialize the controller with. - Authentication []*Credential `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` - // token is the macron token to authenticate the operation. - Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + CredentialCreationResponse string `protobuf:"bytes,4,opt,name=credential_creation_response,json=credentialCreationResponse,proto3" json:"credential_creation_response,omitempty"` } func (x *MsgRegisterController) Reset() { @@ -8787,18 +8135,11 @@ func (x *MsgRegisterController) GetOrigin() string { return "" } -func (x *MsgRegisterController) GetAuthentication() []*Credential { +func (x *MsgRegisterController) GetCredentialCreationResponse() string { if x != nil { - return x.Authentication + return x.CredentialCreationResponse } - return nil -} - -func (x *MsgRegisterController) GetToken() *Token { - if x != nil { - return x.Token - } - return nil + return "" } // MsgRegisterControllerResponse is the response type for the InitializeController RPC. @@ -8856,26 +8197,24 @@ func (x *MsgRegisterControllerResponse) GetAccounts() map[string]string { return nil } -// MsgAuthorize is the message type for the Authorize RPC. -type MsgAuthorize struct { +// MsgAuthorizeService is the message type for the AuthorizeService RPC. +type MsgAuthorizeService struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Controller is the address of the controller to authenticate. - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Address is the address to authenticate. - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` // Origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + // Permissions is the scope of the service. + Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` // token is the macron token to authenticate the operation. - Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + Token *Token `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` } -func (x *MsgAuthorize) Reset() { - *x = MsgAuthorize{} +func (x *MsgAuthorizeService) Reset() { + *x = MsgAuthorizeService{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8883,54 +8222,47 @@ func (x *MsgAuthorize) Reset() { } } -func (x *MsgAuthorize) String() string { +func (x *MsgAuthorizeService) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgAuthorize) ProtoMessage() {} +func (*MsgAuthorizeService) ProtoMessage() {} -// Deprecated: Use MsgAuthorize.ProtoReflect.Descriptor instead. -func (*MsgAuthorize) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgAuthorizeService.ProtoReflect.Descriptor instead. +func (*MsgAuthorizeService) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{10} } -func (x *MsgAuthorize) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgAuthorize) GetController() string { +func (x *MsgAuthorizeService) GetController() string { if x != nil { return x.Controller } return "" } -func (x *MsgAuthorize) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *MsgAuthorize) GetOrigin() string { +func (x *MsgAuthorizeService) GetOrigin() string { if x != nil { return x.Origin } return "" } -func (x *MsgAuthorize) GetToken() *Token { +func (x *MsgAuthorizeService) GetScopes() *Permissions { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *MsgAuthorizeService) GetToken() *Token { if x != nil { return x.Token } return nil } -// MsgAuthorizeResponse is the response type for the Authorize RPC. -type MsgAuthorizeResponse struct { +// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC. +type MsgAuthorizeServiceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -8939,8 +8271,8 @@ type MsgAuthorizeResponse struct { Token *Token `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` } -func (x *MsgAuthorizeResponse) Reset() { - *x = MsgAuthorizeResponse{} +func (x *MsgAuthorizeServiceResponse) Reset() { + *x = MsgAuthorizeServiceResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8948,25 +8280,25 @@ func (x *MsgAuthorizeResponse) Reset() { } } -func (x *MsgAuthorizeResponse) String() string { +func (x *MsgAuthorizeServiceResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgAuthorizeResponse) ProtoMessage() {} +func (*MsgAuthorizeServiceResponse) ProtoMessage() {} -// Deprecated: Use MsgAuthorizeResponse.ProtoReflect.Descriptor instead. -func (*MsgAuthorizeResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgAuthorizeServiceResponse.ProtoReflect.Descriptor instead. +func (*MsgAuthorizeServiceResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{11} } -func (x *MsgAuthorizeResponse) GetSuccess() bool { +func (x *MsgAuthorizeServiceResponse) GetSuccess() bool { if x != nil { return x.Success } return false } -func (x *MsgAuthorizeResponse) GetToken() *Token { +func (x *MsgAuthorizeServiceResponse) GetToken() *Token { if x != nil { return x.Token } @@ -8981,18 +8313,10 @@ type MsgRegisterService struct { // authority is the address of the governance account. Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // origin is the origin of the request in wildcard form. - OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - // Permissions is the scope of the service. - Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` - // Description is the description of the service - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // service_endpoints is the endpoints of the service - ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Metadata is optional additional information about the service - Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + // origin is the origin of the request in wildcard form. Requires valid TXT record in DNS. + Service *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` // token is the macron token to authenticate the operation. - Token *Token `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"` + Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } func (x *MsgRegisterService) Reset() { @@ -9022,37 +8346,9 @@ func (x *MsgRegisterService) GetController() string { return "" } -func (x *MsgRegisterService) GetOriginUri() string { +func (x *MsgRegisterService) GetService() *Service { if x != nil { - return x.OriginUri - } - return "" -} - -func (x *MsgRegisterService) GetScopes() *Permissions { - if x != nil { - return x.Scopes - } - return nil -} - -func (x *MsgRegisterService) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *MsgRegisterService) GetServiceEndpoints() map[string]string { - if x != nil { - return x.ServiceEndpoints - } - return nil -} - -func (x *MsgRegisterService) GetMetadata() *Metadata { - if x != nil { - return x.Metadata + return x.Service } return nil } @@ -9141,7 +8437,7 @@ var file_did_v1_tx_proto_rawDesc = []byte{ 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, 0x82, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa0, 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, @@ -9149,158 +8445,141 @@ var file_did_v1_tx_proto_rawDesc = []byte{ 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb4, 0x01, 0x0a, - 0x0f, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 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, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x23, - 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, - 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 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, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x22, 0x7e, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x23, - 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x30, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, - 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0xb4, 0x01, 0x0a, 0x0f, 0x4d, + 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 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, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, + 0x6e, 0x65, 0x73, 0x73, 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, 0x22, 0xea, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 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, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x0e, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, - 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0x81, 0x02, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, + 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 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, - 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 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, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 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, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, - 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x55, 0x0a, 0x14, 0x4d, - 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0xc4, 0x03, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, + 0xcb, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 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, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x63, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x40, 0x0a, 0x1c, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x1a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x0e, 0x82, + 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x81, 0x02, + 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 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, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0xca, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, - 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, - 0x72, 0x69, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x5d, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x64, + 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x06, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, + 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x5c, + 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xaf, 0x01, 0x0a, + 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x29, 0x0a, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, + 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x48, + 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xf8, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, + 0x12, 0x48, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x23, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x69, + 0x64, 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, 0x12, 0x4e, 0x0a, + 0x0e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, + 0x19, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, + 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x1a, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, - 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x64, 0x69, 0x64, 0x32, 0xd4, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, - 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 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, 0x12, 0x3f, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, - 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, - 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x51, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, - 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, - 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x27, 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, - 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, - 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, - 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, + 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 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, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, + 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, + 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, + 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -9315,7 +8594,7 @@ func file_did_v1_tx_proto_rawDescGZIP() []byte { return file_did_v1_tx_proto_rawDescData } -var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_did_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse @@ -9323,53 +8602,48 @@ var file_did_v1_tx_proto_goTypes = []interface{}{ (*MsgAllocateVaultResponse)(nil), // 3: did.v1.MsgAllocateVaultResponse (*MsgProveWitness)(nil), // 4: did.v1.MsgProveWitness (*MsgProveWitnessResponse)(nil), // 5: did.v1.MsgProveWitnessResponse - (*MsgSyncVault)(nil), // 6: did.v1.MsgSyncVault - (*MsgSyncVaultResponse)(nil), // 7: did.v1.MsgSyncVaultResponse + (*MsgSyncController)(nil), // 6: did.v1.MsgSyncController + (*MsgSyncControllerResponse)(nil), // 7: did.v1.MsgSyncControllerResponse (*MsgRegisterController)(nil), // 8: did.v1.MsgRegisterController (*MsgRegisterControllerResponse)(nil), // 9: did.v1.MsgRegisterControllerResponse - (*MsgAuthorize)(nil), // 10: did.v1.MsgAuthorize - (*MsgAuthorizeResponse)(nil), // 11: did.v1.MsgAuthorizeResponse + (*MsgAuthorizeService)(nil), // 10: did.v1.MsgAuthorizeService + (*MsgAuthorizeServiceResponse)(nil), // 11: did.v1.MsgAuthorizeServiceResponse (*MsgRegisterService)(nil), // 12: did.v1.MsgRegisterService (*MsgRegisterServiceResponse)(nil), // 13: did.v1.MsgRegisterServiceResponse nil, // 14: did.v1.MsgRegisterControllerResponse.AccountsEntry - nil, // 15: did.v1.MsgRegisterService.ServiceEndpointsEntry - (*Params)(nil), // 16: did.v1.Params - (*Token)(nil), // 17: did.v1.Token - (*Credential)(nil), // 18: did.v1.Credential - (*Permissions)(nil), // 19: did.v1.Permissions - (*Metadata)(nil), // 20: did.v1.Metadata + (*Params)(nil), // 15: did.v1.Params + (*Token)(nil), // 16: did.v1.Token + (*Permissions)(nil), // 17: did.v1.Permissions + (*Service)(nil), // 18: did.v1.Service } var file_did_v1_tx_proto_depIdxs = []int32{ - 16, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params - 17, // 1: did.v1.MsgUpdateParams.token:type_name -> did.v1.Token - 17, // 2: did.v1.MsgProveWitness.token:type_name -> did.v1.Token - 17, // 3: did.v1.MsgSyncVault.token:type_name -> did.v1.Token - 18, // 4: did.v1.MsgRegisterController.authentication:type_name -> did.v1.Credential - 17, // 5: did.v1.MsgRegisterController.token:type_name -> did.v1.Token - 14, // 6: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry - 17, // 7: did.v1.MsgAuthorize.token:type_name -> did.v1.Token - 17, // 8: did.v1.MsgAuthorizeResponse.token:type_name -> did.v1.Token - 19, // 9: did.v1.MsgRegisterService.scopes:type_name -> did.v1.Permissions - 15, // 10: did.v1.MsgRegisterService.service_endpoints:type_name -> did.v1.MsgRegisterService.ServiceEndpointsEntry - 20, // 11: did.v1.MsgRegisterService.metadata:type_name -> did.v1.Metadata - 17, // 12: did.v1.MsgRegisterService.token:type_name -> did.v1.Token - 0, // 13: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams - 10, // 14: did.v1.Msg.Authorize:input_type -> did.v1.MsgAuthorize - 2, // 15: did.v1.Msg.AllocateVault:input_type -> did.v1.MsgAllocateVault - 6, // 16: did.v1.Msg.SyncVault:input_type -> did.v1.MsgSyncVault - 8, // 17: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController - 12, // 18: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService - 1, // 19: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse - 11, // 20: did.v1.Msg.Authorize:output_type -> did.v1.MsgAuthorizeResponse - 3, // 21: did.v1.Msg.AllocateVault:output_type -> did.v1.MsgAllocateVaultResponse - 7, // 22: did.v1.Msg.SyncVault:output_type -> did.v1.MsgSyncVaultResponse - 9, // 23: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse - 13, // 24: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse - 19, // [19:25] is the sub-list for method output_type - 13, // [13:19] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 15, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params + 16, // 1: did.v1.MsgUpdateParams.token:type_name -> did.v1.Token + 16, // 2: did.v1.MsgProveWitness.token:type_name -> did.v1.Token + 16, // 3: did.v1.MsgSyncController.token:type_name -> did.v1.Token + 14, // 4: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry + 17, // 5: did.v1.MsgAuthorizeService.scopes:type_name -> did.v1.Permissions + 16, // 6: did.v1.MsgAuthorizeService.token:type_name -> did.v1.Token + 16, // 7: did.v1.MsgAuthorizeServiceResponse.token:type_name -> did.v1.Token + 18, // 8: did.v1.MsgRegisterService.service:type_name -> did.v1.Service + 16, // 9: did.v1.MsgRegisterService.token:type_name -> did.v1.Token + 0, // 10: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams + 10, // 11: did.v1.Msg.AuthorizeService:input_type -> did.v1.MsgAuthorizeService + 2, // 12: did.v1.Msg.AllocateVault:input_type -> did.v1.MsgAllocateVault + 6, // 13: did.v1.Msg.SyncController:input_type -> did.v1.MsgSyncController + 8, // 14: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController + 12, // 15: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService + 1, // 16: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse + 11, // 17: did.v1.Msg.AuthorizeService:output_type -> did.v1.MsgAuthorizeServiceResponse + 3, // 18: did.v1.Msg.AllocateVault:output_type -> did.v1.MsgAllocateVaultResponse + 7, // 19: did.v1.Msg.SyncController:output_type -> did.v1.MsgSyncControllerResponse + 9, // 20: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse + 13, // 21: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse + 16, // [16:22] is the sub-list for method output_type + 10, // [10:16] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_did_v1_tx_proto_init() } @@ -9453,7 +8727,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSyncVault); i { + switch v := v.(*MsgSyncController); i { case 0: return &v.state case 1: @@ -9465,7 +8739,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSyncVaultResponse); i { + switch v := v.(*MsgSyncControllerResponse); i { case 0: return &v.state case 1: @@ -9501,7 +8775,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAuthorize); i { + switch v := v.(*MsgAuthorizeService); i { case 0: return &v.state case 1: @@ -9513,7 +8787,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAuthorizeResponse); i { + switch v := v.(*MsgAuthorizeServiceResponse); i { case 0: return &v.state case 1: @@ -9555,7 +8829,7 @@ func file_did_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 16, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/tx_grpc.pb.go b/api/did/v1/tx_grpc.pb.go index e636df6bb..d7f85dee2 100644 --- a/api/did/v1/tx_grpc.pb.go +++ b/api/did/v1/tx_grpc.pb.go @@ -20,9 +20,9 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" - Msg_Authorize_FullMethodName = "/did.v1.Msg/Authorize" + Msg_AuthorizeService_FullMethodName = "/did.v1.Msg/AuthorizeService" Msg_AllocateVault_FullMethodName = "/did.v1.Msg/AllocateVault" - Msg_SyncVault_FullMethodName = "/did.v1.Msg/SyncVault" + Msg_SyncController_FullMethodName = "/did.v1.Msg/SyncController" Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService" ) @@ -35,13 +35,13 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // Authorize asserts the given controller is the owner of the given address. - Authorize(ctx context.Context, in *MsgAuthorize, opts ...grpc.CallOption) (*MsgAuthorizeResponse, error) + // AuthorizeService asserts the given controller is the owner of the given address. + AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) // 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) - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) + // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. + SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -65,9 +65,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) Authorize(ctx context.Context, in *MsgAuthorize, opts ...grpc.CallOption) (*MsgAuthorizeResponse, error) { - out := new(MsgAuthorizeResponse) - err := c.cc.Invoke(ctx, Msg_Authorize_FullMethodName, in, out, opts...) +func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) { + out := new(MsgAuthorizeServiceResponse) + err := c.cc.Invoke(ctx, Msg_AuthorizeService_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -83,9 +83,9 @@ func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opt return out, nil } -func (c *msgClient) SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) { - out := new(MsgSyncVaultResponse) - err := c.cc.Invoke(ctx, Msg_SyncVault_FullMethodName, in, out, opts...) +func (c *msgClient) SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) { + out := new(MsgSyncControllerResponse) + err := c.cc.Invoke(ctx, Msg_SyncController_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -118,13 +118,13 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // Authorize asserts the given controller is the owner of the given address. - Authorize(context.Context, *MsgAuthorize) (*MsgAuthorizeResponse, error) + // AuthorizeService asserts the given controller is the owner of the given address. + AuthorizeService(context.Context, *MsgAuthorizeService) (*MsgAuthorizeServiceResponse, error) // 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) - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) + // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. + SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -139,14 +139,14 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (UnimplementedMsgServer) Authorize(context.Context, *MsgAuthorize) (*MsgAuthorizeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authorize not implemented") +func (UnimplementedMsgServer) AuthorizeService(context.Context, *MsgAuthorizeService) (*MsgAuthorizeServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthorizeService not implemented") } func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented") } -func (UnimplementedMsgServer) SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncVault not implemented") +func (UnimplementedMsgServer) SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncController not implemented") } func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") @@ -185,20 +185,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_Authorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthorize) +func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAuthorizeService) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).Authorize(ctx, in) + return srv.(MsgServer).AuthorizeService(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_Authorize_FullMethodName, + FullMethod: Msg_AuthorizeService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Authorize(ctx, req.(*MsgAuthorize)) + return srv.(MsgServer).AuthorizeService(ctx, req.(*MsgAuthorizeService)) } return interceptor(ctx, in, info, handler) } @@ -221,20 +221,20 @@ func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_SyncVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSyncVault) +func _Msg_SyncController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSyncController) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SyncVault(ctx, in) + return srv.(MsgServer).SyncController(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_SyncVault_FullMethodName, + FullMethod: Msg_SyncController_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SyncVault(ctx, req.(*MsgSyncVault)) + return srv.(MsgServer).SyncController(ctx, req.(*MsgSyncController)) } return interceptor(ctx, in, info, handler) } @@ -287,16 +287,16 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateParams_Handler, }, { - MethodName: "Authorize", - Handler: _Msg_Authorize_Handler, + MethodName: "AuthorizeService", + Handler: _Msg_AuthorizeService_Handler, }, { MethodName: "AllocateVault", Handler: _Msg_AllocateVault_Handler, }, { - MethodName: "SyncVault", - Handler: _Msg_SyncVault_Handler, + MethodName: "SyncController", + Handler: _Msg_SyncController_Handler, }, { MethodName: "RegisterController", diff --git a/api/oracle/module/v1/module.pulsar.go b/api/oracle/module/v1/module.pulsar.go deleted file mode 100644 index 1fee45c67..000000000 --- a/api/oracle/module/v1/module.pulsar.go +++ /dev/null @@ -1,504 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package modulev1 - -import ( - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Module protoreflect.MessageDescriptor -) - -func init() { - file_oracle_module_v1_module_proto_init() - md_Module = File_oracle_module_v1_module_proto.Messages().ByName("Module") -} - -var _ protoreflect.Message = (*fastReflection_Module)(nil) - -type fastReflection_Module Module - -func (x *Module) ProtoReflect() protoreflect.Message { - return (*fastReflection_Module)(x) -} - -func (x *Module) slowProtoReflect() protoreflect.Message { - mi := &file_oracle_module_v1_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Module_messageType fastReflection_Module_messageType -var _ protoreflect.MessageType = fastReflection_Module_messageType{} - -type fastReflection_Module_messageType struct{} - -func (x fastReflection_Module_messageType) Zero() protoreflect.Message { - return (*fastReflection_Module)(nil) -} -func (x fastReflection_Module_messageType) New() protoreflect.Message { - return new(fastReflection_Module) -} -func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Module) Type() protoreflect.MessageType { - return _fastReflection_Module_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Module) New() protoreflect.Message { - return new(fastReflection_Module) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { - return (*Module)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) - } - panic(fmt.Errorf("message onsonr.sonr.oracle.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) - } - panic(fmt.Errorf("message onsonr.sonr.oracle.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) - } - panic(fmt.Errorf("message onsonr.sonr.oracle.module.v1.Module does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) - } - panic(fmt.Errorf("message onsonr.sonr.oracle.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) - } - panic(fmt.Errorf("message onsonr.sonr.oracle.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) - } - panic(fmt.Errorf("message onsonr.sonr.oracle.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.oracle.module.v1.Module", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Module) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: oracle/module/v1/module.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Module is the app config object of the module. -// Learn more: https://docs.cosmos.network/main/building-modules/depinject -type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Module) Reset() { - *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_oracle_module_v1_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Module) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Module) ProtoMessage() {} - -// Deprecated: Use Module.ProtoReflect.Descriptor instead. -func (*Module) Descriptor() ([]byte, []int) { - return file_oracle_module_v1_module_proto_rawDescGZIP(), []int{0} -} - -var File_oracle_module_v1_module_proto protoreflect.FileDescriptor - -var file_oracle_module_v1_module_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1c, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x6f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, - 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, - 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xfa, 0x01, 0x0a, 0x20, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 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, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x53, 0x4f, 0x4d, 0xaa, 0x02, 0x1c, 0x4f, 0x6e, 0x73, - 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x6f, 0x6e, 0x72, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1c, 0x4f, 0x6e, 0x73, 0x6f, - 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x28, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, - 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53, 0x6f, - 0x6e, 0x72, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_oracle_module_v1_module_proto_rawDescOnce sync.Once - file_oracle_module_v1_module_proto_rawDescData = file_oracle_module_v1_module_proto_rawDesc -) - -func file_oracle_module_v1_module_proto_rawDescGZIP() []byte { - file_oracle_module_v1_module_proto_rawDescOnce.Do(func() { - file_oracle_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_module_v1_module_proto_rawDescData) - }) - return file_oracle_module_v1_module_proto_rawDescData -} - -var file_oracle_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_oracle_module_v1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: onsonr.sonr.oracle.module.v1.Module -} -var file_oracle_module_v1_module_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_oracle_module_v1_module_proto_init() } -func file_oracle_module_v1_module_proto_init() { - if File_oracle_module_v1_module_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_oracle_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_oracle_module_v1_module_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_oracle_module_v1_module_proto_goTypes, - DependencyIndexes: file_oracle_module_v1_module_proto_depIdxs, - MessageInfos: file_oracle_module_v1_module_proto_msgTypes, - }.Build() - File_oracle_module_v1_module_proto = out.File - file_oracle_module_v1_module_proto_rawDesc = nil - file_oracle_module_v1_module_proto_goTypes = nil - file_oracle_module_v1_module_proto_depIdxs = nil -} diff --git a/api/oracle/v1/genesis.pulsar.go b/api/oracle/v1/genesis.pulsar.go deleted file mode 100644 index 447e1f22a..000000000 --- a/api/oracle/v1/genesis.pulsar.go +++ /dev/null @@ -1,493 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package oraclev1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GenesisState protoreflect.MessageDescriptor -) - -func init() { - file_oracle_v1_genesis_proto_init() - md_GenesisState = File_oracle_v1_genesis_proto.Messages().ByName("GenesisState") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_oracle_v1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) - } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) - } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) - } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) - } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) - } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) - } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in oracle.v1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: oracle/v1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the middlewares genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_oracle_v1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_oracle_v1_genesis_proto_rawDescGZIP(), []int{0} -} - -var File_oracle_v1_genesis_proto protoreflect.FileDescriptor - -var file_oracle_v1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x91, 0x01, 0x0a, 0x0d, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 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, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, - 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, - 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, - 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_oracle_v1_genesis_proto_rawDescOnce sync.Once - file_oracle_v1_genesis_proto_rawDescData = file_oracle_v1_genesis_proto_rawDesc -) - -func file_oracle_v1_genesis_proto_rawDescGZIP() []byte { - file_oracle_v1_genesis_proto_rawDescOnce.Do(func() { - file_oracle_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_genesis_proto_rawDescData) - }) - return file_oracle_v1_genesis_proto_rawDescData -} - -var file_oracle_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_oracle_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: oracle.v1.GenesisState -} -var file_oracle_v1_genesis_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_oracle_v1_genesis_proto_init() } -func file_oracle_v1_genesis_proto_init() { - if File_oracle_v1_genesis_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_oracle_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_oracle_v1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_oracle_v1_genesis_proto_goTypes, - DependencyIndexes: file_oracle_v1_genesis_proto_depIdxs, - MessageInfos: file_oracle_v1_genesis_proto_msgTypes, - }.Build() - File_oracle_v1_genesis_proto = out.File - file_oracle_v1_genesis_proto_rawDesc = nil - file_oracle_v1_genesis_proto_goTypes = nil - file_oracle_v1_genesis_proto_depIdxs = nil -} diff --git a/api/oracle/v1/query.pulsar.go b/api/oracle/v1/query.pulsar.go deleted file mode 100644 index 7d3fc5ce9..000000000 --- a/api/oracle/v1/query.pulsar.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package oraclev1 - -import ( - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: oracle/v1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_oracle_v1_query_proto protoreflect.FileDescriptor - -var file_oracle_v1_query_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, - 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x8f, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 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, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, - 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, - 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var file_oracle_v1_query_proto_goTypes = []interface{}{} -var file_oracle_v1_query_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_oracle_v1_query_proto_init() } -func file_oracle_v1_query_proto_init() { - if File_oracle_v1_query_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_oracle_v1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_oracle_v1_query_proto_goTypes, - DependencyIndexes: file_oracle_v1_query_proto_depIdxs, - }.Build() - File_oracle_v1_query_proto = out.File - file_oracle_v1_query_proto_rawDesc = nil - file_oracle_v1_query_proto_goTypes = nil - file_oracle_v1_query_proto_depIdxs = nil -} diff --git a/api/oracle/v1/tx.pulsar.go b/api/oracle/v1/tx.pulsar.go deleted file mode 100644 index 39a948648..000000000 --- a/api/oracle/v1/tx.pulsar.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package oraclev1 - -import ( - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: oracle/v1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_oracle_v1_tx_proto protoreflect.FileDescriptor - -var file_oracle_v1_tx_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, - 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x8c, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x2d, 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, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_oracle_v1_tx_proto_goTypes = []interface{}{} -var file_oracle_v1_tx_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_oracle_v1_tx_proto_init() } -func file_oracle_v1_tx_proto_init() { - if File_oracle_v1_tx_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_oracle_v1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_oracle_v1_tx_proto_goTypes, - DependencyIndexes: file_oracle_v1_tx_proto_depIdxs, - }.Build() - File_oracle_v1_tx_proto = out.File - file_oracle_v1_tx_proto_rawDesc = nil - file_oracle_v1_tx_proto_goTypes = nil - file_oracle_v1_tx_proto_depIdxs = nil -} diff --git a/app/app.go b/app/app.go index 4b869ce18..77134f700 100644 --- a/app/app.go +++ b/app/app.go @@ -148,9 +148,6 @@ import ( did "github.com/onsonr/sonr/x/did" didkeeper "github.com/onsonr/sonr/x/did/keeper" didtypes "github.com/onsonr/sonr/x/did/types" - oracle "github.com/onsonr/sonr/x/oracle" - oraclekeeper "github.com/onsonr/sonr/x/oracle/keeper" - oracletypes "github.com/onsonr/sonr/x/oracle/types" ) const appName = "sonr" @@ -220,7 +217,6 @@ type SonrApp struct { NFTKeeper nftkeeper.Keeper AuthzKeeper authzkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper - OracleKeeper oraclekeeper.Keeper interfaceRegistry types.InterfaceRegistry txConfig client.TxConfig appCodec codec.Codec @@ -361,7 +357,6 @@ func NewChainApp( poa.StoreKey, globalfeetypes.StoreKey, packetforwardtypes.StoreKey, - oracletypes.StoreKey, didtypes.StoreKey, ) @@ -621,13 +616,6 @@ func NewChainApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - // Create the oracle Middleware Keeper - app.OracleKeeper = oraclekeeper.NewKeeper( - appCodec, - app.MsgServiceRouter(), - app.IBCKeeper.ChannelKeeper, - ) - // Create the globalfee keeper app.GlobalFeeKeeper = globalfeekeeper.NewKeeper( appCodec, @@ -883,7 +871,6 @@ func NewChainApp( app.PacketForwardKeeper, app.GetSubspace(packetforwardtypes.ModuleName), ), - oracle.NewAppModule(app.OracleKeeper), did.NewAppModule(appCodec, app.DidKeeper), ) @@ -933,7 +920,6 @@ func NewChainApp( ibcfeetypes.ModuleName, tokenfactorytypes.ModuleName, packetforwardtypes.ModuleName, - oracletypes.ModuleName, didtypes.ModuleName, ) @@ -953,7 +939,6 @@ func NewChainApp( ibcfeetypes.ModuleName, tokenfactorytypes.ModuleName, packetforwardtypes.ModuleName, - oracletypes.ModuleName, didtypes.ModuleName, ) @@ -982,7 +967,6 @@ func NewChainApp( tokenfactorytypes.ModuleName, globalfeetypes.ModuleName, packetforwardtypes.ModuleName, - oracletypes.ModuleName, didtypes.ModuleName, } app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) @@ -1440,7 +1424,6 @@ func initParamsKeeper( paramsKeeper.Subspace(globalfee.ModuleName) paramsKeeper.Subspace(packetforwardtypes.ModuleName). WithKeyTable(packetforwardtypes.ParamKeyTable()) - paramsKeeper.Subspace(oracletypes.ModuleName) paramsKeeper.Subspace(didtypes.ModuleName) return paramsKeeper diff --git a/app/local.go b/app/local.go deleted file mode 100644 index 830a8d751..000000000 --- a/app/local.go +++ /dev/null @@ -1,37 +0,0 @@ -package app - -import ( - "github.com/ipfs/kubo/client/rpc" -) - -var ( - ChainID = "testnet" - ValAddr = "val1" -) - -// Initialize initializes the local configuration values -func init() { - -} - -// SetLocalContextSessionID sets the session ID for the local context -func SetLocalValidatorAddress(address string) { - ValAddr = address -} - -// SetLocalContextChainID sets the chain ID for the local -func SetLocalChainID(id string) { - ChainID = id -} - -// IPFSClient is an interface for interacting with an IPFS node. -type IPFSClient = *rpc.HttpApi - -// NewLocalClient creates a new IPFS client that connects to the local IPFS node. -func GetIPFSClient() (IPFSClient, error) { - rpcClient, err := rpc.NewLocalApi() - if err != nil { - return nil, err - } - return rpcClient, nil -} diff --git a/app/upgrades.go b/app/upgrades.go index a613b29d1..9855cab2e 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -22,6 +22,7 @@ func (app *SonrApp) RegisterUpgradeHandlers() { keepers := upgrades.AppKeepers{ AccountKeeper: &app.AccountKeeper, + DidKeeper: &app.DidKeeper, ParamsKeeper: &app.ParamsKeeper, ConsensusParamsKeeper: &app.ConsensusParamsKeeper, CapabilityKeeper: app.CapabilityKeeper, diff --git a/app/upgrades/types.go b/app/upgrades/types.go index 2ff71ce63..cd7d199ca 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -14,10 +14,12 @@ import ( authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" + didkeeper "github.com/onsonr/sonr/x/did/keeper" ) type AppKeepers struct { AccountKeeper *authkeeper.AccountKeeper + DidKeeper *didkeeper.Keeper ParamsKeeper *paramskeeper.Keeper ConsensusParamsKeeper *consensusparamkeeper.Keeper Codec codec.Codec diff --git a/cmd/dwn/index.templ b/cmd/dwn/index.templ deleted file mode 100644 index 39ad31172..000000000 --- a/cmd/dwn/index.templ +++ /dev/null @@ -1,28 +0,0 @@ -package main - -templ VaultIndex() { - - - - - - Sonr Vault - - - -

Sonr Vault

- - -} diff --git a/cmd/dwn/main.go b/cmd/dwn/main.go index 4f6f9d31c..a18dc86b4 100644 --- a/cmd/dwn/main.go +++ b/cmd/dwn/main.go @@ -7,37 +7,112 @@ import ( "errors" "github.com/labstack/echo/v4" - wasmhttp "github.com/nlepage/go-wasm-http-server" + "github.com/onsonr/sonr/internal/vfs/wasm" + "github.com/donseba/go-htmx" "github.com/onsonr/sonr/internal/db" ) -var edb *db.DB +var dwn *DWN -func main() { - // Initialize the database - initDB() - - e := echo.New() - e.POST("/api/insert/:account/:address", itemsHandler) - wasmhttp.Serve(e) +type DWN struct { + *echo.Echo + DB *db.DB + Htmx *htmx.HTMX } -func initDB() { - var err error - edb, err = db.Open(db.New()) +func main() { + dwn = initRails() + + dwn.GET("/", htmxHandler) + dwn.POST("/accounts", accountsHandler) + + wasm.Serve(dwn.Echo) +} + +// initRails initializes the Rails application +func initRails() *DWN { + // Open the database + cnfg := db.New() + db, err := cnfg.Open() if err != nil { panic(err.Error()) } + + // Initialize the htmx handler + return &DWN{ + Echo: echo.New(), + DB: db, + Htmx: htmx.New(), + } } -func itemsHandler(e echo.Context) error { +func accountsHandler(e echo.Context) error { switch e.Request().Method { case "GET": - case "POST": - edb.AddAccount(e.Param("account"), e.Param("address")) + case "PUT": + // dwn.DB.AddAccount(e.Param("account"), e.Param("address")) default: e.Error(errors.New("Method not allowed")) } return e.JSON(200, "OK") } + +func htmxHandler(e echo.Context) error { + // initiate a new htmx handler + h := dwn.Htmx.NewHandler(e.Response(), e.Request()) + + // check if the request is a htmx request + if h.IsHxRequest() { + // do something + } + + // check if the request is boosted + if h.IsHxBoosted() { + // do something + } + + // check if the request is a history restore request + if h.IsHxHistoryRestoreRequest() { + // do something + } + + // check if the request is a prompt request + if h.RenderPartial() { + // do something + } + + // set the headers for the response, see docs for more options + h.PushURL("http://push.url") + h.ReTarget("#ReTarged") + + // write the output like you normally do. + // check the inspector tool in the browser to see that the headers are set. + _, err := h.Write([]byte("OK")) + return err +} + +// +// func credentialsHandler(e echo.Context) error { +// switch e.Request().Method { +// case "GET": +// dwn.DB.GetCredentials(e.Param("account")) +// case "PUT": +// dwn.DB.AddCredentials(e.Param("account"), e.Param("address")) +// default: +// e.Error(errors.New("Method not allowed")) +// } +// return e.JSON(200, "OK") +// } +// +// func keysharesHandler(e echo.Context) error { +// switch e.Request().Method { +// case "GET": +// dwn.DB.GetKeyshares(e.Param("account")) +// case "PUT": +// dwn.DB.AddKeyshares(e.Param("account"), e.Param("address")) +// default: +// e.Error(errors.New("Method not allowed")) +// } +// return e.JSON(200, "OK") +// } diff --git a/cmd/sonrd/root.go b/cmd/sonrd/root.go index 9c0d5af24..e2b7e32fb 100644 --- a/cmd/sonrd/root.go +++ b/cmd/sonrd/root.go @@ -95,8 +95,8 @@ func NewRootCmd() *cobra.Command { } // Set the context chain ID and validator address - app.SetLocalChainID(initClientCtx.ChainID) - app.SetLocalValidatorAddress(initClientCtx.FromAddress.String()) + // app.SetLocalChainID(initClientCtx.ChainID) + // app.SetLocalValidatorAddress(initClientCtx.FromAddress.String()) customAppTemplate, customAppConfig := initAppConfig() customCMTConfig := initCometBFTConfig() diff --git a/devbox.json b/devbox.json index ddf90b9b0..037e9c12e 100644 --- a/devbox.json +++ b/devbox.json @@ -3,11 +3,11 @@ "packages": [ "go@1.22", "templ@latest", - "commitizen@latest", - "goreleaser@latest", "go-task@latest", + "templ@latest", "bun@latest", - "ipfs-cluster@latest" + "ipfs-cluster@latest", + "air@latest" ], "env": { "GOPATH": "$HOME/go", @@ -20,25 +20,33 @@ }, "shell": { "scripts": { - "init": [ - "make install", - "sh ./scripts/test_node.sh" - ], - "gen": [ - "make proto-gen", - "make templ", - "make dwn" + "install": [ + "make install" ], "build": [ "make build", "make local-image" ], - "testnet": [ - "make install", - "devbox services up" + "build:dwn": [ + "templ generate", + "make dwn" ], - "pkl-eval": [ - "bunx pkl eval ./pkl/msgs.pkl" + "build:motr": [ + "templ generate", + "make motr" + ], + "gen:proto": [ + "make proto-gen" + ], + "gen:pkl": [ + "go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/orm.pkl", + "go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/txns.pkl" + ], + "dev": [ + "air" + ], + "testnet": [ + "devbox services up" ] } } diff --git a/docker-compose.yaml b/docker-compose.yaml index 1fc1bfe15..9b7687ed8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,7 +6,7 @@ services: context: . dockerfile: Dockerfile volumes: - - /home/prad/.sonr:/root/.sonr + - /home/prad/.scnr:/root/.sonr ports: - "26657:26657" - "1317:1317" diff --git a/gen/vault/Account.pkl.go b/gen/vault/Account.pkl.go deleted file mode 100644 index f893ef200..000000000 --- a/gen/vault/Account.pkl.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -import "github.com/apple/pkl-go/pkl" - -type Account interface { - Model - - GetId() uint - - GetName() string - - GetAddress() string - - GetPublicKey() *pkl.Object - - GetCreatedAt() *string -} - -var _ Account = (*AccountImpl)(nil) - -type AccountImpl struct { - Table string `pkl:"table"` - - Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"` - - Name string `pkl:"name" json:"name,omitempty"` - - Address string `pkl:"address" json:"address,omitempty"` - - PublicKey *pkl.Object `pkl:"publicKey" json:"publicKey,omitempty"` - - CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` -} - -func (rcv *AccountImpl) GetTable() string { - return rcv.Table -} - -func (rcv *AccountImpl) GetId() uint { - return rcv.Id -} - -func (rcv *AccountImpl) GetName() string { - return rcv.Name -} - -func (rcv *AccountImpl) GetAddress() string { - return rcv.Address -} - -func (rcv *AccountImpl) GetPublicKey() *pkl.Object { - return rcv.PublicKey -} - -func (rcv *AccountImpl) GetCreatedAt() *string { - return rcv.CreatedAt -} diff --git a/gen/vault/Asset.pkl.go b/gen/vault/Asset.pkl.go deleted file mode 100644 index cc2571131..000000000 --- a/gen/vault/Asset.pkl.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type Asset interface { - Model - - GetId() uint - - GetName() string - - GetSymbol() string - - GetDecimals() int - - GetChainId() *int - - GetCreatedAt() *string -} - -var _ Asset = (*AssetImpl)(nil) - -type AssetImpl struct { - Table string `pkl:"table"` - - Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"` - - Name string `pkl:"name" json:"name,omitempty"` - - Symbol string `pkl:"symbol" json:"symbol,omitempty"` - - Decimals int `pkl:"decimals" json:"decimals,omitempty"` - - ChainId *int `pkl:"chainId" json:"chainId,omitempty"` - - CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` -} - -func (rcv *AssetImpl) GetTable() string { - return rcv.Table -} - -func (rcv *AssetImpl) GetId() uint { - return rcv.Id -} - -func (rcv *AssetImpl) GetName() string { - return rcv.Name -} - -func (rcv *AssetImpl) GetSymbol() string { - return rcv.Symbol -} - -func (rcv *AssetImpl) GetDecimals() int { - return rcv.Decimals -} - -func (rcv *AssetImpl) GetChainId() *int { - return rcv.ChainId -} - -func (rcv *AssetImpl) GetCreatedAt() *string { - return rcv.CreatedAt -} diff --git a/gen/vault/Chain.pkl.go b/gen/vault/Chain.pkl.go deleted file mode 100644 index fe4ce4bc3..000000000 --- a/gen/vault/Chain.pkl.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type Chain interface { - Model - - GetId() uint - - GetName() string - - GetNetworkId() string - - GetCreatedAt() *string -} - -var _ Chain = (*ChainImpl)(nil) - -type ChainImpl struct { - Table string `pkl:"table"` - - Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"` - - Name string `pkl:"name" json:"name,omitempty"` - - NetworkId string `pkl:"networkId" json:"networkId,omitempty"` - - CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` -} - -func (rcv *ChainImpl) GetTable() string { - return rcv.Table -} - -func (rcv *ChainImpl) GetId() uint { - return rcv.Id -} - -func (rcv *ChainImpl) GetName() string { - return rcv.Name -} - -func (rcv *ChainImpl) GetNetworkId() string { - return rcv.NetworkId -} - -func (rcv *ChainImpl) GetCreatedAt() *string { - return rcv.CreatedAt -} diff --git a/gen/vault/Client.pkl.go b/gen/vault/Client.pkl.go deleted file mode 100644 index 1ed8f886e..000000000 --- a/gen/vault/Client.pkl.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type Client interface { - GetChainId() string - - GetKeyringBackend() string - - GetOutput() string - - GetNode() string - - GetBroadcastMode() string - - GetApiUrl() string - - GetAddressPrefix() string -} diff --git a/gen/vault/Credential.pkl.go b/gen/vault/Credential.pkl.go deleted file mode 100644 index 8570c89e9..000000000 --- a/gen/vault/Credential.pkl.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -import "github.com/apple/pkl-go/pkl" - -type Credential interface { - Model - - GetId() uint - - GetSubject() string - - GetController() string - - GetAttestationType() string - - GetOrigin() string - - GetCredentialId() *pkl.Object - - GetPublicKey() *pkl.Object - - GetTransport() string - - GetSignCount() uint - - GetUserPresent() bool - - GetUserVerified() bool - - GetBackupEligible() bool - - GetBackupState() bool - - GetCloneWarning() bool - - GetCreatedAt() *string - - GetUpdatedAt() *string -} - -var _ Credential = (*CredentialImpl)(nil) - -type CredentialImpl struct { - Table string `pkl:"table"` - - Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"` - - Subject string `pkl:"subject" json:"subject,omitempty"` - - Controller string `pkl:"controller" json:"controller,omitempty"` - - AttestationType string `pkl:"attestationType" json:"attestationType,omitempty"` - - Origin string `pkl:"origin" json:"origin,omitempty"` - - CredentialId *pkl.Object `pkl:"credentialId" json:"credentialId,omitempty"` - - PublicKey *pkl.Object `pkl:"publicKey" json:"publicKey,omitempty"` - - Transport string `pkl:"transport" json:"transport,omitempty"` - - SignCount uint `pkl:"signCount" json:"signCount,omitempty"` - - UserPresent bool `pkl:"userPresent" json:"userPresent,omitempty"` - - UserVerified bool `pkl:"userVerified" json:"userVerified,omitempty"` - - BackupEligible bool `pkl:"backupEligible" json:"backupEligible,omitempty"` - - BackupState bool `pkl:"backupState" json:"backupState,omitempty"` - - CloneWarning bool `pkl:"cloneWarning" json:"cloneWarning,omitempty"` - - CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` - - UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"` -} - -func (rcv *CredentialImpl) GetTable() string { - return rcv.Table -} - -func (rcv *CredentialImpl) GetId() uint { - return rcv.Id -} - -func (rcv *CredentialImpl) GetSubject() string { - return rcv.Subject -} - -func (rcv *CredentialImpl) GetController() string { - return rcv.Controller -} - -func (rcv *CredentialImpl) GetAttestationType() string { - return rcv.AttestationType -} - -func (rcv *CredentialImpl) GetOrigin() string { - return rcv.Origin -} - -func (rcv *CredentialImpl) GetCredentialId() *pkl.Object { - return rcv.CredentialId -} - -func (rcv *CredentialImpl) GetPublicKey() *pkl.Object { - return rcv.PublicKey -} - -func (rcv *CredentialImpl) GetTransport() string { - return rcv.Transport -} - -func (rcv *CredentialImpl) GetSignCount() uint { - return rcv.SignCount -} - -func (rcv *CredentialImpl) GetUserPresent() bool { - return rcv.UserPresent -} - -func (rcv *CredentialImpl) GetUserVerified() bool { - return rcv.UserVerified -} - -func (rcv *CredentialImpl) GetBackupEligible() bool { - return rcv.BackupEligible -} - -func (rcv *CredentialImpl) GetBackupState() bool { - return rcv.BackupState -} - -func (rcv *CredentialImpl) GetCloneWarning() bool { - return rcv.CloneWarning -} - -func (rcv *CredentialImpl) GetCreatedAt() *string { - return rcv.CreatedAt -} - -func (rcv *CredentialImpl) GetUpdatedAt() *string { - return rcv.UpdatedAt -} diff --git a/gen/vault/DB.pkl.go b/gen/vault/DB.pkl.go deleted file mode 100644 index 41e93d601..000000000 --- a/gen/vault/DB.pkl.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type DB interface { - GetFilename() string -} diff --git a/gen/vault/Ipfs.pkl.go b/gen/vault/Ipfs.pkl.go deleted file mode 100644 index 00339ca55..000000000 --- a/gen/vault/Ipfs.pkl.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type Ipfs struct { - ResolverUrl string `pkl:"resolverUrl"` - - IpfsMountPath string `pkl:"ipfsMountPath"` - - IpnsMountPath string `pkl:"ipnsMountPath"` -} diff --git a/gen/vault/Keyshare.pkl.go b/gen/vault/Keyshare.pkl.go deleted file mode 100644 index c134fffa3..000000000 --- a/gen/vault/Keyshare.pkl.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -import "github.com/apple/pkl-go/pkl" - -type Keyshare interface { - Model - - GetId() uint - - GetMetadata() string - - GetPayloads() string - - GetProtocol() string - - GetPublicKey() *pkl.Object - - GetRole() int - - GetVersion() int - - GetCreatedAt() *string -} - -var _ Keyshare = (*KeyshareImpl)(nil) - -type KeyshareImpl struct { - Table string `pkl:"table"` - - Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"` - - Metadata string `pkl:"metadata" json:"metadata,omitempty"` - - Payloads string `pkl:"payloads" json:"payloads,omitempty"` - - Protocol string `pkl:"protocol" json:"protocol,omitempty"` - - PublicKey *pkl.Object `pkl:"publicKey" json:"publicKey,omitempty"` - - Role int `pkl:"role" json:"role,omitempty"` - - Version int `pkl:"version" json:"version,omitempty"` - - CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` -} - -func (rcv *KeyshareImpl) GetTable() string { - return rcv.Table -} - -func (rcv *KeyshareImpl) GetId() uint { - return rcv.Id -} - -func (rcv *KeyshareImpl) GetMetadata() string { - return rcv.Metadata -} - -func (rcv *KeyshareImpl) GetPayloads() string { - return rcv.Payloads -} - -func (rcv *KeyshareImpl) GetProtocol() string { - return rcv.Protocol -} - -func (rcv *KeyshareImpl) GetPublicKey() *pkl.Object { - return rcv.PublicKey -} - -func (rcv *KeyshareImpl) GetRole() int { - return rcv.Role -} - -func (rcv *KeyshareImpl) GetVersion() int { - return rcv.Version -} - -func (rcv *KeyshareImpl) GetCreatedAt() *string { - return rcv.CreatedAt -} diff --git a/gen/vault/Model.pkl.go b/gen/vault/Model.pkl.go deleted file mode 100644 index 6f57ffe7d..000000000 --- a/gen/vault/Model.pkl.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type Model interface { - GetTable() string -} diff --git a/gen/vault/Permission.pkl.go b/gen/vault/Permission.pkl.go deleted file mode 100644 index a72127f1e..000000000 --- a/gen/vault/Permission.pkl.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type Permission interface { - Model - - GetId() uint - - GetServiceId() string - - GetGrants() string - - GetScopes() string - - GetCreatedAt() *string - - GetUpdatedAt() *string -} - -var _ Permission = (*PermissionImpl)(nil) - -type PermissionImpl struct { - Table string `pkl:"table"` - - Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"` - - ServiceId string `pkl:"serviceId" json:"serviceId,omitempty"` - - Grants string `pkl:"grants" json:"grants,omitempty"` - - Scopes string `pkl:"scopes" json:"scopes,omitempty"` - - CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` - - UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"` -} - -func (rcv *PermissionImpl) GetTable() string { - return rcv.Table -} - -func (rcv *PermissionImpl) GetId() uint { - return rcv.Id -} - -func (rcv *PermissionImpl) GetServiceId() string { - return rcv.ServiceId -} - -func (rcv *PermissionImpl) GetGrants() string { - return rcv.Grants -} - -func (rcv *PermissionImpl) GetScopes() string { - return rcv.Scopes -} - -func (rcv *PermissionImpl) GetCreatedAt() *string { - return rcv.CreatedAt -} - -func (rcv *PermissionImpl) GetUpdatedAt() *string { - return rcv.UpdatedAt -} diff --git a/gen/vault/Profile.pkl.go b/gen/vault/Profile.pkl.go deleted file mode 100644 index 215274846..000000000 --- a/gen/vault/Profile.pkl.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type Profile interface { - Model - - GetId() string - - GetSubject() string - - GetController() string - - GetOriginUri() *string - - GetPublicMetadata() *string - - GetPrivateMetadata() *string - - GetCreatedAt() *string - - GetUpdatedAt() *string -} - -var _ Profile = (*ProfileImpl)(nil) - -type ProfileImpl struct { - Table string `pkl:"table"` - - Id string `pkl:"id" gorm:"primaryKey" json:"id,omitempty"` - - Subject string `pkl:"subject" json:"subject,omitempty"` - - Controller string `pkl:"controller" json:"controller,omitempty"` - - OriginUri *string `pkl:"originUri" json:"originUri,omitempty"` - - PublicMetadata *string `pkl:"publicMetadata" json:"publicMetadata,omitempty"` - - PrivateMetadata *string `pkl:"privateMetadata" json:"privateMetadata,omitempty"` - - CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` - - UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"` -} - -func (rcv *ProfileImpl) GetTable() string { - return rcv.Table -} - -func (rcv *ProfileImpl) GetId() string { - return rcv.Id -} - -func (rcv *ProfileImpl) GetSubject() string { - return rcv.Subject -} - -func (rcv *ProfileImpl) GetController() string { - return rcv.Controller -} - -func (rcv *ProfileImpl) GetOriginUri() *string { - return rcv.OriginUri -} - -func (rcv *ProfileImpl) GetPublicMetadata() *string { - return rcv.PublicMetadata -} - -func (rcv *ProfileImpl) GetPrivateMetadata() *string { - return rcv.PrivateMetadata -} - -func (rcv *ProfileImpl) GetCreatedAt() *string { - return rcv.CreatedAt -} - -func (rcv *ProfileImpl) GetUpdatedAt() *string { - return rcv.UpdatedAt -} diff --git a/gen/vault/Property.pkl.go b/gen/vault/Property.pkl.go deleted file mode 100644 index 9b2b7f948..000000000 --- a/gen/vault/Property.pkl.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -import "github.com/apple/pkl-go/pkl" - -type Property interface { - Model - - GetId() uint - - GetProfileId() string - - GetKey() string - - GetAccumulator() *pkl.Object - - GetPropertyKey() *pkl.Object -} - -var _ Property = (*PropertyImpl)(nil) - -type PropertyImpl struct { - Table string `pkl:"table"` - - Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"` - - ProfileId string `pkl:"profileId" json:"profileId,omitempty"` - - Key string `pkl:"key" json:"key,omitempty"` - - Accumulator *pkl.Object `pkl:"accumulator" json:"accumulator,omitempty"` - - PropertyKey *pkl.Object `pkl:"propertyKey" json:"propertyKey,omitempty"` -} - -func (rcv *PropertyImpl) GetTable() string { - return rcv.Table -} - -func (rcv *PropertyImpl) GetId() uint { - return rcv.Id -} - -func (rcv *PropertyImpl) GetProfileId() string { - return rcv.ProfileId -} - -func (rcv *PropertyImpl) GetKey() string { - return rcv.Key -} - -func (rcv *PropertyImpl) GetAccumulator() *pkl.Object { - return rcv.Accumulator -} - -func (rcv *PropertyImpl) GetPropertyKey() *pkl.Object { - return rcv.PropertyKey -} diff --git a/gen/vault/PublicKey.pkl.go b/gen/vault/PublicKey.pkl.go deleted file mode 100644 index a8afeae52..000000000 --- a/gen/vault/PublicKey.pkl.go +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -import "github.com/apple/pkl-go/pkl" - -type PublicKey interface { - Model - - GetId() uint - - GetRole() int - - GetAlgorithm() int - - GetEncoding() int - - GetRaw() *pkl.Object - - GetHex() string - - GetMultibase() string - - GetJwk() *pkl.Object - - GetCreatedAt() *string -} - -var _ PublicKey = (*PublicKeyImpl)(nil) - -type PublicKeyImpl struct { - Table string `pkl:"table"` - - Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"` - - Role int `pkl:"role" json:"role,omitempty"` - - Algorithm int `pkl:"algorithm" json:"algorithm,omitempty"` - - Encoding int `pkl:"encoding" json:"encoding,omitempty"` - - Raw *pkl.Object `pkl:"raw" json:"raw,omitempty"` - - Hex string `pkl:"hex" json:"hex,omitempty"` - - Multibase string `pkl:"multibase" json:"multibase,omitempty"` - - Jwk *pkl.Object `pkl:"jwk" json:"jwk,omitempty"` - - CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` -} - -func (rcv *PublicKeyImpl) GetTable() string { - return rcv.Table -} - -func (rcv *PublicKeyImpl) GetId() uint { - return rcv.Id -} - -func (rcv *PublicKeyImpl) GetRole() int { - return rcv.Role -} - -func (rcv *PublicKeyImpl) GetAlgorithm() int { - return rcv.Algorithm -} - -func (rcv *PublicKeyImpl) GetEncoding() int { - return rcv.Encoding -} - -func (rcv *PublicKeyImpl) GetRaw() *pkl.Object { - return rcv.Raw -} - -func (rcv *PublicKeyImpl) GetHex() string { - return rcv.Hex -} - -func (rcv *PublicKeyImpl) GetMultibase() string { - return rcv.Multibase -} - -func (rcv *PublicKeyImpl) GetJwk() *pkl.Object { - return rcv.Jwk -} - -func (rcv *PublicKeyImpl) GetCreatedAt() *string { - return rcv.CreatedAt -} diff --git a/gen/vault/Sonr.pkl.go b/gen/vault/Sonr.pkl.go deleted file mode 100644 index 7b850f809..000000000 --- a/gen/vault/Sonr.pkl.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type Sonr interface { - Client - - GetRpcUrl() any -} - -var _ Sonr = (*SonrImpl)(nil) - -type SonrImpl struct { - ChainId string `pkl:"chainId"` - - KeyringBackend string `pkl:"keyringBackend"` - - Output string `pkl:"output"` - - RpcUrl any `pkl:"rpcUrl"` - - BroadcastMode string `pkl:"broadcastMode"` - - ApiUrl string `pkl:"apiUrl"` - - AddressPrefix string `pkl:"addressPrefix"` - - Node string `pkl:"node"` -} - -func (rcv *SonrImpl) GetChainId() string { - return rcv.ChainId -} - -func (rcv *SonrImpl) GetKeyringBackend() string { - return rcv.KeyringBackend -} - -func (rcv *SonrImpl) GetOutput() string { - return rcv.Output -} - -func (rcv *SonrImpl) GetRpcUrl() any { - return rcv.RpcUrl -} - -func (rcv *SonrImpl) GetBroadcastMode() string { - return rcv.BroadcastMode -} - -func (rcv *SonrImpl) GetApiUrl() string { - return rcv.ApiUrl -} - -func (rcv *SonrImpl) GetAddressPrefix() string { - return rcv.AddressPrefix -} - -func (rcv *SonrImpl) GetNode() string { - return rcv.Node -} diff --git a/gen/vault/Sqlite.pkl.go b/gen/vault/Sqlite.pkl.go deleted file mode 100644 index 9b52b5b23..000000000 --- a/gen/vault/Sqlite.pkl.go +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -type Sqlite interface { - DB -} - -var _ Sqlite = (*SqliteImpl)(nil) - -type SqliteImpl struct { - Filename string `pkl:"filename"` -} - -func (rcv *SqliteImpl) GetFilename() string { - return rcv.Filename -} diff --git a/gen/vault/init.pkl.go b/gen/vault/init.pkl.go deleted file mode 100644 index 92544b815..000000000 --- a/gen/vault/init.pkl.go +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault - -import "github.com/apple/pkl-go/pkl" - -func init() { - pkl.RegisterMapping("vault", Vault{}) - pkl.RegisterMapping("vault#Sonr", SonrImpl{}) - pkl.RegisterMapping("vault#Sqlite", SqliteImpl{}) - pkl.RegisterMapping("vault#Account", AccountImpl{}) - pkl.RegisterMapping("vault#Asset", AssetImpl{}) - pkl.RegisterMapping("vault#Chain", ChainImpl{}) - pkl.RegisterMapping("vault#Credential", CredentialImpl{}) - pkl.RegisterMapping("vault#Profile", ProfileImpl{}) - pkl.RegisterMapping("vault#Property", PropertyImpl{}) - pkl.RegisterMapping("vault#Keyshare", KeyshareImpl{}) - pkl.RegisterMapping("vault#PublicKey", PublicKeyImpl{}) - pkl.RegisterMapping("vault#Permission", PermissionImpl{}) -} diff --git a/go.mod b/go.mod index 6b19a4844..4236e65ee 100644 --- a/go.mod +++ b/go.mod @@ -64,6 +64,7 @@ require ( github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2-0.20240228211029-91e486ec4dbb github.com/cosmos/ibc-go/modules/capability v1.0.0 github.com/cosmos/ibc-go/v8 v8.2.0 + github.com/donseba/go-htmx v1.10.0 github.com/go-webauthn/webauthn v0.10.2 github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 @@ -71,12 +72,14 @@ require ( github.com/ipfs/boxo v0.21.0 github.com/ipfs/kubo v0.29.0 github.com/joho/godotenv v1.5.1 - github.com/labstack/echo/v4 v4.10.0 + github.com/labstack/echo-jwt/v4 v4.2.0 + github.com/labstack/echo/v4 v4.10.2 github.com/mr-tron/base58 v1.2.0 github.com/ncruces/go-sqlite3 v0.18.2 github.com/ncruces/go-sqlite3/gormlite v0.18.0 - github.com/nlepage/go-wasm-http-server v1.1.0 - github.com/onsonr/crypto v1.23.0 + github.com/nlepage/go-js-promise v1.0.0 + github.com/onsonr/crypto v1.28.0 + github.com/segmentio/ksuid v1.0.4 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 @@ -85,11 +88,13 @@ require ( github.com/strangelove-ventures/poa v0.50.0 github.com/strangelove-ventures/tokenfactory v0.50.0 github.com/stretchr/testify v1.9.0 + github.com/syumai/workers v0.26.3 golang.org/x/crypto v0.26.0 google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 google.golang.org/grpc v1.64.0 google.golang.org/protobuf v1.34.2 gopkg.in/macaroon-bakery.v2 v2.3.0 + gopkg.in/macaroon.v2 v2.1.0 gorm.io/gorm v1.25.11 lukechampine.com/adiantum v1.1.1 ) @@ -171,6 +176,7 @@ require ( github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -189,6 +195,7 @@ require ( github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/gtank/merlin v0.1.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.5 // indirect @@ -258,6 +265,7 @@ require ( github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/miekg/dns v1.1.61 // indirect + github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -279,7 +287,6 @@ require ( github.com/multiformats/go-multistream v0.5.0 // indirect github.com/multiformats/go-varint v0.0.7 // indirect github.com/ncruces/julianday v1.0.0 // indirect - github.com/nlepage/go-js-promise v1.0.0 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect github.com/onsi/ginkgo v1.16.5 // indirect @@ -352,7 +359,6 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect gopkg.in/errgo.v1 v1.0.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/macaroon.v2 v2.1.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/go.sum b/go.sum index baa751493..8a3eabdac 100644 --- a/go.sum +++ b/go.sum @@ -1094,6 +1094,8 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/donseba/go-htmx v1.10.0 h1:ByeQd8frMPSX38vkjvsprSQ7+xTkHMDrkzBV0ljfYvA= +github.com/donseba/go-htmx v1.10.0/go.mod h1:8PTAYvNKf8+QYis+DpAsggKz+sa2qljtMgvdAeNBh5s= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= @@ -1226,6 +1228,8 @@ github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -1397,6 +1401,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1 github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= +github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -1639,8 +1645,10 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.10.0 h1:5CiyngihEO4HXsz3vVsJn7f8xAlWwRr3aY6Ih280ZKA= -github.com/labstack/echo/v4 v4.10.0/go.mod h1:S/T/5fy/GigaXnHTkh0ZGe4LpkkQysvRjFMSUTkDRNQ= +github.com/labstack/echo-jwt/v4 v4.2.0 h1:odSISV9JgcSCuhgQSV/6Io3i7nUmfM/QkBeR5GVJj5c= +github.com/labstack/echo-jwt/v4 v4.2.0/go.mod h1:MA2RqdXdEn4/uEglx0HcUOgQSyBaTh5JcaHIan3biwU= +github.com/labstack/echo/v4 v4.10.2 h1:n1jAhnq/elIFTHr1EYpiYtyKgx4RW9ccVgkqByZaN2M= +github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k= github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= @@ -1741,6 +1749,8 @@ github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUM github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b/go.mod h1:lxPUiZwKoFL8DUUmalo2yJJUCxbPKtm8OKfqr2/FTNU= github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc h1:PTfri+PuQmWDqERdnNMiD9ZejrlswWrCpBEZgWOiTrc= github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc/go.mod h1:cGKTAVKx4SxOuR/czcZ/E2RSJ3sfHs8FpHhQ5CWMf9s= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= @@ -1825,8 +1835,6 @@ github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvz github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nlepage/go-js-promise v1.0.0 h1:K7OmJ3+0BgWJ2LfXchg2sI6RDr7AW/KWR8182epFwGQ= github.com/nlepage/go-js-promise v1.0.0/go.mod h1:bdOP0wObXu34euibyK39K1hoBCtlgTKXGc56AGflaRo= -github.com/nlepage/go-wasm-http-server v1.1.0 h1:phw2NtSp71m/6NmGjE2veQ41PBPzWFcnE614cKucy5M= -github.com/nlepage/go-wasm-http-server v1.1.0/go.mod h1:xpffUeN97vuv8CTlMJ2oC5tPsftfPoG9HkAgI9gkiPI= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= @@ -1849,8 +1857,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/onsonr/crypto v1.23.0 h1:8YYDwja/tGpRaA2Tcoau3Rw5j1t/RfZkIcVacKIi7dI= -github.com/onsonr/crypto v1.23.0/go.mod h1:nPb9pp3n7kMl4/3l2sW3ZJWMU3DQsGoNzyYAqLwL+EY= +github.com/onsonr/crypto v1.28.0 h1:IZnWipcqtehohvau065NJSEgS2a2iMeTv2S0KlQ22ns= +github.com/onsonr/crypto v1.28.0/go.mod h1:2Ew7gRDlysE9+UXN904nUaJ9bqn6OlpKFMtk/LuTYoc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= @@ -2001,6 +2009,8 @@ github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXn github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c= +github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -2065,6 +2075,8 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8 github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/syumai/workers v0.26.3 h1:AF+IBaRccbR4JIj2kNJLJblruPFMD/pAbzkopejGcP8= +github.com/syumai/workers v0.26.3/go.mod h1:ZnqmdiHNBrbxOLrZ/HJ5jzHy6af9cmiNZk10R9NrIEA= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tetratelabs/wazero v1.8.0 h1:iEKu0d4c2Pd+QSRieYbnQC9yiFlMS9D+Jr0LsRmcF4g= diff --git a/internal/db/actions.go b/internal/db/actions.go new file mode 100644 index 000000000..1ce969b8b --- /dev/null +++ b/internal/db/actions.go @@ -0,0 +1,91 @@ +package db + +import ( + "fmt" + + "github.com/onsonr/sonr/internal/db/orm" + "gorm.io/gorm" +) + +// createInitialTables creates the initial tables in the database. +func createInitialTables(db *gorm.DB) (*DB, error) { + err := db.AutoMigrate( + &orm.Account{}, + &orm.Asset{}, + &orm.Keyshare{}, + &orm.Credential{}, + &orm.Profile{}, + &orm.Property{}, + &orm.Permission{}, + ) + if err != nil { + return nil, fmt.Errorf("failed to create table: %w", err) + } + + return &DB{db}, nil +} + +// AddAccount adds a new account to the database +func (db *DB) AddAccount(account *orm.Account) error { + tx := db.Create(account) + if tx.Error != nil { + return fmt.Errorf("failed to add account: %w", tx.Error) + } + + return nil +} + +// AddKeyshare adds a new keyshare to the database +func (db *DB) AddKeyshare(keyshare *orm.Keyshare) error { + tx := db.Create(keyshare) + + if tx.Error != nil { + return fmt.Errorf("failed to add keyshare: %w", tx.Error) + } + + return nil +} + +// AddCredential adds a new credential to the database +func (db *DB) AddCredential(credential *orm.Credential) error { + tx := db.Create(credential) + + if tx.Error != nil { + return fmt.Errorf("failed to add credential: %w", tx.Error) + } + + return nil +} + +// AddProfile adds a new profile to the database +func (db *DB) AddProfile(profile *orm.Profile) error { + tx := db.Create(profile) + + if tx.Error != nil { + return fmt.Errorf("failed to add profile: %w", tx.Error) + } + + return nil +} + +// AddProperty adds a new property to the database +func (db *DB) AddProperty(property *orm.Property) error { + tx := db.Create(property) + + if tx.Error != nil { + return fmt.Errorf("failed to add property: %w", tx.Error) + } + + return nil +} + +// AddPermission adds a new permission to the database +func (db *DB) AddPermission(permission *orm.Permission) error { + tx := db.Create(permission) + + if tx.Error != nil { + return fmt.Errorf("failed to add permission: %w", tx.Error) + } + + return nil +} diff --git a/internal/db/database.go b/internal/db/database.go new file mode 100644 index 000000000..53f87ec65 --- /dev/null +++ b/internal/db/database.go @@ -0,0 +1,17 @@ +package db + +import "gorm.io/gorm" + +type DB struct { + *gorm.DB +} + +func New(opts ...DBOption) *DBConfig { + config := &DBConfig{ + fileName: "vault.db", + } + for _, opt := range opts { + opt(config) + } + return config +} diff --git a/internal/db/db.go b/internal/db/db.go deleted file mode 100644 index 2f916c6b1..000000000 --- a/internal/db/db.go +++ /dev/null @@ -1,174 +0,0 @@ -package db - -import ( - "fmt" - - "github.com/ncruces/go-sqlite3" - _ "github.com/ncruces/go-sqlite3/embed" -) - -type DB struct { - *sqlite3.Conn -} - -func New(opts ...DBOption) *DBConfig { - config := &DBConfig{ - fileName: "vault.db", - } - for _, opt := range opts { - opt(config) - } - return config -} - -func Open(config *DBConfig) (*DB, error) { - conn, err := sqlite3.Open(config.ConnectionString()) - if err != nil { - return nil, fmt.Errorf("failed to open database: %w", err) - } - - db := &DB{ - Conn: conn, - } - - if err := createTables(db); err != nil { - conn.Close() - return nil, fmt.Errorf("failed to create tables: %w", err) - } - return db, nil -} - -func createTables(db *DB) error { - tables := []string{ - createAccountsTable, - createAssetsTable, - createChainsTable, - createCredentialsTable, - createKeysharesTable, - createProfilesTable, - createPropertiesTable, - createPermissionsTable, - } - - for _, table := range tables { - err := db.Exec(table) - if err != nil { - return fmt.Errorf("failed to create table: %w", err) - } - } - - return nil -} - -// AddAccount adds a new account to the database -func (db *DB) AddAccount(name, address string) error { - return db.Exec(insertAccountQuery(name, address)) -} - -// AddAsset adds a new asset to the database -func (db *DB) AddAsset(name, symbol string, decimals int, chainID int64) error { - return db.Exec(insertAssetQuery(name, symbol, decimals, chainID)) -} - -// AddChain adds a new chain to the database -func (db *DB) AddChain(name, networkID string) error { - return db.Exec(insertChainQuery(name, networkID)) -} - -// AddCredential adds a new credential to the database -func (db *DB) AddCredential( - handle, controller, attestationType, origin string, - credentialID, publicKey []byte, - transport string, - signCount uint32, - userPresent, userVerified, backupEligible, backupState, cloneWarning bool, -) error { - return db.Exec(insertCredentialQuery( - handle, - controller, - attestationType, - origin, - credentialID, - publicKey, - transport, - signCount, - userPresent, - userVerified, - backupEligible, - backupState, - cloneWarning, - )) -} - -// -// // AddProfile adds a new profile to the database -// func (db *DB) AddProfile( -// id, subject, controller, originURI string, -// publicMetadata, privateMetadata string, -// ) error { -// return db.statements["insertProfile"].Exec( -// id, -// subject, -// controller, -// originURI, -// publicMetadata, -// privateMetadata, -// ) -// } -// -// // AddProperty adds a new property to the database -// func (db *DB) AddProperty(profileID, key string, accumulator, propertyKey []byte) error { -// return db.statements["insertProperty"].Exec(profileID, key, accumulator, propertyKey) -// } -// -// // AddPermission adds a new permission to the database -// func (db *DB) AddPermission( -// serviceID string, -// grants []DIDNamespace, -// scopes []PermissionScope, -// ) error { -// grantsJSON, err := json.Marshal(grants) -// if err != nil { -// return fmt.Errorf("failed to marshal grants: %w", err) -// } -// -// scopesJSON, err := json.Marshal(scopes) -// if err != nil { -// return fmt.Errorf("failed to marshal scopes: %w", err) -// } -// -// return db.statements["insertPermission"].Exec( -// serviceID, -// string(grantsJSON), -// string(scopesJSON), -// ) -// } -// -// // GetPermission retrieves a permission from the database -// func (db *DB) GetPermission(serviceID string) ([]DIDNamespace, []PermissionScope, error) { -// stmt := db.statements["getPermission"] -// if err := stmt.Exec(serviceID); err != nil { -// return nil, nil, fmt.Errorf("failed to execute statement: %w", err) -// } -// -// if !stmt.Step() { -// return nil, nil, fmt.Errorf("permission not found") -// } -// -// grantsJSON := stmt.ColumnText(0) -// scopesJSON := stmt.ColumnText(1) -// -// var grants []DIDNamespace -// err := json.Unmarshal([]byte(grantsJSON), &grants) -// if err != nil { -// return nil, nil, fmt.Errorf("failed to unmarshal grants: %w", err) -// } -// -// var scopes []PermissionScope -// err = json.Unmarshal([]byte(scopesJSON), &scopes) -// if err != nil { -// return nil, nil, fmt.Errorf("failed to unmarshal scopes: %w", err) -// } -// -// return grants, scopes, nil -// } diff --git a/internal/db/enums.go b/internal/db/enums.go deleted file mode 100644 index 339a0f716..000000000 --- a/internal/db/enums.go +++ /dev/null @@ -1,36 +0,0 @@ -package db - -// DIDNamespace defines the different namespaces of DID -type DIDNamespace int - -const ( - DIDNamespaceUnspecified DIDNamespace = iota - DIDNamespaceIPFS - DIDNamespaceSonr - DIDNamespaceBitcoin - DIDNamespaceEthereum - DIDNamespaceIBC - DIDNamespaceWebauthn - DIDNamespaceDWN - DIDNamespaceService -) - -// PermissionScope defines the Capabilities Controllers can grant for Services -type PermissionScope int - -const ( - PermissionScopeUnspecified PermissionScope = iota - PermissionScopeBasicInfo - PermissionScopeRecordsRead - PermissionScopeRecordsWrite - PermissionScopeTransactionsRead - PermissionScopeTransactionsWrite - PermissionScopeWalletsRead - PermissionScopeWalletsCreate - PermissionScopeWalletsSubscribe - PermissionScopeWalletsUpdate - PermissionScopeTransactionsVerify - PermissionScopeTransactionsBroadcast - PermissionScopeAdminUser - PermissionScopeAdminValidator -) diff --git a/internal/db/options.go b/internal/db/options.go index 9699a3ea2..15dbe4924 100644 --- a/internal/db/options.go +++ b/internal/db/options.go @@ -4,11 +4,12 @@ import ( "crypto/rand" "github.com/ncruces/go-sqlite3/gormlite" - "github.com/ncruces/go-sqlite3/vfs" "golang.org/x/crypto/argon2" "gorm.io/gorm" "lukechampine.com/adiantum/hbsh" "lukechampine.com/adiantum/hpolyc" + + _ "github.com/ncruces/go-sqlite3/embed" ) type DBOption func(config *DBConfig) @@ -19,46 +20,32 @@ func WithDir(dir string) DBOption { } } -func WithInMemory() DBOption { - return func(config *DBConfig) { - config.InMemory = true - } -} - func WithSecretKey(secretKey string) DBOption { return func(config *DBConfig) { config.SecretKey = secretKey } } -func WithOpenFlag(flag vfs.OpenFlag) DBOption { - return func(config *DBConfig) { - config.OpenFlag = flag - } -} - type DBConfig struct { Dir string - InMemory bool SecretKey string - OpenFlag vfs.OpenFlag fileName string } func (config *DBConfig) ConnectionString() string { connStr := "file:" - if config.InMemory { - connStr += ":memory:" - } else { - connStr += config.Dir + "/" + config.fileName - } + connStr += config.Dir + "/" + config.fileName return connStr } // GormDialector creates a gorm dialector for the database. -func (config *DBConfig) GormDialector() (*gorm.DB, error) { - return gorm.Open(gormlite.Open(config.ConnectionString())) +func (config *DBConfig) Open() (*DB, error) { + db, err := gorm.Open(gormlite.Open(config.ConnectionString())) + if err != nil { + return nil, err + } + return createInitialTables(db) } // HBSH creates an HBSH cipher given a key. diff --git a/internal/db/orm/Account.pkl.go b/internal/db/orm/Account.pkl.go new file mode 100644 index 000000000..09a4e0b1a --- /dev/null +++ b/internal/db/orm/Account.pkl.go @@ -0,0 +1,14 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Account struct { + Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"` + + Name string `pkl:"name" json:"name,omitempty" param:"name"` + + Address string `pkl:"address" json:"address,omitempty" param:"address"` + + PublicKey string `pkl:"publicKey" json:"publicKey,omitempty" param:"publicKey"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"` +} diff --git a/internal/db/orm/Asset.pkl.go b/internal/db/orm/Asset.pkl.go new file mode 100644 index 000000000..fd28cc9f7 --- /dev/null +++ b/internal/db/orm/Asset.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Asset struct { + Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"` + + Name string `pkl:"name" json:"name,omitempty" param:"name"` + + Symbol string `pkl:"symbol" json:"symbol,omitempty" param:"symbol"` + + Decimals int `pkl:"decimals" json:"decimals,omitempty" param:"decimals"` + + ChainId *int `pkl:"chainId" json:"chainId,omitempty" param:"chainId"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"` +} diff --git a/internal/db/orm/Chain.pkl.go b/internal/db/orm/Chain.pkl.go new file mode 100644 index 000000000..6b3544d18 --- /dev/null +++ b/internal/db/orm/Chain.pkl.go @@ -0,0 +1,12 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Chain struct { + Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"` + + Name string `pkl:"name" json:"name,omitempty" param:"name"` + + NetworkId string `pkl:"networkId" json:"networkId,omitempty" param:"networkId"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"` +} diff --git a/internal/db/orm/Credential.pkl.go b/internal/db/orm/Credential.pkl.go new file mode 100644 index 000000000..b05f04c9b --- /dev/null +++ b/internal/db/orm/Credential.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Credential struct { + Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"` + + Subject string `pkl:"subject" json:"subject,omitempty" param:"subject"` + + Controller string `pkl:"controller" json:"controller,omitempty" param:"controller"` + + AttestationType string `pkl:"attestationType" json:"attestationType,omitempty" param:"attestationType"` + + Origin string `pkl:"origin" json:"origin,omitempty" param:"origin"` + + CredentialId string `pkl:"credentialId" json:"credentialId,omitempty" param:"credentialId"` + + PublicKey string `pkl:"publicKey" json:"publicKey,omitempty" param:"publicKey"` + + Transport string `pkl:"transport" json:"transport,omitempty" param:"transport"` + + SignCount uint `pkl:"signCount" json:"signCount,omitempty" param:"signCount"` + + UserPresent bool `pkl:"userPresent" json:"userPresent,omitempty" param:"userPresent"` + + UserVerified bool `pkl:"userVerified" json:"userVerified,omitempty" param:"userVerified"` + + BackupEligible bool `pkl:"backupEligible" json:"backupEligible,omitempty" param:"backupEligible"` + + BackupState bool `pkl:"backupState" json:"backupState,omitempty" param:"backupState"` + + CloneWarning bool `pkl:"cloneWarning" json:"cloneWarning,omitempty" param:"cloneWarning"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"` + + UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty" param:"updatedAt"` +} diff --git a/internal/db/orm/DiscoveryDocument.pkl.go b/internal/db/orm/DiscoveryDocument.pkl.go new file mode 100644 index 000000000..036d8f26d --- /dev/null +++ b/internal/db/orm/DiscoveryDocument.pkl.go @@ -0,0 +1,34 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type DiscoveryDocument struct { + Issuer string `pkl:"issuer" json:"issuer,omitempty" param:"issuer"` + + AuthorizationEndpoint string `pkl:"authorization_endpoint" json:"authorization_endpoint,omitempty" param:"authorization_endpoint"` + + TokenEndpoint string `pkl:"token_endpoint" json:"token_endpoint,omitempty" param:"token_endpoint"` + + UserinfoEndpoint string `pkl:"userinfo_endpoint" json:"userinfo_endpoint,omitempty" param:"userinfo_endpoint"` + + JwksUri string `pkl:"jwks_uri" json:"jwks_uri,omitempty" param:"jwks_uri"` + + RegistrationEndpoint string `pkl:"registration_endpoint" json:"registration_endpoint,omitempty" param:"registration_endpoint"` + + ScopesSupported []string `pkl:"scopes_supported" json:"scopes_supported,omitempty" param:"scopes_supported"` + + ResponseTypesSupported []string `pkl:"response_types_supported" json:"response_types_supported,omitempty" param:"response_types_supported"` + + ResponseModesSupported []string `pkl:"response_modes_supported" json:"response_modes_supported,omitempty" param:"response_modes_supported"` + + SubjectTypesSupported []string `pkl:"subject_types_supported" json:"subject_types_supported,omitempty" param:"subject_types_supported"` + + IdTokenSigningAlgValuesSupported []string `pkl:"id_token_signing_alg_values_supported" json:"id_token_signing_alg_values_supported,omitempty" param:"id_token_signing_alg_values_supported"` + + ClaimsSupported []string `pkl:"claims_supported" json:"claims_supported,omitempty" param:"claims_supported"` + + GrantTypesSupported []string `pkl:"grant_types_supported" json:"grant_types_supported,omitempty" param:"grant_types_supported"` + + AcrValuesSupported []string `pkl:"acr_values_supported" json:"acr_values_supported,omitempty" param:"acr_values_supported"` + + TokenEndpointAuthMethodsSupported []string `pkl:"token_endpoint_auth_methods_supported" json:"token_endpoint_auth_methods_supported,omitempty" param:"token_endpoint_auth_methods_supported"` +} diff --git a/internal/db/orm/Keyshare.pkl.go b/internal/db/orm/Keyshare.pkl.go new file mode 100644 index 000000000..c5072c7e3 --- /dev/null +++ b/internal/db/orm/Keyshare.pkl.go @@ -0,0 +1,20 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Keyshare struct { + Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"` + + Metadata string `pkl:"metadata" json:"metadata,omitempty" param:"metadata"` + + Payloads string `pkl:"payloads" json:"payloads,omitempty" param:"payloads"` + + Protocol string `pkl:"protocol" json:"protocol,omitempty" param:"protocol"` + + PublicKey string `pkl:"publicKey" json:"publicKey,omitempty" param:"publicKey"` + + Role int `pkl:"role" json:"role,omitempty" param:"role"` + + Version int `pkl:"version" json:"version,omitempty" param:"version"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"` +} diff --git a/gen/vault/Vault.pkl.go b/internal/db/orm/Orm.pkl.go similarity index 69% rename from gen/vault/Vault.pkl.go rename to internal/db/orm/Orm.pkl.go index 5e92f3753..8c2222fb0 100644 --- a/gen/vault/Vault.pkl.go +++ b/internal/db/orm/Orm.pkl.go @@ -1,5 +1,5 @@ -// Code generated from Pkl module `vault`. DO NOT EDIT. -package vault +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm import ( "context" @@ -7,11 +7,11 @@ import ( "github.com/apple/pkl-go/pkl" ) -type Vault struct { +type Orm struct { } -// LoadFromPath loads the pkl module at the given path and evaluates it into a Vault -func LoadFromPath(ctx context.Context, path string) (ret *Vault, err error) { +// LoadFromPath loads the pkl module at the given path and evaluates it into a Orm +func LoadFromPath(ctx context.Context, path string) (ret *Orm, err error) { evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) if err != nil { return nil, err @@ -26,9 +26,9 @@ func LoadFromPath(ctx context.Context, path string) (ret *Vault, err error) { return ret, err } -// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Vault -func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Vault, error) { - var ret Vault +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Orm +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Orm, error) { + var ret Orm if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { return nil, err } diff --git a/internal/db/orm/Permission.pkl.go b/internal/db/orm/Permission.pkl.go new file mode 100644 index 000000000..0e93df3c3 --- /dev/null +++ b/internal/db/orm/Permission.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Permission struct { + Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"` + + ServiceId string `pkl:"serviceId" json:"serviceId,omitempty" param:"serviceId"` + + Grants string `pkl:"grants" json:"grants,omitempty" param:"grants"` + + Scopes string `pkl:"scopes" json:"scopes,omitempty" param:"scopes"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"` + + UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty" param:"updatedAt"` +} diff --git a/internal/db/orm/Profile.pkl.go b/internal/db/orm/Profile.pkl.go new file mode 100644 index 000000000..c0153cc3c --- /dev/null +++ b/internal/db/orm/Profile.pkl.go @@ -0,0 +1,20 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Profile struct { + Id string `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"` + + Subject string `pkl:"subject" json:"subject,omitempty" param:"subject"` + + Controller string `pkl:"controller" json:"controller,omitempty" param:"controller"` + + OriginUri *string `pkl:"originUri" json:"originUri,omitempty" param:"originUri"` + + PublicMetadata *string `pkl:"publicMetadata" json:"publicMetadata,omitempty" param:"publicMetadata"` + + PrivateMetadata *string `pkl:"privateMetadata" json:"privateMetadata,omitempty" param:"privateMetadata"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"` + + UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty" param:"updatedAt"` +} diff --git a/internal/db/orm/Property.pkl.go b/internal/db/orm/Property.pkl.go new file mode 100644 index 000000000..937b6209a --- /dev/null +++ b/internal/db/orm/Property.pkl.go @@ -0,0 +1,14 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Property struct { + Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"` + + ProfileId string `pkl:"profileId" json:"profileId,omitempty" param:"profileId"` + + Key string `pkl:"key" json:"key,omitempty" param:"key"` + + Accumulator string `pkl:"accumulator" json:"accumulator,omitempty" param:"accumulator"` + + PropertyKey string `pkl:"propertyKey" json:"propertyKey,omitempty" param:"propertyKey"` +} diff --git a/internal/db/orm/PublicKey.pkl.go b/internal/db/orm/PublicKey.pkl.go new file mode 100644 index 000000000..7275e0ae5 --- /dev/null +++ b/internal/db/orm/PublicKey.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type PublicKey struct { + Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"` + + Role int `pkl:"role" json:"role,omitempty" param:"role"` + + Algorithm int `pkl:"algorithm" json:"algorithm,omitempty" param:"algorithm"` + + Encoding int `pkl:"encoding" json:"encoding,omitempty" param:"encoding"` + + Jwk string `pkl:"jwk" json:"jwk,omitempty" param:"jwk"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"` +} diff --git a/internal/db/orm/init.pkl.go b/internal/db/orm/init.pkl.go new file mode 100644 index 000000000..c8660ac41 --- /dev/null +++ b/internal/db/orm/init.pkl.go @@ -0,0 +1,18 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("orm", Orm{}) + pkl.RegisterMapping("orm#Account", Account{}) + pkl.RegisterMapping("orm#Asset", Asset{}) + pkl.RegisterMapping("orm#Chain", Chain{}) + pkl.RegisterMapping("orm#Credential", Credential{}) + pkl.RegisterMapping("orm#Profile", Profile{}) + pkl.RegisterMapping("orm#Property", Property{}) + pkl.RegisterMapping("orm#Keyshare", Keyshare{}) + pkl.RegisterMapping("orm#PublicKey", PublicKey{}) + pkl.RegisterMapping("orm#Permission", Permission{}) + pkl.RegisterMapping("orm#DiscoveryDocument", DiscoveryDocument{}) +} diff --git a/internal/db/queries.go b/internal/db/queries.go deleted file mode 100644 index 17e7faecf..000000000 --- a/internal/db/queries.go +++ /dev/null @@ -1,79 +0,0 @@ -package db - -import "fmt" - -// Account queries -func insertAccountQuery(name, address string) string { - return fmt.Sprintf(`INSERT INTO accounts (name, address) VALUES (%s, %s)`, name, address) -} - -// Asset queries -func insertAssetQuery(name, symbol string, decimals int, chainID int64) string { - return fmt.Sprintf( - `INSERT INTO assets (name, symbol, decimals, chain_id) VALUES (%s, %s, %d, %d)`, - name, - symbol, - decimals, - chainID, - ) -} - -// Chain queries -func insertChainQuery(name string, networkID string) string { - return fmt.Sprintf(`INSERT INTO chains (name, network_id) VALUES (%s, %s)`, name, networkID) -} - -// Credential queries -func insertCredentialQuery( - handle, controller, attestationType, origin string, - credentialID, publicKey []byte, - transport string, - signCount uint32, - userPresent, userVerified, backupEligible, backupState, cloneWarning bool, -) string { - return fmt.Sprintf(`INSERT INTO credentials ( - handle, controller, attestation_type, origin, - credential_id, public_key, transport, sign_count, - user_present, user_verified, backup_eligible, - backup_state, clone_warning - ) VALUES (%s, %s, %s, %s, %s, %s, %s, %d, %t, %t, %t, %t, %t)`, - handle, controller, attestationType, origin, - credentialID, publicKey, transport, signCount, - userPresent, userVerified, backupEligible, - backupState, cloneWarning) -} - -// Profile queries -func insertProfileQuery( - id, subject, controller, originURI, publicMetadata, privateMetadata string, -) string { - return fmt.Sprintf(`INSERT INTO profiles ( - id, subject, controller, origin_uri, - public_metadata, private_metadata - ) VALUES (%s, %s, %s, %s, %s, %s)`, - id, subject, controller, originURI, - publicMetadata, privateMetadata) -} - -// Property queries -func insertPropertyQuery(profileID, key, accumulator, propertyKey string) string { - return fmt.Sprintf(`INSERT INTO properties ( - profile_id, key, accumulator, property_key - ) VALUES (%s, %s, %s, %s)`, - profileID, key, accumulator, propertyKey) -} - -// Permission queries -func insertPermissionQuery(serviceID, grants, scopes string) string { - return fmt.Sprintf( - `INSERT INTO permissions (service_id, grants, scopes) VALUES (%s, %s, %s)`, - serviceID, - grants, - scopes, - ) -} - -// GetPermission query -func getPermissionQuery(serviceID string) string { - return fmt.Sprintf(`SELECT grants, scopes FROM permissions WHERE service_id = %s`, serviceID) -} diff --git a/internal/db/tables.go b/internal/db/tables.go deleted file mode 100644 index e15a8ccf7..000000000 --- a/internal/db/tables.go +++ /dev/null @@ -1,104 +0,0 @@ -package db - -const ( - createAccountsTable = ` - CREATE TABLE IF NOT EXISTS accounts ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - address TEXT NOT NULL UNIQUE, - public_key BLOB NOT NULL, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP - ) - ` - - createAssetsTable = ` - CREATE TABLE IF NOT EXISTS assets ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - symbol TEXT NOT NULL, - decimals INTEGER NOT NULL, - chain_id INTEGER, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (chain_id) REFERENCES chains(id) - ) - ` - - createChainsTable = ` - CREATE TABLE IF NOT EXISTS chains ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - network_id TEXT NOT NULL UNIQUE, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP - ) - ` - - createCredentialsTable = ` - CREATE TABLE IF NOT EXISTS credentials ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - handle TEXT NOT NULL, - controller TEXT NOT NULL, - attestation_type TEXT NOT NULL, - origin TEXT NOT NULL, - credential_id BLOB NOT NULL, - public_key BLOB NOT NULL, - transport TEXT NOT NULL, - sign_count INTEGER NOT NULL, - user_present BOOLEAN NOT NULL, - user_verified BOOLEAN NOT NULL, - backup_eligible BOOLEAN NOT NULL, - backup_state BOOLEAN NOT NULL, - clone_warning BOOLEAN NOT NULL, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP - ) - ` - - createProfilesTable = ` - CREATE TABLE IF NOT EXISTS profiles ( - id TEXT PRIMARY KEY, - subject TEXT NOT NULL, - controller TEXT NOT NULL, - origin_uri TEXT, - public_metadata TEXT, - private_metadata TEXT, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP - ) - ` - - createPropertiesTable = ` - CREATE TABLE IF NOT EXISTS properties ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - profile_id TEXT NOT NULL, - key TEXT NOT NULL, - accumulator BLOB NOT NULL, - property_key BLOB NOT NULL, - FOREIGN KEY (profile_id) REFERENCES profiles(id) - ) - ` - - createKeysharesTable = ` - CREATE TABLE IF NOT EXISTS keyshares ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - metadata TEXT NOT NULL, - payloads TEXT NOT NULL, - protocol TEXT NOT NULL, - public_key BLOB NOT NULL, - role INTEGER NOT NULL, - version INTEGER NOT NULL, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP - ) - ` - - createPermissionsTable = ` - CREATE TABLE IF NOT EXISTS permissions ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - service_id TEXT NOT NULL, - grants TEXT NOT NULL, - scopes TEXT NOT NULL, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (service_id) REFERENCES services(id) - ) - ` -) diff --git a/internal/front/command.go b/internal/front/command.go deleted file mode 100644 index 12a03e509..000000000 --- a/internal/front/command.go +++ /dev/null @@ -1,22 +0,0 @@ -package front - -import ( - "log" - "net/http" - - "github.com/labstack/echo/v4" - "github.com/spf13/cobra" -) - -func NewServeFrontendCmd() *cobra.Command { - return &cobra.Command{ - Use: "serve-web", - Short: "TUI for managing the local Sonr validator node", - Run: func(cmd *cobra.Command, args []string) { - e := echo.New() - if err := e.Start(":42069"); err != http.ErrServerClosed { - log.Fatal(err) - } - }, - } -} diff --git a/internal/front/handlers/authorize_handler.go b/internal/front/handlers/authorize_handler.go deleted file mode 100644 index 5ac8282f4..000000000 --- a/internal/front/handlers/authorize_handler.go +++ /dev/null @@ -1 +0,0 @@ -package handlers diff --git a/internal/front/handlers/current_handler.go b/internal/front/handlers/current_handler.go deleted file mode 100644 index 5ac8282f4..000000000 --- a/internal/front/handlers/current_handler.go +++ /dev/null @@ -1 +0,0 @@ -package handlers diff --git a/internal/front/handlers/login_handler.go b/internal/front/handlers/login_handler.go deleted file mode 100644 index 5ac8282f4..000000000 --- a/internal/front/handlers/login_handler.go +++ /dev/null @@ -1 +0,0 @@ -package handlers diff --git a/internal/front/handlers/register_handler.go b/internal/front/handlers/register_handler.go deleted file mode 100644 index 5ac8282f4..000000000 --- a/internal/front/handlers/register_handler.go +++ /dev/null @@ -1 +0,0 @@ -package handlers diff --git a/internal/front/routes/api.go b/internal/front/routes/api.go deleted file mode 100644 index 0db51ae52..000000000 --- a/internal/front/routes/api.go +++ /dev/null @@ -1 +0,0 @@ -package routes diff --git a/internal/front/routes/htmx.go b/internal/front/routes/htmx.go deleted file mode 100644 index 0db51ae52..000000000 --- a/internal/front/routes/htmx.go +++ /dev/null @@ -1 +0,0 @@ -package routes diff --git a/internal/gui/elements/alert.templ b/internal/gui/elements/alert.templ new file mode 100644 index 000000000..89f977aea --- /dev/null +++ b/internal/gui/elements/alert.templ @@ -0,0 +1,67 @@ +package elements + +func Alert(variant Variant, icon Icon, title, message string) templ.Component { + return alertElement(variant.Attributes(), title, message, icon.Render()) +} + +templ alertElement(attrs templ.Attributes, title, message string, icon templ.Component) { +
+ @icon +
{ title }
+
{ message }
+
+} + +type AlertVariant int + +const ( + AlertVariant_Default AlertVariant = iota + AlertVariant_Info + AlertVariant_Error + AlertVariant_Success + AlertVariant_Warning + AlertVariant_Subtle_Info + AlertVariant_Subtle_Error + AlertVariant_Subtle_Success + AlertVariant_Subtle_Warning +) + +func (v AlertVariant) Attributes() templ.Attributes { + switch v { + case AlertVariant_Info: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-blue-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Error: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-red-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Success: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-green-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Warning: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-yellow-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Subtle_Info: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-blue-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-blue-600", + } + case AlertVariant_Subtle_Error: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-red-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-red-600", + } + case AlertVariant_Subtle_Success: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-green-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-green-600", + } + case AlertVariant_Subtle_Warning: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-yellow-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-yellow-600", + } + } + return templ.Attributes{ + "class": "relative w-full rounded-lg border bg-white p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-neutral-900", + } +} diff --git a/internal/gui/elements/alert_templ.go b/internal/gui/elements/alert_templ.go new file mode 100644 index 000000000..9e21f5df5 --- /dev/null +++ b/internal/gui/elements/alert_templ.go @@ -0,0 +1,137 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package elements + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +func Alert(variant Variant, icon Icon, title, message string) templ.Component { + return alertElement(variant.Attributes(), title, message, icon.Render()) +} + +func alertElement(attrs templ.Attributes, title, message string, icon templ.Component) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = icon.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gui/elements/alert.templ`, Line: 10, Col: 66} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(message) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gui/elements/alert.templ`, Line: 11, Col: 43} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +type AlertVariant int + +const ( + AlertVariant_Default AlertVariant = iota + AlertVariant_Info + AlertVariant_Error + AlertVariant_Success + AlertVariant_Warning + AlertVariant_Subtle_Info + AlertVariant_Subtle_Error + AlertVariant_Subtle_Success + AlertVariant_Subtle_Warning +) + +func (v AlertVariant) Attributes() templ.Attributes { + switch v { + case AlertVariant_Info: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-blue-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Error: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-red-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Success: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-green-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Warning: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-yellow-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Subtle_Info: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-blue-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-blue-600", + } + case AlertVariant_Subtle_Error: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-red-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-red-600", + } + case AlertVariant_Subtle_Success: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-green-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-green-600", + } + case AlertVariant_Subtle_Warning: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-yellow-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-yellow-600", + } + } + return templ.Attributes{ + "class": "relative w-full rounded-lg border bg-white p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-neutral-900", + } +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/elements/animation.templ b/internal/gui/elements/animation.templ new file mode 100644 index 000000000..9d7f988ff --- /dev/null +++ b/internal/gui/elements/animation.templ @@ -0,0 +1,5 @@ +package elements + +templ Animation() { + +} diff --git a/cmd/dwn/index_templ.go b/internal/gui/elements/animation_templ.go similarity index 60% rename from cmd/dwn/index_templ.go rename to internal/gui/elements/animation_templ.go index f9f127038..facdbf620 100644 --- a/cmd/dwn/index_templ.go +++ b/internal/gui/elements/animation_templ.go @@ -1,14 +1,14 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.771 -package main +package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -func VaultIndex() templ.Component { +func Animation() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) @@ -26,7 +26,7 @@ func VaultIndex() templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Sonr Vault

Sonr Vault

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/gui/elements/button.templ b/internal/gui/elements/button.templ new file mode 100644 index 000000000..e7ea64b5c --- /dev/null +++ b/internal/gui/elements/button.templ @@ -0,0 +1,134 @@ +package elements + +func Button(variant Variant) templ.Component { + return renderButton(variant.Attributes()) +} + +templ renderButton(attrs templ.Attributes) { + +} + +type ButtonVariant int + +const ( + ButtonVariantDefault ButtonVariant = iota + ButtonVariantPrimary + ButtonVariantInfo + ButtonVariantError + ButtonVariantSuccess + ButtonVariantWarning +) + +func (v ButtonVariant) Attributes() templ.Attributes { + switch v { + case ButtonVariantPrimary: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-red-600 hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-green-600 hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-yellow-600 hover:bg-yellow-700 focus:ring-2 focus:ring-offset-2 focus:ring-yellow-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-200 bg-white border rounded-md text-neutral-500 hover:text-neutral-700 border-neutral-200/70 hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-200/60 focus:shadow-outline", + "type": "button", + } +} + +type SubtleButtonVariant int + +const ( + SubtleButtonVariantDefault SubtleButtonVariant = iota + SubtleButtonVariantInfo + SubtleButtonVariantError + SubtleButtonVariantSuccess + SubtleButtonVariantWarning +) + +func (v SubtleButtonVariant) Attributes() templ.Attributes { + switch v { + case SubtleButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-blue-100 bg-blue-50 hover:text-blue-600 hover:bg-blue-100", + "type": "button", + } + case SubtleButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-red-100 bg-red-50 hover:text-red-600 hover:bg-red-100", + "type": "button", + } + case SubtleButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-green-100 bg-green-50 hover:text-green-600 hover:bg-green-100", + "type": "button", + } + case SubtleButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-yellow-100 bg-yellow-50 hover:text-yellow-700 hover:bg-yellow-100", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 rounded-md text-neutral-500 bg-neutral-50 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-100 hover:text-neutral-600 hover:bg-neutral-100", + "type": "button", + } +} + +type OutlineButtonVariant int + +const ( + OutlineButtonVariantDefault OutlineButtonVariant = iota + OutlineButtonVariantInfo + OutlineButtonVariantError + OutlineButtonVariantSuccess + OutlineButtonVariantWarning +) + +func (v OutlineButtonVariant) Attributes() templ.Attributes { + switch v { + case OutlineButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-600 transition-colors duration-100 bg-white border-2 border-blue-600 rounded-md hover:text-white hover:bg-blue-600", + "type": "button", + } + case OutlineButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-600 transition-colors duration-100 bg-white border-2 border-red-600 rounded-md hover:text-white hover:bg-red-600", + "type": "button", + } + case OutlineButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-600 transition-colors duration-100 bg-white border-2 border-green-600 rounded-md hover:text-white hover:bg-green-600", + "type": "button", + } + case OutlineButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 bg-white border-2 border-yellow-500 rounded-md hover:text-white hover:bg-yellow-500", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 bg-white border-2 rounded-md text-neutral-900 hover:text-white border-neutral-900 hover:bg-neutral-900", + "type": "button", + } +} diff --git a/internal/gui/elements/button_templ.go b/internal/gui/elements/button_templ.go new file mode 100644 index 000000000..43134874b --- /dev/null +++ b/internal/gui/elements/button_templ.go @@ -0,0 +1,180 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package elements + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +func Button(variant Variant) templ.Component { + return renderButton(variant.Attributes()) +} + +func renderButton(attrs templ.Attributes) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +type ButtonVariant int + +const ( + ButtonVariantDefault ButtonVariant = iota + ButtonVariantPrimary + ButtonVariantInfo + ButtonVariantError + ButtonVariantSuccess + ButtonVariantWarning +) + +func (v ButtonVariant) Attributes() templ.Attributes { + switch v { + case ButtonVariantPrimary: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-red-600 hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-green-600 hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-yellow-600 hover:bg-yellow-700 focus:ring-2 focus:ring-offset-2 focus:ring-yellow-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-200 bg-white border rounded-md text-neutral-500 hover:text-neutral-700 border-neutral-200/70 hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-200/60 focus:shadow-outline", + "type": "button", + } +} + +type SubtleButtonVariant int + +const ( + SubtleButtonVariantDefault SubtleButtonVariant = iota + SubtleButtonVariantInfo + SubtleButtonVariantError + SubtleButtonVariantSuccess + SubtleButtonVariantWarning +) + +func (v SubtleButtonVariant) Attributes() templ.Attributes { + switch v { + case SubtleButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-blue-100 bg-blue-50 hover:text-blue-600 hover:bg-blue-100", + "type": "button", + } + case SubtleButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-red-100 bg-red-50 hover:text-red-600 hover:bg-red-100", + "type": "button", + } + case SubtleButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-green-100 bg-green-50 hover:text-green-600 hover:bg-green-100", + "type": "button", + } + case SubtleButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-yellow-100 bg-yellow-50 hover:text-yellow-700 hover:bg-yellow-100", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 rounded-md text-neutral-500 bg-neutral-50 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-100 hover:text-neutral-600 hover:bg-neutral-100", + "type": "button", + } +} + +type OutlineButtonVariant int + +const ( + OutlineButtonVariantDefault OutlineButtonVariant = iota + OutlineButtonVariantInfo + OutlineButtonVariantError + OutlineButtonVariantSuccess + OutlineButtonVariantWarning +) + +func (v OutlineButtonVariant) Attributes() templ.Attributes { + switch v { + case OutlineButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-600 transition-colors duration-100 bg-white border-2 border-blue-600 rounded-md hover:text-white hover:bg-blue-600", + "type": "button", + } + case OutlineButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-600 transition-colors duration-100 bg-white border-2 border-red-600 rounded-md hover:text-white hover:bg-red-600", + "type": "button", + } + case OutlineButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-600 transition-colors duration-100 bg-white border-2 border-green-600 rounded-md hover:text-white hover:bg-green-600", + "type": "button", + } + case OutlineButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 bg-white border-2 border-yellow-500 rounded-md hover:text-white hover:bg-yellow-500", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 bg-white border-2 rounded-md text-neutral-900 hover:text-white border-neutral-900 hover:bg-neutral-900", + "type": "button", + } +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/elements/card.templ b/internal/gui/elements/card.templ new file mode 100644 index 000000000..2a9327f39 --- /dev/null +++ b/internal/gui/elements/card.templ @@ -0,0 +1,17 @@ +package elements + +func Card(size Size) templ.Component { + return renderCard(size.CardAttributes()) +} + +templ renderCard(attrs templ.Attributes) { +
+
+
+
+ { children... } +
+
+
+
+} diff --git a/internal/gui/elements/card_templ.go b/internal/gui/elements/card_templ.go new file mode 100644 index 000000000..4f155dcda --- /dev/null +++ b/internal/gui/elements/card_templ.go @@ -0,0 +1,57 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package elements + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +func Card(size Size) templ.Component { + return renderCard(size.CardAttributes()) +} + +func renderCard(attrs templ.Attributes) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/elements/global.templ b/internal/gui/elements/global.templ new file mode 100644 index 000000000..8d0974a87 --- /dev/null +++ b/internal/gui/elements/global.templ @@ -0,0 +1,37 @@ +package elements + +templ Layout(title string) { + + + + @defaultStyles() + { title } + + +
+
+ { children... } +
+
+ + +} + +templ Spacer() { +
+} + +templ ServiceWorker(path string) { + +} + +templ defaultStyles() { + + + + + + +} diff --git a/internal/gui/elements/global_templ.go b/internal/gui/elements/global_templ.go new file mode 100644 index 000000000..8ceb6a81c --- /dev/null +++ b/internal/gui/elements/global_templ.go @@ -0,0 +1,144 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package elements + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +func Layout(title string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = defaultStyles().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gui/elements/global.templ`, Line: 8, Col: 17} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func Spacer() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func ServiceWorker(path string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func defaultStyles() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var5 := templ.GetChildren(ctx) + if templ_7745c5c3_Var5 == nil { + templ_7745c5c3_Var5 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/elements/icons.templ b/internal/gui/elements/icons.templ new file mode 100644 index 000000000..431aa93db --- /dev/null +++ b/internal/gui/elements/icons.templ @@ -0,0 +1,28 @@ +package elements + +type Icons int + +const ( + Icons_Info Icons = iota + Icons_Error + Icons_Success + Icons_Warning +) + +func (v Icons) Render() templ.Component { + return renderIconVariant(v) +} + +templ renderIconVariant(v Icons) { + switch v { + case Icons_Info: + + case Icons_Error: + + case Icons_Success: + + case Icons_Warning: + + } + +} diff --git a/internal/gui/elements/icons_templ.go b/internal/gui/elements/icons_templ.go new file mode 100644 index 000000000..2557e55d7 --- /dev/null +++ b/internal/gui/elements/icons_templ.go @@ -0,0 +1,72 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package elements + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +type Icons int + +const ( + Icons_Info Icons = iota + Icons_Error + Icons_Success + Icons_Warning +) + +func (v Icons) Render() templ.Component { + return renderIconVariant(v) +} + +func renderIconVariant(v Icons) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + switch v { + case Icons_Info: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case Icons_Error: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case Icons_Success: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case Icons_Warning: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/elements/sizes.templ b/internal/gui/elements/sizes.templ new file mode 100644 index 000000000..0e97fb872 --- /dev/null +++ b/internal/gui/elements/sizes.templ @@ -0,0 +1,61 @@ +package elements + +type Size int + +const ( + SizeDefault Size = iota + SizeSmall + SizeMedium + SizeLarge +) + +func (s Size) CardAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "class": "max-w-md bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } + case SizeLarge: + return templ.Attributes{ + "class": "max-w-xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } + } + return templ.Attributes{ + "class": "max-w-lg bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } +} + +func (s Size) SvgAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "height": "16", + "width": "16", + } + case SizeLarge: + return templ.Attributes{ + "height": "32", + "width": "32", + } + } + return templ.Attributes{ + "height": "24", + "width": "24", + } +} + +func (s Size) TextAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "class": "text-sm", + } + case SizeLarge: + return templ.Attributes{ + "class": "text-lg", + } + } + return templ.Attributes{ + "class": "text-md", + } +} diff --git a/internal/gui/elements/sizes_templ.go b/internal/gui/elements/sizes_templ.go new file mode 100644 index 000000000..f7a0b98a1 --- /dev/null +++ b/internal/gui/elements/sizes_templ.go @@ -0,0 +1,71 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package elements + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +type Size int + +const ( + SizeDefault Size = iota + SizeSmall + SizeMedium + SizeLarge +) + +func (s Size) CardAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "class": "max-w-md bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } + case SizeLarge: + return templ.Attributes{ + "class": "max-w-xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } + } + return templ.Attributes{ + "class": "max-w-lg bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } +} + +func (s Size) SvgAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "height": "16", + "width": "16", + } + case SizeLarge: + return templ.Attributes{ + "height": "32", + "width": "32", + } + } + return templ.Attributes{ + "height": "24", + "width": "24", + } +} + +func (s Size) TextAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "class": "text-sm", + } + case SizeLarge: + return templ.Attributes{ + "class": "text-lg", + } + } + return templ.Attributes{ + "class": "text-md", + } +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/elements/text.templ b/internal/gui/elements/text.templ new file mode 100644 index 000000000..f158286ce --- /dev/null +++ b/internal/gui/elements/text.templ @@ -0,0 +1,124 @@ +package elements + +import "fmt" + +func Text(content string, options ...Variant) templ.Component { + if err := ValidTextVariants(options...); err != nil { + return renderParagraph(clsxMerge(TextSizeDefault, TextStyleDefault), content) + } + return renderParagraph(clsxMerge(options...), content) +} + +func ValidTextVariants(variants ...Variant) error { + for _, v := range variants { + switch v.(type) { + case TextSize: + case TextStyle: + default: + return fmt.Errorf("invalid text variant: %v", v) + } + } + return nil +} + +templ renderHeading(attrs templ.Attributes, text string) { +

+ { text } +

+} + +templ renderParagraph(attrs templ.Attributes, text string) { +

+ { text } +

+} + +templ renderLink(attrs templ.Attributes, text string) { + + { text } + +} + +templ renderStrong(attrs templ.Attributes, text string) { + + { text } + +} + +templ renderEmphasis(attrs templ.Attributes, text string) { + + { text } + +} + +templ renderCode(attrs templ.Attributes, text string) { + + { text } + +} + +type TextSize int + +const ( + TextSizeDefault TextSize = iota + TextSizeSmall + TextSizeMedium + TextSizeLarge +) + +func (s TextSize) Attributes() templ.Attributes { + switch s { + case TextSizeSmall: + return templ.Attributes{ + "class": "text-sm", + } + case TextSizeLarge: + return templ.Attributes{ + "class": "text-xl", + } + } + return templ.Attributes{ + "class": "text-md", + } +} + +type TextStyle int + +const ( + TextStyleDefault TextStyle = iota + TextStyleHeading + TextStyleParagraph + TextStyleLink + TextStyleStrong + TextStyleEmphasis + TextStyleCode +) + +func (s TextStyle) Attributes() templ.Attributes { + switch s { + case TextStyleHeading: + return templ.Attributes{ + "class": "text-xl font-bold text-xl", + } + case TextStyleParagraph: + return templ.Attributes{ + "class": "text-base font-normal", + } + case TextStyleLink: + return templ.Attributes{ + "class": "text-blue-600 font-medium underline", + } + case TextStyleStrong: + return templ.Attributes{ + "class": "font-semibold text-md", + } + case TextStyleCode: + return templ.Attributes{ + "class": "text-stone-800 font-mono", + } + default: + return templ.Attributes{ + "class": "text-base font-normal text-md", + } + } +} diff --git a/internal/gui/elements/text_templ.go b/internal/gui/elements/text_templ.go new file mode 100644 index 000000000..85585c468 --- /dev/null +++ b/internal/gui/elements/text_templ.go @@ -0,0 +1,380 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package elements + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import "fmt" + +func Text(content string, options ...Variant) templ.Component { + if err := ValidTextVariants(options...); err != nil { + return renderParagraph(clsxMerge(TextSizeDefault, TextStyleDefault), content) + } + return renderParagraph(clsxMerge(options...), content) +} + +func ValidTextVariants(variants ...Variant) error { + for _, v := range variants { + switch v.(type) { + case TextSize: + case TextStyle: + default: + return fmt.Errorf("invalid text variant: %v", v) + } + } + return nil +} + +func renderHeading(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gui/elements/text.templ`, Line: 26, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderParagraph(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gui/elements/text.templ`, Line: 32, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderLink(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var5 := templ.GetChildren(ctx) + if templ_7745c5c3_Var5 == nil { + templ_7745c5c3_Var5 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var6 string + templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gui/elements/text.templ`, Line: 38, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderStrong(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var7 := templ.GetChildren(ctx) + if templ_7745c5c3_Var7 == nil { + templ_7745c5c3_Var7 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var8 string + templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gui/elements/text.templ`, Line: 44, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderEmphasis(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var9 := templ.GetChildren(ctx) + if templ_7745c5c3_Var9 == nil { + templ_7745c5c3_Var9 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var10 string + templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gui/elements/text.templ`, Line: 50, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderCode(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var11 := templ.GetChildren(ctx) + if templ_7745c5c3_Var11 == nil { + templ_7745c5c3_Var11 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var12 string + templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gui/elements/text.templ`, Line: 56, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +type TextSize int + +const ( + TextSizeDefault TextSize = iota + TextSizeSmall + TextSizeMedium + TextSizeLarge +) + +func (s TextSize) Attributes() templ.Attributes { + switch s { + case TextSizeSmall: + return templ.Attributes{ + "class": "text-sm", + } + case TextSizeLarge: + return templ.Attributes{ + "class": "text-xl", + } + } + return templ.Attributes{ + "class": "text-md", + } +} + +type TextStyle int + +const ( + TextStyleDefault TextStyle = iota + TextStyleHeading + TextStyleParagraph + TextStyleLink + TextStyleStrong + TextStyleEmphasis + TextStyleCode +) + +func (s TextStyle) Attributes() templ.Attributes { + switch s { + case TextStyleHeading: + return templ.Attributes{ + "class": "text-xl font-bold text-xl", + } + case TextStyleParagraph: + return templ.Attributes{ + "class": "text-base font-normal", + } + case TextStyleLink: + return templ.Attributes{ + "class": "text-blue-600 font-medium underline", + } + case TextStyleStrong: + return templ.Attributes{ + "class": "font-semibold text-md", + } + case TextStyleCode: + return templ.Attributes{ + "class": "text-stone-800 font-mono", + } + default: + return templ.Attributes{ + "class": "text-base font-normal text-md", + } + } +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/elements/utils.go b/internal/gui/elements/utils.go new file mode 100644 index 000000000..cec24317e --- /dev/null +++ b/internal/gui/elements/utils.go @@ -0,0 +1,37 @@ +package elements + +import ( + "strings" + + "github.com/a-h/templ" +) + +type Icon interface { + Render() templ.Component +} + +type Variant interface { + Attributes() templ.Attributes +} + +func clsxMerge(variants ...Variant) templ.Attributes { + combinedAttrs := templ.Attributes{} + var classElements []string + + for _, variant := range variants { + attrs := variant.Attributes() + if class, ok := attrs["class"].(string); ok { + classElements = append(classElements, strings.Fields(class)...) + } + for key, value := range attrs { + if key != "class" { + combinedAttrs[key] = value + } + } + } + + if len(classElements) > 0 { + combinedAttrs["class"] = strings.Join(classElements, " ") + } + return combinedAttrs +} diff --git a/internal/gui/views/home.templ b/internal/gui/views/home.templ new file mode 100644 index 000000000..a07436fe4 --- /dev/null +++ b/internal/gui/views/home.templ @@ -0,0 +1,23 @@ +package views + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/gui/elements" +) + +func HomeView(c echo.Context) error { + return echoComponentResponse(c, renderHomeView()) +} + +templ renderHomeView() { + @elements.Layout("Sonr.ID") { + @elements.Card(elements.SizeMedium) { + @elements.Text("Sonr.ID", elements.TextSizeLarge, elements.TextStyleHeading) + @elements.Text("Neo-tree is a file manager for NeoFS.", elements.TextSizeMedium, elements.TextStyleParagraph) + @elements.Spacer() + @elements.Button(elements.ButtonVariantPrimary) { + @elements.Text("Get Started", elements.TextSizeMedium, elements.TextStyleParagraph) + } + } + } +} diff --git a/internal/gui/views/home_templ.go b/internal/gui/views/home_templ.go new file mode 100644 index 000000000..be9507cef --- /dev/null +++ b/internal/gui/views/home_templ.go @@ -0,0 +1,124 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package views + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/gui/elements" +) + +func HomeView(c echo.Context) error { + return echoComponentResponse(c, renderHomeView()) +} + +func renderHomeView() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = elements.Text("Sonr.ID", elements.TextSizeLarge, elements.TextStyleHeading).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = elements.Text("Neo-tree is a file manager for NeoFS.", elements.TextSizeMedium, elements.TextStyleParagraph).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = elements.Spacer().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = elements.Text("Get Started", elements.TextSizeMedium, elements.TextStyleParagraph).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Button(elements.ButtonVariantPrimary).Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Card(elements.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Layout("Sonr.ID").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/views/login.templ b/internal/gui/views/login.templ new file mode 100644 index 000000000..56ea6f860 --- /dev/null +++ b/internal/gui/views/login.templ @@ -0,0 +1,23 @@ +package views + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/gui/elements" +) + +func LoginView(c echo.Context) error { + return echoComponentResponse(c, renderLoginView()) +} + +templ renderLoginView() { + @elements.Layout("Sonr.ID") { + @elements.Card(elements.SizeMedium) { + @elements.Text("Sonr.ID", elements.TextSizeLarge, elements.TextStyleHeading) + @elements.Text("Neo-tree is a file manager for NeoFS.", elements.TextSizeMedium, elements.TextStyleParagraph) + @elements.Spacer() + @elements.Button(elements.ButtonVariantPrimary) { + @elements.Text("Login", elements.TextSizeMedium, elements.TextStyleParagraph) + } + } + } +} diff --git a/internal/gui/views/login_templ.go b/internal/gui/views/login_templ.go new file mode 100644 index 000000000..b2b45a1a1 --- /dev/null +++ b/internal/gui/views/login_templ.go @@ -0,0 +1,124 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package views + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/gui/elements" +) + +func LoginView(c echo.Context) error { + return echoComponentResponse(c, renderLoginView()) +} + +func renderLoginView() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = elements.Text("Sonr.ID", elements.TextSizeLarge, elements.TextStyleHeading).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = elements.Text("Neo-tree is a file manager for NeoFS.", elements.TextSizeMedium, elements.TextStyleParagraph).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = elements.Spacer().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = elements.Text("Login", elements.TextSizeMedium, elements.TextStyleParagraph).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Button(elements.ButtonVariantPrimary).Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Card(elements.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Layout("Sonr.ID").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/views/openid.templ b/internal/gui/views/openid.templ new file mode 100644 index 000000000..3f1a1ae88 --- /dev/null +++ b/internal/gui/views/openid.templ @@ -0,0 +1,19 @@ +package views + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/gui/elements" +) + +func AuthorizeView(c echo.Context) error { + return echoComponentResponse(c, renderAuthorizeView()) +} + +templ renderAuthorizeView() { + @elements.Layout("Login | Sonr.ID") { + @elements.Card(elements.SizeMedium) { + @elements.Text("Sonr.ID", elements.TextSizeLarge, elements.TextStyleHeading) + @elements.Text("Neo-tree is a file manager for NeoFS.", elements.TextSizeMedium, elements.TextStyleParagraph) + } + } +} diff --git a/internal/gui/views/openid_templ.go b/internal/gui/views/openid_templ.go new file mode 100644 index 000000000..e02236ab6 --- /dev/null +++ b/internal/gui/views/openid_templ.go @@ -0,0 +1,90 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package views + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/gui/elements" +) + +func AuthorizeView(c echo.Context) error { + return echoComponentResponse(c, renderAuthorizeView()) +} + +func renderAuthorizeView() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = elements.Text("Sonr.ID", elements.TextSizeLarge, elements.TextStyleHeading).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = elements.Text("Neo-tree is a file manager for NeoFS.", elements.TextSizeMedium, elements.TextStyleParagraph).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Card(elements.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Layout("Login | Sonr.ID").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/views/register.templ b/internal/gui/views/register.templ new file mode 100644 index 000000000..fb9c1fe68 --- /dev/null +++ b/internal/gui/views/register.templ @@ -0,0 +1,33 @@ +package views + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/gui/elements" +) + +func RegisterView(c echo.Context) error { + return echoComponentResponse(c, renderRegisterView()) +} + +templ renderRegisterView() { + @elements.Layout("Register | Sonr.ID") { + @elements.Card(elements.SizeMedium) { + @elements.Text("Sonr.ID", elements.TextSizeLarge, elements.TextStyleHeading) + @elements.Text("Neo-tree is a file manager for NeoFS.", elements.TextSizeMedium, elements.TextStyleParagraph) + } + @elements.Card(elements.SizeMedium) { +

Welcome to Neo-tree

+

Neo-tree is a file manager for NeoFS.

+ } + @elements.Card(elements.SizeMedium) { +
+
+
+

Welcome to Neo-tree

+

Neo-tree is a file manager for NeoFS.

+
+
+
+ } + } +} diff --git a/internal/gui/views/register_templ.go b/internal/gui/views/register_templ.go new file mode 100644 index 000000000..19dbc9f03 --- /dev/null +++ b/internal/gui/views/register_templ.go @@ -0,0 +1,142 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package views + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/gui/elements" +) + +func RegisterView(c echo.Context) error { + return echoComponentResponse(c, renderRegisterView()) +} + +func renderRegisterView() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = elements.Text("Sonr.ID", elements.TextSizeLarge, elements.TextStyleHeading).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = elements.Text("Neo-tree is a file manager for NeoFS.", elements.TextSizeMedium, elements.TextStyleParagraph).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Card(elements.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Welcome to Neo-tree

Neo-tree is a file manager for NeoFS.

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Card(elements.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var5 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Welcome to Neo-tree

Neo-tree is a file manager for NeoFS.

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Card(elements.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = elements.Layout("Register | Sonr.ID").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gui/views/views.go b/internal/gui/views/views.go new file mode 100644 index 000000000..cc62f7aed --- /dev/null +++ b/internal/gui/views/views.go @@ -0,0 +1,27 @@ +package views + +import ( + "bytes" + + "github.com/a-h/templ" + "github.com/labstack/echo/v4" +) + +// render renders a templ.Component +func echoComponentResponse(c echo.Context, cmp templ.Component) error { + // Create a buffer to store the rendered HTML + buf := &bytes.Buffer{} + + // Render the component to the buffer + err := cmp.Render(c.Request().Context(), buf) + if err != nil { + return err + } + + // Set the content type + c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) + + // Write the buffered content to the response + _, err = c.Response().Write(buf.Bytes()) + return err +} diff --git a/internal/ipfs/base.go b/internal/ipfs/base.go deleted file mode 100644 index f67c89e8c..000000000 --- a/internal/ipfs/base.go +++ /dev/null @@ -1,88 +0,0 @@ -package ipfs - -import ( - "fmt" - "io" - "time" -) - -var ( - ErrNotInitialized = fmt.Errorf("IPFS client not initialized") - ErrNotMounted = fmt.Errorf("IPFS client not mounted") - ErrCIDNotFound = fmt.Errorf("CID not found") - ErrIPNSNotFound = fmt.Errorf("IPNS not found") - ErrInternal = fmt.Errorf("internal error") -) - -type FileSystem interface { - // NewFile initializes a File on the specified volume at path 'absFilePath'. - // - // * Accepts volume and an absolute file path. - // * Upon success, a vfs.File, representing the file's new path (location path + file relative path), will be returned. - // * On error, nil is returned for the file. - // * Note that not all file systems will have a "volume" and will therefore be "": - // file:///path/to/file has a volume of "" and name /path/to/file - // whereas - // s3://mybucket/path/to/file has a volume of "mybucket and name /path/to/file - // results in /tmp/dir1/newerdir/file.txt for the final vfs.File path. - // * The file may or may not already exist. - NewFile(volume string, absFilePath string) (File, error) - - // Name returns the name of the FileSystem ie: Amazon S3, os, Google Cloud Storage, etc. - Name() string -} - -type File interface { - io.Closer - io.Reader - io.Seeker - io.Writer - fmt.Stringer - - // Exists returns boolean if the file exists on the file system. Returns an error, if any. - Exists() (bool, error) - - // CopyToFile will copy the current file to the provided file instance. - // - // * In the case of an error, nil is returned for the file. - // * CopyToLocation should use native functions when possible within the same scheme. - // * If the file already exists, the contents will be overwritten with the current file's contents. - // * CopyToFile will Close both the source and target Files which therefore can't be appended to without first - // calling Seek() to move the cursor to the end of the file. - CopyToFile(file File) error - - // MoveToFile will move the current file to the provided file instance. - // - // * If the file already exists, the contents will be overwritten with the current file's contents. - // * The current instance of the file will be removed. - // * MoveToFile will Close both the source and target Files which therefore can't be appended to without first - // calling Seek() to move the cursor to the end of the file. - MoveToFile(file File) error - - // Delete unlinks the File on the file system. - Delete() error - - // LastModified returns the timestamp the file was last modified (as *time.Time). - LastModified() (*time.Time, error) - - // Size returns the size of the file in bytes. - Size() (uint64, error) - - // Path returns absolute path, including filename, ie /some/path/to/file.txt - // - // If the directory portion of a file is desired, call - // someFile.Location().Path() - Path() string - - // Name returns the base name of the file path. - // - // For file:///some/path/to/file.txt, it would return file.txt - Name() string - - // Touch creates a zero-length file on the vfs.File if no File exists. Update File's last modified timestamp. - // Returns error if unable to touch File. - Touch() error - - // URI returns the fully qualified absolute URI for the File. IE, s3://bucket/some/path/to/file.txt - URI() string -} diff --git a/internal/ipfs/ipfs.go b/internal/ipfs/ipfs.go deleted file mode 100644 index 0af936f9d..000000000 --- a/internal/ipfs/ipfs.go +++ /dev/null @@ -1,173 +0,0 @@ -package ipfs - -import ( - "context" - "fmt" - "io" - "os" - "path/filepath" - - "github.com/ipfs/boxo/files" - "github.com/ipfs/boxo/path" - "github.com/ipfs/kubo/client/rpc" -) - -var ( - initialized bool - localMount bool - ipfsClient *rpc.HttpApi - ipfsFS FileSystem -) - -// init initializes the IPFS client and checks for local mounts -func init() { - var err error - ipfsClient, err = rpc.NewLocalApi() - if err != nil { - initialized = false - localMount = false - return - } - - initialized = true - ipfsFS = &IPFSFileSystem{client: ipfsClient} - - // Check if /ipfs and /ipns are mounted using os package - _, errIPFS := os.Stat("/ipfs") - _, errIPNS := os.Stat("/ipns") - localMount = !os.IsNotExist(errIPFS) && !os.IsNotExist(errIPNS) -} - -// GetFileSystem returns the IPFS FileSystem implementation -func GetFileSystem() FileSystem { - return ipfsFS -} - -// AddFile adds a single file to IPFS and returns its CID -func AddFile(ctx context.Context, filePath string) (string, error) { - if !initialized { - return "", ErrNotInitialized - } - - file, err := os.Open(filePath) - if err != nil { - return "", fmt.Errorf("failed to open file: %w", err) - } - defer file.Close() - - fileNode := files.NewReaderFile(file) - - cidFile, err := ipfsClient.Unixfs().Add(ctx, fileNode) - if err != nil { - return "", fmt.Errorf("failed to add file to IPFS: %w", err) - } - - return cidFile.String(), nil -} - -// AddFolder adds a folder and its contents to IPFS and returns the CID of the folder -func AddFolder(ctx context.Context, folderPath string) (string, error) { - if !initialized { - return "", ErrNotInitialized - } - - stat, err := os.Stat(folderPath) - if err != nil { - return "", fmt.Errorf("failed to get folder info: %w", err) - } - - if !stat.IsDir() { - return "", fmt.Errorf("provided path is not a directory") - } - - folderNode, err := files.NewSerialFile(folderPath, false, stat) - if err != nil { - return "", fmt.Errorf("failed to create folder node: %w", err) - } - - cidFolder, err := ipfsClient.Unixfs().Add(ctx, folderNode) - if err != nil { - return "", fmt.Errorf("failed to add folder to IPFS: %w", err) - } - - return cidFolder.String(), nil -} - -func GetCID(ctx context.Context, cid string) ([]byte, error) { - if !initialized { - return nil, ErrNotInitialized - } - - if localMount { - // Try to read from local filesystem first - data, err := os.ReadFile(filepath.Join("/ipfs", cid)) - if err == nil { - return data, nil - } - // If local read fails, fall back to IPFS client - } - - // Use IPFS client to fetch the data - p, err := path.NewPath("/ipfs/" + cid) - if err != nil { - return nil, err - } - n, err := ipfsClient.Unixfs().Get(ctx, p) - if err != nil { - return nil, err - } - - return readNodeData(n) -} - -func GetIPNS(ctx context.Context, name string) ([]byte, error) { - if !initialized { - return nil, ErrNotInitialized - } - - if localMount { - // Try to read from local filesystem first - data, err := os.ReadFile(filepath.Join("/ipns", name)) - if err == nil { - return data, nil - } - // If local read fails, fall back to IPFS client - } - - // Use IPFS client to fetch the data - p, err := path.NewPath("/ipns/" + name) - if err != nil { - return nil, err - } - n, err := ipfsClient.Unixfs().Get(ctx, p) - if err != nil { - return nil, err - } - - return readNodeData(n) -} - -func PinCID(ctx context.Context, cid string, name string) error { - if !initialized { - return ErrNotInitialized - } - - p, err := path.NewPath(cid) - if err != nil { - return ErrNotInitialized - } - err = ipfsClient.Pin().Add(ctx, p) - if err != nil { - return ErrInternal - } - return nil -} - -func readNodeData(n files.Node) ([]byte, error) { - switch n := n.(type) { - case files.File: - return io.ReadAll(n) - default: - return nil, fmt.Errorf("unsupported node type: %T", n) - } -} diff --git a/internal/ipfs/vfs.go b/internal/ipfs/vfs.go deleted file mode 100644 index 1b52ae77a..000000000 --- a/internal/ipfs/vfs.go +++ /dev/null @@ -1,119 +0,0 @@ -package ipfs - -import ( - "context" - "fmt" - "time" - - "github.com/ipfs/boxo/files" - "github.com/ipfs/boxo/path" - "github.com/ipfs/kubo/client/rpc" -) - -type IPFSFile struct { - node files.Node - path string - name string - client *rpc.HttpApi -} - -func (f *IPFSFile) Close() error { - return nil // IPFS nodes don't need to be closed -} - -func (f *IPFSFile) Read(p []byte) (n int, err error) { - if file, ok := f.node.(files.File); ok { - return file.Read(p) - } - return 0, fmt.Errorf("not a file") -} - -func (f *IPFSFile) Seek(offset int64, whence int) (int64, error) { - if file, ok := f.node.(files.File); ok { - return file.Seek(offset, whence) - } - return 0, fmt.Errorf("not a file") -} - -func (f *IPFSFile) Write(p []byte) (n int, err error) { - return 0, fmt.Errorf("write operation not supported for IPFS files") -} - -func (f *IPFSFile) String() string { - return f.path -} - -func (f *IPFSFile) Exists() (bool, error) { - // In IPFS, if we have the node, it exists - return true, nil -} - -func (f *IPFSFile) CopyToFile(file File) error { - // Implementation depends on how you want to handle copying between IPFS and other file types - return fmt.Errorf("CopyToFile not implemented for IPFS files") -} - -func (f *IPFSFile) MoveToFile(file File) error { - // Moving files in IPFS doesn't make sense in the traditional way - return fmt.Errorf("MoveToFile not applicable for IPFS files") -} - -func (f *IPFSFile) Delete() error { - // Deleting in IPFS is not straightforward, might need to implement unpinning - return fmt.Errorf("Delete operation not supported for IPFS files") -} - -func (f *IPFSFile) LastModified() (*time.Time, error) { - // IPFS doesn't have a concept of last modified time - return nil, fmt.Errorf("LastModified not applicable for IPFS files") -} - -func (f *IPFSFile) Size() (uint64, error) { - if file, ok := f.node.(files.File); ok { - s, _ := file.Size() - return uint64(s), nil - } - return 0, fmt.Errorf("not a file") -} - -func (f *IPFSFile) Path() string { - return f.path -} - -func (f *IPFSFile) Name() string { - return f.name -} - -func (f *IPFSFile) Touch() error { - return fmt.Errorf("Touch operation not supported for IPFS files") -} - -func (f *IPFSFile) URI() string { - return fmt.Sprintf("ipfs://%s", f.path) -} - -type IPFSFileSystem struct { - client *rpc.HttpApi -} - -func (fs *IPFSFileSystem) NewFile(volume string, absFilePath string) (File, error) { - p, err := path.NewPath(absFilePath) - if err != nil { - return nil, err - } - node, err := fs.client.Unixfs().Get(context.Background(), p) - if err != nil { - return nil, err - } - - return &IPFSFile{ - node: node, - path: absFilePath, - name: p.String(), - client: fs.client, - }, nil -} - -func (fs *IPFSFileSystem) Name() string { - return "IPFS" -} diff --git a/internal/mdw/authz.go b/internal/mdw/authz.go new file mode 100644 index 000000000..75fdf9fe5 --- /dev/null +++ b/internal/mdw/authz.go @@ -0,0 +1,72 @@ +package mdw + +import ( + "net/http" + + echojwt "github.com/labstack/echo-jwt/v4" + "github.com/labstack/echo/v4" + "gopkg.in/macaroon.v2" +) + +type Authz struct { + echo.Context + echojwt.Config + + signKey []byte +} + +func newAuthz(c echo.Context, signKey []byte) *Authz { + return &Authz{Context: c, signKey: signKey} +} + +func (a *Authz) Accessible(route string, handler echo.HandlerFunc) echo.HandlerFunc { + // Verify the macaroon + // verified := a.Verify(a.signKey, func(caveat string) error { + // Implement your caveat verification logic here + // For example, you might check if the caveat is still valid (e.g., not expired) + // return nil // Return nil if the caveat is valid + // }, nil) + // if !verified { + // return func(c echo.Context) error { + // return c.JSON(http.StatusUnauthorized, map[string]string{"error": "Invalid macaroon"}) + // } + // } + a.SetPath(route) + return handler +} + +func ValidateMacaroonMiddleware(secretKey []byte, location string) echo.MiddlewareFunc { + return func(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + // Extract the macaroon from the Authorization header + auth := c.Request().Header.Get("Authorization") + if auth == "" { + return c.JSON(http.StatusUnauthorized, map[string]string{"error": "Missing Authorization header"}) + } + + // Decode the macaroon + mac, err := macaroon.Base64Decode([]byte(auth)) + if err != nil { + return c.JSON(http.StatusBadRequest, map[string]string{"error": "Invalid macaroon encoding"}) + } + + token, err := macaroon.New(secretKey, mac, location, macaroon.LatestVersion) + if err != nil { + return c.JSON(http.StatusBadRequest, map[string]string{"error": "Invalid macaroon"}) + } + + // Verify the macaroon + err = token.Verify(secretKey, func(caveat string) error { + // Implement your caveat verification logic here + // For example, you might check if the caveat is still valid (e.g., not expired) + return nil // Return nil if the caveat is valid + }, nil) + if err != nil { + return c.JSON(http.StatusUnauthorized, map[string]string{"error": "Invalid macaroon"}) + } + + // Macaroon is valid, proceed to the next handler + return next(c) + } + } +} diff --git a/internal/mdw/headers.go b/internal/mdw/headers.go new file mode 100644 index 000000000..bc207de46 --- /dev/null +++ b/internal/mdw/headers.go @@ -0,0 +1,62 @@ +package mdw + +import "github.com/labstack/echo/v4" + +type RequestHeaders struct { + Authorization *string `header:"Authorization"` + CacheControl *string `header:"Cache-Control"` + DeviceMemory *string `header:"Device-Memory"` + Forwarded *string `header:"Forwarded"` + From *string `header:"From"` + Host *string `header:"Host"` + Link *string `header:"Link"` + PermissionsPolicy *string `header:"Permissions-Policy"` + ProxyAuthorization *string `header:"Proxy-Authorization"` + Referer *string `header:"Referer"` + UserAgent *string `header:"User-Agent"` + ViewportWidth *string `header:"Viewport-Width"` + Width *string `header:"Width"` + WWWAuthenticate *string `header:"WWW-Authenticate"` + + // HTMX Specific + HXBoosted *string `header:"HX-Boosted"` + HXCurrentURL *string `header:"HX-Current-URL"` + HXHistoryRestoreRequest *string `header:"HX-History-Restore-Request"` + HXPrompt *string `header:"HX-Prompt"` + HXRequest *string `header:"HX-Request"` + HXTarget *string `header:"HX-Target"` + HXTriggerName *string `header:"HX-Trigger-Name"` + HXTrigger *string `header:"HX-Trigger"` +} + +type ResponseHeaders struct { + AcceptCH *string `header:"Accept-CH"` + AccessControlAllowCredentials *string `header:"Access-Control-Allow-Credentials"` + AccessControlAllowHeaders *string `header:"Access-Control-Allow-Headers"` + AccessControlAllowMethods *string `header:"Access-Control-Allow-Methods"` + AccessControlExposeHeaders *string `header:"Access-Control-Expose-Headers"` + AccessControlRequestHeaders *string `header:"Access-Control-Request-Headers"` + ContentSecurityPolicy *string `header:"Content-Security-Policy"` + CrossOriginEmbedderPolicy *string `header:"Cross-Origin-Embedder-Policy"` + PermissionsPolicy *string `header:"Permissions-Policy"` + ProxyAuthorization *string `header:"Proxy-Authorization"` + WWWAuthenticate *string `header:"WWW-Authenticate"` + + // HTMX Specific + HXLocation *string `header:"HX-Location"` + HXPushURL *string `header:"HX-Push-Url"` + HXRedirect *string `header:"HX-Redirect"` + HXRefresh *string `header:"HX-Refresh"` + HXReplaceURL *string `header:"HX-Replace-Url"` + HXReswap *string `header:"HX-Reswap"` + HXRetarget *string `header:"HX-Retarget"` + HXReselect *string `header:"HX-Reselect"` + HXTrigger *string `header:"HX-Trigger"` + HXTriggerAfterSettle *string `header:"HX-Trigger-After-Settle"` + HXTriggerAfterSwap *string `header:"HX-Trigger-After-Swap"` +} + +func bindRequestHeaders(c echo.Context) { + headers := new(RequestHeaders) + c.Bind(headers) +} diff --git a/internal/mdw/session.go b/internal/mdw/session.go new file mode 100644 index 000000000..3c1d921a0 --- /dev/null +++ b/internal/mdw/session.go @@ -0,0 +1,71 @@ +package mdw + +import ( + "net/http" + "time" + + "github.com/donseba/go-htmx" + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/db" + "github.com/segmentio/ksuid" +) + +// UseSession establishes a Session Cookie. +func UseSession(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + sc := newSession(c) + bindRequestHeaders(sc) + return next(sc) + } +} + +// GetSession returns the current Session +func GetSession(c echo.Context) *Session { + return c.(*Session) +} + +type Session struct { + echo.Context + htmx *htmx.HTMX + dB *db.DB +} + +func (c *Session) ID() string { + return readCookie(c, "session") +} + +func (c *Session) Htmx() *htmx.HTMX { + return c.htmx +} + +func (c *Session) DB() *db.DB { + return c.dB +} + +func newSession(c echo.Context) *Session { + s := &Session{Context: c} + if val := readCookie(c, "session"); val == "" { + id := ksuid.New().String() + writeCookie(c, "session", id) + } + return s +} + +func readCookie(c echo.Context, key string) string { + cookie, err := c.Cookie(key) + if err != nil { + return "" + } + if cookie == nil { + return "" + } + return cookie.Value +} + +func writeCookie(c echo.Context, key string, value string) { + cookie := new(http.Cookie) + cookie.Name = key + cookie.Value = value + cookie.Expires = time.Now().Add(24 * time.Hour) + c.SetCookie(cookie) +} diff --git a/internal/mdw/status.go b/internal/mdw/status.go new file mode 100644 index 000000000..68a712b86 --- /dev/null +++ b/internal/mdw/status.go @@ -0,0 +1 @@ +package mdw diff --git a/internal/svc/openid.go b/internal/svc/openid.go new file mode 100644 index 000000000..29996fb98 --- /dev/null +++ b/internal/svc/openid.go @@ -0,0 +1,44 @@ +package svc + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/db/orm" +) + +func GrantAuthorization(e echo.Context) error { + // Implement authorization endpoint using passkey authentication + // Store session data in cache + return nil +} + +func GetJWKS(e echo.Context) error { + // Implement token endpoint + // Use cached session data for validation + return nil +} + +func GetToken(e echo.Context) error { + // Implement token endpoint + // Use cached session data for validation + return nil +} + +func GetDiscovery(e echo.Context) error { + baseURL := "https://" + e.Request().Host // Ensure this is the correct base URL for your service + discoveryDoc := &orm.DiscoveryDocument{ + Issuer: "https://sonr.id", + AuthorizationEndpoint: "https://api.sonr.id/auth", + TokenEndpoint: "https://api.sonr.id/token", + UserinfoEndpoint: "https://api.sonr.id/userinfo", + JwksUri: baseURL + "/jwks", // You'll need to implement this endpoint + RegistrationEndpoint: baseURL + "/register", + ScopesSupported: []string{"openid", "profile", "email", "web3", "sonr"}, + ResponseTypesSupported: []string{"code"}, + ResponseModesSupported: []string{"query", "form_post"}, + GrantTypesSupported: []string{"authorization_code", "refresh_token"}, + AcrValuesSupported: []string{"passkey"}, + SubjectTypesSupported: []string{"public"}, + ClaimsSupported: []string{"sub", "iss", "name", "email"}, + } + return e.JSON(200, discoveryDoc) +} diff --git a/internal/svc/webauth.go b/internal/svc/webauth.go new file mode 100644 index 000000000..ac08255c7 --- /dev/null +++ b/internal/svc/webauth.go @@ -0,0 +1,43 @@ +package svc + +import ( + "encoding/json" + "fmt" + + "github.com/go-webauthn/webauthn/protocol" + "github.com/labstack/echo/v4" +) + +func CheckSubjectIsValid(e echo.Context) error { + credentialID := e.FormValue("credentialID") + return e.JSON(200, credentialID) +} + +func HandleCredentialAssertion(e echo.Context) error { + return e.JSON(200, "HandleCredentialAssertion") +} + +func HandleCredentialCreation(e echo.Context) error { + // Get the serialized credential data from the form + credentialDataJSON := e.FormValue("credentialData") + + // Deserialize the JSON into a temporary struct + var ccr protocol.CredentialCreationResponse + err := json.Unmarshal([]byte(credentialDataJSON), &ccr) + if err != nil { + return e.JSON(500, err.Error()) + } + // + // // Parse the CredentialCreationResponse + // parsedData, err := ccr.Parse() + // if err != nil { + // return e.JSON(500, err.Error()) + // } + // + // // Create the Credential + // // credential := orm.NewCredential(parsedData, e.Request().Host, "") + // + // // Set additional fields + // credential.Controller = "" // Set this to the appropriate controller value + return e.JSON(200, fmt.Sprintf("REGISTER: %s", string(ccr.ID))) +} diff --git a/internal/vfs/assemble.go b/internal/vfs/assemble.go index e8928c287..07545ebc7 100644 --- a/internal/vfs/assemble.go +++ b/internal/vfs/assemble.go @@ -5,8 +5,8 @@ import ( ) var ( - kServiceWorkerFileName = "sw.js" - kVaultFileName = "vault.wasm" + kServiceWorkerFileName = "server/sw.js" + kVaultFileName = "server/vault.wasm" kIndexFileName = "index.html" ) @@ -14,7 +14,6 @@ func AssembleDirectory() files.Directory { fileMap := map[string]files.Node{ kVaultFileName: DWNWasmFile(), kServiceWorkerFileName: SWJSFile(), - kIndexFileName: IndexHTMLFile(), } return files.NewMapDirectory(fileMap) diff --git a/internal/vfs/dwn.wasm b/internal/vfs/dwn.wasm index 633e13130..272ccbefa 100755 Binary files a/internal/vfs/dwn.wasm and b/internal/vfs/dwn.wasm differ diff --git a/internal/vfs/embed.go b/internal/vfs/embed.go index 12e246511..d7dcc4db6 100644 --- a/internal/vfs/embed.go +++ b/internal/vfs/embed.go @@ -9,20 +9,14 @@ import ( //go:embed dwn.wasm var dwnWasmData []byte +//go:embed sw.js +var swJSData []byte + func DWNWasmFile() files.Node { return files.NewBytesFile(dwnWasmData) } -//go:embed sw.js -var swJSData []byte - +// Use ServiceWorkerJS template to generate the service worker file func SWJSFile() files.Node { return files.NewBytesFile(swJSData) } - -//go:embed index.html -var indexHTMLData []byte - -func IndexHTMLFile() files.Node { - return files.NewBytesFile(indexHTMLData) -} diff --git a/internal/vfs/index.html b/internal/vfs/index.html deleted file mode 100644 index 6950d5bcf..000000000 --- a/internal/vfs/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - Sonr Vault - - - diff --git a/internal/vfs/sw.js b/internal/vfs/sw.js index 990e2d399..a5654ed5d 100644 --- a/internal/vfs/sw.js +++ b/internal/vfs/sw.js @@ -1,9 +1,8 @@ importScripts( "https://cdn.jsdelivr.net/gh/golang/go@go1.18.4/misc/wasm/wasm_exec.js", -); - -importScripts( "https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v1.1.0/sw.js", + "https://cdn.jsdelivr.net/npm/htmx.org@1.9.12/dist/htmx.min.js", + "https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js", ); registerWasmHTTPListener("dwn.wasm"); diff --git a/internal/vfs/wasm/request.go b/internal/vfs/wasm/request.go new file mode 100644 index 000000000..c7aeb7d5a --- /dev/null +++ b/internal/vfs/wasm/request.go @@ -0,0 +1,37 @@ +//go:build js && wasm + +package wasm + +import ( + "bytes" + "net/http" + "net/http/httptest" + "syscall/js" + + promise "github.com/nlepage/go-js-promise" +) + +// Request builds and returns the equivalent http.Request +func Request(r js.Value) *http.Request { + jsBody := js.Global().Get("Uint8Array").New(promise.Await(r.Call("arrayBuffer"))) + body := make([]byte, jsBody.Get("length").Int()) + js.CopyBytesToGo(body, jsBody) + + req := httptest.NewRequest( + r.Get("method").String(), + r.Get("url").String(), + bytes.NewBuffer(body), + ) + + headersIt := r.Get("headers").Call("entries") + for { + e := headersIt.Call("next") + if e.Get("done").Bool() { + break + } + v := e.Get("value") + req.Header.Set(v.Index(0).String(), v.Index(1).String()) + } + + return req +} diff --git a/internal/vfs/wasm/response.go b/internal/vfs/wasm/response.go new file mode 100644 index 000000000..632538b87 --- /dev/null +++ b/internal/vfs/wasm/response.go @@ -0,0 +1,50 @@ +//go:build js && wasm + +package wasm + +import ( + "io" + "net/http/httptest" + "syscall/js" +) + +// ResponseRecorder uses httptest.ResponseRecorder to build a JS Response +type ResponseRecorder struct { + *httptest.ResponseRecorder +} + +// NewResponseRecorder returns a new ResponseRecorder +func NewResponseRecorder() ResponseRecorder { + return ResponseRecorder{httptest.NewRecorder()} +} + +// JSResponse builds and returns the equivalent JS Response +func (rr ResponseRecorder) JSResponse() js.Value { + res := rr.Result() + + body := js.Undefined() + if res.ContentLength != 0 { + b, err := io.ReadAll(res.Body) + if err != nil { + panic(err) + } + body = js.Global().Get("Uint8Array").New(len(b)) + js.CopyBytesToJS(body, b) + } + + init := make(map[string]interface{}, 2) + + if res.StatusCode != 0 { + init["status"] = res.StatusCode + } + + if len(res.Header) != 0 { + headers := make(map[string]interface{}, len(res.Header)) + for k := range res.Header { + headers[k] = res.Header.Get(k) + } + init["headers"] = headers + } + + return js.Global().Get("Response").New(body, init) +} diff --git a/internal/vfs/wasm/serve.go b/internal/vfs/wasm/serve.go new file mode 100644 index 000000000..846280928 --- /dev/null +++ b/internal/vfs/wasm/serve.go @@ -0,0 +1,59 @@ +//go:build js && wasm + +package wasm + +import ( + "fmt" + "net/http" + "strings" + "syscall/js" + + promise "github.com/nlepage/go-js-promise" +) + +// Serve serves HTTP requests using handler or http.DefaultServeMux if handler is nil. +func Serve(handler http.Handler) func() { + h := handler + if h == nil { + h = http.DefaultServeMux + } + + prefix := js.Global().Get("wasmhttp").Get("path").String() + for strings.HasSuffix(prefix, "/") { + prefix = strings.TrimSuffix(prefix, "/") + } + + if prefix != "" { + mux := http.NewServeMux() + mux.Handle(prefix+"/", http.StripPrefix(prefix, h)) + h = mux + } + + cb := js.FuncOf(func(_ js.Value, args []js.Value) interface{} { + resPromise, resolve, reject := promise.New() + + go func() { + defer func() { + if r := recover(); r != nil { + if err, ok := r.(error); ok { + reject(fmt.Sprintf("wasmhttp: panic: %+v\n", err)) + } else { + reject(fmt.Sprintf("wasmhttp: panic: %v\n", r)) + } + } + }() + + res := NewResponseRecorder() + + h.ServeHTTP(res, Request(args[0])) + + resolve(res.JSResponse()) + }() + + return resPromise + }) + + js.Global().Get("wasmhttp").Call("setHandler", cb) + + return cb.Release +} diff --git a/motr/main.go b/motr/main.go new file mode 100644 index 000000000..5f53f4c17 --- /dev/null +++ b/motr/main.go @@ -0,0 +1,43 @@ +//go:build wasm + +package main + +import ( + "github.com/labstack/echo/v4" + "github.com/syumai/workers" + + "github.com/onsonr/sonr/internal/gui/views" + "github.com/onsonr/sonr/internal/mdw" + "github.com/onsonr/sonr/internal/svc" +) + +func main() { + // Configure the server + e := echo.New() + + // Use Middlewares + e.Use(mdw.UseSession) + + // Setup routes + registerRoutes(e) + + // Serve Worker + workers.Serve(e) +} + +func registerRoutes(e *echo.Echo) { + // Add Public Pages + e.GET("/", views.HomeView) + e.GET("/login", views.LoginView) + e.POST("/login/:identifier", svc.HandleCredentialAssertion) + e.GET("/register", views.RegisterView) + e.POST("/register/:subject", svc.HandleCredentialCreation) + e.POST("/register/:subject/check", svc.CheckSubjectIsValid) + + // Add Authenticated Pages + e.GET("/authorize", views.AuthorizeView) + e.GET("/authorize/discovery", svc.GetDiscovery) + e.GET("/authorize/jwks", svc.GetJWKS) + e.GET("/authorize/token", svc.GetToken) + e.POST("/authorize/:origin/grant/:subject", svc.GrantAuthorization) +} diff --git a/motr/wrangler.toml b/motr/wrangler.toml new file mode 100644 index 000000000..10bce7926 --- /dev/null +++ b/motr/wrangler.toml @@ -0,0 +1,10 @@ +name = "sonr-id" +main = "./build/worker.mjs" +compatibility_date = "2024-07-26" + +[dev] +ip = "localhost" +port = 4202 + +[build] +command = "devbox run build:motr" diff --git a/pkg/controller/chainexec.go b/pkg/controller/chainexec.go deleted file mode 100644 index b0b429f89..000000000 --- a/pkg/controller/chainexec.go +++ /dev/null @@ -1 +0,0 @@ -package controller diff --git a/pkg/controller/didauth.go b/pkg/controller/didauth.go deleted file mode 100644 index b0b429f89..000000000 --- a/pkg/controller/didauth.go +++ /dev/null @@ -1 +0,0 @@ -package controller diff --git a/pkg/controller/signer.go b/pkg/controller/signer.go deleted file mode 100644 index b0b429f89..000000000 --- a/pkg/controller/signer.go +++ /dev/null @@ -1 +0,0 @@ -package controller diff --git a/pkg/resolver/ipfs.go b/pkg/resolver/ipfs.go deleted file mode 100644 index d356a7b72..000000000 --- a/pkg/resolver/ipfs.go +++ /dev/null @@ -1 +0,0 @@ -package resolver diff --git a/pkg/resolver/sonr.go b/pkg/resolver/sonr.go deleted file mode 100644 index d356a7b72..000000000 --- a/pkg/resolver/sonr.go +++ /dev/null @@ -1 +0,0 @@ -package resolver diff --git a/pkl/vault.pkl b/pkl/orm.pkl similarity index 66% rename from pkl/vault.pkl rename to pkl/orm.pkl index 26da3c29f..a03c4776f 100644 --- a/pkl/vault.pkl +++ b/pkl/orm.pkl @@ -1,42 +1,14 @@ -@go.Package { name = "github.com/onsonr/sonr/gen/vault" } +@go.Package { name = "github.com/onsonr/sonr/internal/db/orm" } -module vault +module orm import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" - -abstract class Client { - chainId: String - keyringBackend: String - output: String - node: String - broadcastMode: String - apiUrl: String - addressPrefix: String -} - -class Sonr extends Client { - chainId = "sonr-testnet-1" - keyringBackend = "test" - output = "json" - rpcUrl = "tcp://localhost:26657" - broadcastMode = "async" - apiUrl = "http://localhost:1317" - addressPrefix = "idx" -} - -abstract class DB { - filename: String -} - -class Sqlite extends DB { - filename = "vault.db" -} - class PrimaryKey extends go.Field { structTags { - ["gorm"] = "primaryKey" + ["gorm"] = "primaryKey,autoIncrement" ["json"] = "%{name},omitempty" + ["query"] = "%{name}" } } @@ -61,12 +33,6 @@ class NotNull extends go.Field { } } -class AutoIncrement extends go.Field { - structTags { - ["gorm"] = "autoIncrement" - } -} - class ForeignKey extends go.Field { references: String structTags { @@ -74,19 +40,14 @@ class ForeignKey extends go.Field { } } -abstract class Model { - table: String -} - class JsonField extends go.Field { structTags { ["json"] = "%{name},omitempty" + ["param"] = "%{name}" } } -class Account extends Model { - table = "accounts" - +class Account { @PrimaryKey id: UInt @@ -97,15 +58,13 @@ class Account extends Model { address: String @JsonField - publicKey: Dynamic + publicKey: String @JsonField createdAt: String? } -class Asset extends Model { - table = "assets" - +class Asset { @PrimaryKey id: UInt @@ -125,9 +84,7 @@ class Asset extends Model { createdAt: String? } -class Chain extends Model { - table = "chains" - +class Chain { @PrimaryKey id: UInt @@ -141,9 +98,7 @@ class Chain extends Model { createdAt: String? } -class Credential extends Model { - table = "credentials" - +class Credential { @PrimaryKey id: UInt @@ -160,10 +115,10 @@ class Credential extends Model { origin: String @JsonField - credentialId: Dynamic + credentialId: String @JsonField - publicKey: Dynamic + publicKey: String @JsonField transport: String @@ -193,9 +148,7 @@ class Credential extends Model { updatedAt: String? } -class Profile extends Model { - table = "profiles" - +class Profile { @PrimaryKey id: String @@ -221,9 +174,7 @@ class Profile extends Model { updatedAt: String? } -class Property extends Model { - table = "properties" - +class Property { @PrimaryKey id: UInt @@ -234,15 +185,13 @@ class Property extends Model { key: String @JsonField - accumulator: Dynamic + accumulator: String @JsonField - propertyKey: Dynamic + propertyKey: String } -class Keyshare extends Model { - table = "keyshares" - +class Keyshare { @PrimaryKey id: UInt @@ -256,7 +205,7 @@ class Keyshare extends Model { protocol: String @JsonField - publicKey: Dynamic + publicKey: String @JsonField role: Int @@ -268,9 +217,7 @@ class Keyshare extends Model { createdAt: String? } -class PublicKey extends Model { - table = "public_keys" - +class PublicKey { @PrimaryKey id: UInt @@ -284,24 +231,13 @@ class PublicKey extends Model { encoding: Int @JsonField - raw: Dynamic - - @JsonField - hex: String - - @JsonField - multibase: String - - @JsonField - jwk: Dynamic + jwk: String @JsonField createdAt: String? } -class Permission extends Model { - table = "permissions" - +class Permission { @PrimaryKey id: UInt @@ -320,3 +256,54 @@ class Permission extends Model { @JsonField updatedAt: String? } + +// +// OpenID Connect +// + +class DiscoveryDocument { + @JsonField + issuer: String + + @JsonField + authorization_endpoint: String + + @JsonField + token_endpoint: String + + @JsonField + userinfo_endpoint: String + + @JsonField + jwks_uri: String + + @JsonField + registration_endpoint: String + + @JsonField + scopes_supported: List + + @JsonField + response_types_supported: List + + @JsonField + response_modes_supported: List + + @JsonField + subject_types_supported: List + + @JsonField + id_token_signing_alg_values_supported: List + + @JsonField + claims_supported: List + + @JsonField + grant_types_supported: List + + @JsonField + acr_values_supported: List + + @JsonField + token_endpoint_auth_methods_supported: List +} diff --git a/pkl/txns.pkl b/pkl/txns.pkl index 58a509354..4482ab154 100644 --- a/pkl/txns.pkl +++ b/pkl/txns.pkl @@ -1,4 +1,4 @@ -@go.Package { name = "github.com/onsonr/sonr/gen/transactions" } +@go.Package { name = "github.com/onsonr/sonr/txns" } module transactions diff --git a/pkl/webauth.pkl b/pkl/webauth.pkl deleted file mode 100644 index 850ce6934..000000000 --- a/pkl/webauth.pkl +++ /dev/null @@ -1,101 +0,0 @@ -@go.Package { name = "github.com/onsonr/sonr/gen/protocol" } - -module protocol - -import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" - -class CredentialCreation { - response: PublicKeyCredentialCreationOptions = new JsonField { name = "publicKey"; type = "PublicKeyCredentialCreationOptions" } -} - -class CredentialAssertion { - response: PublicKeyCredentialRequestOptions = new JsonField { name = "publicKey"; type = "PublicKeyCredentialRequestOptions" } -} - -class PublicKeyCredentialCreationOptions { - relyingParty: RelyingPartyEntity = new JsonField { name = "rp"; type = "RelyingPartyEntity" } - user: UserEntity = new JsonField { name = "user"; type = "UserEntity" } - challenge: URLEncodedBase64 = new JsonField { name = "challenge"; type = "URLEncodedBase64" } - parameters: Listing[CredentialParameter]? = new JsonField { name = "pubKeyCredParams"; type = "[]CredentialParameter" } - timeout: Int? = new JsonField { name = "timeout"; type = "int" } - credentialExcludeList: Listing[CredentialDescriptor]? = new JsonField { name = "excludeCredentials"; type = "[]CredentialDescriptor" } - authenticatorSelection: AuthenticatorSelection? = new JsonField { name = "authenticatorSelection"; type = "AuthenticatorSelection" } - hints: Listing[PublicKeyCredentialHints]? = new JsonField { name = "hints"; type = "[]PublicKeyCredentialHints" } - attestation: ConveyancePreference? = new JsonField { name = "attestation"; type = "ConveyancePreference" } - attestationFormats: Listing[AttestationFormat]? = new JsonField { name = "attestationFormats"; type = "[]AttestationFormat" } - extensions: AuthenticationExtensions? = new JsonField { name = "extensions"; type = "AuthenticationExtensions" } -} - -class PublicKeyCredentialRequestOptions { - challenge: URLEncodedBase64 = new JsonField { name = "challenge"; type = "URLEncodedBase64" } - timeout: Int? = new JsonField { name = "timeout"; type = "int" } - relyingPartyID: String? = new JsonField { name = "rpId"; type = "string" } - allowedCredentials: Listing[CredentialDescriptor]? = new JsonField { name = "allowCredentials"; type = "[]CredentialDescriptor" } - userVerification: UserVerificationRequirement? = new JsonField { name = "userVerification"; type = "UserVerificationRequirement" } - hints: Listing[PublicKeyCredentialHints]? = new JsonField { name = "hints"; type = "[]PublicKeyCredentialHints" } - extensions: AuthenticationExtensions? = new JsonField { name = "extensions"; type = "AuthenticationExtensions" } - - function getAllowedCredentialIDs(): Listing[Listing[Int8]] { - this.allowedCredentials?.map((credential) -> credential.credentialID) ?? Listing() - } -} - -class CredentialDescriptor { - type: CredentialType = new JsonField { name = "type"; type = "CredentialType" } - credentialID: URLEncodedBase64 = new JsonField { name = "id"; type = "URLEncodedBase64" } - transport: Listing[AuthenticatorTransport]? = new JsonField { name = "transports"; type = "[]AuthenticatorTransport" } - attestationType: String? = new JsonField { name = "-"; type = "string" } -} - -class CredentialParameter { - type: CredentialType = new JsonField { name = "type"; type = "CredentialType" } - algorithm: Int = new JsonField { name = "alg"; type = "int" } -} - -typealias CredentialType = String - -const PublicKeyCredentialType: CredentialType = "public-key" - -typealias AuthenticationExtensions = Mapping[String, Dynamic] - -class AuthenticatorSelection { - authenticatorAttachment: AuthenticatorAttachment? = new JsonField { name = "authenticatorAttachment"; type = "AuthenticatorAttachment" } - requireResidentKey: Boolean? = new JsonField { name = "requireResidentKey"; type = "bool" } - residentKey: ResidentKeyRequirement? = new JsonField { name = "residentKey"; type = "ResidentKeyRequirement" } - userVerification: UserVerificationRequirement? = new JsonField { name = "userVerification"; type = "UserVerificationRequirement" } -} - -typealias ConveyancePreference = String - -const PreferNoAttestation: ConveyancePreference = "none" -const PreferIndirectAttestation: ConveyancePreference = "indirect" -const PreferDirectAttestation: ConveyancePreference = "direct" -const PreferEnterpriseAttestation: ConveyancePreference = "enterprise" - -typealias AttestationFormat = String - -const AttestationFormatPacked: AttestationFormat = "packed" -const AttestationFormatTPM: AttestationFormat = "tpm" -const AttestationFormatAndroidKey: AttestationFormat = "android-key" -const AttestationFormatAndroidSafetyNet: AttestationFormat = "android-safetynet" -const AttestationFormatFIDOUniversalSecondFactor: AttestationFormat = "fido-u2f" -const AttestationFormatApple: AttestationFormat = "apple" -const AttestationFormatNone: AttestationFormat = "none" - -typealias PublicKeyCredentialHints = String - -const PublicKeyCredentialHintSecurityKey: PublicKeyCredentialHints = "security-key" -const PublicKeyCredentialHintClientDevice: PublicKeyCredentialHints = "client-device" -const PublicKeyCredentialHintHybrid: PublicKeyCredentialHints = "hybrid" - -typealias Extensions = Dynamic - -class ServerResponse { - status: ServerResponseStatus = new JsonField { name = "status"; type = "ServerResponseStatus" } - message: String = new JsonField { name = "errorMessage"; type = "string" } -} - -typealias ServerResponseStatus = String - -const StatusOk: ServerResponseStatus = "ok" -const StatusFailed= ServerResponseStatus = "failed" diff --git a/proto/did/v1/accounts.proto b/proto/did/v1/accounts.proto deleted file mode 100644 index 2f6e1007b..000000000 --- a/proto/did/v1/accounts.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package did.v1; - -option go_package = "github.com/onsonr/sonr/x/did/types"; - -message BtcAccount {} - -message EthAccount {} - -message IBCAccount {} - -message SnrAccount {} diff --git a/proto/did/v1/genesis.proto b/proto/did/v1/genesis.proto index d38a457b3..8069f2a9d 100644 --- a/proto/did/v1/genesis.proto +++ b/proto/did/v1/genesis.proto @@ -27,20 +27,17 @@ message Params { // Whitelisted Key Types repeated KeyInfo allowed_public_keys = 3; - // OpenIDConfig defines the base openid configuration across all did services - OpenIDConfig openid_config = 4; - // IpfsActive is a flag to enable/disable ipfs - bool ipfs_active = 5; + bool ipfs_active = 4; // Localhost Registration Enabled - bool localhost_registration_enabled = 6; + bool localhost_registration_enabled = 5; // ConveyancePreference defines the conveyance preference - string conveyance_preference = 7; + string conveyance_preference = 6; // AttestationFormats defines the attestation formats - repeated string attestation_formats = 8; + repeated string attestation_formats = 7; } // AssetInfo defines the asset info @@ -85,20 +82,6 @@ message KeyInfo { KeyType type = 5; // e.g., "Octet", "Elliptic", "RSA", "Symmetric", "HMAC" } -// OpenIDConfig defines the base openid configuration across all did services -message OpenIDConfig { - string issuer = 1; - string authorization_endpoint = 2; - string token_endpoint = 3; - string userinfo_endpoint = 4; - repeated string scopes_supported = 5; - repeated string response_types_supported = 6; - repeated string response_modes_supported = 7; - repeated string grant_types_supported = 8; - repeated string acr_values_supported = 9; - repeated string subject_types_supported = 10; -} - // ValidatorInfo defines information for accepted Validator nodes message ValidatorInfo { string moniker = 1; @@ -221,6 +204,12 @@ enum KeyType { KEY_TYPE_BIP32 = 9; } +enum KeyshareRole { + KEYSHARE_ROLE_UNSPECIFIED = 0; + KEYSHARE_ROLE_USER = 1; + KEYSHARE_ROLE_VALIDATOR = 2; +} + // PermissionScope define the Capabilities Controllers can grant for Services enum PermissionScope { PERMISSION_SCOPE_UNSPECIFIED = 0; diff --git a/proto/did/v1/models.proto b/proto/did/v1/models.proto index c4c9cc2c2..f88876af7 100644 --- a/proto/did/v1/models.proto +++ b/proto/did/v1/models.proto @@ -7,56 +7,47 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; -// Accumulator defines a BLS accumulator -message Accumulator { - bytes accumulator = 1; +// Alias defines a subject/origin pair +message Alias { + string subject = 1; + string origin = 2; + string controller = 3; } -// Credential defines a WebAuthn credential message Credential { - string id = 1; - string credential_type = 2; - bytes credential_id = 3; - repeated string transport = 4; - string subject = 6; - string controller = 7; -} - -// DID defines a parsed DID string -message DID { - DIDNamespace method = 1; - string network = 2; - string subject = 3; - string identifier = 4; - repeated string paths = 5; + string subject = 1; + string attestation_type = 2; + string origin = 3; + bytes credential_id = 4; + bytes public_key = 5; + repeated string transport = 6; + uint32 sign_count = 7; + bool user_present = 8; + bool user_verified = 9; + bool backup_eligible = 10; + bool backup_state = 11; + bool clone_warning = 12; } // Document defines a DID document message Document { string id = 1; - repeated VerificationMethod verification_methods = 2; - repeated string authentication = 4; - repeated string assertion_method = 5; - repeated string capability_delegation = 7; - repeated string capability_invocation = 8; - repeated string service = 9; + string controller = 2; // The DID of the controller + repeated string authentication = 3; + repeated string assertion_method = 4; + repeated string capability_delegation = 5; + repeated string capability_invocation = 6; + repeated string service = 7; } -// JWK represents a JSON Web Key -message JWK { - string kty = 1; // Key Type - string crv = 2; // Curve (for EC and OKP keys) - string x = 3; // X coordinate (for EC and OKP keys) - string y = 4; // Y coordinate (for EC keys) - string n = 5; // Modulus (for RSA keys) - string e = 6; // Exponent (for RSA keys) -} - -// Metadata defines additional information provided to a did -message Metadata { - string origin_uri = 1; - map public = 2; - map private = 3; +// Keyshare defines a keyshare from the MPC protocol +message Keyshare { + map metadata = 1; + map payloads = 2; + string protocol = 3; + bytes public_key = 4; + uint32 version = 5; + int32 role = 6; // 0 =none, 1 = validator, 2 = user } // Permissions contains a list of grants and access control rules for @@ -66,21 +57,6 @@ message Permissions { repeated PermissionScope scopes = 2; } -// Profile defines an associated public identity for a did subject -message Profile { - string id = 1; - string subject = 2; - string controller = 3; - Metadata metadata = 4; -} - -// Property defines a Zero-Knowledge accumulator which can be used to -// anonymously prove a given value to a DID subject -message Property { - bytes accumulator = 1; - bytes key = 2; -} - // PubKey defines a public key for a did message PubKey { KeyRole role = 1; @@ -90,16 +66,35 @@ message PubKey { KeyType key_type = 5; bytes raw = 6; JWK jwk = 7; + + // JWK represents a JSON Web Key + message JWK { + string kty = 1; // Key Type + string crv = 2; // Curve (for EC and OKP keys) + string x = 3; // X coordinate (for EC and OKP keys) + string y = 4; // Y coordinate (for EC keys) + string n = 5; // Modulus (for RSA keys) + string e = 6; // Exponent (for RSA keys) + } } // Service defines a Decentralized Service on the Sonr Blockchain message Service { string id = 1; - string controller = 2; - string origin = 3; - Permissions permissions = 4; - OpenIDConfig openid = 5; - Metadata metadata = 6; + string service_type = 2; + string authority = 3; + string origin = 4; + string description = 5; + map service_endpoints = 6; + Permissions permissions = 7; +} + +// ServicceInfo defines a Decentralized Service on the Sonr Blockchain +message ServiceInfo { + bool exists = 1; + string origin = 2; + string fingerprint = 3; + Service service = 4; } // Token defines a macron token @@ -108,17 +103,3 @@ message Token { string controller = 2; bytes macron = 3; } - -// VerificationMethod defines a verification method -message VerificationMethod { - DIDNamespace method = 1; - string id = 2; - string controller = 3; - string issuer = 4; - PubKey public_key = 5; -} - -// Witness defines a BLS witness -message Witness { - bytes witness = 1; -} diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 0e4f35669..c80773c92 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -4,24 +4,25 @@ package did.v1; import "did/v1/genesis.proto"; import "did/v1/models.proto"; import "google/api/annotations.proto"; -import "google/api/httpbody.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; // Query provides defines the gRPC querier service. service Query { // Params queries all parameters of the module. - rpc Params(QueryRequest) returns (QueryParamsResponse) { + rpc Params(QueryRequest) returns (QueryResponse) { option (google.api.http).get = "/did/params"; } // Resolve queries the DID document by its id. - rpc Resolve(QueryRequest) returns (QueryResolveResponse) { + rpc Resolve(QueryRequest) returns (QueryResponse) { option (google.api.http).get = "/did/{did}"; } // Service returns associated ServiceInfo for a given Origin - rpc Service(QueryRequest) returns (QueryServiceResponse) { + // if the servie is not found, a fingerprint is generated to be used + // as a TXT record in DNS. v=sonr, o=origin, p=protocol + rpc Service(QueryRequest) returns (QueryResponse) { option (google.api.http).get = "/service/{origin}"; } } @@ -30,48 +31,13 @@ service Query { message QueryRequest { string did = 1; string origin = 2; - string subject = 3; - string endpoint = 4; -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} - -// QueryResponse is the response type for the Query/Exists RPC method. -message QueryResponse { - bool success = 1; - string subject = 2; - string origin = 3; - bool ipfs_active = 4; - Params params = 5; - Document document = 6; - Service service = 7; - repeated Credential credentials = 8; - Token token = 9; - string error = 10; } // QueryResolveResponse is the response type for the Query/Resolve RPC method. -message QueryResolveResponse { +message QueryResponse { bool success = 1; - string subject = 2; - string origin = 3; - bool ipfs_active = 4; + string query = 2; + Document document = 3; + ServiceInfo service = 4; Params params = 5; - Document document = 6; - repeated Credential credentials = 7; - Token token = 8; -} - -// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -message QueryServiceResponse { - bool success = 1; - string subject = 2; - string origin = 3; - bool ipfs_active = 4; - Params params = 5; - Service service = 6; } diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index 7dc18fb4d..76550b5b1 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -8,99 +8,57 @@ import "did/v1/models.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; -// Authentication represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) -message Authentication { +// Account represents a wallet account associated with a DID Controller +message Account { option (cosmos.orm.v1.table) = { id: 1 primary_key: {fields: "id"} index: { id: 1 - fields: "subject,origin" + fields: "controller,label" unique: true } index: { id: 2 - fields: "controller,origin" + fields: "controller,address" unique: true } index: { id: 3 - fields: "controller,credential_label" + fields: "controller,chain_code,index" unique: true } }; - // The unique identifier of the attestation + // The unique identifier of the account string id = 1; - // The controller of the attestation - string controller = 2; - - // Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave") - PubKey public_key = 3; - - // The origin of the attestation - string origin = 4; - - // The subject of the attestation - string subject = 5; - - // The value of the linked identifier - bytes credential_id = 6; - - // The credential label - string credential_label = 7; - - // The display label of the attestation - repeated string credential_transport = 8; - - // The attestationtype of the attestation - string attestation_type = 9; - - // Metadata is optional additional information about the assertion - Metadata metadata = 10; -} - -// Assertion represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) -message Assertion { - option (cosmos.orm.v1.table) = { - id: 2 - primary_key: {fields: "id"} - index: { - id: 1 - fields: "subject,origin" - unique: true - } - index: { - id: 2 - fields: "controller,origin" - unique: true - } - }; - - // The unique identifier of the attestation - string id = 1; - - // The type of the linked identifier (e.g., "crypto", "github", "email", "phone") + // The controller of the account string controller = 2; // The value of the linked identifier PubKey public_key = 3; - // The origin of the attestation - string origin = 4; + // The address of the account + string address = 4; - // The subject of the attestation - string subject = 5; + // The label of the account + string label = 5; - // The controller of the attestation - Metadata metadata = 6; + // The bip32 chain code + uint32 chain_code = 6; + + // The index of the account + uint32 index = 7; + + // The supported chains of the account + repeated string chains = 8; } // Controller represents a Sonr DWN Vault message Controller { option (cosmos.orm.v1.table) = { - id: 3 + id: 2 primary_key: {fields: "id"} index: { id: 1 @@ -121,71 +79,62 @@ message Controller { string address = 2; // Aliases of the controller - repeated string aliases = 3; + repeated Alias aliases = 3; // PubKey is the verification method PubKey public_key = 4; // The vault address or identifier string vault_cid = 5; + + // The Authentications of the controller + repeated Credential authentication = 6; } -// Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC) -message Delegation { +// Proof represents a verifiable credential +message Proof { option (cosmos.orm.v1.table) = { id: 4 primary_key: {fields: "id"} index: { id: 1 - fields: "account_address,chain_id" + fields: "controller,issuer,property" unique: true } - index: { - id: 2 - fields: "controller,account_label" - unique: true - } - index: { - id: 3 - fields: "controller,chain_id" - } }; - // The unique identifier of the delegation + // The unique identifier of the proof string id = 1; - // The Decentralized Identifier of the delegated account + // The controller of the proof string controller = 2; - // Resolved from module parameters - string chain_index = 3; + // The value of the linked identifier + string issuer = 3; - // The delegation proof or verification method - PubKey public_key = 4; + // The property of the proof + string property = 4; - // The Account Address - string account_address = 5; + // The accumulator of the proof + bytes accumulator = 5; - // The Account label - string account_label = 6; - - // The Chain ID - string chain_id = 7; + // The secret key of the proof + bytes key = 6; } // ServiceRecord represents a decentralized service in a DID Document message ServiceRecord { option (cosmos.orm.v1.table) = { - id: 5 + id: 3 primary_key: {fields: "id"} index: { id: 1 - fields: "origin_uri" + fields: "origin" unique: true } index: { id: 2 - fields: "controller,origin_uri" + fields: "authority,origin" unique: true } }; @@ -196,11 +145,11 @@ message ServiceRecord { // The type of the service string service_type = 2; - // The controller DID of the service - string controller = 3; + // The authority DID of the service + string authority = 3; // The domain name of the service - string origin_uri = 4; + string origin = 4; // The description of the service string description = 5; @@ -210,7 +159,35 @@ message ServiceRecord { // Scopes is the Authorization Grants of the service Permissions permissions = 7; - - // Metadata is optional additional information about the service - Metadata metadata = 8; +} + +// Verification reprsents a method of verifying membership in a DID +message VerificationMethod { + option (cosmos.orm.v1.table) = { + id: 5 + primary_key: {fields: "id"} + index: { + id: 1 + fields: "controller,method,issuer,subject" + unique: true + } + }; + + // The unique identifier of the verification + string id = 1; + + // The controller of the verification + string controller = 2; + + // The DIDNamespace of the verification + DIDNamespace method = 3; + + // The value of the linked identifier + string issuer = 4; + + // The subject of the verification + string subject = 5; + + // The public key of the verification + PubKey public_key = 6; } diff --git a/proto/did/v1/tx.proto b/proto/did/v1/tx.proto index 03f346cbb..b5ff071b6 100644 --- a/proto/did/v1/tx.proto +++ b/proto/did/v1/tx.proto @@ -18,15 +18,15 @@ service Msg { // Since: cosmos-sdk 0.47 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - // Authorize asserts the given controller is the owner of the given address. - rpc Authorize(MsgAuthorize) returns (MsgAuthorizeResponse); + // AuthorizeService asserts the given controller is the owner of the given address. + rpc AuthorizeService(MsgAuthorizeService) returns (MsgAuthorizeServiceResponse); // 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); - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - rpc SyncVault(MsgSyncVault) returns (MsgSyncVaultResponse); + // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. + rpc SyncController(MsgSyncController) returns (MsgSyncControllerResponse); // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse); @@ -81,6 +81,9 @@ message MsgAllocateVaultResponse { // RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn string registration_options = 3; + + // IsLocalhost is a flag to indicate if the vault is localhost + bool localhost = 4; } // MsgProveWitness is the message type for the ProveWitness RPC. @@ -106,8 +109,8 @@ message MsgProveWitnessResponse { string property = 2; } -// MsgSyncVault is the message type for the SyncVault RPC. -message MsgSyncVault { +// MsgSyncController is the message type for the SyncController RPC. +message MsgSyncController { option (cosmos.msg.v1.signer) = "controller"; // controller is the address of the controller to sync. @@ -117,8 +120,8 @@ message MsgSyncVault { Token token = 3; } -// MsgSyncVaultResponse is the response type for the SyncVault RPC. -message MsgSyncVaultResponse { +// MsgSyncControllerResponse is the response type for the SyncController RPC. +message MsgSyncControllerResponse { bool success = 1; } @@ -136,10 +139,7 @@ message MsgRegisterController { string origin = 3; // Credential is the list of keyshares to initialize the controller with. - repeated Credential authentication = 4; - - // token is the macron token to authenticate the operation. - Token token = 5; + string credential_creation_response = 4; } // MsgRegisterControllerResponse is the response type for the InitializeController RPC. @@ -154,28 +154,25 @@ message MsgRegisterControllerResponse { map accounts = 3; } -// MsgAuthorize is the message type for the Authorize RPC. -message MsgAuthorize { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +// MsgAuthorizeService is the message type for the AuthorizeService RPC. +message MsgAuthorizeService { + option (cosmos.msg.v1.signer) = "controller"; // Controller is the address of the controller to authenticate. - string controller = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Address is the address to authenticate. - string address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Origin is the origin of the request in wildcard form. - string origin = 4; + string origin = 2; + + // Permissions is the scope of the service. + Permissions scopes = 3; // token is the macron token to authenticate the operation. - Token token = 5; + Token token = 4; } -// MsgAuthorizeResponse is the response type for the Authorize RPC. -message MsgAuthorizeResponse { +// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC. +message MsgAuthorizeServiceResponse { bool success = 1; Token token = 2; } @@ -187,23 +184,11 @@ message MsgRegisterService { // authority is the address of the governance account. string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // origin is the origin of the request in wildcard form. - string origin_uri = 2; - - // Permissions is the scope of the service. - Permissions scopes = 3; - - // Description is the description of the service - string description = 4; - - // service_endpoints is the endpoints of the service - map service_endpoints = 5; - - // Metadata is optional additional information about the service - Metadata metadata = 6; + // origin is the origin of the request in wildcard form. Requires valid TXT record in DNS. + Service service = 2; // token is the macron token to authenticate the operation. - Token token = 7; + Token token = 3; } // MsgRegisterServiceResponse is the response type for the RegisterService RPC. diff --git a/proto/oracle/module/v1/module.proto b/proto/oracle/module/v1/module.proto deleted file mode 100644 index 5b4e261e4..000000000 --- a/proto/oracle/module/v1/module.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -package onsonr.sonr.oracle.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the app config object of the module. -// Learn more: https://docs.cosmos.network/main/building-modules/depinject -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import : "github.com/onsonr/sonr" - }; -} diff --git a/proto/oracle/v1/genesis.proto b/proto/oracle/v1/genesis.proto deleted file mode 100644 index 80f75910c..000000000 --- a/proto/oracle/v1/genesis.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package oracle.v1; - -option go_package = "github.com/onsonr/sonr/x/oracle/types"; - -import "gogoproto/gogo.proto"; - -// GenesisState defines the middlewares genesis state. -message GenesisState {} diff --git a/proto/oracle/v1/query.proto b/proto/oracle/v1/query.proto deleted file mode 100644 index c4a8fecdc..000000000 --- a/proto/oracle/v1/query.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package oracle.v1; - -option go_package = "github.com/onsonr/sonr/x/oracle/types"; - -import "gogoproto/gogo.proto"; diff --git a/proto/oracle/v1/tx.proto b/proto/oracle/v1/tx.proto deleted file mode 100644 index c4a8fecdc..000000000 --- a/proto/oracle/v1/tx.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package oracle.v1; - -option go_package = "github.com/onsonr/sonr/x/oracle/types"; - -import "gogoproto/gogo.proto"; diff --git a/gen/transactions/Msg.pkl.go b/txns/Msg.pkl.go similarity index 83% rename from gen/transactions/Msg.pkl.go rename to txns/Msg.pkl.go index fe8ffcc9a..cf0adf0c7 100644 --- a/gen/transactions/Msg.pkl.go +++ b/txns/Msg.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns type Msg interface { GetTypeUrl() string diff --git a/gen/transactions/MsgDidAllocateVault.pkl.go b/txns/MsgDidAllocateVault.pkl.go similarity index 97% rename from gen/transactions/MsgDidAllocateVault.pkl.go rename to txns/MsgDidAllocateVault.pkl.go index 0e691f461..508f5cb23 100644 --- a/gen/transactions/MsgDidAllocateVault.pkl.go +++ b/txns/MsgDidAllocateVault.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgDidAuthorize.pkl.go b/txns/MsgDidAuthorize.pkl.go similarity index 98% rename from gen/transactions/MsgDidAuthorize.pkl.go rename to txns/MsgDidAuthorize.pkl.go index b12fc046d..127ffefe7 100644 --- a/gen/transactions/MsgDidAuthorize.pkl.go +++ b/txns/MsgDidAuthorize.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgDidProveWitness.pkl.go b/txns/MsgDidProveWitness.pkl.go similarity index 97% rename from gen/transactions/MsgDidProveWitness.pkl.go rename to txns/MsgDidProveWitness.pkl.go index 8bb849194..41f2a3fdc 100644 --- a/gen/transactions/MsgDidProveWitness.pkl.go +++ b/txns/MsgDidProveWitness.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgDidRegisterController.pkl.go b/txns/MsgDidRegisterController.pkl.go similarity index 98% rename from gen/transactions/MsgDidRegisterController.pkl.go rename to txns/MsgDidRegisterController.pkl.go index 99907f455..901a85595 100644 --- a/gen/transactions/MsgDidRegisterController.pkl.go +++ b/txns/MsgDidRegisterController.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgDidRegisterService.pkl.go b/txns/MsgDidRegisterService.pkl.go similarity index 98% rename from gen/transactions/MsgDidRegisterService.pkl.go rename to txns/MsgDidRegisterService.pkl.go index d234865da..2cf0c86a2 100644 --- a/gen/transactions/MsgDidRegisterService.pkl.go +++ b/txns/MsgDidRegisterService.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgDidSyncVault.pkl.go b/txns/MsgDidSyncVault.pkl.go similarity index 97% rename from gen/transactions/MsgDidSyncVault.pkl.go rename to txns/MsgDidSyncVault.pkl.go index c4de4ba64..61db8f7b2 100644 --- a/gen/transactions/MsgDidSyncVault.pkl.go +++ b/txns/MsgDidSyncVault.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgDidUpdateParams.pkl.go b/txns/MsgDidUpdateParams.pkl.go similarity index 97% rename from gen/transactions/MsgDidUpdateParams.pkl.go rename to txns/MsgDidUpdateParams.pkl.go index a3e227ab8..2d9db3e5c 100644 --- a/gen/transactions/MsgDidUpdateParams.pkl.go +++ b/txns/MsgDidUpdateParams.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgGovDeposit.pkl.go b/txns/MsgGovDeposit.pkl.go similarity index 97% rename from gen/transactions/MsgGovDeposit.pkl.go rename to txns/MsgGovDeposit.pkl.go index 556d1df7f..7f8b133be 100644 --- a/gen/transactions/MsgGovDeposit.pkl.go +++ b/txns/MsgGovDeposit.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgGovSubmitProposal.pkl.go b/txns/MsgGovSubmitProposal.pkl.go similarity index 97% rename from gen/transactions/MsgGovSubmitProposal.pkl.go rename to txns/MsgGovSubmitProposal.pkl.go index c33b589b6..665e7059d 100644 --- a/gen/transactions/MsgGovSubmitProposal.pkl.go +++ b/txns/MsgGovSubmitProposal.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgGovVote.pkl.go b/txns/MsgGovVote.pkl.go similarity index 97% rename from gen/transactions/MsgGovVote.pkl.go rename to txns/MsgGovVote.pkl.go index 303cf1eee..d760dca68 100644 --- a/gen/transactions/MsgGovVote.pkl.go +++ b/txns/MsgGovVote.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns type MsgGovVote interface { Msg diff --git a/gen/transactions/MsgGroupCreateGroup.pkl.go b/txns/MsgGroupCreateGroup.pkl.go similarity index 97% rename from gen/transactions/MsgGroupCreateGroup.pkl.go rename to txns/MsgGroupCreateGroup.pkl.go index c5dafd6bd..f7a9448bf 100644 --- a/gen/transactions/MsgGroupCreateGroup.pkl.go +++ b/txns/MsgGroupCreateGroup.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgGroupSubmitProposal.pkl.go b/txns/MsgGroupSubmitProposal.pkl.go similarity index 98% rename from gen/transactions/MsgGroupSubmitProposal.pkl.go rename to txns/MsgGroupSubmitProposal.pkl.go index c23f15391..f4807a2b2 100644 --- a/gen/transactions/MsgGroupSubmitProposal.pkl.go +++ b/txns/MsgGroupSubmitProposal.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgGroupVote.pkl.go b/txns/MsgGroupVote.pkl.go similarity index 97% rename from gen/transactions/MsgGroupVote.pkl.go rename to txns/MsgGroupVote.pkl.go index a79ce6899..f5c80ca9a 100644 --- a/gen/transactions/MsgGroupVote.pkl.go +++ b/txns/MsgGroupVote.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns type MsgGroupVote interface { Msg diff --git a/gen/transactions/MsgStakingBeginRedelegate.pkl.go b/txns/MsgStakingBeginRedelegate.pkl.go similarity index 98% rename from gen/transactions/MsgStakingBeginRedelegate.pkl.go rename to txns/MsgStakingBeginRedelegate.pkl.go index 44a019af4..e22288c7f 100644 --- a/gen/transactions/MsgStakingBeginRedelegate.pkl.go +++ b/txns/MsgStakingBeginRedelegate.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgStakingCreateValidator.pkl.go b/txns/MsgStakingCreateValidator.pkl.go similarity index 98% rename from gen/transactions/MsgStakingCreateValidator.pkl.go rename to txns/MsgStakingCreateValidator.pkl.go index d904a71c6..12763546f 100644 --- a/gen/transactions/MsgStakingCreateValidator.pkl.go +++ b/txns/MsgStakingCreateValidator.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgStakingDelegate.pkl.go b/txns/MsgStakingDelegate.pkl.go similarity index 97% rename from gen/transactions/MsgStakingDelegate.pkl.go rename to txns/MsgStakingDelegate.pkl.go index 9dd6fa824..d0709ef6e 100644 --- a/gen/transactions/MsgStakingDelegate.pkl.go +++ b/txns/MsgStakingDelegate.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/MsgStakingUndelegate.pkl.go b/txns/MsgStakingUndelegate.pkl.go similarity index 97% rename from gen/transactions/MsgStakingUndelegate.pkl.go rename to txns/MsgStakingUndelegate.pkl.go index ffc2395e6..9b7f609bc 100644 --- a/gen/transactions/MsgStakingUndelegate.pkl.go +++ b/txns/MsgStakingUndelegate.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/Proposal.pkl.go b/txns/Proposal.pkl.go similarity index 92% rename from gen/transactions/Proposal.pkl.go rename to txns/Proposal.pkl.go index 4a3e8bd62..ab363f202 100644 --- a/gen/transactions/Proposal.pkl.go +++ b/txns/Proposal.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns // Base class for all proposals type Proposal struct { diff --git a/gen/transactions/Transactions.pkl.go b/txns/Transactions.pkl.go similarity index 97% rename from gen/transactions/Transactions.pkl.go rename to txns/Transactions.pkl.go index 5a551b8c4..a471a756d 100644 --- a/gen/transactions/Transactions.pkl.go +++ b/txns/Transactions.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import ( "context" diff --git a/gen/transactions/TxBody.pkl.go b/txns/TxBody.pkl.go similarity index 95% rename from gen/transactions/TxBody.pkl.go rename to txns/TxBody.pkl.go index 8a8c23263..c1912f774 100644 --- a/gen/transactions/TxBody.pkl.go +++ b/txns/TxBody.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/gen/transactions/init.pkl.go b/txns/init.pkl.go similarity index 98% rename from gen/transactions/init.pkl.go rename to txns/init.pkl.go index 211bc2e21..68ba1e69e 100644 --- a/gen/transactions/init.pkl.go +++ b/txns/init.pkl.go @@ -1,5 +1,5 @@ // Code generated from Pkl module `transactions`. DO NOT EDIT. -package transactions +package txns import "github.com/apple/pkl-go/pkl" diff --git a/x/did/builder/api.go b/x/did/builder/api.go index 063d24646..d042ba441 100644 --- a/x/did/builder/api.go +++ b/x/did/builder/api.go @@ -4,12 +4,103 @@ import ( "encoding/base64" "fmt" + "github.com/go-webauthn/webauthn/protocol" + "github.com/go-webauthn/webauthn/protocol/webauthncose" didv1 "github.com/onsonr/sonr/api/did/v1" "github.com/onsonr/sonr/x/did/types" ) -func FormatEC2PublicKey(key *webauthncose.EC2PublicKeyData) (*types.JWK, error) { +func APIFormatDIDNamespace(namespace types.DIDNamespace) didv1.DIDNamespace { + return didv1.DIDNamespace(namespace) +} + +func APIFormatDIDNamespaces(namespaces []types.DIDNamespace) []didv1.DIDNamespace { + var s []didv1.DIDNamespace + for _, namespace := range namespaces { + s = append(s, APIFormatDIDNamespace(namespace)) + } + return s +} + +func APIFormatKeyRole(role types.KeyRole) didv1.KeyRole { + return didv1.KeyRole(role) +} + +func APIFormatKeyAlgorithm(algorithm types.KeyAlgorithm) didv1.KeyAlgorithm { + return didv1.KeyAlgorithm(algorithm) +} + +func APIFormatKeyEncoding(encoding types.KeyEncoding) didv1.KeyEncoding { + return didv1.KeyEncoding(encoding) +} + +func APIFormatKeyCurve(curve types.KeyCurve) didv1.KeyCurve { + return didv1.KeyCurve(curve) +} + +func APIFormatKeyType(keyType types.KeyType) didv1.KeyType { + return didv1.KeyType(keyType) +} + +func APIFormatPermissions(permissions *types.Permissions) *didv1.Permissions { + if permissions == nil { + return nil + } + p := didv1.Permissions{ + Grants: APIFormatDIDNamespaces(permissions.Grants), + Scopes: APIFormatPermissionScopes(permissions.Scopes), + } + return &p +} + +func APIFormatPermissionScope(scope types.PermissionScope) didv1.PermissionScope { + return didv1.PermissionScope(scope) +} + +func APIFormatPermissionScopes(scopes []types.PermissionScope) []didv1.PermissionScope { + var s []didv1.PermissionScope + for _, scope := range scopes { + s = append(s, APIFormatPermissionScope(scope)) + } + return s +} + +func APIFormatServiceRecord(service *types.Service) *didv1.ServiceRecord { + return &didv1.ServiceRecord{ + Id: service.Id, + ServiceType: service.ServiceType, + Authority: service.Authority, + Origin: service.Origin, + Description: service.Description, + ServiceEndpoints: service.ServiceEndpoints, + Permissions: APIFormatPermissions(service.Permissions), + } +} + +func APIFormatPubKeyJWK(jwk *types.PubKey_JWK) *didv1.PubKey_JWK { + return &didv1.PubKey_JWK{ + Kty: jwk.Kty, + Crv: jwk.Crv, + X: jwk.X, + Y: jwk.Y, + N: jwk.N, + E: jwk.E, + } +} + +func APIFormatPubKey(key *types.PubKey) *didv1.PubKey { + return &didv1.PubKey{ + Role: APIFormatKeyRole(key.GetRole()), + Algorithm: APIFormatKeyAlgorithm(key.GetAlgorithm()), + Encoding: APIFormatKeyEncoding(key.GetEncoding()), + Curve: APIFormatKeyCurve(key.GetCurve()), + KeyType: APIFormatKeyType(key.GetKeyType()), + Raw: key.GetRaw(), + } +} + +func FormatEC2PublicKey(key *webauthncose.EC2PublicKeyData) (*types.PubKey_JWK, error) { curve, err := GetCOSECurveName(key.Curve) if err != nil { return nil, err @@ -25,7 +116,7 @@ func FormatEC2PublicKey(key *webauthncose.EC2PublicKeyData) (*types.JWK, error) return MapToJWK(jwkMap) } -func FormatRSAPublicKey(key *webauthncose.RSAPublicKeyData) (*types.JWK, error) { +func FormatRSAPublicKey(key *webauthncose.RSAPublicKeyData) (*types.PubKey_JWK, error) { jwkMap := map[string]interface{}{ "kty": "RSA", "n": base64.RawURLEncoding.EncodeToString(key.Modulus), @@ -35,8 +126,8 @@ func FormatRSAPublicKey(key *webauthncose.RSAPublicKeyData) (*types.JWK, error) return MapToJWK(jwkMap) } -func FormatOKPPublicKey(key *webauthncose.OKPPublicKeyData) (*types.JWK, error) { - curve, err := getOKPCurveName(key.Curve) +func FormatOKPPublicKey(key *webauthncose.OKPPublicKeyData) (*types.PubKey_JWK, error) { + curve, err := GetOKPCurveName(key.Curve) if err != nil { return nil, err } @@ -50,8 +141,8 @@ func FormatOKPPublicKey(key *webauthncose.OKPPublicKeyData) (*types.JWK, error) return MapToJWK(jwkMap) } -func MapToJWK(m map[string]interface{}) (*types.JWK, error) { - jwk := &types.JWK{} +func MapToJWK(m map[string]interface{}) (*types.PubKey_JWK, error) { + jwk := &types.PubKey_JWK{} for k, v := range m { switch k { case "kty": @@ -84,7 +175,7 @@ func GetCOSECurveName(curveID int64) (string, error) { } } -func getOKPCurveName(curveID int64) (string, error) { +func GetOKPCurveName(curveID int64) (string, error) { switch curveID { case int64(webauthncose.Ed25519): return "Ed25519", nil @@ -93,84 +184,68 @@ func getOKPCurveName(curveID int64) (string, error) { } } -func ModulePubKeyToAPI(pk *types.PubKey) *didv1.PubKey { - return &didv1.PubKey{ - Role: ModuleKeyRoleToAPI(pk.GetRole()), - Algorithm: ModuleKeyAlgorithmToAPI(pk.GetAlgorithm()), - Encoding: ModuleKeyEncodingToAPI(pk.GetEncoding()), - Curve: ModuleKeyCurveToAPI(pk.GetCurve()), - KeyType: ModuleKeyTypeToAPI(pk.GetKeyType()), - Raw: pk.GetRaw(), +// NormalizeTransports returns the transports as strings +func NormalizeTransports(transports []protocol.AuthenticatorTransport) []string { + tss := make([]string, len(transports)) + for i, t := range transports { + tss[i] = string(t) + } + return tss +} + +// GetTransports returns the protocol.AuthenticatorTransport +func ModuleTransportsToProtocol(transport []string) []protocol.AuthenticatorTransport { + tss := make([]protocol.AuthenticatorTransport, len(transport)) + for i, t := range transport { + tss[i] = protocol.AuthenticatorTransport(t) + } + return tss +} + +// ModuleFormatAPIServiceRecord formats a service record for the module +func ModuleFormatAPIServiceRecord(service *didv1.ServiceRecord) *types.Service { + return &types.Service{ + Id: service.Id, + ServiceType: service.ServiceType, + Authority: service.Authority, + Origin: service.Origin, + Description: service.Description, + ServiceEndpoints: service.ServiceEndpoints, + Permissions: ModuleFormatAPIPermissions(service.Permissions), } } -func ModuleKeyRoleToAPI(role types.KeyRole) didv1.KeyRole { - switch role { - case types.KeyRole_KEY_ROLE_INVOCATION: - return didv1.KeyRole_KEY_ROLE_INVOCATION - case types.KeyRole_KEY_ROLE_ASSERTION: - return didv1.KeyRole_KEY_ROLE_ASSERTION - case types.KeyRole_KEY_ROLE_DELEGATION: - return didv1.KeyRole_KEY_ROLE_DELEGATION - default: - return didv1.KeyRole_KEY_ROLE_INVOCATION +func ModuleFormatAPIPermissions(permissions *didv1.Permissions) *types.Permissions { + if permissions == nil { + return nil } + p := types.Permissions{ + Grants: ModuleFormatAPIDIDNamespaces(permissions.Grants), + Scopes: ModuleFormatAPIPermissionScopes(permissions.Scopes), + } + return &p } -func ModuleKeyAlgorithmToAPI(algorithm types.KeyAlgorithm) didv1.KeyAlgorithm { - switch algorithm { - case types.KeyAlgorithm_KEY_ALGORITHM_ES256K: - return didv1.KeyAlgorithm_KEY_ALGORITHM_ES256K - case types.KeyAlgorithm_KEY_ALGORITHM_ES256: - return didv1.KeyAlgorithm_KEY_ALGORITHM_ES256 - case types.KeyAlgorithm_KEY_ALGORITHM_ES384: - return didv1.KeyAlgorithm_KEY_ALGORITHM_ES384 - case types.KeyAlgorithm_KEY_ALGORITHM_ES512: - return didv1.KeyAlgorithm_KEY_ALGORITHM_ES512 - case types.KeyAlgorithm_KEY_ALGORITHM_EDDSA: - return didv1.KeyAlgorithm_KEY_ALGORITHM_EDDSA - default: - return didv1.KeyAlgorithm_KEY_ALGORITHM_ES256K - } +func ModuleFormatAPIPermissionScope(scope didv1.PermissionScope) types.PermissionScope { + return types.PermissionScope(scope) } -func ModuleKeyCurveToAPI(curve types.KeyCurve) didv1.KeyCurve { - switch curve { - case types.KeyCurve_KEY_CURVE_P256: - return didv1.KeyCurve_KEY_CURVE_P256 - case types.KeyCurve_KEY_CURVE_SECP256K1: - return didv1.KeyCurve_KEY_CURVE_SECP256K1 - case types.KeyCurve_KEY_CURVE_BLS12381: - return didv1.KeyCurve_KEY_CURVE_BLS12381 - case types.KeyCurve_KEY_CURVE_KECCAK256: - return didv1.KeyCurve_KEY_CURVE_KECCAK256 - default: - return didv1.KeyCurve_KEY_CURVE_P256 +func ModuleFormatAPIPermissionScopes(scopes []didv1.PermissionScope) []types.PermissionScope { + var s []types.PermissionScope + for _, scope := range scopes { + s = append(s, ModuleFormatAPIPermissionScope(scope)) } + return s } -func ModuleKeyEncodingToAPI(encoding types.KeyEncoding) didv1.KeyEncoding { - switch encoding { - case types.KeyEncoding_KEY_ENCODING_RAW: - return didv1.KeyEncoding_KEY_ENCODING_RAW - case types.KeyEncoding_KEY_ENCODING_HEX: - return didv1.KeyEncoding_KEY_ENCODING_HEX - case types.KeyEncoding_KEY_ENCODING_MULTIBASE: - return didv1.KeyEncoding_KEY_ENCODING_MULTIBASE - default: - return didv1.KeyEncoding_KEY_ENCODING_RAW - } +func ModuleFormatAPIDIDNamespace(namespace didv1.DIDNamespace) types.DIDNamespace { + return types.DIDNamespace(namespace) } -func ModuleKeyTypeToAPI(keyType types.KeyType) didv1.KeyType { - switch keyType { - case types.KeyType_KEY_TYPE_BIP32: - return didv1.KeyType_KEY_TYPE_BIP32 - case types.KeyType_KEY_TYPE_ZK: - return didv1.KeyType_KEY_TYPE_ZK - case types.KeyType_KEY_TYPE_WEBAUTHN: - return didv1.KeyType_KEY_TYPE_WEBAUTHN - default: - return didv1.KeyType_KEY_TYPE_BIP32 +func ModuleFormatAPIDIDNamespaces(namespaces []didv1.DIDNamespace) []types.DIDNamespace { + var s []types.DIDNamespace + for _, namespace := range namespaces { + s = append(s, ModuleFormatAPIDIDNamespace(namespace)) } + return s } diff --git a/x/did/builder/macroon.go b/x/did/builder/macroon.go new file mode 100644 index 000000000..aacdbfb2a --- /dev/null +++ b/x/did/builder/macroon.go @@ -0,0 +1,48 @@ +package builder + +import ( + "net/http" + + "github.com/labstack/echo/v4" + "gopkg.in/macaroon.v2" + + "gopkg.in/macaroon-bakery.v2/bakery/checkers" +) + +var PermissionNamespace *checkers.Namespace + +func ValidateMacaroonMiddleware(secretKey []byte, location string) echo.MiddlewareFunc { + return func(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + // Extract the macaroon from the Authorization header + auth := c.Request().Header.Get("Authorization") + if auth == "" { + return c.JSON(http.StatusUnauthorized, map[string]string{"error": "Missing Authorization header"}) + } + + // Decode the macaroon + mac, err := macaroon.Base64Decode([]byte(auth)) + if err != nil { + return c.JSON(http.StatusBadRequest, map[string]string{"error": "Invalid macaroon encoding"}) + } + + token, err := macaroon.New(secretKey, mac, location, macaroon.LatestVersion) + if err != nil { + return c.JSON(http.StatusBadRequest, map[string]string{"error": "Invalid macaroon"}) + } + + // Verify the macaroon + err = token.Verify(secretKey, func(caveat string) error { + // Implement your caveat verification logic here + // For example, you might check if the caveat is still valid (e.g., not expired) + return nil // Return nil if the caveat is valid + }, nil) + if err != nil { + return c.JSON(http.StatusUnauthorized, map[string]string{"error": "Invalid macaroon"}) + } + + // Macaroon is valid, proceed to the next handler + return next(c) + } + } +} diff --git a/x/did/builder/options.go b/x/did/builder/options.go index b068ac7f6..828af608e 100644 --- a/x/did/builder/options.go +++ b/x/did/builder/options.go @@ -52,7 +52,7 @@ type PublicKeyCredentialCreationOptions struct { Extensions AuthenticationExtensions `json:"extensions,omitempty"` } -func NewRegistrationOptions(origin string, subject string, vaultCID string, params *types.Params) (*PublicKeyCredentialCreationOptions, error) { +func GetPublicKeyCredentialCreationOptions(origin string, subject string, vaultCID string, params *types.Params) (*PublicKeyCredentialCreationOptions, error) { chal, err := CreateChallenge() if err != nil { return nil, err diff --git a/x/did/builder/pubkey.go b/x/did/builder/pubkey.go index d23331e3d..2c408b1ab 100644 --- a/x/did/builder/pubkey.go +++ b/x/did/builder/pubkey.go @@ -4,6 +4,7 @@ import ( "fmt" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + didv1 "github.com/onsonr/sonr/api/did/v1" "github.com/onsonr/sonr/x/did/types" "github.com/go-webauthn/webauthn/protocol/webauthncose" @@ -33,17 +34,17 @@ func CreateAuthnVerification(namespace types.DIDNamespace, issuer string, contro } // CreateWalletVerification creates a new verification method for a wallet -func CreateWalletVerification(namespace types.DIDNamespace, controller string, pubkey *types.PubKey, identifier string) *types.VerificationMethod { - return &types.VerificationMethod{ - Method: namespace, +func CreateWalletVerification(namespace types.DIDNamespace, controller string, pubkey *types.PubKey, identifier string) *didv1.VerificationMethod { + return &didv1.VerificationMethod{ + Method: APIFormatDIDNamespace(namespace), Controller: controller, - PublicKey: pubkey, + PublicKey: APIFormatPubKey(pubkey), Id: identifier, } } // ExtractWebAuthnPublicKey parses the raw public key bytes and returns a JWK representation -func ExtractWebAuthnPublicKey(keyBytes []byte) (*types.JWK, error) { +func ExtractWebAuthnPublicKey(keyBytes []byte) (*types.PubKey_JWK, error) { key, err := webauthncose.ParsePublicKey(keyBytes) if err != nil { return nil, fmt.Errorf("failed to parse public key: %w", err) @@ -62,8 +63,8 @@ func ExtractWebAuthnPublicKey(keyBytes []byte) (*types.JWK, error) { } // NewInitialWalletAccounts creates a new set of verification methods for a wallet -func NewInitialWalletAccounts(controller string, pubkey *types.PubKey) ([]*types.VerificationMethod, error) { - var verificationMethods []*types.VerificationMethod +func NewInitialWalletAccounts(controller string, pubkey *types.PubKey) ([]*didv1.VerificationMethod, error) { + var verificationMethods []*didv1.VerificationMethod for method, chain := range types.InitialChainCodes { nk, err := computeBip32AccountPublicKey(pubkey, chain, 0) if err != nil { diff --git a/x/did/builder/scopes.go b/x/did/builder/scopes.go new file mode 100644 index 000000000..2635d6204 --- /dev/null +++ b/x/did/builder/scopes.go @@ -0,0 +1,56 @@ +package builder + +import ( + "github.com/onsonr/sonr/x/did/types" + "gopkg.in/macaroon-bakery.v2/bakery/checkers" +) + +var ( + GenericPermissionScopeStrings = [...]string{ + "profile.name", + "identifiers.email", + "identifiers.phone", + "transactions.read", + "transactions.write", + "wallets.read", + "wallets.create", + "wallets.subscribe", + "wallets.update", + "transactions.verify", + "transactions.broadcast", + "admin.user", + "admin.validator", + } + + StringToModulePermissionScope = map[string]types.PermissionScope{ + "PERMISSION_SCOPE_UNSPECIFIED": types.PermissionScope_PERMISSION_SCOPE_UNSPECIFIED, + "PERMISSION_SCOPE_BASIC_INFO": types.PermissionScope_PERMISSION_SCOPE_BASIC_INFO, + "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": types.PermissionScope_PERMISSION_SCOPE_PERMISSIONS_READ, + "PERMISSION_SCOPE_IDENTIFIERS_PHONE": types.PermissionScope_PERMISSION_SCOPE_PERMISSIONS_WRITE, + "PERMISSION_SCOPE_TRANSACTIONS_READ": types.PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ, + "PERMISSION_SCOPE_TRANSACTIONS_WRITE": types.PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE, + "PERMISSION_SCOPE_WALLETS_READ": types.PermissionScope_PERMISSION_SCOPE_WALLETS_READ, + "PERMISSION_SCOPE_WALLETS_CREATE": types.PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE, + "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": types.PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE, + "PERMISSION_SCOPE_WALLETS_UPDATE": types.PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE, + "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": types.PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY, + "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": types.PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST, + "PERMISSION_SCOPE_ADMIN_USER": types.PermissionScope_PERMISSION_SCOPE_ADMIN_USER, + "PERMISSION_SCOPE_ADMIN_VALIDATOR": types.PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR, + } +) + +func ResolvePermissionScope(scope string) (types.PermissionScope, bool) { + uriToPrefix := make(map[string]string) + for _, scope := range GenericPermissionScopeStrings { + uriToPrefix["https://example.com/auth/"+scope] = scope + } + PermissionNamespace := checkers.NewNamespace(uriToPrefix) + + prefix, ok := PermissionNamespace.Resolve("https://example.com/auth/" + scope) + if !ok { + return 0, false + } + permScope, ok := StringToModulePermissionScope[prefix] + return permScope, ok +} diff --git a/x/did/builder/signer.go b/x/did/builder/signer.go new file mode 100644 index 000000000..b7b3fc33a --- /dev/null +++ b/x/did/builder/signer.go @@ -0,0 +1,59 @@ +package builder + +import ( + "github.com/onsonr/crypto" + "github.com/onsonr/sonr/x/did/types" +) + +type Signer interface { + Sign(msg []byte) ([]byte, error) + Verify(msg []byte, sig []byte) error + PublicKey() []byte +} + +type signer struct { + user *types.Keyshare + val *types.Keyshare +} + +func (k signer) Sign(msg []byte) ([]byte, error) { + valSignFunc, err := crypto.GetSignFunc(k.val, msg) + if err != nil { + return nil, err + } + usrSignFunc, err := crypto.GetSignFunc(k.user, msg) + if err != nil { + return nil, err + } + sig, err := crypto.RunMPCSign(valSignFunc, usrSignFunc) + if err != nil { + return nil, err + } + return crypto.SerializeMPCSignature(sig) +} + +func (k signer) Verify(msg []byte, sig []byte) error { + sigMpc, err := crypto.DeserializeMPCSignature(sig) + if err != nil { + return err + } + pk, err := crypto.GetECDSAPublicKey(k.val) + if err != nil { + return err + } + ok := crypto.VerifyMPCSignature(sigMpc, msg, pk) + if !ok { + return types.ErrInvalidSignature + } + return nil +} + +func (k signer) PublicKey() []byte { + if k.user != nil { + return k.user.PublicKey + } + if k.val != nil { + return k.val.PublicKey + } + return nil +} diff --git a/x/did/builder/webauthn.go b/x/did/builder/webauthn.go index b32d118d8..098f91356 100644 --- a/x/did/builder/webauthn.go +++ b/x/did/builder/webauthn.go @@ -4,8 +4,63 @@ import ( "bytes" "encoding/base64" "reflect" + + "github.com/go-webauthn/webauthn/protocol" ) +// Credential contains all needed information about a WebAuthn credential for storage. +type Credential struct { + Subject string `json:"handle"` + AttestationType string `json:"attestationType"` + Origin string `json:"origin"` + CredentialID []byte `json:"id"` + PublicKey []byte `json:"publicKey"` + Transport []string `json:"transport"` + SignCount uint32 `json:"signCount"` + UserPresent bool `json:"userPresent"` + UserVerified bool `json:"userVerified"` + BackupEligible bool `json:"backupEligible"` + BackupState bool `json:"backupState"` + CloneWarning bool `json:"cloneWarning"` +} + +// NewCredential will return a credential pointer on successful validation of a registration response. +func NewCredential(c *protocol.ParsedCredentialCreationData, origin, handle string) *Credential { + return &Credential{ + Subject: handle, + Origin: origin, + AttestationType: c.Response.AttestationObject.Format, + CredentialID: c.Response.AttestationObject.AuthData.AttData.CredentialID, + PublicKey: c.Response.AttestationObject.AuthData.AttData.CredentialPublicKey, + Transport: NormalizeTransports(c.Response.Transports), + SignCount: c.Response.AttestationObject.AuthData.Counter, + UserPresent: c.Response.AttestationObject.AuthData.Flags.HasUserPresent(), + UserVerified: c.Response.AttestationObject.AuthData.Flags.HasUserVerified(), + BackupEligible: c.Response.AttestationObject.AuthData.Flags.HasBackupEligible(), + BackupState: c.Response.AttestationObject.AuthData.Flags.HasAttestedCredentialData(), + } +} + +// Descriptor converts a Credential into a protocol.CredentialDescriptor. +func (c *Credential) Descriptor() protocol.CredentialDescriptor { + return protocol.CredentialDescriptor{ + Type: protocol.PublicKeyCredentialType, + CredentialID: c.CredentialID, + Transport: ModuleTransportsToProtocol(c.Transport), + AttestationType: c.AttestationType, + } +} + +// This is a signal that the authenticator may be cloned, see CloneWarning above for more information. +func (a *Credential) UpdateCounter(authDataCount uint32) { + if authDataCount <= a.SignCount && (authDataCount != 0 || a.SignCount != 0) { + a.CloneWarning = true + return + } + + a.SignCount = authDataCount +} + type CredentialDescriptor struct { // The valid credential types. Type CredentialType `json:"type"` diff --git a/x/did/context/cache.go b/x/did/context/cache.go new file mode 100644 index 000000000..a03e1d1c4 --- /dev/null +++ b/x/did/context/cache.go @@ -0,0 +1 @@ +package context diff --git a/x/did/middleware/grpc.go b/x/did/context/client.go similarity index 98% rename from x/did/middleware/grpc.go rename to x/did/context/client.go index 745cc1c8b..576c12974 100644 --- a/x/did/middleware/grpc.go +++ b/x/did/context/client.go @@ -1,4 +1,4 @@ -package middleware +package context import ( "context" diff --git a/x/did/keeper/context.go b/x/did/keeper/context.go new file mode 100644 index 000000000..07bc22f72 --- /dev/null +++ b/x/did/keeper/context.go @@ -0,0 +1,60 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/onsonr/sonr/x/did/builder" + "github.com/onsonr/sonr/x/did/types" + "google.golang.org/grpc/peer" +) + +type Context struct { + SDKCtx sdk.Context + Keeper Keeper + Peer *peer.Peer +} + +func (k Keeper) CurrentCtx(goCtx context.Context) Context { + ctx := sdk.UnwrapSDKContext(goCtx) + peer, _ := peer.FromContext(goCtx) + return Context{SDKCtx: ctx, Peer: peer, Keeper: k} +} + +func (c Context) Params() *types.Params { + return c.Keeper.GetParams(c.SDK()) +} + +func (c Context) SDK() sdk.Context { + return c.SDKCtx +} + +func (c Context) IsAnonymous() bool { + if c.Peer == nil { + return true + } + return c.Peer.Addr == nil +} + +func (c Context) PeerID() string { + if c.Peer == nil { + return "" + } + return c.Peer.Addr.String() +} + +func (c Context) GetService(origin string) (*types.Service, error) { + rec, err := c.Keeper.OrmDB.ServiceRecordTable().GetByOrigin(c.SDK(), origin) + if err != nil { + return nil, err + } + return builder.ModuleFormatAPIServiceRecord(rec), nil +} + +func (c Context) GetServiceInfo(origin string) *types.ServiceInfo { + rec, _ := c.GetService(origin) + if rec == nil { + return &types.ServiceInfo{Exists: false, Origin: origin, Fingerprint: types.ComputeOriginTXTRecord(origin)} + } + return &types.ServiceInfo{Exists: true, Origin: origin, Fingerprint: types.ComputeOriginTXTRecord(origin), Service: rec} +} diff --git a/x/did/keeper/genesis.go b/x/did/keeper/genesis.go index e0a25ddc7..381f971e5 100644 --- a/x/did/keeper/genesis.go +++ b/x/did/keeper/genesis.go @@ -66,7 +66,8 @@ func (k Keeper) GetParams(ctx sdk.Context) *types.Params { if err != nil { p = types.DefaultParams() } - return &p + params := p.ActiveParams(k.HasIPFSConnection()) + return ¶ms } // GetExpirationBlockHeight returns the block height at which the given duration will have passed diff --git a/x/did/keeper/ipfs.go b/x/did/keeper/ipfs.go index 44aa8f420..c02b39dea 100644 --- a/x/did/keeper/ipfs.go +++ b/x/did/keeper/ipfs.go @@ -23,11 +23,11 @@ func (k Keeper) assembleInitialVault(ctx sdk.Context) (string, int64, error) { } // pinInitialVault pins the initial vault to the local IPFS node -func (k Keeper) pinInitialVault(_ sdk.Context, cid string, address string) error { +func (k Keeper) pinInitialVault(_ sdk.Context, cid string, address string) (bool, error) { // Resolve the path path, err := path.NewPath(cid) if err != nil { - return err + return false, err } // 1. Initialize vault.db sqlite database in local IPFS with Mount @@ -37,13 +37,13 @@ func (k Keeper) pinInitialVault(_ sdk.Context, cid string, address string) error // 3. Publish the path to the IPNS _, err = k.ipfsClient.Name().Publish(context.Background(), path, options.Name.Key(address)) if err != nil { - return err + return false, err } // 4. Insert the accounts into x/auth // 5. Insert the controller into state - return nil + return true, nil } // GetFromIPFS gets a file from the local IPFS node diff --git a/x/did/keeper/keeper.go b/x/did/keeper/keeper.go index fa9fe0ded..bcfdaf30b 100644 --- a/x/did/keeper/keeper.go +++ b/x/did/keeper/keeper.go @@ -14,7 +14,7 @@ import ( "github.com/ipfs/kubo/client/rpc" apiv1 "github.com/onsonr/sonr/api/did/v1" - middleware "github.com/onsonr/sonr/x/did/middleware" + middleware "github.com/onsonr/sonr/x/did/context" "github.com/onsonr/sonr/x/did/types" ) @@ -90,7 +90,7 @@ func NewKeeper( // IsClaimedServiceOrigin checks if a service origin is unclaimed func (k Keeper) IsUnclaimedServiceOrigin(ctx sdk.Context, origin string) bool { - rec, _ := k.OrmDB.ServiceRecordTable().GetByOriginUri(ctx, origin) + rec, _ := k.OrmDB.ServiceRecordTable().GetByOrigin(ctx, origin) return rec == nil } @@ -99,7 +99,7 @@ func (k Keeper) IsValidServiceOrigin(ctx sdk.Context, origin string, clientInfo if origin != clientInfo.Hostname { return false } - rec, err := k.OrmDB.ServiceRecordTable().GetByOriginUri(ctx, origin) + rec, err := k.OrmDB.ServiceRecordTable().GetByOrigin(ctx, origin) if err != nil { return false } diff --git a/x/did/keeper/models.go b/x/did/keeper/models.go deleted file mode 100644 index 0f8b89ac0..000000000 --- a/x/did/keeper/models.go +++ /dev/null @@ -1,12 +0,0 @@ -package keeper - -import ( - didv1 "github.com/onsonr/sonr/api/did/v1" - "github.com/onsonr/sonr/x/did/types" -) - -func convertServiceRecord(rec *didv1.ServiceRecord) *types.Service { - return &types.Service{ - Origin: rec.OriginUri, - } -} diff --git a/x/did/keeper/querier.go b/x/did/keeper/querier.go index 2d1c7472b..674dac1b5 100644 --- a/x/did/keeper/querier.go +++ b/x/did/keeper/querier.go @@ -2,11 +2,6 @@ package keeper import ( "context" - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - "google.golang.org/genproto/googleapis/api/httpbody" - "google.golang.org/grpc/peer" "github.com/onsonr/sonr/x/did/types" ) @@ -23,52 +18,27 @@ func NewQuerier(keeper Keeper) Querier { // Params returns the total set of did parameters. func (k Querier) Params( - c context.Context, + goCtx context.Context, req *types.QueryRequest, -) (*types.QueryParamsResponse, error) { - ctx := sdk.UnwrapSDKContext(c) - - p, err := k.Keeper.Params.Get(ctx) - if err != nil { - return nil, err - } - params := p.ActiveParams(k.HasIPFSConnection()) - return &types.QueryParamsResponse{Params: ¶ms}, nil +) (*types.QueryResponse, error) { + ctx := k.CurrentCtx(goCtx) + return &types.QueryResponse{Params: k.GetParams(ctx.SDK())}, nil } // Resolve implements types.QueryServer. func (k Querier) Resolve( goCtx context.Context, req *types.QueryRequest, -) (*types.QueryResolveResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.QueryResolveResponse{}, nil +) (*types.QueryResponse, error) { + ctx := k.CurrentCtx(goCtx) + return &types.QueryResponse{Params: k.GetParams(ctx.SDK())}, nil } // Service implements types.QueryServer. func (k Querier) Service( goCtx context.Context, req *types.QueryRequest, -) (*types.QueryServiceResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - _, ok := peer.FromContext(goCtx) - if !ok { - return nil, fmt.Errorf("failed to get peer from context") - } - - rec, err := k.OrmDB.ServiceRecordTable().GetByOriginUri(ctx, req.Origin) - if err != nil { - return nil, err - } - return &types.QueryServiceResponse{Service: convertServiceRecord(rec)}, nil -} - -// HTMX implements types.QueryServer. -func (k Querier) HTMX(goCtx context.Context, req *types.QueryRequest) (*httpbody.HttpBody, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &httpbody.HttpBody{ - ContentType: "text/html", - Data: []byte("HTMX"), - }, nil +) (*types.QueryResponse, error) { + ctx := k.CurrentCtx(goCtx) + return &types.QueryResponse{Service: ctx.GetServiceInfo(req.GetOrigin()), Params: ctx.Params()}, nil } diff --git a/x/did/keeper/server.go b/x/did/keeper/server.go index dda5cdab6..2b5539b1c 100644 --- a/x/did/keeper/server.go +++ b/x/did/keeper/server.go @@ -9,7 +9,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/onsonr/sonr/x/did/builder" - "github.com/onsonr/sonr/x/did/middleware" + snrctx "github.com/onsonr/sonr/x/did/context" "github.com/onsonr/sonr/x/did/types" ) @@ -24,38 +24,17 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{k: keeper} } -// UpdateParams updates the x/did module parameters. -func (ms msgServer) UpdateParams( - ctx context.Context, - msg *types.MsgUpdateParams, -) (*types.MsgUpdateParamsResponse, error) { - if ms.k.authority != msg.Authority { +// AuthorizeService implements types.MsgServer. +func (ms msgServer) AuthorizeService(goCtx context.Context, msg *types.MsgAuthorizeService) (*types.MsgAuthorizeServiceResponse, error) { + if ms.k.authority != msg.Controller { return nil, errors.Wrapf( govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, - msg.Authority, + msg.Controller, ) } - - return nil, ms.k.Params.Set(ctx, msg.Params) -} - -// Authorize implements types.MsgServer. -func (ms msgServer) Authorize( - ctx context.Context, - msg *types.MsgAuthorize, -) (*types.MsgAuthorizeResponse, error) { - if ms.k.authority != msg.Authority { - return nil, errors.Wrapf( - govtypes.ErrInvalidSigner, - "invalid authority; expected %s, got %s", - ms.k.authority, - msg.Authority, - ) - } - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.MsgAuthorizeResponse{}, nil + return &types.MsgAuthorizeServiceResponse{}, nil } // AllocateVault implements types.MsgServer. @@ -64,7 +43,7 @@ func (ms msgServer) AllocateVault( msg *types.MsgAllocateVault, ) (*types.MsgAllocateVaultResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - clientInfo, err := middleware.ExtractClientInfo(goCtx) + clientInfo, err := snrctx.ExtractClientInfo(goCtx) if err != nil { return nil, err } @@ -79,7 +58,7 @@ func (ms msgServer) AllocateVault( return nil, err } - regOpts, err := builder.NewRegistrationOptions(msg.Origin, msg.Subject, cid, ms.k.GetParams(ctx)) + regOpts, err := builder.GetPublicKeyCredentialCreationOptions(msg.Origin, msg.Subject, cid, ms.k.GetParams(ctx)) if err != nil { return nil, err } @@ -113,23 +92,36 @@ func (ms msgServer) RegisterService( ) (*types.MsgRegisterServiceResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - clientInfo, err := middleware.ExtractClientInfo(goCtx) + clientInfo, err := snrctx.ExtractClientInfo(goCtx) if err != nil { return nil, err } // 1.Check if the service origin is valid - if !ms.k.IsValidServiceOrigin(ctx, msg.OriginUri, clientInfo) { + if !ms.k.IsValidServiceOrigin(ctx, msg.Service.Origin, clientInfo) { return nil, types.ErrInvalidServiceOrigin } - return ms.k.insertService(ctx, msg) + return ms.k.insertService(ctx, msg.Service) } -// SyncVault implements types.MsgServer. -func (ms msgServer) SyncVault( - ctx context.Context, - msg *types.MsgSyncVault, -) (*types.MsgSyncVaultResponse, error) { +// SyncController implements types.MsgServer. +func (ms msgServer) SyncController(ctx context.Context, msg *types.MsgSyncController) (*types.MsgSyncControllerResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.MsgSyncVaultResponse{}, nil + return &types.MsgSyncControllerResponse{}, nil +} + +// UpdateParams updates the x/did module parameters. +func (ms msgServer) UpdateParams( + ctx context.Context, + msg *types.MsgUpdateParams, +) (*types.MsgUpdateParamsResponse, error) { + if ms.k.authority != msg.Authority { + return nil, errors.Wrapf( + govtypes.ErrInvalidSigner, + "invalid authority; expected %s, got %s", + ms.k.authority, + msg.Authority, + ) + } + return nil, ms.k.Params.Set(ctx, msg.Params) } diff --git a/x/did/keeper/state.go b/x/did/keeper/state.go index 1f35e1188..8ddcda5ab 100644 --- a/x/did/keeper/state.go +++ b/x/did/keeper/state.go @@ -3,19 +3,17 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - didv1 "github.com/onsonr/sonr/api/did/v1" + "github.com/onsonr/sonr/x/did/builder" "github.com/onsonr/sonr/x/did/types" ) // insertService inserts a service record into the database func (k Keeper) insertService( ctx sdk.Context, - svc *types.MsgRegisterService, + svc *types.Service, ) (*types.MsgRegisterServiceResponse, error) { - record := didv1.ServiceRecord{ - Id: svc.OriginUri, - } - err := k.OrmDB.ServiceRecordTable().Insert(ctx, &record) + record := builder.APIFormatServiceRecord(svc) + err := k.OrmDB.ServiceRecordTable().Insert(ctx, record) if err != nil { return nil, err } diff --git a/x/did/types/codec.go b/x/did/types/codec.go index 2cb3dbf04..987b94d09 100644 --- a/x/did/types/codec.go +++ b/x/did/types/codec.go @@ -1,12 +1,19 @@ package types import ( + "crypto/sha256" + "encoding/hex" + fmt "fmt" + + "github.com/cosmos/btcutil/bech32" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" + "github.com/mr-tron/base58/base58" + "github.com/onsonr/crypto" // this line is used by starport scaffolding # 1 ) @@ -41,3 +48,153 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } + +type ChainCode uint32 + +const ( + ChainCodeBTC ChainCode = 0 + ChainCodeETH ChainCode = 60 + ChainCodeIBC ChainCode = 118 + ChainCodeSNR ChainCode = 703 +) + +var InitialChainCodes = map[DIDNamespace]ChainCode{ + DIDNamespace_DID_NAMESPACE_BITCOIN: ChainCodeBTC, + DIDNamespace_DID_NAMESPACE_IBC: ChainCodeIBC, + DIDNamespace_DID_NAMESPACE_ETHEREUM: ChainCodeETH, + DIDNamespace_DID_NAMESPACE_SONR: ChainCodeSNR, +} + +func (c ChainCode) FormatAddress(pubKey *PubKey) (string, error) { + switch c { + case ChainCodeBTC: + return bech32.Encode("bc", pubKey.Bytes()) + + case ChainCodeETH: + return bech32.Encode("eth", pubKey.Bytes()) + + case ChainCodeSNR: + return bech32.Encode("idx", pubKey.Bytes()) + + case ChainCodeIBC: + return bech32.Encode("cosmos", pubKey.Bytes()) + + } + return "", ErrUnsopportedChainCode +} + +func (n DIDNamespace) ChainCode() (uint32, error) { + switch n { + case DIDNamespace_DID_NAMESPACE_BITCOIN: + return 0, nil + case DIDNamespace_DID_NAMESPACE_ETHEREUM: + return 64, nil + case DIDNamespace_DID_NAMESPACE_IBC: + return 118, nil + case DIDNamespace_DID_NAMESPACE_SONR: + return 703, nil + default: + return 0, fmt.Errorf("unsupported chain") + } +} + +func (n DIDNamespace) DIDMethod() string { + switch n { + case DIDNamespace_DID_NAMESPACE_IPFS: + return "ipfs" + case DIDNamespace_DID_NAMESPACE_SONR: + return "sonr" + case DIDNamespace_DID_NAMESPACE_BITCOIN: + return "btcr" + case DIDNamespace_DID_NAMESPACE_ETHEREUM: + return "ethr" + case DIDNamespace_DID_NAMESPACE_IBC: + return "ibcr" + case DIDNamespace_DID_NAMESPACE_WEBAUTHN: + return "webauthn" + case DIDNamespace_DID_NAMESPACE_DWN: + return "motr" + case DIDNamespace_DID_NAMESPACE_SERVICE: + return "web" + default: + return "n/a" + } +} + +func (n DIDNamespace) FormatDID(subject string) string { + return fmt.Sprintf("%s:%s", n.DIDMethod(), subject) +} + +type EncodedKey []byte + +func (e KeyEncoding) EncodeRaw(data []byte) (EncodedKey, error) { + switch e { + case KeyEncoding_KEY_ENCODING_RAW: + return data, nil + case KeyEncoding_KEY_ENCODING_HEX: + return []byte(hex.EncodeToString(data)), nil + case KeyEncoding_KEY_ENCODING_MULTIBASE: + return []byte(base58.Encode(data)), nil + default: + return nil, nil + } +} + +func (e KeyEncoding) DecodeRaw(data EncodedKey) ([]byte, error) { + switch e { + case KeyEncoding_KEY_ENCODING_RAW: + return data, nil + case KeyEncoding_KEY_ENCODING_HEX: + return hex.DecodeString(string(data)) + case KeyEncoding_KEY_ENCODING_MULTIBASE: + return base58.Decode(string(data)) + default: + return nil, nil + } +} + +type COSEAlgorithmIdentifier int + +func (k KeyAlgorithm) CoseIdentifier() COSEAlgorithmIdentifier { + switch k { + case KeyAlgorithm_KEY_ALGORITHM_ES256: + return COSEAlgorithmIdentifier(-7) + case KeyAlgorithm_KEY_ALGORITHM_ES384: + return COSEAlgorithmIdentifier(-35) + case KeyAlgorithm_KEY_ALGORITHM_ES512: + return COSEAlgorithmIdentifier(-36) + case KeyAlgorithm_KEY_ALGORITHM_EDDSA: + return COSEAlgorithmIdentifier(-8) + case KeyAlgorithm_KEY_ALGORITHM_ES256K: + return COSEAlgorithmIdentifier(-10) + default: + return COSEAlgorithmIdentifier(0) + } +} + +func (k KeyCurve) ComputePublicKey(data []byte) (*PubKey, error) { + return nil, ErrUnsupportedKeyCurve +} + +func (k *Keyshare) Equals(o crypto.MPCShare) bool { + opk := o.GetPublicKey() + if opk != nil && k.PublicKey == nil { + return false + } + return k.GetRole() == o.GetRole() +} + +func (k *Keyshare) IsUser() bool { + return k.Role == 2 +} + +func (k *Keyshare) IsValidator() bool { + return k.Role == 1 +} + +// ComputeOriginTXTRecord generates a fingerprint for a given origin +func ComputeOriginTXTRecord(origin string) string { + h := sha256.New() + h.Write([]byte(origin)) + return fmt.Sprintf("v=sonr,o=%s,p=%x", origin, h.Sum(nil)) +} diff --git a/x/did/types/encoding.go b/x/did/types/encoding.go deleted file mode 100644 index e4ced1989..000000000 --- a/x/did/types/encoding.go +++ /dev/null @@ -1,136 +0,0 @@ -package types - -import ( - "encoding/hex" - fmt "fmt" - - "github.com/cosmos/btcutil/bech32" - "github.com/mr-tron/base58/base58" -) - -type ChainCode uint32 - -const ( - ChainCodeBTC ChainCode = 0 - ChainCodeETH ChainCode = 60 - ChainCodeIBC ChainCode = 118 - ChainCodeSNR ChainCode = 703 -) - -var InitialChainCodes = map[DIDNamespace]ChainCode{ - DIDNamespace_DID_NAMESPACE_BITCOIN: ChainCodeBTC, - DIDNamespace_DID_NAMESPACE_IBC: ChainCodeIBC, - DIDNamespace_DID_NAMESPACE_ETHEREUM: ChainCodeETH, - DIDNamespace_DID_NAMESPACE_SONR: ChainCodeSNR, -} - -func (c ChainCode) FormatAddress(pubKey *PubKey) (string, error) { - switch c { - case ChainCodeBTC: - return bech32.Encode("bc", pubKey.Bytes()) - - case ChainCodeETH: - return bech32.Encode("eth", pubKey.Bytes()) - - case ChainCodeSNR: - return bech32.Encode("idx", pubKey.Bytes()) - - case ChainCodeIBC: - return bech32.Encode("cosmos", pubKey.Bytes()) - - } - return "", ErrUnsopportedChainCode -} - -func (n DIDNamespace) ChainCode() (uint32, error) { - switch n { - case DIDNamespace_DID_NAMESPACE_BITCOIN: - return 0, nil - case DIDNamespace_DID_NAMESPACE_ETHEREUM: - return 64, nil - case DIDNamespace_DID_NAMESPACE_IBC: - return 118, nil - case DIDNamespace_DID_NAMESPACE_SONR: - return 703, nil - default: - return 0, fmt.Errorf("unsupported chain") - } -} - -func (n DIDNamespace) DIDMethod() string { - switch n { - case DIDNamespace_DID_NAMESPACE_IPFS: - return "ipfs" - case DIDNamespace_DID_NAMESPACE_SONR: - return "sonr" - case DIDNamespace_DID_NAMESPACE_BITCOIN: - return "btcr" - case DIDNamespace_DID_NAMESPACE_ETHEREUM: - return "ethr" - case DIDNamespace_DID_NAMESPACE_IBC: - return "ibcr" - case DIDNamespace_DID_NAMESPACE_WEBAUTHN: - return "webauthn" - case DIDNamespace_DID_NAMESPACE_DWN: - return "motr" - case DIDNamespace_DID_NAMESPACE_SERVICE: - return "web" - default: - return "n/a" - } -} - -func (n DIDNamespace) FormatDID(subject string) string { - return fmt.Sprintf("%s:%s", n.DIDMethod(), subject) -} - -type EncodedKey []byte - -func (e KeyEncoding) EncodeRaw(data []byte) (EncodedKey, error) { - switch e { - case KeyEncoding_KEY_ENCODING_RAW: - return data, nil - case KeyEncoding_KEY_ENCODING_HEX: - return []byte(hex.EncodeToString(data)), nil - case KeyEncoding_KEY_ENCODING_MULTIBASE: - return []byte(base58.Encode(data)), nil - default: - return nil, nil - } -} - -func (e KeyEncoding) DecodeRaw(data EncodedKey) ([]byte, error) { - switch e { - case KeyEncoding_KEY_ENCODING_RAW: - return data, nil - case KeyEncoding_KEY_ENCODING_HEX: - return hex.DecodeString(string(data)) - case KeyEncoding_KEY_ENCODING_MULTIBASE: - return base58.Decode(string(data)) - default: - return nil, nil - } -} - -type COSEAlgorithmIdentifier int - -func (k KeyAlgorithm) CoseIdentifier() COSEAlgorithmIdentifier { - switch k { - case KeyAlgorithm_KEY_ALGORITHM_ES256: - return COSEAlgorithmIdentifier(-7) - case KeyAlgorithm_KEY_ALGORITHM_ES384: - return COSEAlgorithmIdentifier(-35) - case KeyAlgorithm_KEY_ALGORITHM_ES512: - return COSEAlgorithmIdentifier(-36) - case KeyAlgorithm_KEY_ALGORITHM_EDDSA: - return COSEAlgorithmIdentifier(-8) - case KeyAlgorithm_KEY_ALGORITHM_ES256K: - return COSEAlgorithmIdentifier(-10) - default: - return COSEAlgorithmIdentifier(0) - } -} - -func (k KeyCurve) ComputePublicKey(data []byte) (*PubKey, error) { - return nil, ErrUnsupportedKeyCurve -} diff --git a/x/did/types/errors.go b/x/did/types/errors.go index bbc7b4365..76d33bbd6 100644 --- a/x/did/types/errors.go +++ b/x/did/types/errors.go @@ -7,9 +7,11 @@ var ( ErrInvalidETHAddressFormat = sdkerrors.Register(ModuleName, 200, "invalid ETH address format") ErrInvalidBTCAddressFormat = sdkerrors.Register(ModuleName, 201, "invalid BTC address format") ErrInvalidIDXAddressFormat = sdkerrors.Register(ModuleName, 202, "invalid IDX address format") + ErrInvalidOriginFormat = sdkerrors.Register(ModuleName, 203, "invalid origin format") ErrInvalidServiceOrigin = sdkerrors.Register(ModuleName, 300, "invalid service origin") ErrUnrecognizedService = sdkerrors.Register(ModuleName, 301, "unrecognized service") ErrUnsupportedKeyEncoding = sdkerrors.Register(ModuleName, 400, "unsupported key encoding") ErrUnsopportedChainCode = sdkerrors.Register(ModuleName, 401, "unsupported chain code") ErrUnsupportedKeyCurve = sdkerrors.Register(ModuleName, 402, "unsupported key curve") + ErrInvalidSignature = sdkerrors.Register(ModuleName, 403, "invalid signature") ) diff --git a/x/did/types/genesis.go b/x/did/types/genesis.go index 56cb7a54a..d92ce632e 100644 --- a/x/did/types/genesis.go +++ b/x/did/types/genesis.go @@ -53,7 +53,6 @@ func DefaultParams() Params { WhitelistedAssets: DefaultAssets(), WhitelistedChains: DefaultChains(), AllowedPublicKeys: DefaultKeyInfos(), - OpenidConfig: DefaultOpenIDConfig(), LocalhostRegistrationEnabled: true, ConveyancePreference: "direct", AttestationFormats: []string{"packed", "android-key", "fido-u2f", "apple"}, @@ -163,21 +162,6 @@ func DefaultKeyInfos() []*KeyInfo { } } -func DefaultOpenIDConfig() *OpenIDConfig { - return &OpenIDConfig{ - Issuer: "https://sonr.id", - AuthorizationEndpoint: "https://api.sonr.id/auth", - TokenEndpoint: "https://api.sonr.id/token", - UserinfoEndpoint: "https://api.sonr.id/userinfo", - ScopesSupported: []string{"openid", "profile", "email", "web3", "sonr"}, - ResponseTypesSupported: []string{"code"}, - ResponseModesSupported: []string{"query", "form_post"}, - GrantTypesSupported: []string{"authorization_code", "refresh_token"}, - AcrValuesSupported: []string{"passkey"}, - SubjectTypesSupported: []string{"public"}, - } -} - func (p Params) ActiveParams(ipfsActive bool) Params { p.IpfsActive = ipfsActive return p @@ -198,3 +182,39 @@ func (p Params) Validate() error { // TODO: return nil } + +// +// # Genesis Structures +// + +// Equal returns true if two asset infos are equal +func (a *AssetInfo) Equal(b *AssetInfo) bool { + if a == nil && b == nil { + return true + } + return false +} + +// Equal returns true if two chain infos are equal +func (c *ChainInfo) Equal(b *ChainInfo) bool { + if c == nil && b == nil { + return true + } + return false +} + +// Equal returns true if two key infos are equal +func (k *KeyInfo) Equal(b *KeyInfo) bool { + if k == nil && b == nil { + return true + } + return false +} + +// Equal returns true if two validator infos are equal +func (v *ValidatorInfo) Equal(b *ValidatorInfo) bool { + if v == nil && b == nil { + return true + } + return false +} diff --git a/x/did/types/genesis.pb.go b/x/did/types/genesis.pb.go index bb7852c89..d5b6dd68f 100644 --- a/x/did/types/genesis.pb.go +++ b/x/did/types/genesis.pb.go @@ -324,6 +324,34 @@ func (KeyType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_fda181cae44f7c00, []int{6} } +type KeyshareRole int32 + +const ( + KeyshareRole_KEYSHARE_ROLE_UNSPECIFIED KeyshareRole = 0 + KeyshareRole_KEYSHARE_ROLE_USER KeyshareRole = 1 + KeyshareRole_KEYSHARE_ROLE_VALIDATOR KeyshareRole = 2 +) + +var KeyshareRole_name = map[int32]string{ + 0: "KEYSHARE_ROLE_UNSPECIFIED", + 1: "KEYSHARE_ROLE_USER", + 2: "KEYSHARE_ROLE_VALIDATOR", +} + +var KeyshareRole_value = map[string]int32{ + "KEYSHARE_ROLE_UNSPECIFIED": 0, + "KEYSHARE_ROLE_USER": 1, + "KEYSHARE_ROLE_VALIDATOR": 2, +} + +func (x KeyshareRole) String() string { + return proto.EnumName(KeyshareRole_name, int32(x)) +} + +func (KeyshareRole) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{7} +} + // PermissionScope define the Capabilities Controllers can grant for Services type PermissionScope int32 @@ -383,7 +411,7 @@ func (x PermissionScope) String() string { } func (PermissionScope) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{7} + return fileDescriptor_fda181cae44f7c00, []int{8} } // GenesisState defines the module genesis state @@ -440,16 +468,14 @@ type Params struct { WhitelistedChains []*ChainInfo `protobuf:"bytes,2,rep,name=whitelisted_chains,json=whitelistedChains,proto3" json:"whitelisted_chains,omitempty"` // Whitelisted Key Types AllowedPublicKeys []*KeyInfo `protobuf:"bytes,3,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty"` - // OpenIDConfig defines the base openid configuration across all did services - OpenidConfig *OpenIDConfig `protobuf:"bytes,4,opt,name=openid_config,json=openidConfig,proto3" json:"openid_config,omitempty"` // IpfsActive is a flag to enable/disable ipfs - IpfsActive bool `protobuf:"varint,5,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` + IpfsActive bool `protobuf:"varint,4,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` // Localhost Registration Enabled - LocalhostRegistrationEnabled bool `protobuf:"varint,6,opt,name=localhost_registration_enabled,json=localhostRegistrationEnabled,proto3" json:"localhost_registration_enabled,omitempty"` + LocalhostRegistrationEnabled bool `protobuf:"varint,5,opt,name=localhost_registration_enabled,json=localhostRegistrationEnabled,proto3" json:"localhost_registration_enabled,omitempty"` // ConveyancePreference defines the conveyance preference - ConveyancePreference string `protobuf:"bytes,7,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"` + ConveyancePreference string `protobuf:"bytes,6,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"` // AttestationFormats defines the attestation formats - AttestationFormats []string `protobuf:"bytes,8,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"` + AttestationFormats []string `protobuf:"bytes,7,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -505,13 +531,6 @@ func (m *Params) GetAllowedPublicKeys() []*KeyInfo { return nil } -func (m *Params) GetOpenidConfig() *OpenIDConfig { - if m != nil { - return m.OpenidConfig - } - return nil -} - func (m *Params) GetIpfsActive() bool { if m != nil { return m.IpfsActive @@ -794,123 +813,6 @@ func (m *KeyInfo) GetType() KeyType { return KeyType_KEY_TYPE_UNSPECIFIED } -// OpenIDConfig defines the base openid configuration across all did services -type OpenIDConfig struct { - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - AuthorizationEndpoint string `protobuf:"bytes,2,opt,name=authorization_endpoint,json=authorizationEndpoint,proto3" json:"authorization_endpoint,omitempty"` - TokenEndpoint string `protobuf:"bytes,3,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` - UserinfoEndpoint string `protobuf:"bytes,4,opt,name=userinfo_endpoint,json=userinfoEndpoint,proto3" json:"userinfo_endpoint,omitempty"` - ScopesSupported []string `protobuf:"bytes,5,rep,name=scopes_supported,json=scopesSupported,proto3" json:"scopes_supported,omitempty"` - ResponseTypesSupported []string `protobuf:"bytes,6,rep,name=response_types_supported,json=responseTypesSupported,proto3" json:"response_types_supported,omitempty"` - ResponseModesSupported []string `protobuf:"bytes,7,rep,name=response_modes_supported,json=responseModesSupported,proto3" json:"response_modes_supported,omitempty"` - GrantTypesSupported []string `protobuf:"bytes,8,rep,name=grant_types_supported,json=grantTypesSupported,proto3" json:"grant_types_supported,omitempty"` - AcrValuesSupported []string `protobuf:"bytes,9,rep,name=acr_values_supported,json=acrValuesSupported,proto3" json:"acr_values_supported,omitempty"` - SubjectTypesSupported []string `protobuf:"bytes,10,rep,name=subject_types_supported,json=subjectTypesSupported,proto3" json:"subject_types_supported,omitempty"` -} - -func (m *OpenIDConfig) Reset() { *m = OpenIDConfig{} } -func (m *OpenIDConfig) String() string { return proto.CompactTextString(m) } -func (*OpenIDConfig) ProtoMessage() {} -func (*OpenIDConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{5} -} -func (m *OpenIDConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OpenIDConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OpenIDConfig.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 *OpenIDConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_OpenIDConfig.Merge(m, src) -} -func (m *OpenIDConfig) XXX_Size() int { - return m.Size() -} -func (m *OpenIDConfig) XXX_DiscardUnknown() { - xxx_messageInfo_OpenIDConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_OpenIDConfig proto.InternalMessageInfo - -func (m *OpenIDConfig) GetIssuer() string { - if m != nil { - return m.Issuer - } - return "" -} - -func (m *OpenIDConfig) GetAuthorizationEndpoint() string { - if m != nil { - return m.AuthorizationEndpoint - } - return "" -} - -func (m *OpenIDConfig) GetTokenEndpoint() string { - if m != nil { - return m.TokenEndpoint - } - return "" -} - -func (m *OpenIDConfig) GetUserinfoEndpoint() string { - if m != nil { - return m.UserinfoEndpoint - } - return "" -} - -func (m *OpenIDConfig) GetScopesSupported() []string { - if m != nil { - return m.ScopesSupported - } - return nil -} - -func (m *OpenIDConfig) GetResponseTypesSupported() []string { - if m != nil { - return m.ResponseTypesSupported - } - return nil -} - -func (m *OpenIDConfig) GetResponseModesSupported() []string { - if m != nil { - return m.ResponseModesSupported - } - return nil -} - -func (m *OpenIDConfig) GetGrantTypesSupported() []string { - if m != nil { - return m.GrantTypesSupported - } - return nil -} - -func (m *OpenIDConfig) GetAcrValuesSupported() []string { - if m != nil { - return m.AcrValuesSupported - } - return nil -} - -func (m *OpenIDConfig) GetSubjectTypesSupported() []string { - if m != nil { - return m.SubjectTypesSupported - } - return nil -} - // ValidatorInfo defines information for accepted Validator nodes type ValidatorInfo struct { Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` @@ -925,7 +827,7 @@ func (m *ValidatorInfo) Reset() { *m = ValidatorInfo{} } func (m *ValidatorInfo) String() string { return proto.CompactTextString(m) } func (*ValidatorInfo) ProtoMessage() {} func (*ValidatorInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{6} + return fileDescriptor_fda181cae44f7c00, []int{5} } func (m *ValidatorInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1006,7 +908,7 @@ func (m *ValidatorInfo_Endpoint) Reset() { *m = ValidatorInfo_Endpoint{} func (m *ValidatorInfo_Endpoint) String() string { return proto.CompactTextString(m) } func (*ValidatorInfo_Endpoint) ProtoMessage() {} func (*ValidatorInfo_Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{6, 0} + return fileDescriptor_fda181cae44f7c00, []int{5, 0} } func (m *ValidatorInfo_Endpoint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1059,7 +961,7 @@ func (m *ValidatorInfo_ExplorerInfo) Reset() { *m = ValidatorInfo_Explor func (m *ValidatorInfo_ExplorerInfo) String() string { return proto.CompactTextString(m) } func (*ValidatorInfo_ExplorerInfo) ProtoMessage() {} func (*ValidatorInfo_ExplorerInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{6, 1} + return fileDescriptor_fda181cae44f7c00, []int{5, 1} } func (m *ValidatorInfo_ExplorerInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1115,7 +1017,7 @@ func (m *ValidatorInfo_FeeInfo) Reset() { *m = ValidatorInfo_FeeInfo{} } func (m *ValidatorInfo_FeeInfo) String() string { return proto.CompactTextString(m) } func (*ValidatorInfo_FeeInfo) ProtoMessage() {} func (*ValidatorInfo_FeeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{6, 2} + return fileDescriptor_fda181cae44f7c00, []int{5, 2} } func (m *ValidatorInfo_FeeInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1189,7 +1091,7 @@ func (m *ValidatorInfo_IBCChannel) Reset() { *m = ValidatorInfo_IBCChann func (m *ValidatorInfo_IBCChannel) String() string { return proto.CompactTextString(m) } func (*ValidatorInfo_IBCChannel) ProtoMessage() {} func (*ValidatorInfo_IBCChannel) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{6, 3} + return fileDescriptor_fda181cae44f7c00, []int{5, 3} } func (m *ValidatorInfo_IBCChannel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1240,13 +1142,13 @@ func init() { proto.RegisterEnum("did.v1.KeyEncoding", KeyEncoding_name, KeyEncoding_value) proto.RegisterEnum("did.v1.KeyRole", KeyRole_name, KeyRole_value) proto.RegisterEnum("did.v1.KeyType", KeyType_name, KeyType_value) + proto.RegisterEnum("did.v1.KeyshareRole", KeyshareRole_name, KeyshareRole_value) proto.RegisterEnum("did.v1.PermissionScope", PermissionScope_name, PermissionScope_value) proto.RegisterType((*GenesisState)(nil), "did.v1.GenesisState") proto.RegisterType((*Params)(nil), "did.v1.Params") proto.RegisterType((*AssetInfo)(nil), "did.v1.AssetInfo") proto.RegisterType((*ChainInfo)(nil), "did.v1.ChainInfo") proto.RegisterType((*KeyInfo)(nil), "did.v1.KeyInfo") - proto.RegisterType((*OpenIDConfig)(nil), "did.v1.OpenIDConfig") proto.RegisterType((*ValidatorInfo)(nil), "did.v1.ValidatorInfo") proto.RegisterType((*ValidatorInfo_Endpoint)(nil), "did.v1.ValidatorInfo.Endpoint") proto.RegisterType((*ValidatorInfo_ExplorerInfo)(nil), "did.v1.ValidatorInfo.ExplorerInfo") @@ -1257,132 +1159,121 @@ func init() { func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) } var fileDescriptor_fda181cae44f7c00 = []byte{ - // 1995 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0xbd, 0x73, 0x1b, 0xc7, - 0x15, 0x27, 0x88, 0xef, 0x07, 0x12, 0x5a, 0x2e, 0x3f, 0x04, 0x51, 0x12, 0x49, 0x51, 0xb2, 0xcd, - 0xd0, 0x19, 0x52, 0x84, 0x44, 0x8f, 0x9c, 0x78, 0x92, 0x1c, 0x0e, 0x47, 0xea, 0x86, 0xf8, 0x9a, - 0xbd, 0x23, 0x69, 0xb9, 0xb9, 0x39, 0x02, 0x4b, 0x70, 0x23, 0xe0, 0x0e, 0x73, 0x7b, 0xa0, 0xc5, - 0x74, 0x69, 0x5d, 0xa5, 0x4c, 0x3a, 0x77, 0x69, 0x52, 0x24, 0xff, 0x83, 0x0b, 0x37, 0x99, 0x71, - 0x99, 0x34, 0x19, 0x8f, 0x54, 0x24, 0x55, 0xfa, 0x74, 0x99, 0xdd, 0xbb, 0x03, 0x70, 0x04, 0xa4, - 0x71, 0x83, 0xd9, 0xfd, 0xfd, 0x7e, 0xef, 0xed, 0x7b, 0xfb, 0xde, 0xee, 0x1e, 0x09, 0x2b, 0x1d, - 0xd6, 0xd9, 0xbf, 0x3e, 0xd8, 0xef, 0x52, 0x87, 0x72, 0xc6, 0xf7, 0x06, 0x9e, 0xeb, 0xbb, 0x38, - 0xd3, 0x61, 0x9d, 0xbd, 0xeb, 0x83, 0xf5, 0x25, 0xbb, 0xcf, 0x1c, 0x77, 0x5f, 0xfe, 0x06, 0xd4, - 0xfa, 0x4a, 0xd7, 0xed, 0xba, 0x72, 0xb8, 0x2f, 0x46, 0x01, 0xba, 0xfd, 0x05, 0x2c, 0x1c, 0x07, - 0x1e, 0x0c, 0xdf, 0xf6, 0x29, 0xfe, 0x39, 0x64, 0x06, 0xb6, 0x67, 0xf7, 0x79, 0x29, 0xb1, 0x95, - 0xd8, 0x29, 0x94, 0x8b, 0x7b, 0x81, 0xc7, 0xbd, 0x96, 0x44, 0x2b, 0xa9, 0xef, 0xff, 0xb5, 0x39, - 0x47, 0x42, 0xcd, 0xf6, 0x7f, 0x93, 0x90, 0x09, 0x08, 0xfc, 0x1b, 0xc0, 0x5f, 0x5f, 0x31, 0x9f, - 0xf6, 0x18, 0xf7, 0x69, 0xc7, 0xb2, 0x39, 0xa7, 0xbe, 0x70, 0x92, 0xdc, 0x29, 0x94, 0x97, 0x22, - 0x27, 0x8a, 0x40, 0x75, 0xe7, 0xd2, 0x25, 0x4b, 0x13, 0x62, 0x89, 0x4e, 0x79, 0x68, 0x5f, 0xd9, - 0xcc, 0xe1, 0xa5, 0xf9, 0xb8, 0x07, 0x55, 0xa0, 0x53, 0x1e, 0x24, 0xca, 0xf1, 0xaf, 0x61, 0xd9, - 0xee, 0xf5, 0xdc, 0xaf, 0x69, 0xc7, 0x1a, 0x0c, 0x2f, 0x7a, 0xac, 0x6d, 0xbd, 0xa6, 0x37, 0xbc, - 0x94, 0x94, 0x2e, 0xee, 0x44, 0x2e, 0x4e, 0xe8, 0x4d, 0xe0, 0x20, 0xd4, 0xb6, 0xa4, 0xf4, 0x84, - 0xde, 0x70, 0xfc, 0x39, 0x2c, 0xba, 0x03, 0xea, 0xb0, 0x8e, 0xd5, 0x76, 0x9d, 0x4b, 0xd6, 0x2d, - 0xa5, 0xe4, 0x26, 0xac, 0x44, 0xa6, 0xcd, 0x01, 0x75, 0xf4, 0xaa, 0x2a, 0x39, 0xb2, 0x10, 0x48, - 0x83, 0x19, 0xde, 0x84, 0x02, 0x1b, 0x5c, 0x72, 0xcb, 0x6e, 0xfb, 0xec, 0x9a, 0x96, 0xd2, 0x5b, - 0x89, 0x9d, 0x1c, 0x01, 0x01, 0x29, 0x12, 0xc1, 0x55, 0xd8, 0xe8, 0xb9, 0x6d, 0xbb, 0x77, 0xe5, - 0x72, 0xdf, 0xf2, 0x68, 0x97, 0x71, 0xdf, 0xb3, 0x7d, 0xe6, 0x3a, 0x16, 0x75, 0xec, 0x8b, 0x1e, - 0xed, 0x94, 0x32, 0xd2, 0xe6, 0xc1, 0x48, 0x45, 0x26, 0x44, 0x5a, 0xa0, 0xc1, 0xcf, 0x60, 0xb5, - 0xed, 0x3a, 0xd7, 0xf4, 0xc6, 0x76, 0xda, 0xd4, 0x1a, 0x78, 0xf4, 0x92, 0x7a, 0xd4, 0x69, 0xd3, - 0x52, 0x76, 0x2b, 0xb1, 0x93, 0x27, 0x2b, 0x63, 0xb2, 0x35, 0xe2, 0xf0, 0x3e, 0x2c, 0xdb, 0xbe, - 0x4f, 0xb9, 0x1f, 0xac, 0x77, 0xe9, 0x7a, 0x7d, 0xdb, 0xe7, 0xa5, 0xdc, 0x56, 0x72, 0x27, 0x4f, - 0xf0, 0x04, 0x75, 0x14, 0x30, 0xbf, 0xb8, 0xfb, 0xc7, 0x6f, 0x37, 0xe7, 0xfe, 0xf3, 0xed, 0x66, - 0xe2, 0x9b, 0x7f, 0xff, 0x75, 0x17, 0x44, 0xa7, 0x85, 0x05, 0xff, 0x2e, 0x01, 0xf9, 0x51, 0x11, - 0xf1, 0x0a, 0xa4, 0x99, 0xd3, 0xa1, 0x6f, 0x64, 0xaf, 0x24, 0x49, 0x30, 0xc1, 0x08, 0x92, 0x57, - 0xde, 0xa0, 0x34, 0x2f, 0x03, 0x12, 0x43, 0xbc, 0x06, 0x19, 0x7e, 0xd3, 0xbf, 0x70, 0x7b, 0xa5, - 0xa4, 0x04, 0xc3, 0x19, 0x7e, 0x0a, 0x20, 0xfb, 0xc4, 0xf2, 0x6f, 0x06, 0x54, 0xee, 0x75, 0xf1, - 0x56, 0xaf, 0x98, 0x37, 0x03, 0x4a, 0xf2, 0x76, 0x34, 0xc4, 0x18, 0x52, 0x8e, 0xdd, 0x0f, 0xb6, - 0x37, 0x4f, 0xe4, 0x58, 0x78, 0xef, 0x53, 0xff, 0xca, 0x0d, 0x36, 0x30, 0x4f, 0xc2, 0x19, 0xbe, - 0x07, 0x39, 0xd6, 0x76, 0x1d, 0x6b, 0xe8, 0xf5, 0xc2, 0xdd, 0xc9, 0x8a, 0xf9, 0xa9, 0xd7, 0xdb, - 0xfe, 0x53, 0x02, 0xf2, 0xa3, 0x4e, 0xc2, 0x45, 0x98, 0x67, 0x1d, 0x99, 0x43, 0x9e, 0xcc, 0x33, - 0x69, 0x28, 0x9b, 0xcf, 0x62, 0x9d, 0x30, 0x8b, 0xac, 0x9c, 0xeb, 0x9d, 0xd1, 0xfa, 0xc9, 0xf8, - 0xfa, 0x61, 0x76, 0xa9, 0x58, 0x76, 0x87, 0x00, 0xd7, 0x76, 0x8f, 0x75, 0x6c, 0xdf, 0xf5, 0x78, - 0x29, 0x2d, 0x9b, 0x70, 0x35, 0xca, 0xee, 0x2c, 0x62, 0x64, 0x2b, 0x4e, 0x08, 0xb7, 0x7f, 0x4c, - 0x40, 0x36, 0x6c, 0x51, 0xfc, 0x18, 0x52, 0x9e, 0xdb, 0xa3, 0x32, 0xb6, 0x62, 0xac, 0x83, 0x89, - 0xdb, 0xa3, 0x44, 0x92, 0xb8, 0x0c, 0x79, 0xbb, 0xd7, 0x75, 0x3d, 0xe6, 0x5f, 0xf5, 0x65, 0xbc, - 0xc5, 0x71, 0xc3, 0x9e, 0xd0, 0x1b, 0x25, 0xe2, 0xc8, 0x58, 0x86, 0xf7, 0x21, 0x47, 0x9d, 0xb6, - 0xdb, 0x61, 0x4e, 0x57, 0xe6, 0x52, 0x2c, 0x2f, 0x4f, 0x98, 0x68, 0x21, 0x45, 0x46, 0x22, 0xfc, - 0x31, 0xa4, 0xdb, 0x43, 0xef, 0x3a, 0xaa, 0x12, 0x9a, 0x50, 0xab, 0x02, 0x27, 0x01, 0x2d, 0x22, - 0x96, 0xc5, 0x4c, 0x4f, 0x45, 0x2c, 0x4b, 0x29, 0x49, 0x71, 0x6d, 0x2c, 0x4c, 0x1e, 0x25, 0xb1, - 0x85, 0x8c, 0xf3, 0x21, 0xf5, 0xc2, 0x2a, 0x84, 0x33, 0x7c, 0x08, 0x6b, 0xf6, 0xd0, 0xbf, 0x72, - 0x3d, 0xf6, 0xbb, 0xe8, 0xa8, 0x74, 0x06, 0x2e, 0x73, 0xfc, 0xb0, 0x2e, 0xab, 0x31, 0x56, 0x0b, - 0x49, 0xfc, 0x11, 0x14, 0x7d, 0xf7, 0x35, 0x9d, 0x90, 0x07, 0xf5, 0x5a, 0x94, 0xe8, 0x48, 0xf6, - 0x29, 0x2c, 0x0d, 0x39, 0xf5, 0x98, 0x73, 0xe9, 0x8e, 0x95, 0x41, 0x0d, 0x51, 0x44, 0x8c, 0xc4, - 0x3f, 0x03, 0xc4, 0xdb, 0xee, 0x80, 0x72, 0x8b, 0x0f, 0x07, 0x03, 0xd7, 0xf3, 0x69, 0x47, 0xd6, - 0x34, 0x4f, 0xee, 0x04, 0xb8, 0x11, 0xc1, 0xf8, 0x05, 0x94, 0x3c, 0xca, 0x07, 0xae, 0xc3, 0xa9, - 0xec, 0xec, 0x49, 0x93, 0x8c, 0x34, 0x59, 0x8b, 0x78, 0xb1, 0x29, 0xef, 0xb1, 0xec, 0xbb, 0x9d, - 0x98, 0x65, 0x36, 0x6e, 0x59, 0x17, 0xf4, 0xd8, 0xb2, 0x0c, 0xab, 0x5d, 0xcf, 0x76, 0xfc, 0xa9, - 0x05, 0x83, 0x43, 0xbe, 0x2c, 0xc9, 0x5b, 0xab, 0x3d, 0x85, 0x15, 0xbb, 0xed, 0x59, 0xd7, 0x76, - 0x6f, 0x18, 0x33, 0xc9, 0x87, 0xf7, 0x42, 0xdb, 0x3b, 0x93, 0xd4, 0xd8, 0xe2, 0x33, 0xb8, 0xcb, - 0x87, 0x17, 0xbf, 0xa5, 0xed, 0xe9, 0x75, 0x40, 0x1a, 0xad, 0x86, 0x74, 0x7c, 0xa5, 0xed, 0xbf, - 0xa7, 0x61, 0x31, 0xd6, 0xf1, 0xb8, 0x04, 0xd9, 0xbe, 0xeb, 0xb0, 0xd7, 0xa3, 0x92, 0x47, 0x53, - 0xac, 0x41, 0xb1, 0xeb, 0x0d, 0xda, 0xa3, 0x8a, 0x44, 0x4f, 0xc0, 0xc6, 0xcc, 0xa3, 0xb3, 0x17, - 0x15, 0x88, 0x2c, 0x0a, 0xab, 0x68, 0xc6, 0x85, 0x1b, 0x8f, 0x72, 0x7f, 0xc2, 0x4d, 0xf2, 0xa7, - 0xb9, 0x11, 0x56, 0x63, 0x37, 0xbf, 0x82, 0x1c, 0x7d, 0x33, 0xe8, 0xb9, 0x1e, 0xf5, 0xc2, 0xc7, - 0x60, 0xfb, 0x3d, 0x0e, 0x42, 0x95, 0x3c, 0xcf, 0x23, 0x1b, 0xfc, 0x02, 0x72, 0x97, 0x94, 0x5a, - 0xa2, 0x95, 0xe4, 0x99, 0x28, 0x94, 0x1f, 0xce, 0xb6, 0x3f, 0xa2, 0x54, 0x9a, 0x66, 0x2f, 0x83, - 0x01, 0x56, 0xa0, 0xc0, 0x2e, 0xda, 0xe2, 0x19, 0x74, 0x1c, 0xda, 0x93, 0x77, 0x5b, 0xa1, 0xbc, - 0x35, 0xdb, 0x58, 0xaf, 0xa8, 0x6a, 0xa0, 0x23, 0xc0, 0x2e, 0xda, 0xe1, 0x78, 0xfd, 0x97, 0x90, - 0x1b, 0xf5, 0x2f, 0x82, 0xa4, 0xb8, 0x08, 0x83, 0xcd, 0x16, 0x43, 0xfc, 0x10, 0x80, 0x71, 0x6b, - 0xe0, 0xb1, 0xbe, 0xed, 0xdd, 0xc8, 0x03, 0x95, 0x23, 0x79, 0xc6, 0x5b, 0x01, 0xb0, 0xfe, 0x1c, - 0x16, 0x26, 0x73, 0x1a, 0x5d, 0x7d, 0x89, 0x89, 0xab, 0x2f, 0x74, 0x3a, 0x3f, 0x72, 0xba, 0xfe, - 0xb7, 0x04, 0x64, 0xc3, 0x54, 0xc4, 0x02, 0x17, 0x36, 0xa7, 0x56, 0x87, 0x3a, 0x6e, 0x3f, 0xb4, - 0xcb, 0x0b, 0xa4, 0x2a, 0x00, 0x7c, 0x1f, 0xf2, 0x62, 0x6b, 0x3c, 0xdb, 0xa7, 0x41, 0x8d, 0xf3, - 0x44, 0xec, 0x15, 0x11, 0x73, 0xfc, 0x04, 0x8a, 0xcc, 0x61, 0xbe, 0xd5, 0xb5, 0xb9, 0xd5, 0x63, - 0x7d, 0x16, 0x1c, 0xe1, 0x34, 0x59, 0x10, 0xe8, 0xb1, 0xcd, 0x6b, 0x02, 0xc3, 0x8f, 0x60, 0x81, - 0x71, 0x8b, 0xb3, 0xfe, 0xb0, 0x27, 0x9e, 0x47, 0x59, 0xa1, 0x1c, 0x29, 0x30, 0x6e, 0x44, 0x90, - 0x90, 0x08, 0x1f, 0xfd, 0x61, 0xcf, 0x67, 0x83, 0xde, 0x8d, 0x2c, 0x42, 0x82, 0x14, 0xba, 0x36, - 0xaf, 0x87, 0xd0, 0xfa, 0x53, 0x80, 0xf1, 0x06, 0x4e, 0xbd, 0x06, 0x18, 0x52, 0xa2, 0x8b, 0xc3, - 0x24, 0xe5, 0x78, 0xf7, 0x2f, 0xd1, 0x33, 0x28, 0x1f, 0xa5, 0x75, 0x58, 0x53, 0x0c, 0x43, 0x33, - 0x2d, 0xf3, 0x55, 0x4b, 0xb3, 0x4e, 0x1b, 0x46, 0x4b, 0x53, 0xf5, 0x23, 0x5d, 0xab, 0xa2, 0x39, - 0xbc, 0x0a, 0x4b, 0x13, 0x5c, 0x43, 0x31, 0xf5, 0x33, 0x0d, 0x25, 0xf0, 0x1a, 0xe0, 0x09, 0xf8, - 0x9c, 0x28, 0xad, 0x96, 0x56, 0x45, 0xf3, 0xb7, 0x70, 0xc3, 0x54, 0x4e, 0xf4, 0xc6, 0x31, 0x4a, - 0xe2, 0x65, 0xb8, 0x33, 0x81, 0xb7, 0x9a, 0xcd, 0x1a, 0x4a, 0x61, 0x0c, 0xc5, 0x09, 0x50, 0xaf, - 0xa8, 0x28, 0x7d, 0x4b, 0xa8, 0x9e, 0x97, 0x9f, 0xa2, 0xcc, 0xee, 0xff, 0x12, 0xb0, 0x50, 0xd5, - 0xab, 0x0d, 0xbb, 0x4f, 0xf9, 0xc0, 0x6e, 0x53, 0xfc, 0x10, 0xee, 0x55, 0xf5, 0xaa, 0xd5, 0x50, - 0xea, 0x9a, 0xd1, 0x52, 0xd4, 0xdb, 0x41, 0xaf, 0x01, 0x8e, 0xd3, 0x7a, 0xeb, 0xc8, 0x08, 0xa2, - 0x8e, 0xe3, 0x46, 0xb3, 0x41, 0xd0, 0x3c, 0xbe, 0x07, 0xab, 0x71, 0xbc, 0xa2, 0x9b, 0x6a, 0x53, - 0x6f, 0xa0, 0xa4, 0xd8, 0x9b, 0x38, 0xa5, 0x99, 0x2f, 0x35, 0xa2, 0x9d, 0xd6, 0x51, 0x4a, 0xec, - 0xcd, 0xad, 0x65, 0x64, 0x0a, 0x53, 0x26, 0xe7, 0x5a, 0x45, 0x39, 0x35, 0x5f, 0x36, 0x50, 0x66, - 0xda, 0xa4, 0x7a, 0xde, 0x40, 0xd9, 0xe9, 0x00, 0x0c, 0x8d, 0x9c, 0xe9, 0xaa, 0x86, 0x72, 0xbb, - 0xdf, 0x25, 0x60, 0x61, 0xf2, 0x15, 0x14, 0xb9, 0x9f, 0x68, 0xaf, 0x2c, 0xa5, 0x76, 0xdc, 0x24, - 0xba, 0xf9, 0xb2, 0x7e, 0x2b, 0xf7, 0xbb, 0xb0, 0x1c, 0xa7, 0x35, 0xa3, 0x7c, 0xf8, 0x19, 0x4a, - 0xcc, 0x22, 0x9e, 0xbd, 0x78, 0x8e, 0xe6, 0x67, 0x11, 0x87, 0x07, 0x65, 0x94, 0x9c, 0x41, 0x54, - 0xab, 0x86, 0x82, 0x52, 0xb8, 0x04, 0x2b, 0x33, 0xd6, 0x38, 0x41, 0xe9, 0x19, 0x26, 0xaa, 0x30, - 0xc9, 0xec, 0xfe, 0x7e, 0x1e, 0x72, 0xd1, 0x5b, 0x2b, 0xd2, 0x15, 0x2a, 0xf5, 0x94, 0x9c, 0xdd, - 0x2e, 0x1d, 0x86, 0xe2, 0x98, 0x6a, 0x05, 0x91, 0xc7, 0xb1, 0x20, 0xe8, 0x38, 0x76, 0x58, 0x3e, - 0x40, 0x49, 0xbc, 0x02, 0x68, 0x8c, 0x7d, 0x59, 0x3e, 0x3c, 0x3c, 0xf8, 0x3c, 0xe8, 0xb2, 0x09, - 0xf4, 0xf9, 0xf3, 0x17, 0x28, 0x2d, 0xca, 0x30, 0xc6, 0xb4, 0x6a, 0x20, 0xcd, 0x88, 0xe6, 0x9b, - 0x84, 0x85, 0x36, 0x1b, 0xa5, 0x14, 0x80, 0x86, 0xa6, 0x8a, 0xa0, 0x4e, 0x0e, 0x50, 0x4e, 0x74, - 0xd3, 0x98, 0xa8, 0xd4, 0x8c, 0x83, 0xf2, 0xb3, 0x17, 0x07, 0x28, 0x1f, 0x37, 0x38, 0xd1, 0x54, - 0x55, 0x39, 0x11, 0x79, 0xc0, 0x2e, 0x87, 0xc2, 0xc4, 0xc7, 0x09, 0x7e, 0x00, 0x25, 0xa1, 0xd3, - 0x1a, 0x6a, 0xb3, 0xaa, 0x37, 0x8e, 0x6f, 0x6d, 0x44, 0x98, 0xcc, 0x88, 0x25, 0xca, 0x39, 0x4a, - 0x4c, 0xa1, 0x2f, 0xb5, 0x2f, 0xd1, 0xbc, 0xe8, 0xb8, 0x18, 0x5a, 0x3f, 0xad, 0x99, 0x7a, 0x45, - 0x31, 0x34, 0x94, 0xdc, 0xfd, 0x26, 0xf8, 0x1c, 0x13, 0xdf, 0x5b, 0x51, 0xdd, 0x48, 0xb3, 0x76, - 0x7b, 0xdb, 0xef, 0xc3, 0xdd, 0x11, 0x23, 0x7a, 0x55, 0x6b, 0x98, 0xba, 0xaa, 0x98, 0x7a, 0xb3, - 0x11, 0x1c, 0x9b, 0x31, 0x69, 0x18, 0x1a, 0x91, 0xf8, 0xa8, 0x71, 0x24, 0x5e, 0xd5, 0x6a, 0xda, - 0x71, 0x60, 0x90, 0x8c, 0x11, 0x7a, 0xe3, 0xac, 0x19, 0x7a, 0x4a, 0xed, 0xfe, 0x33, 0x08, 0x46, - 0xde, 0x3a, 0x61, 0x30, 0x33, 0xee, 0x9c, 0xb0, 0x62, 0x92, 0x69, 0xaa, 0xa6, 0x66, 0xa2, 0x44, - 0x54, 0x31, 0x89, 0x69, 0xb5, 0x9a, 0xde, 0x32, 0x75, 0x15, 0xcd, 0x63, 0x04, 0x0b, 0x23, 0x98, - 0x18, 0x0a, 0x4a, 0x46, 0xc1, 0x06, 0xf7, 0xcf, 0xab, 0x7a, 0x5d, 0x33, 0x89, 0xae, 0xa2, 0x14, - 0x5e, 0x82, 0xc5, 0x11, 0xfe, 0xb2, 0xae, 0x88, 0x83, 0x3a, 0x69, 0x5c, 0x6f, 0xa9, 0x28, 0x83, - 0xef, 0x40, 0x61, 0x84, 0x7c, 0x75, 0x82, 0xb2, 0xb1, 0x65, 0x47, 0xc7, 0x38, 0x17, 0x8b, 0xb0, - 0xa2, 0xb7, 0x9e, 0x95, 0x51, 0x7e, 0xf7, 0xcf, 0x29, 0xb8, 0xd3, 0xa2, 0x5e, 0x9f, 0x71, 0xce, - 0x5c, 0xc7, 0x10, 0xdf, 0x54, 0x78, 0x0b, 0x1e, 0xb4, 0x34, 0x52, 0xd7, 0x0d, 0x43, 0x6f, 0x36, - 0x2c, 0x43, 0x6d, 0x4e, 0xe5, 0xba, 0x09, 0xf7, 0xa7, 0x14, 0x15, 0xc5, 0xd0, 0x55, 0x4b, 0x6f, - 0x1c, 0x35, 0x51, 0x02, 0x7f, 0x04, 0x8f, 0xa6, 0x04, 0x63, 0xc0, 0xb0, 0x88, 0xa6, 0x88, 0x8b, - 0xf7, 0x63, 0xd8, 0xfe, 0xa0, 0xec, 0x9c, 0xe8, 0xa6, 0x86, 0x92, 0x33, 0x75, 0x26, 0x51, 0x1a, - 0x86, 0xa2, 0x9a, 0x63, 0x7f, 0x29, 0xfc, 0x09, 0x3c, 0xfe, 0xb0, 0x2e, 0x70, 0x98, 0xc6, 0x8f, - 0xe0, 0xe1, 0x94, 0xf0, 0x5c, 0xa9, 0xd5, 0x34, 0x33, 0xf4, 0x95, 0xc1, 0x8f, 0x61, 0xf3, 0xbd, - 0x12, 0x95, 0x68, 0x8a, 0xa9, 0xa1, 0xec, 0xcc, 0xc0, 0x22, 0x91, 0x71, 0x5a, 0x31, 0x54, 0xa2, - 0x57, 0x34, 0x94, 0xfb, 0xa0, 0xb3, 0xd3, 0x56, 0x55, 0x38, 0xcb, 0xe3, 0x1d, 0x78, 0xf2, 0xe1, - 0xe8, 0xcf, 0x34, 0xa2, 0x1f, 0xbd, 0x42, 0x80, 0x3f, 0x85, 0x4f, 0x3e, 0xac, 0xac, 0x90, 0xa6, - 0x52, 0x55, 0x15, 0xc3, 0x44, 0x85, 0x99, 0xc5, 0x52, 0xaa, 0x75, 0xbd, 0x61, 0x9d, 0x1a, 0x1a, - 0x41, 0x0b, 0xf8, 0x09, 0x6c, 0xbd, 0x47, 0x70, 0xa6, 0xd4, 0xf4, 0xaa, 0x62, 0x36, 0x09, 0x5a, - 0xac, 0x7c, 0xf1, 0xfd, 0xdb, 0x8d, 0xc4, 0x0f, 0x6f, 0x37, 0x12, 0x3f, 0xbe, 0xdd, 0x48, 0xfc, - 0xe1, 0xdd, 0xc6, 0xdc, 0x0f, 0xef, 0x36, 0xe6, 0xfe, 0xf1, 0x6e, 0x63, 0xee, 0xab, 0xed, 0x2e, - 0xf3, 0xaf, 0x86, 0x17, 0x7b, 0x6d, 0xb7, 0xbf, 0xef, 0x3a, 0xdc, 0x75, 0xbc, 0x7d, 0xf9, 0xf3, - 0x66, 0x5f, 0xfc, 0x0d, 0x2b, 0x3f, 0x59, 0x2f, 0x32, 0xf2, 0x1f, 0x1f, 0xcf, 0xfe, 0x1f, 0x00, - 0x00, 0xff, 0xff, 0xf7, 0xde, 0xdb, 0x8f, 0x41, 0x11, 0x00, 0x00, + // 1813 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0x4d, 0x6f, 0xdb, 0xc8, + 0x19, 0x36, 0xf5, 0xad, 0x57, 0x8e, 0x32, 0x99, 0x38, 0x59, 0xc5, 0x49, 0x6c, 0xc7, 0x49, 0x77, + 0x0d, 0xb5, 0xb0, 0x63, 0x25, 0x2e, 0xd2, 0x76, 0xd1, 0x96, 0xa2, 0xc6, 0x36, 0x61, 0x7d, 0x61, + 0x48, 0xdb, 0x9b, 0xbd, 0x10, 0xb4, 0x34, 0x96, 0x07, 0x4b, 0x91, 0x02, 0x49, 0x7b, 0xe3, 0x63, + 0xaf, 0x7b, 0xea, 0xb1, 0xbd, 0xed, 0xad, 0x97, 0x1e, 0x5a, 0xf4, 0x2f, 0xec, 0x61, 0x2f, 0x05, + 0xf6, 0xd8, 0x5e, 0x8a, 0x45, 0x72, 0x68, 0xff, 0x42, 0x6f, 0xc5, 0x0c, 0x29, 0x89, 0xb2, 0x14, + 0xa3, 0x17, 0x63, 0xe6, 0x79, 0x9e, 0xf7, 0x9d, 0xf7, 0x6b, 0x86, 0x16, 0xac, 0xf4, 0x79, 0x7f, + 0xe7, 0x6a, 0x77, 0x67, 0xc0, 0x5c, 0x16, 0xf0, 0x60, 0x7b, 0xe4, 0x7b, 0xa1, 0x87, 0x73, 0x7d, + 0xde, 0xdf, 0xbe, 0xda, 0x5d, 0xbd, 0x67, 0x0f, 0xb9, 0xeb, 0xed, 0xc8, 0xbf, 0x11, 0xb5, 0xba, + 0x32, 0xf0, 0x06, 0x9e, 0x5c, 0xee, 0x88, 0x55, 0x84, 0x6e, 0x7e, 0x0e, 0xcb, 0x07, 0x91, 0x07, + 0x23, 0xb4, 0x43, 0x86, 0x7f, 0x06, 0xb9, 0x91, 0xed, 0xdb, 0xc3, 0xa0, 0xa2, 0x6c, 0x28, 0x5b, + 0xa5, 0x5a, 0x79, 0x3b, 0xf2, 0xb8, 0xdd, 0x95, 0x68, 0x3d, 0xf3, 0xfd, 0xbf, 0xd6, 0x97, 0x68, + 0xac, 0xd9, 0xfc, 0x5b, 0x1a, 0x72, 0x11, 0x81, 0x7f, 0x0b, 0xf8, 0xeb, 0x0b, 0x1e, 0x32, 0x87, + 0x07, 0x21, 0xeb, 0x5b, 0x76, 0x10, 0xb0, 0x50, 0x38, 0x49, 0x6f, 0x95, 0x6a, 0xf7, 0xc6, 0x4e, + 0x54, 0x81, 0xea, 0xee, 0xb9, 0x47, 0xef, 0x25, 0xc4, 0x12, 0x9d, 0xf3, 0xd0, 0xbb, 0xb0, 0xb9, + 0x1b, 0x54, 0x52, 0xb3, 0x1e, 0x34, 0x81, 0xce, 0x79, 0x90, 0x68, 0x80, 0x7f, 0x03, 0xf7, 0x6d, + 0xc7, 0xf1, 0xbe, 0x66, 0x7d, 0x6b, 0x74, 0x79, 0xe6, 0xf0, 0x9e, 0xf5, 0x15, 0xbb, 0x0e, 0x2a, + 0x69, 0xe9, 0xe2, 0xee, 0xd8, 0xc5, 0x11, 0xbb, 0x8e, 0x1c, 0xc4, 0xda, 0xae, 0x94, 0x1e, 0xb1, + 0xeb, 0x00, 0xaf, 0x43, 0x89, 0x8f, 0xce, 0x03, 0xcb, 0xee, 0x85, 0xfc, 0x8a, 0x55, 0x32, 0x1b, + 0xca, 0x56, 0x81, 0x82, 0x80, 0x54, 0x89, 0xe0, 0x06, 0xac, 0x39, 0x5e, 0xcf, 0x76, 0x2e, 0xbc, + 0x20, 0xb4, 0x7c, 0x36, 0xe0, 0x41, 0xe8, 0xdb, 0x21, 0xf7, 0x5c, 0x8b, 0xb9, 0xf6, 0x99, 0xc3, + 0xfa, 0x95, 0xac, 0xb4, 0x79, 0x32, 0x51, 0xd1, 0x84, 0x88, 0x44, 0x1a, 0xfc, 0x0a, 0x1e, 0xf4, + 0x3c, 0xf7, 0x8a, 0x5d, 0xdb, 0x6e, 0x8f, 0x59, 0x23, 0x9f, 0x9d, 0x33, 0x9f, 0xb9, 0x3d, 0x56, + 0xc9, 0x6d, 0x28, 0x5b, 0x45, 0xba, 0x32, 0x25, 0xbb, 0x13, 0x0e, 0xef, 0xc0, 0x7d, 0x3b, 0x0c, + 0x59, 0x10, 0x46, 0xe7, 0x9d, 0x7b, 0xfe, 0xd0, 0x0e, 0x83, 0x4a, 0x7e, 0x23, 0xbd, 0x55, 0xa4, + 0x38, 0x41, 0xed, 0x47, 0xcc, 0x2f, 0x3f, 0xf9, 0xc3, 0xb7, 0xeb, 0x4b, 0xff, 0xf9, 0x76, 0x5d, + 0xf9, 0xe6, 0xdf, 0x7f, 0xa9, 0x82, 0x18, 0x97, 0xb8, 0x6b, 0xdf, 0x29, 0x50, 0x9c, 0x74, 0x02, + 0xaf, 0x40, 0x96, 0xbb, 0x7d, 0xf6, 0x4e, 0x36, 0x3c, 0x4d, 0xa3, 0x0d, 0x46, 0x90, 0xbe, 0xf0, + 0x47, 0x95, 0x94, 0x0c, 0x48, 0x2c, 0xf1, 0x43, 0xc8, 0x05, 0xd7, 0xc3, 0x33, 0xcf, 0xa9, 0xa4, + 0x25, 0x18, 0xef, 0xf0, 0x4b, 0x00, 0xd9, 0x6c, 0x2b, 0xbc, 0x1e, 0x45, 0x25, 0x2b, 0xdf, 0x68, + 0xb8, 0x79, 0x3d, 0x62, 0xb4, 0x68, 0x8f, 0x97, 0x18, 0x43, 0xc6, 0xb5, 0x87, 0x4c, 0x96, 0xaa, + 0x48, 0xe5, 0x5a, 0x78, 0x1f, 0xb2, 0xf0, 0xc2, 0xeb, 0xc7, 0x35, 0x88, 0x77, 0xf8, 0x11, 0x14, + 0x78, 0xcf, 0x73, 0xad, 0x4b, 0xdf, 0xa9, 0xe4, 0x25, 0x93, 0x17, 0xfb, 0x63, 0xdf, 0xd9, 0xfc, + 0xa3, 0x02, 0xc5, 0xc9, 0x38, 0xe0, 0x32, 0xa4, 0x78, 0x5f, 0xe6, 0x50, 0xa4, 0x29, 0x2e, 0x0d, + 0xe5, 0x04, 0x59, 0xbc, 0x1f, 0x67, 0x91, 0x97, 0x7b, 0xbd, 0x3f, 0x39, 0x3f, 0x3d, 0x7b, 0x7e, + 0x9c, 0x5d, 0x66, 0x26, 0xbb, 0x3d, 0x80, 0x2b, 0xdb, 0xe1, 0x7d, 0x3b, 0xf4, 0xfc, 0xa0, 0x92, + 0x95, 0x93, 0xf4, 0x60, 0x9c, 0xdd, 0xc9, 0x98, 0x91, 0xf3, 0x94, 0x10, 0x6e, 0xfe, 0xa8, 0x40, + 0x3e, 0x9e, 0x33, 0xfc, 0x1c, 0x32, 0xbe, 0xe7, 0x30, 0x19, 0x5b, 0x79, 0x66, 0x0c, 0xa9, 0xe7, + 0x30, 0x2a, 0x49, 0x5c, 0x83, 0xa2, 0xed, 0x0c, 0x3c, 0x9f, 0x87, 0x17, 0x43, 0x19, 0x6f, 0xb9, + 0xb6, 0x92, 0x50, 0xaa, 0x63, 0x8e, 0x4e, 0x65, 0x78, 0x07, 0x0a, 0xcc, 0xed, 0x79, 0x7d, 0xee, + 0x0e, 0x64, 0x2e, 0xe5, 0xda, 0xfd, 0x84, 0x09, 0x89, 0x29, 0x3a, 0x11, 0xe1, 0x4f, 0x21, 0xdb, + 0xbb, 0xf4, 0xaf, 0xc6, 0x5d, 0x42, 0x09, 0xb5, 0x26, 0x70, 0x1a, 0xd1, 0x22, 0x62, 0xd9, 0xcc, + 0xec, 0x5c, 0xc4, 0xb2, 0x95, 0x92, 0xdc, 0xfc, 0x7b, 0x16, 0xee, 0xcc, 0x14, 0x00, 0x57, 0x20, + 0x3f, 0xf4, 0x5c, 0xfe, 0x15, 0xf3, 0xe3, 0x3e, 0x8c, 0xb7, 0x98, 0x40, 0x79, 0xe0, 0x8f, 0x7a, + 0x16, 0x73, 0xfb, 0x23, 0x8f, 0xbb, 0xe1, 0xf8, 0x5a, 0xaf, 0x2d, 0xac, 0xe4, 0x36, 0x89, 0x65, + 0xf4, 0x8e, 0xb0, 0x1a, 0xef, 0x02, 0xe1, 0xc6, 0x67, 0x41, 0x98, 0x70, 0x93, 0xfe, 0xff, 0xdc, + 0x08, 0xab, 0xa9, 0x9b, 0x5f, 0x43, 0x81, 0xbd, 0x1b, 0x39, 0x9e, 0xcf, 0x7c, 0x59, 0x89, 0x52, + 0x6d, 0xf3, 0x23, 0x0e, 0x62, 0x95, 0x6c, 0xef, 0xc4, 0x06, 0xbf, 0x81, 0xc2, 0x39, 0x63, 0x16, + 0x77, 0xcf, 0x3d, 0x59, 0xa2, 0x52, 0xed, 0xe9, 0x62, 0xfb, 0x7d, 0xc6, 0xa4, 0x69, 0xfe, 0x3c, + 0x5a, 0x60, 0x15, 0x4a, 0xfc, 0xac, 0x27, 0x9e, 0x36, 0xd7, 0x65, 0x8e, 0x1c, 0xf5, 0x52, 0x6d, + 0x63, 0xb1, 0xb1, 0x5e, 0xd7, 0xb4, 0x48, 0x47, 0x81, 0x9f, 0xf5, 0xe2, 0xf5, 0xea, 0xaf, 0xa0, + 0x30, 0xce, 0x44, 0x5c, 0x52, 0x71, 0x2f, 0xa2, 0x62, 0x8b, 0x25, 0x7e, 0x0a, 0xc0, 0x03, 0x6b, + 0xe4, 0xf3, 0xa1, 0xed, 0x5f, 0xcb, 0x39, 0x2a, 0xd0, 0x22, 0x0f, 0xba, 0x11, 0xb0, 0xfa, 0x1a, + 0x96, 0x93, 0x39, 0x4d, 0x6e, 0x82, 0x92, 0xb8, 0x09, 0xb1, 0xd3, 0xd4, 0xc4, 0xe9, 0xea, 0x5f, + 0x15, 0xc8, 0xc7, 0xa9, 0x88, 0x03, 0xce, 0xec, 0x80, 0x59, 0x7d, 0xe6, 0x7a, 0xc3, 0xd8, 0xae, + 0x28, 0x90, 0x86, 0x00, 0xf0, 0x63, 0x28, 0x8a, 0xd2, 0xf8, 0x76, 0xc8, 0xa2, 0x1e, 0x17, 0xa9, + 0xa8, 0x15, 0x15, 0x7b, 0xfc, 0x02, 0xca, 0xdc, 0xe5, 0xa1, 0x35, 0xb0, 0x03, 0xcb, 0xe1, 0x43, + 0x1e, 0xca, 0xa9, 0xcd, 0xd2, 0x65, 0x81, 0x1e, 0xd8, 0x41, 0x53, 0x60, 0xf8, 0x19, 0x2c, 0xf3, + 0xc0, 0x0a, 0xf8, 0xf0, 0xd2, 0x11, 0xaf, 0x65, 0xfc, 0x08, 0x97, 0x78, 0x60, 0x8c, 0x21, 0x21, + 0x11, 0x3e, 0x86, 0x97, 0x4e, 0xc8, 0x47, 0xce, 0xb5, 0x6c, 0x82, 0x42, 0x4b, 0x03, 0x3b, 0x68, + 0xc5, 0xd0, 0xea, 0x4b, 0x80, 0x69, 0x01, 0xe7, 0x1e, 0x07, 0x0c, 0x99, 0x91, 0xe7, 0x87, 0x71, + 0x92, 0x72, 0x5d, 0xfd, 0xf3, 0xf8, 0x55, 0x94, 0x6f, 0xd4, 0x2a, 0x3c, 0x54, 0x0d, 0x83, 0x98, + 0x96, 0xf9, 0xb6, 0x4b, 0xac, 0xe3, 0xb6, 0xd1, 0x25, 0x9a, 0xbe, 0xaf, 0x93, 0x06, 0x5a, 0xc2, + 0x0f, 0xe0, 0x5e, 0x82, 0x6b, 0xab, 0xa6, 0x7e, 0x42, 0x90, 0x82, 0x1f, 0x02, 0x4e, 0xc0, 0xa7, + 0x54, 0xed, 0x76, 0x49, 0x03, 0xa5, 0x6e, 0xe0, 0x86, 0xa9, 0x1e, 0xe9, 0xed, 0x03, 0x94, 0xc6, + 0xf7, 0xe1, 0x6e, 0x02, 0xef, 0x76, 0x3a, 0x4d, 0x94, 0xc1, 0x18, 0xca, 0x09, 0x50, 0xaf, 0x6b, + 0x28, 0x7b, 0x43, 0xa8, 0x9d, 0xd6, 0x5e, 0xa2, 0x5c, 0xf5, 0xbf, 0x0a, 0x2c, 0x37, 0xf4, 0x46, + 0xdb, 0x1e, 0xb2, 0x60, 0x64, 0xf7, 0x18, 0x7e, 0x0a, 0x8f, 0x1a, 0x7a, 0xc3, 0x6a, 0xab, 0x2d, + 0x62, 0x74, 0x55, 0xed, 0x66, 0xd0, 0x0f, 0x01, 0xcf, 0xd2, 0x7a, 0x77, 0xdf, 0x88, 0xa2, 0x9e, + 0xc5, 0x8d, 0x4e, 0x9b, 0xa2, 0x14, 0x7e, 0x04, 0x0f, 0x66, 0xf1, 0xba, 0x6e, 0x6a, 0x1d, 0xbd, + 0x8d, 0xd2, 0xa2, 0x36, 0xb3, 0x14, 0x31, 0x0f, 0x09, 0x25, 0xc7, 0x2d, 0x94, 0x11, 0xb5, 0xb9, + 0x71, 0x8c, 0x4c, 0x61, 0xce, 0xe4, 0x94, 0xd4, 0xd5, 0x63, 0xf3, 0xb0, 0x8d, 0x72, 0xf3, 0x26, + 0x8d, 0xd3, 0x36, 0xca, 0xcf, 0x07, 0x60, 0x10, 0x7a, 0xa2, 0x6b, 0x04, 0x15, 0xaa, 0xdf, 0x29, + 0xb0, 0x9c, 0x7c, 0x14, 0x45, 0xee, 0x47, 0xe4, 0xad, 0xa5, 0x36, 0x0f, 0x3a, 0x54, 0x37, 0x0f, + 0x5b, 0x37, 0x72, 0xff, 0x04, 0xee, 0xcf, 0xd2, 0xc4, 0xa8, 0xed, 0xfd, 0x1c, 0x29, 0x8b, 0x88, + 0x57, 0x6f, 0x5e, 0xa3, 0xd4, 0x22, 0x62, 0x6f, 0xb7, 0x86, 0xd2, 0x0b, 0x88, 0x46, 0xc3, 0x50, + 0x51, 0x06, 0x57, 0x60, 0x65, 0xc1, 0x19, 0x47, 0x28, 0xbb, 0xc0, 0x44, 0x13, 0x26, 0xb9, 0xea, + 0xef, 0x52, 0x50, 0x18, 0x3f, 0xbd, 0x22, 0x5d, 0xa1, 0xd2, 0x8e, 0xe9, 0xc9, 0xcd, 0xd6, 0x61, + 0x28, 0x4f, 0xa9, 0x6e, 0x14, 0xf9, 0x2c, 0x16, 0x05, 0x3d, 0x8b, 0xed, 0xd5, 0x76, 0x51, 0x1a, + 0xaf, 0x00, 0x9a, 0x62, 0x5f, 0xd4, 0xf6, 0xf6, 0x76, 0x7f, 0x11, 0x4d, 0x59, 0x02, 0x7d, 0xfd, + 0xfa, 0x0d, 0xca, 0x8a, 0x36, 0x4c, 0x31, 0xd2, 0x88, 0xa4, 0x39, 0x31, 0x7c, 0x49, 0x58, 0x68, + 0xf3, 0xe3, 0x94, 0x22, 0xd0, 0x20, 0x9a, 0x08, 0xea, 0x68, 0x17, 0x15, 0xc4, 0x34, 0x4d, 0x89, + 0x7a, 0xd3, 0xd8, 0xad, 0xbd, 0x7a, 0xb3, 0x8b, 0x8a, 0xb3, 0x06, 0x47, 0x44, 0xd3, 0xd4, 0x23, + 0x91, 0x07, 0x54, 0x03, 0x28, 0x25, 0xbe, 0x55, 0xf8, 0x09, 0x54, 0x84, 0x8e, 0xb4, 0xb5, 0x4e, + 0x43, 0x6f, 0x1f, 0xdc, 0x28, 0x44, 0x9c, 0xcc, 0x84, 0xa5, 0xea, 0x29, 0x52, 0xe6, 0xd0, 0x43, + 0xf2, 0x05, 0x4a, 0x89, 0x89, 0x9b, 0x41, 0x5b, 0xc7, 0x4d, 0x53, 0xaf, 0xab, 0x06, 0x41, 0xe9, + 0xea, 0x37, 0xd1, 0xd7, 0x59, 0x7c, 0x7e, 0xc7, 0x7d, 0xa3, 0x9d, 0xe6, 0xcd, 0xb2, 0x3f, 0x86, + 0x4f, 0x26, 0x8c, 0x98, 0x55, 0xd2, 0x36, 0x75, 0x4d, 0x35, 0xf5, 0x4e, 0x3b, 0xba, 0x36, 0x53, + 0xd2, 0x30, 0x08, 0x95, 0xf8, 0x64, 0x70, 0x24, 0xde, 0x20, 0x4d, 0x72, 0x10, 0x19, 0xa4, 0x67, + 0x08, 0xbd, 0x7d, 0xd2, 0x89, 0x3d, 0x65, 0xaa, 0xff, 0x8c, 0x82, 0x91, 0xaf, 0x4e, 0x1c, 0xcc, + 0x82, 0x37, 0x27, 0xee, 0x98, 0x64, 0x3a, 0x9a, 0x49, 0x4c, 0xa4, 0x8c, 0x3b, 0x26, 0x31, 0xd2, + 0x6c, 0xea, 0x5d, 0x53, 0xd7, 0x50, 0x0a, 0x23, 0x58, 0x9e, 0xc0, 0xd4, 0x50, 0x51, 0x7a, 0x1c, + 0x6c, 0xf4, 0xfe, 0xbc, 0x6d, 0xb5, 0x88, 0x49, 0x75, 0x0d, 0x65, 0xf0, 0x3d, 0xb8, 0x33, 0xc1, + 0x0f, 0x5b, 0xaa, 0xb8, 0xa8, 0x49, 0xe3, 0x56, 0x57, 0x43, 0x39, 0x7c, 0x17, 0x4a, 0x13, 0xe4, + 0xcb, 0x23, 0x94, 0x9f, 0x39, 0x76, 0x72, 0x8d, 0x0b, 0x33, 0x11, 0xd6, 0xf5, 0xee, 0xab, 0x1a, + 0x2a, 0x56, 0xcf, 0xe4, 0x3d, 0x0d, 0x2e, 0x6c, 0x9f, 0xc9, 0x62, 0x47, 0xf7, 0xd4, 0x38, 0x54, + 0x29, 0x59, 0x54, 0xf1, 0x28, 0xce, 0x24, 0x6d, 0x10, 0x8a, 0x94, 0xb8, 0x13, 0x09, 0xfc, 0x44, + 0x6d, 0xea, 0x0d, 0xd5, 0xec, 0x50, 0x94, 0xaa, 0xfe, 0x29, 0x03, 0x77, 0xbb, 0xcc, 0x1f, 0xf2, + 0x20, 0xe0, 0x9e, 0x6b, 0xf4, 0xbc, 0x11, 0xc3, 0x1b, 0xf0, 0xa4, 0x4b, 0x68, 0x4b, 0x37, 0x0c, + 0xbd, 0xd3, 0xb6, 0x0c, 0xad, 0x33, 0x57, 0xcf, 0x75, 0x78, 0x3c, 0xa7, 0xa8, 0xab, 0x86, 0xae, + 0x59, 0x7a, 0x7b, 0xbf, 0x83, 0x14, 0xfc, 0x13, 0x78, 0x36, 0x27, 0x98, 0x02, 0x86, 0x45, 0x89, + 0x2a, 0x1e, 0xf7, 0x4f, 0x61, 0xf3, 0x56, 0xd9, 0x29, 0xd5, 0x4d, 0x82, 0xd2, 0x0b, 0x75, 0x26, + 0x55, 0xdb, 0x86, 0xaa, 0x99, 0x53, 0x7f, 0x19, 0xfc, 0x19, 0x3c, 0xbf, 0x5d, 0x17, 0x39, 0xcc, + 0xe2, 0x67, 0xf0, 0x74, 0x4e, 0x78, 0xaa, 0x36, 0x9b, 0xc4, 0x8c, 0x7d, 0xe5, 0xf0, 0x73, 0x58, + 0xff, 0xa8, 0x44, 0xa3, 0x44, 0x35, 0x09, 0xca, 0x2f, 0x0c, 0x6c, 0x2c, 0x32, 0x8e, 0xeb, 0x86, + 0x46, 0xf5, 0x3a, 0x41, 0x85, 0x5b, 0x9d, 0x1d, 0x77, 0x1b, 0xc2, 0x59, 0x11, 0x6f, 0xc1, 0x8b, + 0xdb, 0xa3, 0x3f, 0x21, 0x54, 0xdf, 0x7f, 0x8b, 0x00, 0xff, 0x14, 0x3e, 0xbb, 0x5d, 0x59, 0xa7, + 0x1d, 0xb5, 0xa1, 0xa9, 0x86, 0x89, 0x4a, 0x0b, 0x9b, 0xa5, 0x36, 0x5a, 0x7a, 0x3b, 0x1a, 0x90, + 0x65, 0xfc, 0x02, 0x36, 0x3e, 0x22, 0x98, 0x4e, 0xca, 0x9d, 0xfa, 0xe7, 0xdf, 0xbf, 0x5f, 0x53, + 0x7e, 0x78, 0xbf, 0xa6, 0xfc, 0xf8, 0x7e, 0x4d, 0xf9, 0xfd, 0x87, 0xb5, 0xa5, 0x1f, 0x3e, 0xac, + 0x2d, 0xfd, 0xe3, 0xc3, 0xda, 0xd2, 0x97, 0x9b, 0x03, 0x1e, 0x5e, 0x5c, 0x9e, 0x6d, 0xf7, 0xbc, + 0xe1, 0x8e, 0xe7, 0x06, 0x9e, 0xeb, 0xef, 0xc8, 0x3f, 0xef, 0x76, 0xc4, 0xcf, 0x26, 0xf1, 0xef, + 0x6e, 0x70, 0x96, 0x93, 0x3f, 0x98, 0x5f, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xd6, 0x38, + 0x0f, 0x79, 0x0f, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1428,9 +1319,6 @@ func (this *Params) Equal(that interface{}) bool { return false } } - if !this.OpenidConfig.Equal(that1.OpenidConfig) { - return false - } if this.IpfsActive != that1.IpfsActive { return false } @@ -1509,7 +1397,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.AttestationFormats[iNdEx]) i = encodeVarintGenesis(dAtA, i, uint64(len(m.AttestationFormats[iNdEx]))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } } if len(m.ConveyancePreference) > 0 { @@ -1517,7 +1405,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.ConveyancePreference) i = encodeVarintGenesis(dAtA, i, uint64(len(m.ConveyancePreference))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if m.LocalhostRegistrationEnabled { i-- @@ -1527,7 +1415,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if m.IpfsActive { i-- @@ -1537,19 +1425,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x28 - } - if m.OpenidConfig != nil { - { - size, err := m.OpenidConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 + dAtA[i] = 0x20 } if len(m.AllowedPublicKeys) > 0 { for iNdEx := len(m.AllowedPublicKeys) - 1; iNdEx >= 0; iNdEx-- { @@ -1777,111 +1653,6 @@ func (m *KeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *OpenIDConfig) 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 *OpenIDConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OpenIDConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SubjectTypesSupported) > 0 { - for iNdEx := len(m.SubjectTypesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SubjectTypesSupported[iNdEx]) - copy(dAtA[i:], m.SubjectTypesSupported[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.SubjectTypesSupported[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if len(m.AcrValuesSupported) > 0 { - for iNdEx := len(m.AcrValuesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AcrValuesSupported[iNdEx]) - copy(dAtA[i:], m.AcrValuesSupported[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.AcrValuesSupported[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.GrantTypesSupported) > 0 { - for iNdEx := len(m.GrantTypesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.GrantTypesSupported[iNdEx]) - copy(dAtA[i:], m.GrantTypesSupported[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.GrantTypesSupported[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.ResponseModesSupported) > 0 { - for iNdEx := len(m.ResponseModesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ResponseModesSupported[iNdEx]) - copy(dAtA[i:], m.ResponseModesSupported[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.ResponseModesSupported[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.ResponseTypesSupported) > 0 { - for iNdEx := len(m.ResponseTypesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ResponseTypesSupported[iNdEx]) - copy(dAtA[i:], m.ResponseTypesSupported[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.ResponseTypesSupported[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.ScopesSupported) > 0 { - for iNdEx := len(m.ScopesSupported) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ScopesSupported[iNdEx]) - copy(dAtA[i:], m.ScopesSupported[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.ScopesSupported[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.UserinfoEndpoint) > 0 { - i -= len(m.UserinfoEndpoint) - copy(dAtA[i:], m.UserinfoEndpoint) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.UserinfoEndpoint))) - i-- - dAtA[i] = 0x22 - } - if len(m.TokenEndpoint) > 0 { - i -= len(m.TokenEndpoint) - copy(dAtA[i:], m.TokenEndpoint) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.TokenEndpoint))) - i-- - dAtA[i] = 0x1a - } - if len(m.AuthorizationEndpoint) > 0 { - i -= len(m.AuthorizationEndpoint) - copy(dAtA[i:], m.AuthorizationEndpoint) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.AuthorizationEndpoint))) - i-- - dAtA[i] = 0x12 - } - if len(m.Issuer) > 0 { - i -= len(m.Issuer) - copy(dAtA[i:], m.Issuer) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Issuer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *ValidatorInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2196,10 +1967,6 @@ func (m *Params) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if m.OpenidConfig != nil { - l = m.OpenidConfig.Size() - n += 1 + l + sovGenesis(uint64(l)) - } if m.IpfsActive { n += 2 } @@ -2309,67 +2076,6 @@ func (m *KeyInfo) Size() (n int) { return n } -func (m *OpenIDConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Issuer) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.AuthorizationEndpoint) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.TokenEndpoint) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.UserinfoEndpoint) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.ScopesSupported) > 0 { - for _, s := range m.ScopesSupported { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.ResponseTypesSupported) > 0 { - for _, s := range m.ResponseTypesSupported { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.ResponseModesSupported) > 0 { - for _, s := range m.ResponseModesSupported { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.GrantTypesSupported) > 0 { - for _, s := range m.GrantTypesSupported { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.AcrValuesSupported) > 0 { - for _, s := range m.AcrValuesSupported { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.SubjectTypesSupported) > 0 { - for _, s := range m.SubjectTypesSupported { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - func (m *ValidatorInfo) Size() (n int) { if m == nil { return 0 @@ -2706,42 +2412,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OpenidConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OpenidConfig == nil { - m.OpenidConfig = &OpenIDConfig{} - } - if err := m.OpenidConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", wireType) } @@ -2761,7 +2431,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } m.IpfsActive = bool(v != 0) - case 6: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LocalhostRegistrationEnabled", wireType) } @@ -2781,7 +2451,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } m.LocalhostRegistrationEnabled = bool(v != 0) - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConveyancePreference", wireType) } @@ -2813,7 +2483,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.ConveyancePreference = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AttestationFormats", wireType) } @@ -3471,376 +3141,6 @@ func (m *KeyInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *OpenIDConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OpenIDConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OpenIDConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthorizationEndpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenEndpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserinfoEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserinfoEndpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopesSupported = append(m.ScopesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseTypesSupported = append(m.ResponseTypesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseModesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseModesSupported = append(m.ResponseModesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrantTypesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GrantTypesSupported = append(m.GrantTypesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AcrValuesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AcrValuesSupported = append(m.AcrValuesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubjectTypesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubjectTypesSupported = append(m.SubjectTypesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ValidatorInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/did/types/info.go b/x/did/types/info.go deleted file mode 100644 index 84c7a3a5f..000000000 --- a/x/did/types/info.go +++ /dev/null @@ -1,137 +0,0 @@ -package types - -import ( - "encoding/hex" - - "github.com/mr-tron/base58/base58" -) - -// -// # Genesis Structures -// - -// Equal returns true if two asset infos are equal -func (a *AssetInfo) Equal(b *AssetInfo) bool { - if a == nil && b == nil { - return true - } - return false -} - -// Equal returns true if two chain infos are equal -func (c *ChainInfo) Equal(b *ChainInfo) bool { - if c == nil && b == nil { - return true - } - return false -} - -// Equal returns true if two OpenID config infos are equal -func (o *OpenIDConfig) Equal(b *OpenIDConfig) bool { - if o == nil && b == nil { - return true - } - return false -} - -// Equal returns true if two key infos are equal -func (k *KeyInfo) Equal(b *KeyInfo) bool { - if k == nil && b == nil { - return true - } - return false -} - -// Equal returns true if two validator infos are equal -func (v *ValidatorInfo) Equal(b *ValidatorInfo) bool { - if v == nil && b == nil { - return true - } - return false -} - -// DecodePublicKey extracts the public key from the given data -func (k *KeyInfo) DecodePublicKey(data interface{}) ([]byte, error) { - var bz []byte - switch v := data.(type) { - case string: - bz = []byte(v) - case []byte: - bz = v - default: - return nil, ErrUnsupportedKeyEncoding - } - - if k.Encoding == KeyEncoding_KEY_ENCODING_RAW { - return bz, nil - } - if k.Encoding == KeyEncoding_KEY_ENCODING_HEX { - return hex.DecodeString(string(bz)) - } - if k.Encoding == KeyEncoding_KEY_ENCODING_MULTIBASE { - return base58.Decode(string(bz)) - } - return nil, ErrUnsupportedKeyEncoding -} - -// EncodePublicKey encodes the public key according to the KeyInfo's encoding -func (k *KeyInfo) EncodePublicKey(data []byte) (string, error) { - if k.Encoding == KeyEncoding_KEY_ENCODING_RAW { - return string(data), nil - } - if k.Encoding == KeyEncoding_KEY_ENCODING_HEX { - return hex.EncodeToString(data), nil - } - if k.Encoding == KeyEncoding_KEY_ENCODING_MULTIBASE { - return base58.Encode(data), nil - } - return "", ErrUnsupportedKeyEncoding -} - -// DiscoveryDocument represents the OIDC discovery document. -type DiscoveryDocument struct { - Issuer string `json:"issuer"` - AuthorizationEndpoint string `json:"authorization_endpoint"` - TokenEndpoint string `json:"token_endpoint"` - UserinfoEndpoint string `json:"userinfo_endpoint"` - JwksURI string `json:"jwks_uri"` - RegistrationEndpoint string `json:"registration_endpoint"` - ScopesSupported []string `json:"scopes_supported"` - ResponseTypesSupported []string `json:"response_types_supported"` - SubjectTypesSupported []string `json:"subject_types_supported"` - IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"` - ClaimsSupported []string `json:"claims_supported"` - GrantTypesSupported []string `json:"grant_types_supported"` - TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"` -} - -var WalletKeyInfo = &KeyInfo{ - Role: KeyRole_KEY_ROLE_DELEGATION, - Curve: KeyCurve_KEY_CURVE_SECP256K1, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA, - Encoding: KeyEncoding_KEY_ENCODING_HEX, - Type: KeyType_KEY_TYPE_BIP32, -} - -var EthKeyInfo = &KeyInfo{ - Role: KeyRole_KEY_ROLE_DELEGATION, - Curve: KeyCurve_KEY_CURVE_KECCAK256, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA, - Encoding: KeyEncoding_KEY_ENCODING_HEX, - Type: KeyType_KEY_TYPE_BIP32, -} - -var SonrKeyInfo = &KeyInfo{ - Role: KeyRole_KEY_ROLE_INVOCATION, - Curve: KeyCurve_KEY_CURVE_P256, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA, - Encoding: KeyEncoding_KEY_ENCODING_HEX, - Type: KeyType_KEY_TYPE_MPC, -} - -var ChainCodeKeyInfos = map[ChainCode]*KeyInfo{ - ChainCodeBTC: WalletKeyInfo, - ChainCodeETH: EthKeyInfo, - ChainCodeSNR: SonrKeyInfo, - ChainCodeIBC: WalletKeyInfo, -} diff --git a/x/did/types/models.pb.go b/x/did/types/models.pb.go index 0f55ded00..55c905de8 100644 --- a/x/did/types/models.pb.go +++ b/x/did/types/models.pb.go @@ -23,23 +23,25 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Accumulator defines a BLS accumulator -type Accumulator struct { - Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"` +// Alias defines a subject/origin pair +type Alias struct { + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` } -func (m *Accumulator) Reset() { *m = Accumulator{} } -func (m *Accumulator) String() string { return proto.CompactTextString(m) } -func (*Accumulator) ProtoMessage() {} -func (*Accumulator) Descriptor() ([]byte, []int) { +func (m *Alias) Reset() { *m = Alias{} } +func (m *Alias) String() string { return proto.CompactTextString(m) } +func (*Alias) ProtoMessage() {} +func (*Alias) Descriptor() ([]byte, []int) { return fileDescriptor_739bb5ab5cb60751, []int{0} } -func (m *Accumulator) XXX_Unmarshal(b []byte) error { +func (m *Alias) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Accumulator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Alias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Accumulator.Marshal(b, m, deterministic) + return xxx_messageInfo_Alias.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -49,33 +51,52 @@ func (m *Accumulator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *Accumulator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Accumulator.Merge(m, src) +func (m *Alias) XXX_Merge(src proto.Message) { + xxx_messageInfo_Alias.Merge(m, src) } -func (m *Accumulator) XXX_Size() int { +func (m *Alias) XXX_Size() int { return m.Size() } -func (m *Accumulator) XXX_DiscardUnknown() { - xxx_messageInfo_Accumulator.DiscardUnknown(m) +func (m *Alias) XXX_DiscardUnknown() { + xxx_messageInfo_Alias.DiscardUnknown(m) } -var xxx_messageInfo_Accumulator proto.InternalMessageInfo +var xxx_messageInfo_Alias proto.InternalMessageInfo -func (m *Accumulator) GetAccumulator() []byte { +func (m *Alias) GetSubject() string { if m != nil { - return m.Accumulator + return m.Subject } - return nil + return "" +} + +func (m *Alias) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *Alias) GetController() string { + if m != nil { + return m.Controller + } + return "" } -// Credential defines a WebAuthn credential type Credential struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` - CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` - Subject string `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + AttestationType string `protobuf:"bytes,2,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + CredentialId []byte `protobuf:"bytes,4,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + PublicKey []byte `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Transport []string `protobuf:"bytes,6,rep,name=transport,proto3" json:"transport,omitempty"` + SignCount uint32 `protobuf:"varint,7,opt,name=sign_count,json=signCount,proto3" json:"sign_count,omitempty"` + UserPresent bool `protobuf:"varint,8,opt,name=user_present,json=userPresent,proto3" json:"user_present,omitempty"` + UserVerified bool `protobuf:"varint,9,opt,name=user_verified,json=userVerified,proto3" json:"user_verified,omitempty"` + BackupEligible bool `protobuf:"varint,10,opt,name=backup_eligible,json=backupEligible,proto3" json:"backup_eligible,omitempty"` + BackupState bool `protobuf:"varint,11,opt,name=backup_state,json=backupState,proto3" json:"backup_state,omitempty"` + CloneWarning bool `protobuf:"varint,12,opt,name=clone_warning,json=cloneWarning,proto3" json:"clone_warning,omitempty"` } func (m *Credential) Reset() { *m = Credential{} } @@ -111,16 +132,23 @@ func (m *Credential) XXX_DiscardUnknown() { var xxx_messageInfo_Credential proto.InternalMessageInfo -func (m *Credential) GetId() string { +func (m *Credential) GetSubject() string { if m != nil { - return m.Id + return m.Subject } return "" } -func (m *Credential) GetCredentialType() string { +func (m *Credential) GetAttestationType() string { if m != nil { - return m.CredentialType + return m.AttestationType + } + return "" +} + +func (m *Credential) GetOrigin() string { + if m != nil { + return m.Origin } return "" } @@ -132,6 +160,13 @@ func (m *Credential) GetCredentialId() []byte { return nil } +func (m *Credential) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + func (m *Credential) GetTransport() []string { if m != nil { return m.Transport @@ -139,113 +174,64 @@ func (m *Credential) GetTransport() []string { return nil } -func (m *Credential) GetSubject() string { +func (m *Credential) GetSignCount() uint32 { if m != nil { - return m.Subject + return m.SignCount } - return "" + return 0 } -func (m *Credential) GetController() string { +func (m *Credential) GetUserPresent() bool { if m != nil { - return m.Controller + return m.UserPresent } - return "" + return false } -// DID defines a parsed DID string -type DID struct { - Method DIDNamespace `protobuf:"varint,1,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` - Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` - Paths []string `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` -} - -func (m *DID) Reset() { *m = DID{} } -func (m *DID) String() string { return proto.CompactTextString(m) } -func (*DID) ProtoMessage() {} -func (*DID) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{2} -} -func (m *DID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DID.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 *DID) XXX_Merge(src proto.Message) { - xxx_messageInfo_DID.Merge(m, src) -} -func (m *DID) XXX_Size() int { - return m.Size() -} -func (m *DID) XXX_DiscardUnknown() { - xxx_messageInfo_DID.DiscardUnknown(m) -} - -var xxx_messageInfo_DID proto.InternalMessageInfo - -func (m *DID) GetMethod() DIDNamespace { +func (m *Credential) GetUserVerified() bool { if m != nil { - return m.Method + return m.UserVerified } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED + return false } -func (m *DID) GetNetwork() string { +func (m *Credential) GetBackupEligible() bool { if m != nil { - return m.Network + return m.BackupEligible } - return "" + return false } -func (m *DID) GetSubject() string { +func (m *Credential) GetBackupState() bool { if m != nil { - return m.Subject + return m.BackupState } - return "" + return false } -func (m *DID) GetIdentifier() string { +func (m *Credential) GetCloneWarning() bool { if m != nil { - return m.Identifier + return m.CloneWarning } - return "" -} - -func (m *DID) GetPaths() []string { - if m != nil { - return m.Paths - } - return nil + return false } // Document defines a DID document type Document struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` - Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` - Service []string `protobuf:"bytes,9,rep,name=service,proto3" json:"service,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + Authentication []string `protobuf:"bytes,3,rep,name=authentication,proto3" json:"authentication,omitempty"` + AssertionMethod []string `protobuf:"bytes,4,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` + CapabilityDelegation []string `protobuf:"bytes,5,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` + CapabilityInvocation []string `protobuf:"bytes,6,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` + Service []string `protobuf:"bytes,7,rep,name=service,proto3" json:"service,omitempty"` } func (m *Document) Reset() { *m = Document{} } func (m *Document) String() string { return proto.CompactTextString(m) } func (*Document) ProtoMessage() {} func (*Document) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{3} + return fileDescriptor_739bb5ab5cb60751, []int{2} } func (m *Document) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -281,11 +267,11 @@ func (m *Document) GetId() string { return "" } -func (m *Document) GetVerificationMethods() []*VerificationMethod { +func (m *Document) GetController() string { if m != nil { - return m.VerificationMethods + return m.Controller } - return nil + return "" } func (m *Document) GetAuthentication() []string { @@ -323,28 +309,28 @@ func (m *Document) GetService() []string { return nil } -// JWK represents a JSON Web Key -type JWK struct { - Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` - Crv string `protobuf:"bytes,2,opt,name=crv,proto3" json:"crv,omitempty"` - X string `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"` - Y string `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"` - N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` - E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` +// Keyshare defines a keyshare from the MPC protocol +type Keyshare struct { + Metadata map[string]string `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Payloads map[string][]byte `protobuf:"bytes,2,rep,name=payloads,proto3" json:"payloads,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"` + PublicKey []byte `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Version uint32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + Role int32 `protobuf:"varint,6,opt,name=role,proto3" json:"role,omitempty"` } -func (m *JWK) Reset() { *m = JWK{} } -func (m *JWK) String() string { return proto.CompactTextString(m) } -func (*JWK) ProtoMessage() {} -func (*JWK) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{4} +func (m *Keyshare) Reset() { *m = Keyshare{} } +func (m *Keyshare) String() string { return proto.CompactTextString(m) } +func (*Keyshare) ProtoMessage() {} +func (*Keyshare) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{3} } -func (m *JWK) XXX_Unmarshal(b []byte) error { +func (m *Keyshare) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *JWK) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Keyshare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_JWK.Marshal(b, m, deterministic) + return xxx_messageInfo_Keyshare.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -354,121 +340,60 @@ func (m *JWK) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *JWK) XXX_Merge(src proto.Message) { - xxx_messageInfo_JWK.Merge(m, src) +func (m *Keyshare) XXX_Merge(src proto.Message) { + xxx_messageInfo_Keyshare.Merge(m, src) } -func (m *JWK) XXX_Size() int { +func (m *Keyshare) XXX_Size() int { return m.Size() } -func (m *JWK) XXX_DiscardUnknown() { - xxx_messageInfo_JWK.DiscardUnknown(m) +func (m *Keyshare) XXX_DiscardUnknown() { + xxx_messageInfo_Keyshare.DiscardUnknown(m) } -var xxx_messageInfo_JWK proto.InternalMessageInfo +var xxx_messageInfo_Keyshare proto.InternalMessageInfo -func (m *JWK) GetKty() string { +func (m *Keyshare) GetMetadata() map[string]string { if m != nil { - return m.Kty - } - return "" -} - -func (m *JWK) GetCrv() string { - if m != nil { - return m.Crv - } - return "" -} - -func (m *JWK) GetX() string { - if m != nil { - return m.X - } - return "" -} - -func (m *JWK) GetY() string { - if m != nil { - return m.Y - } - return "" -} - -func (m *JWK) GetN() string { - if m != nil { - return m.N - } - return "" -} - -func (m *JWK) GetE() string { - if m != nil { - return m.E - } - return "" -} - -// Metadata defines additional information provided to a did -type Metadata struct { - OriginUri string `protobuf:"bytes,1,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - Public map[string]string `protobuf:"bytes,2,rep,name=public,proto3" json:"public,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Private map[string]*Property `protobuf:"bytes,3,rep,name=private,proto3" json:"private,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{5} -} -func (m *Metadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metadata.Merge(m, src) -} -func (m *Metadata) XXX_Size() int { - return m.Size() -} -func (m *Metadata) XXX_DiscardUnknown() { - xxx_messageInfo_Metadata.DiscardUnknown(m) -} - -var xxx_messageInfo_Metadata proto.InternalMessageInfo - -func (m *Metadata) GetOriginUri() string { - if m != nil { - return m.OriginUri - } - return "" -} - -func (m *Metadata) GetPublic() map[string]string { - if m != nil { - return m.Public + return m.Metadata } return nil } -func (m *Metadata) GetPrivate() map[string]*Property { +func (m *Keyshare) GetPayloads() map[string][]byte { if m != nil { - return m.Private + return m.Payloads } return nil } +func (m *Keyshare) GetProtocol() string { + if m != nil { + return m.Protocol + } + return "" +} + +func (m *Keyshare) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *Keyshare) GetVersion() uint32 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *Keyshare) GetRole() int32 { + if m != nil { + return m.Role + } + return 0 +} + // Permissions contains a list of grants and access control rules for // a Service. type Permissions struct { @@ -480,7 +405,7 @@ func (m *Permissions) Reset() { *m = Permissions{} } func (m *Permissions) String() string { return proto.CompactTextString(m) } func (*Permissions) ProtoMessage() {} func (*Permissions) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{6} + return fileDescriptor_739bb5ab5cb60751, []int{4} } func (m *Permissions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -523,129 +448,6 @@ func (m *Permissions) GetScopes() []PermissionScope { return nil } -// Profile defines an associated public identity for a did subject -type Profile struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (m *Profile) Reset() { *m = Profile{} } -func (m *Profile) String() string { return proto.CompactTextString(m) } -func (*Profile) ProtoMessage() {} -func (*Profile) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{7} -} -func (m *Profile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Profile.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 *Profile) XXX_Merge(src proto.Message) { - xxx_messageInfo_Profile.Merge(m, src) -} -func (m *Profile) XXX_Size() int { - return m.Size() -} -func (m *Profile) XXX_DiscardUnknown() { - xxx_messageInfo_Profile.DiscardUnknown(m) -} - -var xxx_messageInfo_Profile proto.InternalMessageInfo - -func (m *Profile) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Profile) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *Profile) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *Profile) GetMetadata() *Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -// Property defines a Zero-Knowledge accumulator which can be used to -// anonymously prove a given value to a DID subject -type Property struct { - Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` -} - -func (m *Property) Reset() { *m = Property{} } -func (m *Property) String() string { return proto.CompactTextString(m) } -func (*Property) ProtoMessage() {} -func (*Property) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{8} -} -func (m *Property) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Property.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 *Property) XXX_Merge(src proto.Message) { - xxx_messageInfo_Property.Merge(m, src) -} -func (m *Property) XXX_Size() int { - return m.Size() -} -func (m *Property) XXX_DiscardUnknown() { - xxx_messageInfo_Property.DiscardUnknown(m) -} - -var xxx_messageInfo_Property proto.InternalMessageInfo - -func (m *Property) GetAccumulator() []byte { - if m != nil { - return m.Accumulator - } - return nil -} - -func (m *Property) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - // PubKey defines a public key for a did type PubKey struct { Role KeyRole `protobuf:"varint,1,opt,name=role,proto3,enum=did.v1.KeyRole" json:"role,omitempty"` @@ -654,14 +456,14 @@ type PubKey struct { Curve KeyCurve `protobuf:"varint,4,opt,name=curve,proto3,enum=did.v1.KeyCurve" json:"curve,omitempty"` KeyType KeyType `protobuf:"varint,5,opt,name=key_type,json=keyType,proto3,enum=did.v1.KeyType" json:"key_type,omitempty"` Raw []byte `protobuf:"bytes,6,opt,name=raw,proto3" json:"raw,omitempty"` - Jwk *JWK `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"` + Jwk *PubKey_JWK `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"` } func (m *PubKey) Reset() { *m = PubKey{} } func (m *PubKey) String() string { return proto.CompactTextString(m) } func (*PubKey) ProtoMessage() {} func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{9} + return fileDescriptor_739bb5ab5cb60751, []int{5} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -732,28 +534,114 @@ func (m *PubKey) GetRaw() []byte { return nil } -func (m *PubKey) GetJwk() *JWK { +func (m *PubKey) GetJwk() *PubKey_JWK { if m != nil { return m.Jwk } return nil } +// JWK represents a JSON Web Key +type PubKey_JWK struct { + Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` + Crv string `protobuf:"bytes,2,opt,name=crv,proto3" json:"crv,omitempty"` + X string `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"` + Y string `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"` + N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` + E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` +} + +func (m *PubKey_JWK) Reset() { *m = PubKey_JWK{} } +func (m *PubKey_JWK) String() string { return proto.CompactTextString(m) } +func (*PubKey_JWK) ProtoMessage() {} +func (*PubKey_JWK) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{5, 0} +} +func (m *PubKey_JWK) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PubKey_JWK) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PubKey_JWK.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 *PubKey_JWK) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubKey_JWK.Merge(m, src) +} +func (m *PubKey_JWK) XXX_Size() int { + return m.Size() +} +func (m *PubKey_JWK) XXX_DiscardUnknown() { + xxx_messageInfo_PubKey_JWK.DiscardUnknown(m) +} + +var xxx_messageInfo_PubKey_JWK proto.InternalMessageInfo + +func (m *PubKey_JWK) GetKty() string { + if m != nil { + return m.Kty + } + return "" +} + +func (m *PubKey_JWK) GetCrv() string { + if m != nil { + return m.Crv + } + return "" +} + +func (m *PubKey_JWK) GetX() string { + if m != nil { + return m.X + } + return "" +} + +func (m *PubKey_JWK) GetY() string { + if m != nil { + return m.Y + } + return "" +} + +func (m *PubKey_JWK) GetN() string { + if m != nil { + return m.N + } + return "" +} + +func (m *PubKey_JWK) GetE() string { + if m != nil { + return m.E + } + return "" +} + // Service defines a Decentralized Service on the Sonr Blockchain type Service struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - Permissions *Permissions `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"` - Openid *OpenIDConfig `protobuf:"bytes,5,opt,name=openid,proto3" json:"openid,omitempty"` - Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + ServiceEndpoints map[string]string `protobuf:"bytes,6,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"` } func (m *Service) Reset() { *m = Service{} } func (m *Service) String() string { return proto.CompactTextString(m) } func (*Service) ProtoMessage() {} func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{10} + return fileDescriptor_739bb5ab5cb60751, []int{6} } func (m *Service) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -789,9 +677,16 @@ func (m *Service) GetId() string { return "" } -func (m *Service) GetController() string { +func (m *Service) GetServiceType() string { if m != nil { - return m.Controller + return m.ServiceType + } + return "" +} + +func (m *Service) GetAuthority() string { + if m != nil { + return m.Authority } return "" } @@ -803,6 +698,20 @@ func (m *Service) GetOrigin() string { return "" } +func (m *Service) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Service) GetServiceEndpoints() map[string]string { + if m != nil { + return m.ServiceEndpoints + } + return nil +} + func (m *Service) GetPermissions() *Permissions { if m != nil { return m.Permissions @@ -810,16 +719,71 @@ func (m *Service) GetPermissions() *Permissions { return nil } -func (m *Service) GetOpenid() *OpenIDConfig { - if m != nil { - return m.Openid - } - return nil +// ServicceInfo defines a Decentralized Service on the Sonr Blockchain +type ServiceInfo struct { + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Fingerprint string `protobuf:"bytes,3,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + Service *Service `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` } -func (m *Service) GetMetadata() *Metadata { +func (m *ServiceInfo) Reset() { *m = ServiceInfo{} } +func (m *ServiceInfo) String() string { return proto.CompactTextString(m) } +func (*ServiceInfo) ProtoMessage() {} +func (*ServiceInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{7} +} +func (m *ServiceInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceInfo.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 *ServiceInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceInfo.Merge(m, src) +} +func (m *ServiceInfo) XXX_Size() int { + return m.Size() +} +func (m *ServiceInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceInfo proto.InternalMessageInfo + +func (m *ServiceInfo) GetExists() bool { if m != nil { - return m.Metadata + return m.Exists + } + return false +} + +func (m *ServiceInfo) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *ServiceInfo) GetFingerprint() string { + if m != nil { + return m.Fingerprint + } + return "" +} + +func (m *ServiceInfo) GetService() *Service { + if m != nil { + return m.Service } return nil } @@ -835,7 +799,7 @@ func (m *Token) Reset() { *m = Token{} } func (m *Token) String() string { return proto.CompactTextString(m) } func (*Token) ProtoMessage() {} func (*Token) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{11} + return fileDescriptor_739bb5ab5cb60751, []int{8} } func (m *Token) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -885,221 +849,99 @@ func (m *Token) GetMacron() []byte { return nil } -// VerificationMethod defines a verification method -type VerificationMethod struct { - Method DIDNamespace `protobuf:"varint,1,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"` - PublicKey *PubKey `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` -} - -func (m *VerificationMethod) Reset() { *m = VerificationMethod{} } -func (m *VerificationMethod) String() string { return proto.CompactTextString(m) } -func (*VerificationMethod) ProtoMessage() {} -func (*VerificationMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{12} -} -func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerificationMethod.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 *VerificationMethod) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerificationMethod.Merge(m, src) -} -func (m *VerificationMethod) XXX_Size() int { - return m.Size() -} -func (m *VerificationMethod) XXX_DiscardUnknown() { - xxx_messageInfo_VerificationMethod.DiscardUnknown(m) -} - -var xxx_messageInfo_VerificationMethod proto.InternalMessageInfo - -func (m *VerificationMethod) GetMethod() DIDNamespace { - if m != nil { - return m.Method - } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED -} - -func (m *VerificationMethod) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *VerificationMethod) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *VerificationMethod) GetIssuer() string { - if m != nil { - return m.Issuer - } - return "" -} - -func (m *VerificationMethod) GetPublicKey() *PubKey { - if m != nil { - return m.PublicKey - } - return nil -} - -// Witness defines a BLS witness -type Witness struct { - Witness []byte `protobuf:"bytes,1,opt,name=witness,proto3" json:"witness,omitempty"` -} - -func (m *Witness) Reset() { *m = Witness{} } -func (m *Witness) String() string { return proto.CompactTextString(m) } -func (*Witness) ProtoMessage() {} -func (*Witness) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{13} -} -func (m *Witness) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Witness) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Witness.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 *Witness) XXX_Merge(src proto.Message) { - xxx_messageInfo_Witness.Merge(m, src) -} -func (m *Witness) XXX_Size() int { - return m.Size() -} -func (m *Witness) XXX_DiscardUnknown() { - xxx_messageInfo_Witness.DiscardUnknown(m) -} - -var xxx_messageInfo_Witness proto.InternalMessageInfo - -func (m *Witness) GetWitness() []byte { - if m != nil { - return m.Witness - } - return nil -} - func init() { - proto.RegisterType((*Accumulator)(nil), "did.v1.Accumulator") + proto.RegisterType((*Alias)(nil), "did.v1.Alias") proto.RegisterType((*Credential)(nil), "did.v1.Credential") - proto.RegisterType((*DID)(nil), "did.v1.DID") proto.RegisterType((*Document)(nil), "did.v1.Document") - proto.RegisterType((*JWK)(nil), "did.v1.JWK") - proto.RegisterType((*Metadata)(nil), "did.v1.Metadata") - proto.RegisterMapType((map[string]*Property)(nil), "did.v1.Metadata.PrivateEntry") - proto.RegisterMapType((map[string]string)(nil), "did.v1.Metadata.PublicEntry") + proto.RegisterType((*Keyshare)(nil), "did.v1.Keyshare") + proto.RegisterMapType((map[string]string)(nil), "did.v1.Keyshare.MetadataEntry") + proto.RegisterMapType((map[string][]byte)(nil), "did.v1.Keyshare.PayloadsEntry") proto.RegisterType((*Permissions)(nil), "did.v1.Permissions") - proto.RegisterType((*Profile)(nil), "did.v1.Profile") - proto.RegisterType((*Property)(nil), "did.v1.Property") proto.RegisterType((*PubKey)(nil), "did.v1.PubKey") + proto.RegisterType((*PubKey_JWK)(nil), "did.v1.PubKey.JWK") proto.RegisterType((*Service)(nil), "did.v1.Service") + proto.RegisterMapType((map[string]string)(nil), "did.v1.Service.ServiceEndpointsEntry") + proto.RegisterType((*ServiceInfo)(nil), "did.v1.ServiceInfo") proto.RegisterType((*Token)(nil), "did.v1.Token") - proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") - proto.RegisterType((*Witness)(nil), "did.v1.Witness") } func init() { proto.RegisterFile("did/v1/models.proto", fileDescriptor_739bb5ab5cb60751) } var fileDescriptor_739bb5ab5cb60751 = []byte{ - // 1063 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xef, 0xee, 0x36, 0xfe, 0x78, 0x0e, 0x4e, 0x34, 0x31, 0xb0, 0x8a, 0x1a, 0x2b, 0xda, 0x48, - 0x25, 0xa0, 0x62, 0xab, 0x2e, 0x88, 0x0f, 0x21, 0xa4, 0x12, 0xf7, 0x90, 0x9a, 0xd0, 0x68, 0x5b, - 0x88, 0xc4, 0x25, 0x5a, 0xef, 0x4e, 0x9c, 0xa9, 0xd7, 0x33, 0xab, 0x99, 0x59, 0x27, 0x7b, 0xe4, - 0x3f, 0xe0, 0xc6, 0x89, 0x03, 0x7f, 0x06, 0x37, 0xc4, 0x89, 0x63, 0x8f, 0x1c, 0x51, 0xc2, 0x1f, - 0x82, 0xe6, 0x63, 0xed, 0x6d, 0xdc, 0x52, 0xc1, 0xc5, 0x9a, 0xf7, 0x7e, 0xbf, 0x37, 0xf3, 0xbe, - 0xd7, 0xb0, 0x95, 0x90, 0xa4, 0x3f, 0xbf, 0xdf, 0x9f, 0xb1, 0x04, 0xa7, 0xa2, 0x97, 0x71, 0x26, - 0x19, 0xaa, 0x25, 0x24, 0xe9, 0xcd, 0xef, 0x6f, 0x77, 0x2c, 0x38, 0xc1, 0x14, 0x0b, 0x62, 0xd1, - 0xed, 0xce, 0x84, 0x4d, 0x98, 0x3e, 0xf6, 0xd5, 0xc9, 0x68, 0x83, 0x3e, 0xb4, 0x1e, 0xc6, 0x71, - 0x3e, 0xcb, 0xd3, 0x48, 0x32, 0x8e, 0x76, 0xa1, 0x15, 0x2d, 0x45, 0xdf, 0xd9, 0x75, 0xf6, 0xd7, - 0xc3, 0xaa, 0x2a, 0xf8, 0xdd, 0x01, 0x38, 0xe0, 0x38, 0xc1, 0x54, 0x92, 0x28, 0x45, 0x6d, 0x70, - 0x49, 0xa2, 0x79, 0xcd, 0xd0, 0x25, 0x09, 0x7a, 0x0f, 0x36, 0xe2, 0x05, 0x7a, 0x2a, 0x8b, 0x0c, - 0xfb, 0xae, 0x06, 0xdb, 0x4b, 0xf5, 0xb3, 0x22, 0xc3, 0x68, 0x0f, 0xde, 0xaa, 0x10, 0x49, 0xe2, - 0x7b, 0xfa, 0xad, 0xf5, 0xa5, 0xf2, 0x30, 0x41, 0x77, 0xa0, 0x29, 0x79, 0x44, 0x45, 0xc6, 0xb8, - 0xf4, 0x6f, 0xef, 0x7a, 0xfb, 0xcd, 0x70, 0xa9, 0x40, 0x3e, 0xd4, 0x45, 0x3e, 0x7e, 0x8e, 0x63, - 0xe9, 0xd7, 0xf4, 0x1b, 0xa5, 0x88, 0xba, 0x00, 0x31, 0xa3, 0x92, 0xb3, 0x34, 0xc5, 0xdc, 0xaf, - 0x6b, 0xb0, 0xa2, 0x09, 0x7e, 0x76, 0xc0, 0x1b, 0x1e, 0x0e, 0xd1, 0x3d, 0xa8, 0xcd, 0xb0, 0x3c, - 0x67, 0x26, 0x82, 0xf6, 0xa0, 0xd3, 0x33, 0x29, 0xec, 0x0d, 0x0f, 0x87, 0xdf, 0x44, 0x33, 0x2c, - 0xb2, 0x28, 0xc6, 0xa1, 0xe5, 0xa8, 0xf7, 0x28, 0x96, 0x17, 0x8c, 0x4f, 0x6d, 0x4c, 0xa5, 0x58, - 0xf5, 0xc4, 0x5b, 0xf1, 0x84, 0xe8, 0x78, 0xce, 0x08, 0xe6, 0xfe, 0x6d, 0xe3, 0xc9, 0x52, 0x83, - 0x3a, 0xb0, 0x96, 0x45, 0xf2, 0x5c, 0xf8, 0x6b, 0x3a, 0x3a, 0x23, 0x04, 0xbf, 0xb9, 0xd0, 0x18, - 0xb2, 0x38, 0x9f, 0x61, 0x2a, 0x57, 0x52, 0x7c, 0x04, 0x9d, 0x39, 0xe6, 0xe4, 0x8c, 0xc4, 0x91, - 0x24, 0x8c, 0x9e, 0x1a, 0xef, 0x84, 0xef, 0xee, 0x7a, 0xfb, 0xad, 0xc1, 0x76, 0x19, 0xc2, 0x77, - 0x15, 0xce, 0x91, 0xa6, 0x84, 0x5b, 0xf3, 0x15, 0x9d, 0x40, 0x77, 0xa1, 0x1d, 0xe5, 0xf2, 0x5c, - 0x79, 0x64, 0x00, 0x9b, 0xe8, 0x1b, 0x5a, 0xf4, 0x3e, 0x6c, 0x46, 0x42, 0x60, 0x5e, 0x79, 0xd3, - 0x3a, 0xbd, 0xb1, 0xd0, 0x9b, 0x3b, 0xd1, 0x03, 0x78, 0x3b, 0x8e, 0xb2, 0x68, 0x4c, 0x52, 0x22, - 0x8b, 0xd3, 0x04, 0xa7, 0x78, 0x62, 0x6e, 0xae, 0x6b, 0x7e, 0x67, 0x09, 0x0e, 0x17, 0xd8, 0x0d, - 0x23, 0x42, 0xe7, 0xcc, 0xba, 0xd3, 0xb8, 0x69, 0x74, 0xb8, 0xc0, 0x74, 0xe2, 0x31, 0x9f, 0x93, - 0x18, 0xfb, 0x4d, 0x4d, 0x2b, 0xc5, 0x20, 0x02, 0xef, 0xf1, 0xc9, 0x08, 0x6d, 0x82, 0x37, 0x95, - 0x85, 0xcd, 0x9e, 0x3a, 0x2a, 0x4d, 0xcc, 0xe7, 0xb6, 0x82, 0xea, 0x88, 0xd6, 0xc1, 0xb9, 0xb4, - 0x75, 0x73, 0x2e, 0x95, 0x54, 0xd8, 0x42, 0x39, 0x85, 0x92, 0xa8, 0xbf, 0x66, 0x24, 0xaa, 0x24, - 0x6c, 0x7b, 0xcd, 0xc1, 0xc1, 0x2f, 0x2e, 0x34, 0x8e, 0xb0, 0x8c, 0x92, 0x48, 0x46, 0x68, 0x07, - 0x80, 0x71, 0x32, 0x21, 0xf4, 0x34, 0xe7, 0xc4, 0xbe, 0xd7, 0x34, 0x9a, 0x6f, 0x39, 0x41, 0x1f, - 0x41, 0x2d, 0xcb, 0xc7, 0x29, 0x89, 0x6d, 0x99, 0xee, 0x94, 0x65, 0x2a, 0x2f, 0xe8, 0x1d, 0x6b, - 0xf8, 0x11, 0x95, 0xbc, 0x08, 0x2d, 0x17, 0x7d, 0x02, 0xf5, 0x8c, 0x93, 0x79, 0x24, 0xb1, 0xef, - 0x69, 0xb3, 0x9d, 0x55, 0x33, 0x83, 0x1b, 0xbb, 0x92, 0xbd, 0xfd, 0x19, 0xb4, 0x2a, 0xf7, 0xe9, - 0x2c, 0xe0, 0x65, 0x16, 0x70, 0xa1, 0xfa, 0x6e, 0x1e, 0xa5, 0x79, 0x39, 0x9d, 0x46, 0xf8, 0xdc, - 0xfd, 0xd4, 0xd9, 0xfe, 0x1a, 0xd6, 0xab, 0x77, 0xbe, 0xc2, 0xf6, 0x6e, 0xd5, 0xb6, 0x35, 0xd8, - 0x2c, 0x7d, 0x3a, 0xe6, 0x2c, 0xc3, 0x5c, 0x16, 0x95, 0xdb, 0x82, 0x14, 0x5a, 0xc7, 0x98, 0xcf, - 0x88, 0x10, 0x84, 0x51, 0xa1, 0x06, 0x6e, 0xc2, 0x23, 0x2a, 0x85, 0xef, 0xec, 0x7a, 0xaf, 0x1f, - 0x38, 0xc3, 0x41, 0x7d, 0xa8, 0x89, 0x98, 0x65, 0xd8, 0xf4, 0x76, 0x7b, 0xf0, 0xee, 0xe2, 0xa5, - 0xc5, 0x95, 0x4f, 0x15, 0x1e, 0x5a, 0x5a, 0xf0, 0x83, 0x03, 0xf5, 0x63, 0xce, 0xce, 0x48, 0x8a, - 0x57, 0xc6, 0xa6, 0x32, 0xa3, 0xee, 0xbf, 0x6d, 0x0b, 0xef, 0xe6, 0xb6, 0x40, 0xf7, 0xa0, 0x31, - 0xb3, 0xe9, 0xd6, 0x8d, 0x51, 0x09, 0xb9, 0x2c, 0x43, 0xb8, 0x60, 0x04, 0x5f, 0x42, 0xa3, 0x4c, - 0xc4, 0x9b, 0xd7, 0x69, 0x99, 0x5d, 0x57, 0x23, 0xea, 0x18, 0xfc, 0xe4, 0x42, 0xed, 0x38, 0x1f, - 0x8f, 0x70, 0x81, 0xf6, 0xe0, 0x36, 0x67, 0x29, 0xb6, 0xcb, 0x69, 0xa3, 0x7c, 0x74, 0x84, 0x8b, - 0x90, 0xa5, 0x38, 0xd4, 0x20, 0x1a, 0x40, 0x33, 0x4a, 0x27, 0x8c, 0x13, 0x79, 0x3e, 0xd3, 0xf7, - 0x54, 0xb2, 0x3a, 0xc2, 0xc5, 0xc3, 0x12, 0x0b, 0x97, 0x34, 0xd4, 0x87, 0x06, 0xa6, 0x31, 0x4b, - 0x08, 0x9d, 0xe8, 0x78, 0xdb, 0x83, 0xad, 0x8a, 0xc9, 0x23, 0x0b, 0x85, 0x0b, 0x92, 0x2a, 0x79, - 0x9c, 0xf3, 0x39, 0xd6, 0xf1, 0xb7, 0x97, 0xf1, 0x8f, 0x70, 0x71, 0xa0, 0xf4, 0xa1, 0x81, 0xd1, - 0x07, 0xd0, 0x98, 0xe2, 0xc2, 0xec, 0xfd, 0xb5, 0x15, 0xaf, 0xd5, 0xe2, 0x0f, 0xeb, 0x53, 0x73, - 0x50, 0xa1, 0xf3, 0xe8, 0x42, 0x8f, 0xd3, 0x7a, 0xa8, 0x8e, 0x68, 0x07, 0xbc, 0xe7, 0x17, 0x53, - 0xbd, 0xaf, 0x5b, 0x83, 0x56, 0x69, 0xf8, 0xf8, 0x64, 0x14, 0x2a, 0x7d, 0xf0, 0xb7, 0x03, 0xf5, - 0xa7, 0x66, 0xbc, 0x57, 0xaa, 0xfb, 0x72, 0x0d, 0xdd, 0x95, 0x1a, 0xbe, 0x03, 0x35, 0x33, 0x8c, - 0xb6, 0xbe, 0x56, 0x42, 0x1f, 0x43, 0x2b, 0x5b, 0xf6, 0xa7, 0x2d, 0xef, 0xd6, 0x6a, 0x9f, 0x89, - 0xb0, 0xca, 0x53, 0x7d, 0xcc, 0x32, 0x4c, 0x49, 0xa2, 0xa3, 0x6c, 0x2d, 0x33, 0xfe, 0x24, 0xc3, - 0xf4, 0x70, 0x78, 0xc0, 0xe8, 0x19, 0x99, 0x84, 0x96, 0xf3, 0x52, 0x03, 0xd5, 0xde, 0xd8, 0x40, - 0x4f, 0x60, 0xed, 0x19, 0x9b, 0x62, 0xfa, 0x7f, 0x62, 0x9c, 0x45, 0x31, 0x67, 0xd4, 0x7e, 0x4b, - 0xad, 0x14, 0xfc, 0xea, 0x00, 0x5a, 0xfd, 0x1a, 0xfc, 0xc7, 0x8f, 0x9f, 0x71, 0xc6, 0x7d, 0x8d, - 0x33, 0xde, 0xab, 0x9c, 0x21, 0x42, 0xe4, 0x8b, 0x8f, 0x9e, 0x95, 0xd0, 0x87, 0x00, 0x66, 0xb9, - 0x9d, 0xaa, 0xbe, 0x37, 0xd9, 0x6b, 0x2f, 0xf2, 0xad, 0xfb, 0x3e, 0x6c, 0x1a, 0xc6, 0x08, 0x17, - 0xc1, 0x1e, 0xd4, 0x4f, 0x88, 0xa4, 0x58, 0x08, 0x35, 0xc0, 0x17, 0xe6, 0x68, 0x07, 0xa9, 0x14, - 0xbf, 0xfa, 0xe2, 0x8f, 0xab, 0xae, 0xf3, 0xe2, 0xaa, 0xeb, 0xfc, 0x75, 0xd5, 0x75, 0x7e, 0xbc, - 0xee, 0xde, 0x7a, 0x71, 0xdd, 0xbd, 0xf5, 0xe7, 0x75, 0xf7, 0xd6, 0xf7, 0xc1, 0x84, 0xc8, 0xf3, - 0x7c, 0xdc, 0x8b, 0xd9, 0xac, 0xcf, 0xa8, 0x60, 0x94, 0xf7, 0xf5, 0xcf, 0x65, 0x5f, 0xfd, 0x47, - 0x52, 0x6d, 0x2a, 0xc6, 0x35, 0xfd, 0x4f, 0xe8, 0xc1, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5d, - 0xdb, 0xed, 0x81, 0x54, 0x09, 0x00, 0x00, + // 1108 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xef, 0x7a, 0x63, 0xc7, 0xfb, 0xec, 0x3a, 0x61, 0x9a, 0x96, 0x95, 0x55, 0x2c, 0xd7, 0x85, + 0xe2, 0x22, 0x64, 0xab, 0xae, 0x90, 0x50, 0xe1, 0x52, 0x92, 0x1c, 0xd2, 0xa8, 0x10, 0x6d, 0x2b, + 0x2a, 0xb8, 0x58, 0xe3, 0xdd, 0xe9, 0x66, 0xea, 0xf5, 0xcc, 0x6a, 0x66, 0xec, 0x66, 0x8f, 0x5c, + 0x39, 0xc1, 0x67, 0xe0, 0xcb, 0x70, 0xec, 0x91, 0x23, 0x6a, 0xe1, 0x7b, 0xa0, 0xf9, 0xb3, 0xf6, + 0xc6, 0xa5, 0xa0, 0x5e, 0x92, 0x79, 0xbf, 0xf7, 0x7b, 0x33, 0x6f, 0x7f, 0xef, 0xbd, 0x19, 0xc3, + 0xb5, 0x84, 0x26, 0xe3, 0xd5, 0xbd, 0xf1, 0x82, 0x27, 0x24, 0x93, 0xa3, 0x5c, 0x70, 0xc5, 0x51, + 0x23, 0xa1, 0xc9, 0x68, 0x75, 0xaf, 0x7b, 0xe0, 0x9c, 0x29, 0x61, 0x44, 0x52, 0xe7, 0xed, 0x1e, + 0xa4, 0x3c, 0xe5, 0x66, 0x39, 0xd6, 0x2b, 0x8b, 0x0e, 0x7e, 0x80, 0xfa, 0xc3, 0x8c, 0x62, 0x89, + 0x42, 0xd8, 0x95, 0xcb, 0xd9, 0x0b, 0x12, 0xab, 0xd0, 0xeb, 0x7b, 0xc3, 0x20, 0x2a, 0x4d, 0x74, + 0x03, 0x1a, 0x5c, 0xd0, 0x94, 0xb2, 0xb0, 0x66, 0x1c, 0xce, 0x42, 0x3d, 0x80, 0x98, 0x33, 0x25, + 0x78, 0x96, 0x11, 0x11, 0xfa, 0xc6, 0x57, 0x41, 0x06, 0xbf, 0xf9, 0x00, 0x87, 0x82, 0x24, 0x84, + 0x29, 0x8a, 0xb3, 0xff, 0x38, 0xe0, 0x2e, 0xec, 0x63, 0xa5, 0x88, 0x54, 0x58, 0x51, 0xce, 0xa6, + 0xaa, 0xc8, 0x89, 0x3b, 0x6a, 0xaf, 0x82, 0x3f, 0x2d, 0x72, 0x52, 0xc9, 0xc5, 0xbf, 0x94, 0xcb, + 0x6d, 0xb8, 0x1a, 0xaf, 0x8f, 0x9a, 0xd2, 0x24, 0xdc, 0xe9, 0x7b, 0xc3, 0x76, 0xd4, 0xde, 0x80, + 0x27, 0x09, 0xfa, 0x08, 0x20, 0x5f, 0xce, 0x32, 0x1a, 0x4f, 0xe7, 0xa4, 0x08, 0xeb, 0x86, 0x11, + 0x58, 0xe4, 0x94, 0x14, 0xe8, 0x26, 0x04, 0x4a, 0x60, 0x26, 0x73, 0x2e, 0x54, 0xd8, 0xe8, 0xfb, + 0xc3, 0x20, 0xda, 0x00, 0x3a, 0x58, 0xd2, 0x94, 0x4d, 0x63, 0xbe, 0x64, 0x2a, 0xdc, 0xed, 0x7b, + 0xc3, 0xab, 0x51, 0xa0, 0x91, 0x43, 0x0d, 0xa0, 0x5b, 0xd0, 0x5e, 0x4a, 0x22, 0xa6, 0xb9, 0x20, + 0x92, 0x30, 0x15, 0x36, 0xfb, 0xde, 0xb0, 0x19, 0xb5, 0x34, 0x76, 0x66, 0x21, 0x9d, 0xa3, 0xa1, + 0xac, 0x88, 0xa0, 0xcf, 0x29, 0x49, 0xc2, 0xc0, 0x70, 0x4c, 0xdc, 0xf7, 0x0e, 0x43, 0x9f, 0xc2, + 0xde, 0x0c, 0xc7, 0xf3, 0x65, 0x3e, 0x25, 0x19, 0x4d, 0xe9, 0x2c, 0x23, 0x21, 0x18, 0x5a, 0xc7, + 0xc2, 0xc7, 0x0e, 0xd5, 0x07, 0x3a, 0xa2, 0xd6, 0x87, 0x84, 0x2d, 0x7b, 0xa0, 0xc5, 0x9e, 0x68, + 0xc8, 0x88, 0x92, 0x71, 0x46, 0xa6, 0x2f, 0xb1, 0x60, 0x94, 0xa5, 0x61, 0xdb, 0x1e, 0x68, 0xc0, + 0x67, 0x16, 0x1b, 0xfc, 0x5a, 0x83, 0xe6, 0x11, 0x8f, 0x97, 0x0b, 0x9d, 0x62, 0x07, 0x6a, 0x34, + 0x71, 0xe5, 0xa9, 0xd1, 0x64, 0xab, 0xc4, 0xb5, 0xed, 0x12, 0xa3, 0x3b, 0xd0, 0xc1, 0x4b, 0x75, + 0xae, 0x15, 0x8e, 0x4d, 0x91, 0x42, 0xdf, 0xe8, 0xb6, 0x85, 0x9a, 0x0a, 0x4b, 0x49, 0x84, 0xa9, + 0xef, 0x82, 0xa8, 0x73, 0xae, 0x2b, 0xe4, 0x9b, 0x0a, 0x97, 0xf8, 0x63, 0x03, 0xa3, 0xfb, 0x70, + 0x3d, 0xc6, 0x39, 0x9e, 0xd1, 0x8c, 0xaa, 0x62, 0x9a, 0x90, 0x8c, 0xa4, 0x76, 0xe7, 0xba, 0xe1, + 0x1f, 0x6c, 0x9c, 0x47, 0x6b, 0xdf, 0x56, 0x10, 0x65, 0x2b, 0xee, 0xd2, 0x69, 0x6c, 0x07, 0x9d, + 0xac, 0x7d, 0xa6, 0x21, 0x89, 0x58, 0xd1, 0x98, 0x84, 0xbb, 0x86, 0x56, 0x9a, 0x83, 0xbf, 0x6b, + 0xd0, 0x3c, 0x25, 0x85, 0x3c, 0xc7, 0x82, 0xa0, 0x07, 0xd0, 0x5c, 0x10, 0x85, 0x13, 0xac, 0x70, + 0xe8, 0xf5, 0xfd, 0x61, 0x6b, 0xd2, 0x1b, 0xd9, 0x41, 0x1b, 0x95, 0x9c, 0xd1, 0x63, 0x47, 0x38, + 0x66, 0x4a, 0x14, 0xd1, 0x9a, 0xaf, 0x63, 0x73, 0x5c, 0x64, 0x1c, 0x27, 0x32, 0xac, 0xbd, 0x23, + 0xf6, 0xcc, 0x11, 0x5c, 0x6c, 0xc9, 0x47, 0x5d, 0x68, 0x9a, 0x11, 0x8d, 0x79, 0xe6, 0x9a, 0x7d, + 0x6d, 0x6f, 0x75, 0xf2, 0xce, 0x76, 0x27, 0x87, 0xb0, 0xbb, 0x22, 0x42, 0x5a, 0xd5, 0x74, 0xa3, + 0x96, 0x26, 0x42, 0xb0, 0x23, 0x78, 0x46, 0xc2, 0x46, 0xdf, 0x1b, 0xd6, 0x23, 0xb3, 0xee, 0x7e, + 0x05, 0x57, 0x2f, 0xe5, 0x8f, 0xf6, 0xc1, 0xd7, 0xdb, 0xda, 0x36, 0xd0, 0x4b, 0x74, 0x00, 0xf5, + 0x15, 0xce, 0x96, 0xe5, 0x58, 0x5a, 0xe3, 0x41, 0xed, 0x4b, 0x4f, 0x07, 0x5f, 0xfa, 0x80, 0xff, + 0x0b, 0x6e, 0x57, 0x82, 0x07, 0x19, 0xb4, 0xce, 0x88, 0x58, 0x50, 0xa9, 0x73, 0x93, 0xe8, 0x73, + 0x68, 0xa4, 0x02, 0x33, 0x25, 0x8d, 0xce, 0x9d, 0xc9, 0x41, 0xa9, 0xd5, 0xd1, 0xc9, 0xd1, 0xb7, + 0x78, 0x41, 0x64, 0x8e, 0x63, 0x12, 0x39, 0x0e, 0x1a, 0x43, 0x43, 0xc6, 0x3c, 0x27, 0x56, 0xd9, + 0xce, 0xe4, 0xc3, 0x92, 0xbd, 0xd9, 0xf2, 0x89, 0xf6, 0x47, 0x8e, 0x36, 0xf8, 0xc9, 0x87, 0xc6, + 0xd9, 0x72, 0xa6, 0x05, 0xba, 0xed, 0x64, 0xd0, 0x59, 0x76, 0x26, 0x7b, 0x95, 0x9a, 0x44, 0x3c, + 0x23, 0x56, 0x17, 0x34, 0x81, 0x00, 0x67, 0x29, 0x17, 0x54, 0x9d, 0x2f, 0x4c, 0xee, 0x95, 0x8c, + 0x4e, 0x49, 0xf1, 0xb0, 0xf4, 0x45, 0x1b, 0x1a, 0x1a, 0x43, 0x93, 0xb0, 0x98, 0x27, 0x7a, 0xda, + 0x7c, 0x13, 0x72, 0xad, 0x12, 0x72, 0xec, 0x5c, 0xd1, 0x9a, 0x84, 0xee, 0x40, 0x3d, 0x5e, 0x8a, + 0x15, 0x31, 0x45, 0xec, 0x4c, 0xf6, 0x2b, 0xec, 0x43, 0x8d, 0x47, 0xd6, 0x8d, 0x3e, 0x83, 0xe6, + 0x9c, 0x14, 0xf6, 0x6e, 0xac, 0xbf, 0x95, 0xb5, 0xbe, 0x1b, 0xa3, 0xdd, 0xb9, 0x5d, 0xe8, 0x12, + 0x08, 0xfc, 0xd2, 0xd4, 0xb8, 0x1d, 0xe9, 0x25, 0xfa, 0x18, 0xfc, 0x17, 0x2f, 0xe7, 0xe6, 0xd6, + 0x6a, 0x4d, 0xd0, 0x5a, 0x28, 0x23, 0xc6, 0xe8, 0xd1, 0xb3, 0xd3, 0x48, 0xbb, 0xbb, 0x18, 0xfc, + 0x47, 0xcf, 0x4e, 0x4d, 0x05, 0xd5, 0xa6, 0x82, 0xca, 0xd4, 0x34, 0x16, 0x2b, 0x57, 0x7c, 0xbd, + 0x44, 0x6d, 0xf0, 0x2e, 0x5c, 0x57, 0x7a, 0x17, 0xda, 0xb2, 0x5d, 0x18, 0x44, 0x5e, 0xa1, 0x2d, + 0xdb, 0x77, 0x41, 0xe4, 0x31, 0x6d, 0xd9, 0x76, 0x0b, 0x22, 0x8f, 0x0c, 0xfe, 0xaa, 0xc1, 0xee, + 0x13, 0x3b, 0x65, 0x6f, 0x5d, 0x36, 0xb7, 0xa0, 0xed, 0x06, 0xb0, 0xfa, 0x04, 0xb4, 0x1c, 0x66, + 0xbe, 0xec, 0x26, 0x04, 0xfa, 0x66, 0xd1, 0x62, 0x17, 0xee, 0xf8, 0x0d, 0x50, 0x79, 0x1c, 0x76, + 0x2e, 0x3d, 0x0e, 0x7d, 0x68, 0x25, 0x44, 0xc6, 0x82, 0xe6, 0xaa, 0x1c, 0x89, 0x20, 0xaa, 0x42, + 0x28, 0x82, 0x0f, 0xca, 0xa3, 0x09, 0x4b, 0x72, 0x4e, 0x75, 0x13, 0x36, 0xcc, 0xc0, 0x7e, 0x52, + 0xaa, 0xe5, 0xd2, 0x2e, 0xff, 0x1f, 0x97, 0x3c, 0x3b, 0xb7, 0xfb, 0x72, 0x0b, 0x46, 0x5f, 0x40, + 0x2b, 0xdf, 0x34, 0xb7, 0xd3, 0xfe, 0xda, 0xdb, 0x4d, 0x2a, 0xa3, 0x2a, 0xaf, 0x7b, 0x08, 0xd7, + 0xff, 0xf5, 0x84, 0xf7, 0x99, 0xca, 0xc1, 0xcf, 0x1e, 0xb4, 0xdc, 0x2e, 0x27, 0xec, 0x39, 0xd7, + 0xca, 0x90, 0x0b, 0x2a, 0xcd, 0x64, 0xe9, 0x27, 0xc0, 0x59, 0xef, 0x7c, 0xda, 0xfb, 0xd0, 0x7a, + 0x4e, 0x59, 0x4a, 0x44, 0x2e, 0x28, 0x53, 0x4e, 0xe9, 0x2a, 0x84, 0xee, 0x6e, 0x2e, 0xcf, 0x1d, + 0xf3, 0x65, 0x7b, 0x5b, 0x3a, 0x6d, 0x6e, 0xd3, 0xef, 0xa0, 0xfe, 0x94, 0xcf, 0x09, 0x7b, 0xef, + 0xd7, 0xe5, 0x06, 0x34, 0x16, 0x38, 0x16, 0xdc, 0x3e, 0xf6, 0xed, 0xc8, 0x59, 0xdf, 0x7c, 0xfd, + 0xfb, 0xeb, 0x9e, 0xf7, 0xea, 0x75, 0xcf, 0xfb, 0xf3, 0x75, 0xcf, 0xfb, 0xe5, 0x4d, 0xef, 0xca, + 0xab, 0x37, 0xbd, 0x2b, 0x7f, 0xbc, 0xe9, 0x5d, 0xf9, 0x71, 0x90, 0x52, 0x75, 0xbe, 0x9c, 0x8d, + 0x62, 0xbe, 0x18, 0x73, 0x26, 0x39, 0x13, 0x63, 0xf3, 0xe7, 0x62, 0xac, 0x7f, 0x12, 0xe9, 0xae, + 0x92, 0xb3, 0x86, 0xb9, 0x45, 0xef, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xfe, 0x6a, 0x5d, + 0x43, 0x09, 0x00, 0x00, } -func (m *Accumulator) Marshal() (dAtA []byte, err error) { +func (m *Alias) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1109,20 +951,34 @@ func (m *Accumulator) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Accumulator) MarshalTo(dAtA []byte) (int, error) { +func (m *Alias) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Accumulator) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Alias) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Accumulator) > 0 { - i -= len(m.Accumulator) - copy(dAtA[i:], m.Accumulator) - i = encodeVarintModels(dAtA, i, uint64(len(m.Accumulator))) + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x1a + } + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintModels(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x12 + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintModels(dAtA, i, uint64(len(m.Subject))) i-- dAtA[i] = 0xa } @@ -1149,19 +1005,60 @@ func (m *Credential) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) + if m.CloneWarning { i-- - dAtA[i] = 0x3a + if m.CloneWarning { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintModels(dAtA, i, uint64(len(m.Subject))) + if m.BackupState { i-- - dAtA[i] = 0x32 + if m.BackupState { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.BackupEligible { + i-- + if m.BackupEligible { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.UserVerified { + i-- + if m.UserVerified { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.UserPresent { + i-- + if m.UserPresent { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.SignCount != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.SignCount)) + i-- + dAtA[i] = 0x38 } if len(m.Transport) > 0 { for iNdEx := len(m.Transport) - 1; iNdEx >= 0; iNdEx-- { @@ -1169,87 +1066,43 @@ func (m *Credential) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Transport[iNdEx]) i = encodeVarintModels(dAtA, i, uint64(len(m.Transport[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintModels(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0x2a + } if len(m.CredentialId) > 0 { i -= len(m.CredentialId) copy(dAtA[i:], m.CredentialId) i = encodeVarintModels(dAtA, i, uint64(len(m.CredentialId))) i-- + dAtA[i] = 0x22 + } + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintModels(dAtA, i, uint64(len(m.Origin))) + i-- dAtA[i] = 0x1a } - if len(m.CredentialType) > 0 { - i -= len(m.CredentialType) - copy(dAtA[i:], m.CredentialType) - i = encodeVarintModels(dAtA, i, uint64(len(m.CredentialType))) + if len(m.AttestationType) > 0 { + i -= len(m.AttestationType) + copy(dAtA[i:], m.AttestationType) + i = encodeVarintModels(dAtA, i, uint64(len(m.AttestationType))) i-- dAtA[i] = 0x12 } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DID) 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 *DID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Paths) > 0 { - for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Paths[iNdEx]) - copy(dAtA[i:], m.Paths[iNdEx]) - i = encodeVarintModels(dAtA, i, uint64(len(m.Paths[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Identifier) > 0 { - i -= len(m.Identifier) - copy(dAtA[i:], m.Identifier) - i = encodeVarintModels(dAtA, i, uint64(len(m.Identifier))) - i-- - dAtA[i] = 0x22 - } if len(m.Subject) > 0 { i -= len(m.Subject) copy(dAtA[i:], m.Subject) i = encodeVarintModels(dAtA, i, uint64(len(m.Subject))) i-- - dAtA[i] = 0x1a - } - if len(m.Network) > 0 { - i -= len(m.Network) - copy(dAtA[i:], m.Network) - i = encodeVarintModels(dAtA, i, uint64(len(m.Network))) - i-- - dAtA[i] = 0x12 - } - if m.Method != 0 { - i = encodeVarintModels(dAtA, i, uint64(m.Method)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -1280,7 +1133,7 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Service[iNdEx]) i = encodeVarintModels(dAtA, i, uint64(len(m.Service[iNdEx]))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x3a } } if len(m.CapabilityInvocation) > 0 { @@ -1289,7 +1142,7 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.CapabilityInvocation[iNdEx]) i = encodeVarintModels(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x32 } } if len(m.CapabilityDelegation) > 0 { @@ -1298,7 +1151,7 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.CapabilityDelegation[iNdEx]) i = encodeVarintModels(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx]))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x2a } } if len(m.AssertionMethod) > 0 { @@ -1307,7 +1160,7 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.AssertionMethod[iNdEx]) i = encodeVarintModels(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } if len(m.Authentication) > 0 { @@ -1316,22 +1169,15 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Authentication[iNdEx]) i = encodeVarintModels(dAtA, i, uint64(len(m.Authentication[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } } - if len(m.VerificationMethods) > 0 { - for iNdEx := len(m.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintModels(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) @@ -1343,7 +1189,7 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *JWK) Marshal() (dAtA []byte, err error) { +func (m *Keyshare) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1353,94 +1199,48 @@ func (m *JWK) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JWK) MarshalTo(dAtA []byte) (int, error) { +func (m *Keyshare) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JWK) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Keyshare) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.E) > 0 { - i -= len(m.E) - copy(dAtA[i:], m.E) - i = encodeVarintModels(dAtA, i, uint64(len(m.E))) + if m.Role != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Role)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x30 } - if len(m.N) > 0 { - i -= len(m.N) - copy(dAtA[i:], m.N) - i = encodeVarintModels(dAtA, i, uint64(len(m.N))) + if m.Version != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Version)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x28 } - if len(m.Y) > 0 { - i -= len(m.Y) - copy(dAtA[i:], m.Y) - i = encodeVarintModels(dAtA, i, uint64(len(m.Y))) + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintModels(dAtA, i, uint64(len(m.PublicKey))) i-- dAtA[i] = 0x22 } - if len(m.X) > 0 { - i -= len(m.X) - copy(dAtA[i:], m.X) - i = encodeVarintModels(dAtA, i, uint64(len(m.X))) + if len(m.Protocol) > 0 { + i -= len(m.Protocol) + copy(dAtA[i:], m.Protocol) + i = encodeVarintModels(dAtA, i, uint64(len(m.Protocol))) i-- dAtA[i] = 0x1a } - if len(m.Crv) > 0 { - i -= len(m.Crv) - copy(dAtA[i:], m.Crv) - i = encodeVarintModels(dAtA, i, uint64(len(m.Crv))) - i-- - dAtA[i] = 0x12 - } - if len(m.Kty) > 0 { - i -= len(m.Kty) - copy(dAtA[i:], m.Kty) - i = encodeVarintModels(dAtA, i, uint64(len(m.Kty))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Metadata) 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 *Metadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Private) > 0 { - for k := range m.Private { - v := m.Private[k] + if len(m.Payloads) > 0 { + for k := range m.Payloads { + v := m.Payloads[k] baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintModels(dAtA, i, uint64(size)) - } + if len(v) > 0 { + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintModels(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 } @@ -1451,12 +1251,12 @@ func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintModels(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } - if len(m.Public) > 0 { - for k := range m.Public { - v := m.Public[k] + if len(m.Metadata) > 0 { + for k := range m.Metadata { + v := m.Metadata[k] baseI := i i -= len(v) copy(dAtA[i:], v) @@ -1470,16 +1270,9 @@ func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintModels(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } } - if len(m.OriginUri) > 0 { - i -= len(m.OriginUri) - copy(dAtA[i:], m.OriginUri) - i = encodeVarintModels(dAtA, i, uint64(len(m.OriginUri))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -1504,131 +1297,38 @@ func (m *Permissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.Scopes) > 0 { - dAtA3 := make([]byte, len(m.Scopes)*10) - var j2 int + dAtA2 := make([]byte, len(m.Scopes)*10) + var j1 int for _, num := range m.Scopes { for num >= 1<<7 { - dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j2++ + j1++ } - dAtA3[j2] = uint8(num) - j2++ + dAtA2[j1] = uint8(num) + j1++ } - i -= j2 - copy(dAtA[i:], dAtA3[:j2]) - i = encodeVarintModels(dAtA, i, uint64(j2)) + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintModels(dAtA, i, uint64(j1)) i-- dAtA[i] = 0x12 } if len(m.Grants) > 0 { - dAtA5 := make([]byte, len(m.Grants)*10) - var j4 int + dAtA4 := make([]byte, len(m.Grants)*10) + var j3 int for _, num := range m.Grants { for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j4++ + j3++ } - dAtA5[j4] = uint8(num) - j4++ + dAtA4[j3] = uint8(num) + j3++ } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintModels(dAtA, i, uint64(j4)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Profile) 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 *Profile) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintModels(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintModels(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Property) 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 *Property) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Property) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintModels(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Accumulator) > 0 { - i -= len(m.Accumulator) - copy(dAtA[i:], m.Accumulator) - i = encodeVarintModels(dAtA, i, uint64(len(m.Accumulator))) + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintModels(dAtA, i, uint64(j3)) i-- dAtA[i] = 0xa } @@ -1702,6 +1402,71 @@ func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PubKey_JWK) 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 *PubKey_JWK) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PubKey_JWK) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.E) > 0 { + i -= len(m.E) + copy(dAtA[i:], m.E) + i = encodeVarintModels(dAtA, i, uint64(len(m.E))) + i-- + dAtA[i] = 0x32 + } + if len(m.N) > 0 { + i -= len(m.N) + copy(dAtA[i:], m.N) + i = encodeVarintModels(dAtA, i, uint64(len(m.N))) + i-- + dAtA[i] = 0x2a + } + if len(m.Y) > 0 { + i -= len(m.Y) + copy(dAtA[i:], m.Y) + i = encodeVarintModels(dAtA, i, uint64(len(m.Y))) + i-- + dAtA[i] = 0x22 + } + if len(m.X) > 0 { + i -= len(m.X) + copy(dAtA[i:], m.X) + i = encodeVarintModels(dAtA, i, uint64(len(m.X))) + i-- + dAtA[i] = 0x1a + } + if len(m.Crv) > 0 { + i -= len(m.Crv) + copy(dAtA[i:], m.Crv) + i = encodeVarintModels(dAtA, i, uint64(len(m.Crv))) + i-- + dAtA[i] = 0x12 + } + if len(m.Kty) > 0 { + i -= len(m.Kty) + copy(dAtA[i:], m.Kty) + i = encodeVarintModels(dAtA, i, uint64(len(m.Kty))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Service) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1722,30 +1487,6 @@ func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintModels(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Openid != nil { - { - size, err := m.Openid.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintModels(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } if m.Permissions != nil { { size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) @@ -1756,19 +1497,52 @@ func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintModels(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x3a + } + if len(m.ServiceEndpoints) > 0 { + for k := range m.ServiceEndpoints { + v := m.ServiceEndpoints[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintModels(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintModels(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintModels(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintModels(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x2a } if len(m.Origin) > 0 { i -= len(m.Origin) copy(dAtA[i:], m.Origin) i = encodeVarintModels(dAtA, i, uint64(len(m.Origin))) i-- + dAtA[i] = 0x22 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintModels(dAtA, i, uint64(len(m.Authority))) + i-- dAtA[i] = 0x1a } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) + if len(m.ServiceType) > 0 { + i -= len(m.ServiceType) + copy(dAtA[i:], m.ServiceType) + i = encodeVarintModels(dAtA, i, uint64(len(m.ServiceType))) i-- dAtA[i] = 0x12 } @@ -1782,6 +1556,65 @@ func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ServiceInfo) 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 *ServiceInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Service != nil { + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Fingerprint) > 0 { + i -= len(m.Fingerprint) + copy(dAtA[i:], m.Fingerprint) + i = encodeVarintModels(dAtA, i, uint64(len(m.Fingerprint))) + i-- + dAtA[i] = 0x1a + } + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintModels(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x12 + } + if m.Exists { + i-- + if m.Exists { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *Token) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1826,97 +1659,6 @@ func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *VerificationMethod) 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 *VerificationMethod) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PublicKey != nil { - { - size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintModels(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Issuer) > 0 { - i -= len(m.Issuer) - copy(dAtA[i:], m.Issuer) - i = encodeVarintModels(dAtA, i, uint64(len(m.Issuer))) - i-- - dAtA[i] = 0x22 - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x1a - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if m.Method != 0 { - i = encodeVarintModels(dAtA, i, uint64(m.Method)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Witness) 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 *Witness) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Witness) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Witness) > 0 { - i -= len(m.Witness) - copy(dAtA[i:], m.Witness) - i = encodeVarintModels(dAtA, i, uint64(len(m.Witness))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintModels(dAtA []byte, offset int, v uint64) int { offset -= sovModels(v) base := offset @@ -1928,13 +1670,21 @@ func encodeVarintModels(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *Accumulator) Size() (n int) { +func (m *Alias) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Accumulator) + l = len(m.Subject) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Controller) if l > 0 { n += 1 + l + sovModels(uint64(l)) } @@ -1947,11 +1697,15 @@ func (m *Credential) Size() (n int) { } var l int _ = l - l = len(m.Id) + l = len(m.Subject) if l > 0 { n += 1 + l + sovModels(uint64(l)) } - l = len(m.CredentialType) + l = len(m.AttestationType) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Origin) if l > 0 { n += 1 + l + sovModels(uint64(l)) } @@ -1959,49 +1713,33 @@ func (m *Credential) Size() (n int) { if l > 0 { n += 1 + l + sovModels(uint64(l)) } + l = len(m.PublicKey) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } if len(m.Transport) > 0 { for _, s := range m.Transport { l = len(s) n += 1 + l + sovModels(uint64(l)) } } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) + if m.SignCount != 0 { + n += 1 + sovModels(uint64(m.SignCount)) } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) + if m.UserPresent { + n += 2 } - return n -} - -func (m *DID) Size() (n int) { - if m == nil { - return 0 + if m.UserVerified { + n += 2 } - var l int - _ = l - if m.Method != 0 { - n += 1 + sovModels(uint64(m.Method)) + if m.BackupEligible { + n += 2 } - l = len(m.Network) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) + if m.BackupState { + n += 2 } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.Identifier) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - if len(m.Paths) > 0 { - for _, s := range m.Paths { - l = len(s) - n += 1 + l + sovModels(uint64(l)) - } + if m.CloneWarning { + n += 2 } return n } @@ -2016,11 +1754,9 @@ func (m *Document) Size() (n int) { if l > 0 { n += 1 + l + sovModels(uint64(l)) } - if len(m.VerificationMethods) > 0 { - for _, e := range m.VerificationMethods { - l = e.Size() - n += 1 + l + sovModels(uint64(l)) - } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) } if len(m.Authentication) > 0 { for _, s := range m.Authentication { @@ -2055,70 +1791,46 @@ func (m *Document) Size() (n int) { return n } -func (m *JWK) Size() (n int) { +func (m *Keyshare) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Kty) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.Crv) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.X) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.Y) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.N) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.E) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - return n -} - -func (m *Metadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OriginUri) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - if len(m.Public) > 0 { - for k, v := range m.Public { + if len(m.Metadata) > 0 { + for k, v := range m.Metadata { _ = k _ = v mapEntrySize := 1 + len(k) + sovModels(uint64(len(k))) + 1 + len(v) + sovModels(uint64(len(v))) n += mapEntrySize + 1 + sovModels(uint64(mapEntrySize)) } } - if len(m.Private) > 0 { - for k, v := range m.Private { + if len(m.Payloads) > 0 { + for k, v := range m.Payloads { _ = k _ = v l = 0 - if v != nil { - l = v.Size() - l += 1 + sovModels(uint64(l)) + if len(v) > 0 { + l = 1 + len(v) + sovModels(uint64(len(v))) } mapEntrySize := 1 + len(k) + sovModels(uint64(len(k))) + l n += mapEntrySize + 1 + sovModels(uint64(mapEntrySize)) } } + l = len(m.Protocol) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.PublicKey) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Version != 0 { + n += 1 + sovModels(uint64(m.Version)) + } + if m.Role != 0 { + n += 1 + sovModels(uint64(m.Role)) + } return n } @@ -2145,48 +1857,6 @@ func (m *Permissions) Size() (n int) { return n } -func (m *Profile) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovModels(uint64(l)) - } - return n -} - -func (m *Property) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Accumulator) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - return n -} - func (m *PubKey) Size() (n int) { if m == nil { return 0 @@ -2219,6 +1889,39 @@ func (m *PubKey) Size() (n int) { return n } +func (m *PubKey_JWK) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Kty) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Crv) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.X) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Y) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.N) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.E) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + return n +} + func (m *Service) Size() (n int) { if m == nil { return 0 @@ -2229,7 +1932,11 @@ func (m *Service) Size() (n int) { if l > 0 { n += 1 + l + sovModels(uint64(l)) } - l = len(m.Controller) + l = len(m.ServiceType) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Authority) if l > 0 { n += 1 + l + sovModels(uint64(l)) } @@ -2237,16 +1944,44 @@ func (m *Service) Size() (n int) { if l > 0 { n += 1 + l + sovModels(uint64(l)) } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.ServiceEndpoints) > 0 { + for k, v := range m.ServiceEndpoints { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovModels(uint64(len(k))) + 1 + len(v) + sovModels(uint64(len(v))) + n += mapEntrySize + 1 + sovModels(uint64(mapEntrySize)) + } + } if m.Permissions != nil { l = m.Permissions.Size() n += 1 + l + sovModels(uint64(l)) } - if m.Openid != nil { - l = m.Openid.Size() + return n +} + +func (m *ServiceInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Exists { + n += 2 + } + l = len(m.Origin) + if l > 0 { n += 1 + l + sovModels(uint64(l)) } - if m.Metadata != nil { - l = m.Metadata.Size() + l = len(m.Fingerprint) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Service != nil { + l = m.Service.Size() n += 1 + l + sovModels(uint64(l)) } return n @@ -2273,54 +2008,13 @@ func (m *Token) Size() (n int) { return n } -func (m *VerificationMethod) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Method != 0 { - n += 1 + sovModels(uint64(m.Method)) - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.Issuer) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - if m.PublicKey != nil { - l = m.PublicKey.Size() - n += 1 + l + sovModels(uint64(l)) - } - return n -} - -func (m *Witness) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Witness) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - return n -} - func sovModels(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozModels(x uint64) (n int) { return sovModels(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Accumulator) Unmarshal(dAtA []byte) error { +func (m *Alias) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2343,17 +2037,17 @@ func (m *Accumulator) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Accumulator: wiretype end group for non-group") + return fmt.Errorf("proto: Alias: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Accumulator: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Alias: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accumulator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -2363,25 +2057,87 @@ func (m *Accumulator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthModels } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthModels } if postIndex > l { return io.ErrUnexpectedEOF } - m.Accumulator = append(m.Accumulator[:0], dAtA[iNdEx:postIndex]...) - if m.Accumulator == nil { - m.Accumulator = []byte{} + m.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2435,7 +2191,7 @@ func (m *Credential) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2463,11 +2219,11 @@ func (m *Credential) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.Subject = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2495,9 +2251,41 @@ func (m *Credential) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CredentialType = string(dAtA[iNdEx:postIndex]) + m.AttestationType = 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) } @@ -2531,7 +2319,41 @@ func (m *Credential) Unmarshal(dAtA []byte) error { m.CredentialId = []byte{} } iNdEx = postIndex - case 4: + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.PublicKey == nil { + m.PublicKey = []byte{} + } + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) } @@ -2563,125 +2385,11 @@ func (m *Credential) Unmarshal(dAtA []byte) error { } m.Transport = append(m.Transport, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 6: - 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 ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipModels(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthModels - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DID) 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 ErrIntOverflowModels - } - 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: DID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignCount", wireType) } - m.Method = 0 + m.SignCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -2691,16 +2399,16 @@ func (m *DID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Method |= DIDNamespace(b&0x7F) << shift + m.SignCount |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UserPresent", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -2710,29 +2418,17 @@ func (m *DID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthModels + m.UserPresent = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UserVerified", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Network = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -2742,29 +2438,17 @@ func (m *DID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthModels + m.UserVerified = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BackupEligible", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -2774,29 +2458,17 @@ func (m *DID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthModels + m.BackupEligible = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BackupState", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) - } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -2806,24 +2478,32 @@ func (m *DID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthModels + m.BackupState = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CloneWarning", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex + m.CloneWarning = bool(v != 0) default: iNdEx = preIndex skippy, err := skipModels(dAtA[iNdEx:]) @@ -2908,9 +2588,9 @@ func (m *Document) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -2920,27 +2600,25 @@ func (m *Document) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthModels } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthModels } if postIndex > l { return io.ErrUnexpectedEOF } - m.VerificationMethods = append(m.VerificationMethods, &VerificationMethod{}) - if err := m.VerificationMethods[len(m.VerificationMethods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) } @@ -2972,7 +2650,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AssertionMethod", wireType) } @@ -3004,7 +2682,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.AssertionMethod = append(m.AssertionMethod, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 7: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CapabilityDelegation", wireType) } @@ -3036,7 +2714,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.CapabilityDelegation = append(m.CapabilityDelegation, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 8: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CapabilityInvocation", wireType) } @@ -3068,7 +2746,7 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.CapabilityInvocation = append(m.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 9: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } @@ -3121,7 +2799,819 @@ func (m *Document) Unmarshal(dAtA []byte) error { } return nil } -func (m *JWK) Unmarshal(dAtA []byte) error { +func (m *Keyshare) 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 ErrIntOverflowModels + } + 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: Keyshare: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Keyshare: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthModels + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthModels + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthModels + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthModels + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Metadata[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payloads", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Payloads == nil { + m.Payloads = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthModels + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthModels + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthModels + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex < 0 { + return ErrInvalidLengthModels + } + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Payloads[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Protocol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.PublicKey == nil { + m.PublicKey = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Permissions) 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 ErrIntOverflowModels + } + 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: Permissions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v DIDNamespace + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Grants = append(m.Grants, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Grants) == 0 { + m.Grants = make([]DIDNamespace, 0, elementCount) + } + for iNdEx < postIndex { + var v DIDNamespace + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Grants = append(m.Grants, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) + } + case 2: + if wireType == 0 { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Scopes = append(m.Scopes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Scopes) == 0 { + m.Scopes = make([]PermissionScope, 0, elementCount) + } + for iNdEx < postIndex { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Scopes = append(m.Scopes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PubKey) 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 ErrIntOverflowModels + } + 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: PubKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= KeyRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) + } + m.Algorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Algorithm |= KeyAlgorithm(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + m.Encoding = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Encoding |= KeyEncoding(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType) + } + m.Curve = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Curve |= KeyCurve(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) + } + m.KeyType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeyType |= KeyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) + if m.Raw == nil { + m.Raw = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Jwk", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Jwk == nil { + m.Jwk = &PubKey_JWK{} + } + if err := m.Jwk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PubKey_JWK) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3363,7 +3853,7 @@ func (m *JWK) Unmarshal(dAtA []byte) error { } return nil } -func (m *Metadata) Unmarshal(dAtA []byte) error { +func (m *Service) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3386,15 +3876,15 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Metadata: wiretype end group for non-group") + return fmt.Errorf("proto: Service: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3422,11 +3912,139 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OriginUri = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Public", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ServiceType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3453,8 +4071,8 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Public == nil { - m.Public = make(map[string]string) + if m.ServiceEndpoints == nil { + m.ServiceEndpoints = make(map[string]string) } var mapkey string var mapvalue string @@ -3549,987 +4167,9 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Public[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Private", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Private == nil { - m.Private = make(map[string]*Property) - } - var mapkey string - var mapvalue *Property - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthModels - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthModels - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthModels - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthModels - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Property{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipModels(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthModels - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Private[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipModels(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthModels - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Permissions) 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 ErrIntOverflowModels - } - 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: Permissions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v DIDNamespace - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= DIDNamespace(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Grants = append(m.Grants, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Grants) == 0 { - m.Grants = make([]DIDNamespace, 0, elementCount) - } - for iNdEx < postIndex { - var v DIDNamespace - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= DIDNamespace(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Grants = append(m.Grants, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) - } - case 2: - if wireType == 0 { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Scopes = append(m.Scopes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Scopes) == 0 { - m.Scopes = make([]PermissionScope, 0, elementCount) - } - for iNdEx < postIndex { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Scopes = append(m.Scopes, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipModels(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthModels - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Profile) 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 ErrIntOverflowModels - } - 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: Profile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - 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 Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipModels(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthModels - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Property) 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 ErrIntOverflowModels - } - 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: Property: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Property: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accumulator", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Accumulator = append(m.Accumulator[:0], dAtA[iNdEx:postIndex]...) - if m.Accumulator == nil { - m.Accumulator = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipModels(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthModels - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PubKey) 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 ErrIntOverflowModels - } - 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: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - m.Role = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Role |= KeyRole(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) - } - m.Algorithm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Algorithm |= KeyAlgorithm(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) - } - m.Encoding = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Encoding |= KeyEncoding(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType) - } - m.Curve = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Curve |= KeyCurve(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) - } - m.KeyType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.KeyType |= KeyType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) - if m.Raw == nil { - m.Raw = []byte{} - } + m.ServiceEndpoints[mapkey] = mapvalue iNdEx = postIndex case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Jwk", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Jwk == nil { - m.Jwk = &JWK{} - } - if err := m.Jwk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipModels(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthModels - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Service) 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 ErrIntOverflowModels - } - 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: Service: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = 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 ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } @@ -4565,45 +4205,143 @@ func (m *Service) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Openid", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Openid == nil { - m.Openid = &OpenIDConfig{} - } - if err := m.Openid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 6: + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceInfo) 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 ErrIntOverflowModels + } + 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: ServiceInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Exists = bool(v != 0) + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fingerprint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Fingerprint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4630,10 +4368,10 @@ func (m *Service) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Metadata == nil { - m.Metadata = &Metadata{} + if m.Service == nil { + m.Service = &Service{} } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4806,291 +4544,6 @@ func (m *Token) Unmarshal(dAtA []byte) error { } return nil } -func (m *VerificationMethod) 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 ErrIntOverflowModels - } - 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: VerificationMethod: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerificationMethod: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) - } - m.Method = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Method |= DIDNamespace(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - 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 ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PublicKey == nil { - m.PublicKey = &PubKey{} - } - if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipModels(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthModels - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Witness) 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 ErrIntOverflowModels - } - 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: Witness: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Witness: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Witness", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Witness = append(m.Witness[:0], dAtA[iNdEx:postIndex]...) - if m.Witness == nil { - m.Witness = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipModels(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthModels - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipModels(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/did/types/pubkey.go b/x/did/types/pubkey.go index 442ad7dd0..e1a1ebec5 100644 --- a/x/did/types/pubkey.go +++ b/x/did/types/pubkey.go @@ -1,15 +1,44 @@ package types import ( - fmt "fmt" - "math/big" + "encoding/hex" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/onsonr/crypto/core/curves" - "github.com/onsonr/crypto/signatures/ecdsa" - "golang.org/x/crypto/sha3" + "github.com/mr-tron/base58/base58" + "github.com/onsonr/crypto" ) +var WalletKeyInfo = &KeyInfo{ + Role: KeyRole_KEY_ROLE_DELEGATION, + Curve: KeyCurve_KEY_CURVE_SECP256K1, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA, + Encoding: KeyEncoding_KEY_ENCODING_HEX, + Type: KeyType_KEY_TYPE_BIP32, +} + +var EthKeyInfo = &KeyInfo{ + Role: KeyRole_KEY_ROLE_DELEGATION, + Curve: KeyCurve_KEY_CURVE_KECCAK256, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA, + Encoding: KeyEncoding_KEY_ENCODING_HEX, + Type: KeyType_KEY_TYPE_BIP32, +} + +var SonrKeyInfo = &KeyInfo{ + Role: KeyRole_KEY_ROLE_INVOCATION, + Curve: KeyCurve_KEY_CURVE_P256, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA, + Encoding: KeyEncoding_KEY_ENCODING_HEX, + Type: KeyType_KEY_TYPE_MPC, +} + +var ChainCodeKeyInfos = map[ChainCode]*KeyInfo{ + ChainCodeBTC: WalletKeyInfo, + ChainCodeETH: EthKeyInfo, + ChainCodeSNR: SonrKeyInfo, + ChainCodeIBC: WalletKeyInfo, +} + // NewEthPublicKey returns a new ethereum public key func NewPublicKey(data []byte, keyInfo *KeyInfo) (*PubKey, error) { encKey, err := keyInfo.Encoding.EncodeRaw(data) @@ -52,21 +81,12 @@ func (k *PubKey) Clone() cryptotypes.PubKey { // VerifySignature verifies a signature over the given message func (k *PubKey) VerifySignature(msg []byte, sig []byte) bool { - pp, err := buildEcPoint(k.Bytes()) + pk, err := crypto.ComputeEcdsaPublicKey(k.Bytes()) + sigMpc, err := crypto.DeserializeMPCSignature(sig) if err != nil { return false } - sigEd, err := ecdsa.DeserializeSecp256k1Signature(sig) - if err != nil { - return false - } - hash := sha3.New256() - _, err = hash.Write(msg) - if err != nil { - return false - } - digest := hash.Sum(nil) - return curves.VerifyEcdsa(pp, digest[:], sigEd) + return crypto.VerifyMPCSignature(sigMpc, msg, pk) } // Equals returns true if two public keys are equal @@ -79,36 +99,43 @@ func (k *PubKey) Equals(k2 cryptotypes.PubKey) bool { // Type returns the type of the public key func (k *PubKey) Type() string { - return "" + return k.KeyType.String() } -// VerifySignature verifies the signature of a message -func VerifySignature(key []byte, msg []byte, sig []byte) bool { - pp, err := buildEcPoint(key) - if err != nil { - return false +// DecodePublicKey extracts the public key from the given data +func (k *KeyInfo) DecodePublicKey(data interface{}) ([]byte, error) { + var bz []byte + switch v := data.(type) { + case string: + bz = []byte(v) + case []byte: + bz = v + default: + return nil, ErrUnsupportedKeyEncoding } - sigEd, err := ecdsa.DeserializeSecp256k1Signature(sig) - if err != nil { - return false + + if k.Encoding == KeyEncoding_KEY_ENCODING_RAW { + return bz, nil } - hash := sha3.New256() - _, err = hash.Write(msg) - if err != nil { - return false + if k.Encoding == KeyEncoding_KEY_ENCODING_HEX { + return hex.DecodeString(string(bz)) } - digest := hash.Sum(nil) - return curves.VerifyEcdsa(pp, digest[:], sigEd) + if k.Encoding == KeyEncoding_KEY_ENCODING_MULTIBASE { + return base58.Decode(string(bz)) + } + return nil, ErrUnsupportedKeyEncoding } -// BuildEcPoint builds an elliptic curve point from a compressed byte slice -func buildEcPoint(pubKey []byte) (*curves.EcPoint, error) { - crv := curves.K256() - x := new(big.Int).SetBytes(pubKey[1:33]) - y := new(big.Int).SetBytes(pubKey[33:]) - ecCurve, err := crv.ToEllipticCurve() - if err != nil { - return nil, fmt.Errorf("error converting curve: %v", err) +// EncodePublicKey encodes the public key according to the KeyInfo's encoding +func (k *KeyInfo) EncodePublicKey(data []byte) (string, error) { + if k.Encoding == KeyEncoding_KEY_ENCODING_RAW { + return string(data), nil } - return &curves.EcPoint{X: x, Y: y, Curve: ecCurve}, nil + if k.Encoding == KeyEncoding_KEY_ENCODING_HEX { + return hex.EncodeToString(data), nil + } + if k.Encoding == KeyEncoding_KEY_ENCODING_MULTIBASE { + return base58.Encode(data), nil + } + return "", ErrUnsupportedKeyEncoding } diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index 7ca49dac0..33820131d 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -9,7 +9,6 @@ import ( grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" - _ "google.golang.org/genproto/googleapis/api/httpbody" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -31,10 +30,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Queryequest is the request type for the Query/Params RPC method. type QueryRequest struct { - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - Endpoint string `protobuf:"bytes,4,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` } func (m *QueryRequest) Reset() { *m = QueryRequest{} } @@ -84,85 +81,20 @@ func (m *QueryRequest) GetOrigin() string { return "" } -func (m *QueryRequest) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *QueryRequest) GetEndpoint() string { - if m != nil { - return m.Endpoint - } - return "" -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{1} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() *Params { - if m != nil { - return m.Params - } - return nil -} - -// QueryResponse is the response type for the Query/Exists RPC method. +// QueryResolveResponse is the response type for the Query/Resolve RPC method. type QueryResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - IpfsActive bool `protobuf:"varint,4,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` - Document *Document `protobuf:"bytes,6,opt,name=document,proto3" json:"document,omitempty"` - Service *Service `protobuf:"bytes,7,opt,name=service,proto3" json:"service,omitempty"` - Credentials []*Credential `protobuf:"bytes,8,rep,name=credentials,proto3" json:"credentials,omitempty"` - Token *Token `protobuf:"bytes,9,opt,name=token,proto3" json:"token,omitempty"` - Error string `protobuf:"bytes,10,opt,name=error,proto3" json:"error,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + Document *Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` + Service *ServiceInfo `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` } func (m *QueryResponse) Reset() { *m = QueryResponse{} } func (m *QueryResponse) String() string { return proto.CompactTextString(m) } func (*QueryResponse) ProtoMessage() {} func (*QueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{2} + return fileDescriptor_ae1fa9bb626e2869, []int{1} } func (m *QueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -198,34 +130,13 @@ func (m *QueryResponse) GetSuccess() bool { return false } -func (m *QueryResponse) GetSubject() string { +func (m *QueryResponse) GetQuery() string { if m != nil { - return m.Subject + return m.Query } return "" } -func (m *QueryResponse) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *QueryResponse) GetIpfsActive() bool { - if m != nil { - return m.IpfsActive - } - return false -} - -func (m *QueryResponse) GetParams() *Params { - if m != nil { - return m.Params - } - return nil -} - func (m *QueryResponse) GetDocument() *Document { if m != nil { return m.Document @@ -233,268 +144,55 @@ func (m *QueryResponse) GetDocument() *Document { return nil } -func (m *QueryResponse) GetService() *Service { +func (m *QueryResponse) GetService() *ServiceInfo { if m != nil { return m.Service } return nil } -func (m *QueryResponse) GetCredentials() []*Credential { - if m != nil { - return m.Credentials - } - return nil -} - -func (m *QueryResponse) GetToken() *Token { - if m != nil { - return m.Token - } - return nil -} - -func (m *QueryResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -// QueryResolveResponse is the response type for the Query/Resolve RPC method. -type QueryResolveResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - IpfsActive bool `protobuf:"varint,4,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` - Document *Document `protobuf:"bytes,6,opt,name=document,proto3" json:"document,omitempty"` - Credentials []*Credential `protobuf:"bytes,7,rep,name=credentials,proto3" json:"credentials,omitempty"` - Token *Token `protobuf:"bytes,8,opt,name=token,proto3" json:"token,omitempty"` -} - -func (m *QueryResolveResponse) Reset() { *m = QueryResolveResponse{} } -func (m *QueryResolveResponse) String() string { return proto.CompactTextString(m) } -func (*QueryResolveResponse) ProtoMessage() {} -func (*QueryResolveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{3} -} -func (m *QueryResolveResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryResolveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryResolveResponse.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 *QueryResolveResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResolveResponse.Merge(m, src) -} -func (m *QueryResolveResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryResolveResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResolveResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryResolveResponse proto.InternalMessageInfo - -func (m *QueryResolveResponse) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -func (m *QueryResolveResponse) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *QueryResolveResponse) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *QueryResolveResponse) GetIpfsActive() bool { - if m != nil { - return m.IpfsActive - } - return false -} - -func (m *QueryResolveResponse) GetParams() *Params { +func (m *QueryResponse) GetParams() *Params { if m != nil { return m.Params } return nil } -func (m *QueryResolveResponse) GetDocument() *Document { - if m != nil { - return m.Document - } - return nil -} - -func (m *QueryResolveResponse) GetCredentials() []*Credential { - if m != nil { - return m.Credentials - } - return nil -} - -func (m *QueryResolveResponse) GetToken() *Token { - if m != nil { - return m.Token - } - return nil -} - -// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -type QueryServiceResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - IpfsActive bool `protobuf:"varint,4,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` - Service *Service `protobuf:"bytes,6,opt,name=service,proto3" json:"service,omitempty"` -} - -func (m *QueryServiceResponse) Reset() { *m = QueryServiceResponse{} } -func (m *QueryServiceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryServiceResponse) ProtoMessage() {} -func (*QueryServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{4} -} -func (m *QueryServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryServiceResponse.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 *QueryServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryServiceResponse.Merge(m, src) -} -func (m *QueryServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryServiceResponse proto.InternalMessageInfo - -func (m *QueryServiceResponse) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -func (m *QueryServiceResponse) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *QueryServiceResponse) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *QueryServiceResponse) GetIpfsActive() bool { - if m != nil { - return m.IpfsActive - } - return false -} - -func (m *QueryServiceResponse) GetParams() *Params { - if m != nil { - return m.Params - } - return nil -} - -func (m *QueryServiceResponse) GetService() *Service { - if m != nil { - return m.Service - } - return nil -} - func init() { proto.RegisterType((*QueryRequest)(nil), "did.v1.QueryRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "did.v1.QueryParamsResponse") proto.RegisterType((*QueryResponse)(nil), "did.v1.QueryResponse") - proto.RegisterType((*QueryResolveResponse)(nil), "did.v1.QueryResolveResponse") - proto.RegisterType((*QueryServiceResponse)(nil), "did.v1.QueryServiceResponse") } func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) } var fileDescriptor_ae1fa9bb626e2869 = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xad, 0x1d, 0x62, 0xbb, 0x93, 0x16, 0xca, 0x26, 0x42, 0x6e, 0xa8, 0x4c, 0x65, 0x24, 0x54, - 0x24, 0x14, 0xab, 0x85, 0x23, 0x1c, 0xf8, 0xf8, 0x01, 0xad, 0xe1, 0x80, 0xb8, 0x20, 0xc7, 0x3b, - 0xa4, 0x0b, 0xc9, 0xae, 0xeb, 0xdd, 0x44, 0x54, 0x55, 0x2f, 0x1c, 0x38, 0x23, 0xf1, 0x57, 0xf8, - 0x11, 0x1c, 0x2b, 0x21, 0x21, 0x8e, 0xa8, 0xe5, 0xcc, 0x6f, 0x40, 0x59, 0xef, 0x06, 0x27, 0x52, - 0x2b, 0xb8, 0x21, 0x2e, 0x51, 0xe6, 0xbd, 0xe7, 0xd9, 0x37, 0xcf, 0xe3, 0x05, 0x42, 0x19, 0x4d, - 0x26, 0xdb, 0xc9, 0xc1, 0x18, 0xcb, 0xc3, 0x5e, 0x51, 0x0a, 0x25, 0x88, 0x47, 0x19, 0xed, 0x4d, - 0xb6, 0xbb, 0x1d, 0xc3, 0x0d, 0x90, 0xa3, 0x64, 0xb2, 0x62, 0xbb, 0x6d, 0x83, 0x8e, 0x04, 0xc5, - 0xa1, 0x05, 0x37, 0x06, 0x42, 0x0c, 0x86, 0x98, 0x64, 0x05, 0x4b, 0x32, 0xce, 0x85, 0xca, 0x14, - 0x13, 0xdc, 0xb2, 0xeb, 0x35, 0x76, 0x5f, 0xa9, 0xa2, 0x2f, 0xa8, 0x39, 0x2b, 0xe6, 0xb0, 0xb2, - 0x37, 0x3d, 0x3a, 0xc5, 0x83, 0x31, 0x4a, 0x45, 0xd6, 0xa0, 0x41, 0x19, 0x0d, 0x9d, 0x4d, 0x67, - 0x6b, 0x39, 0x9d, 0xfe, 0x25, 0xd7, 0xc0, 0x13, 0x25, 0x1b, 0x30, 0x1e, 0xba, 0x1a, 0x34, 0x15, - 0x09, 0xc1, 0x97, 0xe3, 0xfe, 0x6b, 0xcc, 0x55, 0xd8, 0xd0, 0x84, 0x2d, 0x49, 0x17, 0x02, 0xe4, - 0xb4, 0x10, 0x8c, 0xab, 0xf0, 0x92, 0xa6, 0x66, 0x75, 0xfc, 0x00, 0xda, 0xfa, 0xbc, 0xdd, 0xac, - 0xcc, 0x46, 0x32, 0x45, 0x59, 0x08, 0x2e, 0x91, 0xdc, 0x02, 0xaf, 0xd0, 0x88, 0x3e, 0xb9, 0xb5, - 0x73, 0xb9, 0x57, 0x65, 0xd0, 0x33, 0x3a, 0xc3, 0xc6, 0x3f, 0x5d, 0x58, 0x35, 0x7e, 0xcd, 0x93, - 0xda, 0x46, 0x9e, 0xa3, 0xac, 0x1e, 0x0d, 0x52, 0x5b, 0xd6, 0x0d, 0xba, 0xf3, 0x06, 0x7f, 0x8f, - 0xd4, 0x98, 0x1b, 0xe9, 0x06, 0xb4, 0x58, 0xf1, 0x4a, 0xbe, 0xcc, 0x72, 0xc5, 0x26, 0xa8, 0xbd, - 0x07, 0x29, 0x4c, 0xa1, 0x87, 0x1a, 0xa9, 0xd9, 0x6c, 0x5e, 0x64, 0x93, 0xdc, 0x81, 0x80, 0x8a, - 0x7c, 0x3c, 0x42, 0xae, 0x42, 0x4f, 0x2b, 0xd7, 0xac, 0xf2, 0x89, 0xc1, 0xd3, 0x99, 0x82, 0xdc, - 0x06, 0x5f, 0x62, 0x39, 0x61, 0x39, 0x86, 0xbe, 0x16, 0x5f, 0xb1, 0xe2, 0xa7, 0x15, 0x9c, 0x5a, - 0x9e, 0xdc, 0x83, 0x56, 0x5e, 0x22, 0x45, 0xae, 0x58, 0x36, 0x94, 0x61, 0xb0, 0xd9, 0xd8, 0x6a, - 0xed, 0x10, 0x2b, 0x7f, 0x3c, 0xa3, 0xd2, 0xba, 0x8c, 0xdc, 0x84, 0xa6, 0x12, 0x6f, 0x90, 0x87, - 0xcb, 0xba, 0xfd, 0xaa, 0xd5, 0x3f, 0x9b, 0x82, 0x69, 0xc5, 0x91, 0x0e, 0x34, 0xb1, 0x2c, 0x45, - 0x19, 0x82, 0xce, 0xa4, 0x2a, 0xe2, 0x4f, 0x2e, 0x74, 0x6c, 0xe0, 0x62, 0x38, 0xc1, 0xff, 0x29, - 0xf7, 0x85, 0x30, 0xfd, 0xbf, 0x0c, 0x33, 0x38, 0x3f, 0xcc, 0xf8, 0xab, 0x63, 0x62, 0xb3, 0x6f, - 0xf0, 0x9f, 0x8e, 0xad, 0xb6, 0x80, 0xde, 0xc5, 0x0b, 0xb8, 0xf3, 0xde, 0x85, 0xa6, 0x1e, 0x8c, - 0xec, 0x82, 0x57, 0xb5, 0x21, 0x1d, 0xab, 0xae, 0xdf, 0x24, 0xdd, 0xeb, 0x73, 0xe8, 0xfc, 0xf7, - 0x1e, 0xb7, 0xdf, 0x7d, 0xf9, 0xf1, 0xd1, 0x5d, 0x25, 0xad, 0x64, 0x7a, 0x9b, 0x19, 0x1b, 0x7b, - 0xe0, 0x9b, 0x2d, 0x3b, 0xa7, 0xe5, 0xc6, 0x02, 0x3a, 0xb7, 0x91, 0x31, 0xd1, 0x3d, 0x57, 0x08, - 0xe8, 0x9e, 0x47, 0x94, 0xd1, 0x63, 0xf2, 0x1c, 0x7c, 0x33, 0xc2, 0x1f, 0xb5, 0x5c, 0x78, 0x5b, - 0xf1, 0xba, 0x6e, 0xd9, 0x26, 0x57, 0x13, 0x33, 0x7f, 0x72, 0x54, 0x65, 0x7f, 0xfc, 0xe8, 0xfe, - 0xe7, 0xd3, 0xc8, 0x39, 0x39, 0x8d, 0x9c, 0xef, 0xa7, 0x91, 0xf3, 0xe1, 0x2c, 0x5a, 0x3a, 0x39, - 0x8b, 0x96, 0xbe, 0x9d, 0x45, 0x4b, 0x2f, 0xe2, 0x01, 0x53, 0xfb, 0xe3, 0x7e, 0x2f, 0x17, 0xa3, - 0x44, 0x70, 0x29, 0x78, 0x99, 0xe8, 0x9f, 0xb7, 0xda, 0x97, 0x3a, 0x2c, 0x50, 0xf6, 0x3d, 0x7d, - 0xfb, 0xde, 0xfd, 0x15, 0x00, 0x00, 0xff, 0xff, 0xaf, 0xf3, 0x66, 0xb2, 0xff, 0x05, 0x00, 0x00, + // 404 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xb1, 0xae, 0xd3, 0x30, + 0x18, 0x85, 0xeb, 0x7b, 0x69, 0x72, 0x71, 0x5b, 0x54, 0xfe, 0x14, 0x14, 0x2a, 0x14, 0x55, 0x19, + 0x50, 0x07, 0x88, 0xd5, 0xb2, 0x30, 0x30, 0x21, 0x16, 0x3a, 0xd1, 0xb0, 0xb1, 0xa5, 0xb1, 0x09, + 0x96, 0x1a, 0x3b, 0x8d, 0x93, 0x88, 0xaa, 0xea, 0xc2, 0x13, 0x20, 0xf1, 0x4a, 0x0c, 0x8c, 0x95, + 0x58, 0x18, 0x51, 0xcb, 0x13, 0xf0, 0x04, 0xa8, 0xb6, 0x83, 0xd0, 0xdd, 0xba, 0x44, 0xf9, 0xcf, + 0x39, 0xfe, 0x94, 0xf3, 0xc7, 0x18, 0x28, 0xa7, 0xa4, 0x99, 0x91, 0x4d, 0xcd, 0xca, 0x6d, 0x54, + 0x94, 0xb2, 0x92, 0xe0, 0x50, 0x4e, 0xa3, 0x66, 0x36, 0x1e, 0x59, 0x2f, 0x63, 0x82, 0x29, 0xae, + 0x8c, 0x3b, 0xf6, 0xac, 0x9a, 0x4b, 0xca, 0xd6, 0xad, 0xf8, 0x38, 0x93, 0x32, 0x5b, 0x33, 0x92, + 0x14, 0x9c, 0x24, 0x42, 0xc8, 0x2a, 0xa9, 0xb8, 0x14, 0xd6, 0x0d, 0x5f, 0xe0, 0xfe, 0xf2, 0xcc, + 0x8f, 0xd9, 0xa6, 0x66, 0xaa, 0x82, 0x21, 0xbe, 0xa6, 0x9c, 0xfa, 0x68, 0x82, 0xa6, 0x77, 0xe3, + 0xf3, 0x2b, 0x3c, 0xc4, 0x8e, 0x2c, 0x79, 0xc6, 0x85, 0x7f, 0xa5, 0x45, 0x3b, 0x85, 0xdf, 0x10, + 0x1e, 0xd8, 0xa3, 0xaa, 0x90, 0x42, 0x31, 0xf0, 0xb1, 0xab, 0xea, 0x34, 0x65, 0x4a, 0xe9, 0xf3, + 0x37, 0x71, 0x3b, 0xc2, 0x08, 0x77, 0x75, 0x0b, 0x8b, 0x30, 0x03, 0x3c, 0xc5, 0x37, 0x54, 0xa6, + 0x75, 0xce, 0x44, 0xe5, 0x5f, 0x4f, 0xd0, 0xb4, 0x37, 0x1f, 0x46, 0xa6, 0x5f, 0xf4, 0xda, 0xea, + 0xf1, 0xbf, 0x04, 0x3c, 0xc3, 0xae, 0x62, 0x65, 0xc3, 0x53, 0xe6, 0xdf, 0xd1, 0x61, 0xaf, 0x0d, + 0xbf, 0x33, 0xf2, 0x1b, 0xf1, 0x41, 0xc6, 0x6d, 0x06, 0x9e, 0x60, 0xa7, 0x48, 0xca, 0x24, 0x57, + 0x7e, 0x57, 0xa7, 0xef, 0xb5, 0xe9, 0xb7, 0x5a, 0x8d, 0xad, 0x3b, 0xff, 0x83, 0x70, 0x57, 0xd7, + 0x80, 0x05, 0x76, 0x8c, 0x07, 0xa3, 0x36, 0xfb, 0xff, 0x6a, 0xc6, 0x0f, 0x6e, 0xa9, 0xa6, 0x75, + 0xe8, 0x7d, 0xfe, 0xf1, 0xfb, 0xeb, 0xd5, 0x00, 0x7a, 0xe4, 0xbc, 0x7d, 0x43, 0x85, 0x05, 0x76, + 0x63, 0xa6, 0xe4, 0xba, 0x61, 0x97, 0xc1, 0x40, 0xc3, 0xfa, 0x80, 0x35, 0x6c, 0x47, 0x39, 0xdd, + 0xc3, 0x12, 0xbb, 0xb6, 0xe1, 0x65, 0xac, 0x47, 0x9a, 0xe5, 0xc1, 0x7d, 0x62, 0x77, 0x42, 0x76, + 0xe6, 0xd7, 0xed, 0x5f, 0xbd, 0xfc, 0x7e, 0x0c, 0xd0, 0xe1, 0x18, 0xa0, 0x5f, 0xc7, 0x00, 0x7d, + 0x39, 0x05, 0x9d, 0xc3, 0x29, 0xe8, 0xfc, 0x3c, 0x05, 0x9d, 0xf7, 0x61, 0xc6, 0xab, 0x8f, 0xf5, + 0x2a, 0x4a, 0x65, 0x4e, 0xa4, 0x50, 0x52, 0x94, 0x44, 0x3f, 0x3e, 0xe9, 0x0f, 0xaa, 0xb6, 0x05, + 0x53, 0x2b, 0x47, 0x5f, 0x9d, 0xe7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe3, 0xbf, 0x74, 0xaf, + 0xa1, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -510,11 +208,13 @@ 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 QueryClient interface { // Params queries all parameters of the module. - Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // Resolve queries the DID document by its id. - Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) + Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // Service returns associated ServiceInfo for a given Origin - Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) + // if the servie is not found, a fingerprint is generated to be used + // as a TXT record in DNS. v=sonr, o=origin, p=protocol + Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) } type queryClient struct { @@ -525,8 +225,8 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) +func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { + out := new(QueryResponse) err := c.cc.Invoke(ctx, "/did.v1.Query/Params", in, out, opts...) if err != nil { return nil, err @@ -534,8 +234,8 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc return out, nil } -func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { - out := new(QueryResolveResponse) +func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { + out := new(QueryResponse) err := c.cc.Invoke(ctx, "/did.v1.Query/Resolve", in, out, opts...) if err != nil { return nil, err @@ -543,8 +243,8 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp return out, nil } -func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) { - out := new(QueryServiceResponse) +func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { + out := new(QueryResponse) err := c.cc.Invoke(ctx, "/did.v1.Query/Service", in, out, opts...) if err != nil { return nil, err @@ -555,24 +255,26 @@ func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grp // QueryServer is the server API for Query service. type QueryServer interface { // Params queries all parameters of the module. - Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) + Params(context.Context, *QueryRequest) (*QueryResponse, error) // Resolve queries the DID document by its id. - Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) + Resolve(context.Context, *QueryRequest) (*QueryResponse, error) // Service returns associated ServiceInfo for a given Origin - Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) + // if the servie is not found, a fingerprint is generated to be used + // as a TXT record in DNS. v=sonr, o=origin, p=protocol + Service(context.Context, *QueryRequest) (*QueryResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryRequest) (*QueryParamsResponse, error) { +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryRequest) (*QueryResolveResponse, error) { +func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") } -func (*UnimplementedQueryServer) Service(ctx context.Context, req *QueryRequest) (*QueryServiceResponse, error) { +func (*UnimplementedQueryServer) Service(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") } @@ -675,20 +377,6 @@ func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Endpoint) > 0 { - i -= len(m.Endpoint) - copy(dAtA[i:], m.Endpoint) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Endpoint))) - i-- - dAtA[i] = 0x22 - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x1a - } if len(m.Origin) > 0 { i -= len(m.Origin) copy(dAtA[i:], m.Origin) @@ -706,41 +394,6 @@ func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -761,16 +414,9 @@ func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x52 - } - if m.Token != nil { + if m.Params != nil { { - size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -778,21 +424,7 @@ func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x4a - } - if len(m.Credentials) > 0 { - for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } + dAtA[i] = 0x2a } if m.Service != nil { { @@ -804,7 +436,7 @@ func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a + dAtA[i] = 0x22 } if m.Document != nil { { @@ -816,229 +448,12 @@ func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 - } - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.IpfsActive { - i-- - if m.IpfsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) - i-- dAtA[i] = 0x1a } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x12 - } - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryResolveResponse) 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 *QueryResolveResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Token != nil { - { - size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if len(m.Credentials) > 0 { - for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.Document != nil { - { - size, err := m.Document.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.IpfsActive { - i-- - if m.IpfsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x12 - } - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryServiceResponse) 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 *QueryServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Service != nil { - { - size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.IpfsActive { - i-- - if m.IpfsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Subject))) + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Query))) i-- dAtA[i] = 0x12 } @@ -1080,27 +495,6 @@ func (m *QueryRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Endpoint) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - } return n } @@ -1113,21 +507,10 @@ func (m *QueryResponse) Size() (n int) { if m.Success { n += 2 } - l = len(m.Subject) + l = len(m.Query) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.IpfsActive { - n += 2 - } - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - } if m.Document != nil { l = m.Document.Size() n += 1 + l + sovQuery(uint64(l)) @@ -1136,92 +519,10 @@ func (m *QueryResponse) Size() (n int) { l = m.Service.Size() n += 1 + l + sovQuery(uint64(l)) } - if len(m.Credentials) > 0 { - for _, e := range m.Credentials { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Token != nil { - l = m.Token.Size() - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryResolveResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Success { - n += 2 - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.IpfsActive { - n += 2 - } if m.Params != nil { l = m.Params.Size() n += 1 + l + sovQuery(uint64(l)) } - if m.Document != nil { - l = m.Document.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if len(m.Credentials) > 0 { - for _, e := range m.Credentials { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Token != nil { - l = m.Token.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Success { - n += 2 - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.IpfsActive { - n += 2 - } - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.Service != nil { - l = m.Service.Size() - n += 1 + l + sovQuery(uint64(l)) - } return n } @@ -1324,156 +625,6 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } m.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", 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.Endpoint = 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 *QueryParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Params == nil { - m.Params = &Params{} - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1546,7 +697,7 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { m.Success = bool(v != 0) case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1574,97 +725,9 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Subject = string(dAtA[iNdEx:postIndex]) + m.Query = 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 ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", 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.IpfsActive = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Params == nil { - m.Params = &Params{} - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } @@ -1700,7 +763,7 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } @@ -1730,268 +793,12 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Service == nil { - m.Service = &Service{} + m.Service = &ServiceInfo{} } if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credentials = append(m.Credentials, &Credential{}) - if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token == nil { - m.Token = &Token{} - } - if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = 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 *QueryResolveResponse) 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: QueryResolveResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResolveResponse: 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 Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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 ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", 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.IpfsActive = bool(v != 0) case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) @@ -2028,338 +835,6 @@ func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Document == nil { - m.Document = &Document{} - } - if err := m.Document.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credentials = append(m.Credentials, &Credential{}) - if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token == nil { - m.Token = &Token{} - } - if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryServiceResponse) 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: QueryServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryServiceResponse: 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 Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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 ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", 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.IpfsActive = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Params == nil { - m.Params = &Params{} - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", 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.Service == nil { - m.Service = &Service{} - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/did/types/serivce.go b/x/did/types/serivce.go deleted file mode 100644 index 101dd03ee..000000000 --- a/x/did/types/serivce.go +++ /dev/null @@ -1,28 +0,0 @@ -package types - -import didv1 "github.com/onsonr/sonr/api/did/v1" - -func (m *MsgRegisterService) ExtractServiceRecord() (*didv1.ServiceRecord, error) { - return &didv1.ServiceRecord{ - Controller: m.Controller, - OriginUri: m.OriginUri, - Description: m.Description, - Permissions: convertPermissions(m.GetScopes()), - }, nil -} - -func convertPermissions(permissions *Permissions) *didv1.Permissions { - if permissions == nil { - return nil - } - return &didv1.Permissions{} -} - -// UserInfo represents the user information. -type UserInfo struct { - DID string `json:"did"` - Sub string `json:"sub"` - Name string `json:"name"` - Email string `json:"email"` - // Add other claims as needed -} diff --git a/x/did/types/state.go b/x/did/types/state.go deleted file mode 100644 index e490eec6d..000000000 --- a/x/did/types/state.go +++ /dev/null @@ -1,12 +0,0 @@ -package types - -// ByteArray is a list of byte arrays -type ByteArray = [][]byte - -// ToVerificationMethod converts a Profile to a VerificationMethod -func (p Profile) ToVerificationMethod() VerificationMethod { - return VerificationMethod{ - Id: p.Id, - Controller: p.Controller, - } -} diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index f270dfdcd..abcceec7f 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -23,42 +23,38 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Authentication represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) -type Authentication struct { - // The unique identifier of the attestation +// Account represents a wallet account associated with a DID Controller +type Account struct { + // The unique identifier of the account Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The controller of the attestation + // The controller of the account Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave") - PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The origin of the attestation - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` - // The subject of the attestation - Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // The value of the linked identifier - CredentialId []byte `protobuf:"bytes,6,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - // The credential label - CredentialLabel string `protobuf:"bytes,7,opt,name=credential_label,json=credentialLabel,proto3" json:"credential_label,omitempty"` - // The display label of the attestation - CredentialTransport []string `protobuf:"bytes,8,rep,name=credential_transport,json=credentialTransport,proto3" json:"credential_transport,omitempty"` - // The attestationtype of the attestation - AttestationType string `protobuf:"bytes,9,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` - // Metadata is optional additional information about the assertion - Metadata *Metadata `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` + PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The address of the account + Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` + // The label of the account + Label string `protobuf:"bytes,5,opt,name=label,proto3" json:"label,omitempty"` + // The bip32 chain code + ChainCode uint32 `protobuf:"varint,6,opt,name=chain_code,json=chainCode,proto3" json:"chain_code,omitempty"` + // The index of the account + Index uint32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` + // The supported chains of the account + Chains []string `protobuf:"bytes,8,rep,name=chains,proto3" json:"chains,omitempty"` } -func (m *Authentication) Reset() { *m = Authentication{} } -func (m *Authentication) String() string { return proto.CompactTextString(m) } -func (*Authentication) ProtoMessage() {} -func (*Authentication) Descriptor() ([]byte, []int) { +func (m *Account) Reset() { *m = Account{} } +func (m *Account) String() string { return proto.CompactTextString(m) } +func (*Account) ProtoMessage() {} +func (*Account) Descriptor() ([]byte, []int) { return fileDescriptor_f44bb702879c34b4, []int{0} } -func (m *Authentication) XXX_Unmarshal(b []byte) error { +func (m *Account) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Authentication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Authentication.Marshal(b, m, deterministic) + return xxx_messageInfo_Account.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -68,175 +64,70 @@ func (m *Authentication) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *Authentication) XXX_Merge(src proto.Message) { - xxx_messageInfo_Authentication.Merge(m, src) +func (m *Account) XXX_Merge(src proto.Message) { + xxx_messageInfo_Account.Merge(m, src) } -func (m *Authentication) XXX_Size() int { +func (m *Account) XXX_Size() int { return m.Size() } -func (m *Authentication) XXX_DiscardUnknown() { - xxx_messageInfo_Authentication.DiscardUnknown(m) +func (m *Account) XXX_DiscardUnknown() { + xxx_messageInfo_Account.DiscardUnknown(m) } -var xxx_messageInfo_Authentication proto.InternalMessageInfo +var xxx_messageInfo_Account proto.InternalMessageInfo -func (m *Authentication) GetId() string { +func (m *Account) GetId() string { if m != nil { return m.Id } return "" } -func (m *Authentication) GetController() string { +func (m *Account) GetController() string { if m != nil { return m.Controller } return "" } -func (m *Authentication) GetPublicKey() *PubKey { +func (m *Account) GetPublicKey() *PubKey { if m != nil { return m.PublicKey } return nil } -func (m *Authentication) GetOrigin() string { +func (m *Account) GetAddress() string { if m != nil { - return m.Origin + return m.Address } return "" } -func (m *Authentication) GetSubject() string { +func (m *Account) GetLabel() string { if m != nil { - return m.Subject + return m.Label } return "" } -func (m *Authentication) GetCredentialId() []byte { +func (m *Account) GetChainCode() uint32 { if m != nil { - return m.CredentialId + return m.ChainCode } - return nil + return 0 } -func (m *Authentication) GetCredentialLabel() string { +func (m *Account) GetIndex() uint32 { if m != nil { - return m.CredentialLabel + return m.Index } - return "" + return 0 } -func (m *Authentication) GetCredentialTransport() []string { +func (m *Account) GetChains() []string { if m != nil { - return m.CredentialTransport - } - return nil -} - -func (m *Authentication) GetAttestationType() string { - if m != nil { - return m.AttestationType - } - return "" -} - -func (m *Authentication) GetMetadata() *Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -// Assertion represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) -type Assertion struct { - // The unique identifier of the attestation - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The type of the linked identifier (e.g., "crypto", "github", "email", "phone") - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // The value of the linked identifier - PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The origin of the attestation - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` - // The subject of the attestation - Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` - // The controller of the attestation - Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (m *Assertion) Reset() { *m = Assertion{} } -func (m *Assertion) String() string { return proto.CompactTextString(m) } -func (*Assertion) ProtoMessage() {} -func (*Assertion) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{1} -} -func (m *Assertion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Assertion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Assertion.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 *Assertion) XXX_Merge(src proto.Message) { - xxx_messageInfo_Assertion.Merge(m, src) -} -func (m *Assertion) XXX_Size() int { - return m.Size() -} -func (m *Assertion) XXX_DiscardUnknown() { - xxx_messageInfo_Assertion.DiscardUnknown(m) -} - -var xxx_messageInfo_Assertion proto.InternalMessageInfo - -func (m *Assertion) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Assertion) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *Assertion) GetPublicKey() *PubKey { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *Assertion) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *Assertion) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *Assertion) GetMetadata() *Metadata { - if m != nil { - return m.Metadata + return m.Chains } return nil } @@ -248,18 +139,20 @@ type Controller struct { // The DID of the controller Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Aliases of the controller - Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` + Aliases []*Alias `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` // PubKey is the verification method PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The vault address or identifier VaultCid string `protobuf:"bytes,5,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` + // The Authentications of the controller + Authentication []*Credential `protobuf:"bytes,6,rep,name=authentication,proto3" json:"authentication,omitempty"` } func (m *Controller) Reset() { *m = Controller{} } func (m *Controller) String() string { return proto.CompactTextString(m) } func (*Controller) ProtoMessage() {} func (*Controller) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{2} + return fileDescriptor_f44bb702879c34b4, []int{1} } func (m *Controller) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +195,7 @@ func (m *Controller) GetAddress() string { return "" } -func (m *Controller) GetAliases() []string { +func (m *Controller) GetAliases() []*Alias { if m != nil { return m.Aliases } @@ -323,36 +216,41 @@ func (m *Controller) GetVaultCid() string { return "" } -// Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC) -type Delegation struct { - // The unique identifier of the delegation - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The Decentralized Identifier of the delegated account - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Resolved from module parameters - ChainIndex string `protobuf:"bytes,3,opt,name=chain_index,json=chainIndex,proto3" json:"chain_index,omitempty"` - // The delegation proof or verification method - PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The Account Address - AccountAddress string `protobuf:"bytes,5,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` - // The Account label - AccountLabel string `protobuf:"bytes,6,opt,name=account_label,json=accountLabel,proto3" json:"account_label,omitempty"` - // The Chain ID - ChainId string `protobuf:"bytes,7,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +func (m *Controller) GetAuthentication() []*Credential { + if m != nil { + return m.Authentication + } + return nil } -func (m *Delegation) Reset() { *m = Delegation{} } -func (m *Delegation) String() string { return proto.CompactTextString(m) } -func (*Delegation) ProtoMessage() {} -func (*Delegation) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{3} +// Proof represents a verifiable credential +type Proof struct { + // The unique identifier of the proof + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The controller of the proof + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + // The value of the linked identifier + Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"` + // The property of the proof + Property string `protobuf:"bytes,4,opt,name=property,proto3" json:"property,omitempty"` + // The accumulator of the proof + Accumulator []byte `protobuf:"bytes,5,opt,name=accumulator,proto3" json:"accumulator,omitempty"` + // The secret key of the proof + Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` } -func (m *Delegation) XXX_Unmarshal(b []byte) error { + +func (m *Proof) Reset() { *m = Proof{} } +func (m *Proof) String() string { return proto.CompactTextString(m) } +func (*Proof) ProtoMessage() {} +func (*Proof) Descriptor() ([]byte, []int) { + return fileDescriptor_f44bb702879c34b4, []int{2} +} +func (m *Proof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Delegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Delegation.Marshal(b, m, deterministic) + return xxx_messageInfo_Proof.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -362,65 +260,58 @@ func (m *Delegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Delegation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Delegation.Merge(m, src) +func (m *Proof) XXX_Merge(src proto.Message) { + xxx_messageInfo_Proof.Merge(m, src) } -func (m *Delegation) XXX_Size() int { +func (m *Proof) XXX_Size() int { return m.Size() } -func (m *Delegation) XXX_DiscardUnknown() { - xxx_messageInfo_Delegation.DiscardUnknown(m) +func (m *Proof) XXX_DiscardUnknown() { + xxx_messageInfo_Proof.DiscardUnknown(m) } -var xxx_messageInfo_Delegation proto.InternalMessageInfo +var xxx_messageInfo_Proof proto.InternalMessageInfo -func (m *Delegation) GetId() string { +func (m *Proof) GetId() string { if m != nil { return m.Id } return "" } -func (m *Delegation) GetController() string { +func (m *Proof) GetController() string { if m != nil { return m.Controller } return "" } -func (m *Delegation) GetChainIndex() string { +func (m *Proof) GetIssuer() string { if m != nil { - return m.ChainIndex + return m.Issuer } return "" } -func (m *Delegation) GetPublicKey() *PubKey { +func (m *Proof) GetProperty() string { if m != nil { - return m.PublicKey + return m.Property + } + return "" +} + +func (m *Proof) GetAccumulator() []byte { + if m != nil { + return m.Accumulator } return nil } -func (m *Delegation) GetAccountAddress() string { +func (m *Proof) GetKey() []byte { if m != nil { - return m.AccountAddress + return m.Key } - return "" -} - -func (m *Delegation) GetAccountLabel() string { - if m != nil { - return m.AccountLabel - } - return "" -} - -func (m *Delegation) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" + return nil } // ServiceRecord represents a decentralized service in a DID Document @@ -429,25 +320,23 @@ type ServiceRecord struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the service ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` - // The controller DID of the service - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` + // The authority DID of the service + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` // The domain name of the service - OriginUri string `protobuf:"bytes,4,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` // The description of the service Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // The service endpoint ServiceEndpoints map[string]string `protobuf:"bytes,6,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Scopes is the Authorization Grants of the service Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"` - // Metadata is optional additional information about the service - Metadata *Metadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *ServiceRecord) Reset() { *m = ServiceRecord{} } func (m *ServiceRecord) String() string { return proto.CompactTextString(m) } func (*ServiceRecord) ProtoMessage() {} func (*ServiceRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{4} + return fileDescriptor_f44bb702879c34b4, []int{3} } func (m *ServiceRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -490,16 +379,16 @@ func (m *ServiceRecord) GetServiceType() string { return "" } -func (m *ServiceRecord) GetController() string { +func (m *ServiceRecord) GetAuthority() string { if m != nil { - return m.Controller + return m.Authority } return "" } -func (m *ServiceRecord) GetOriginUri() string { +func (m *ServiceRecord) GetOrigin() string { if m != nil { - return m.OriginUri + return m.Origin } return "" } @@ -525,82 +414,165 @@ func (m *ServiceRecord) GetPermissions() *Permissions { return nil } -func (m *ServiceRecord) GetMetadata() *Metadata { +// Verification reprsents a method of verifying membership in a DID +type VerificationMethod struct { + // The unique identifier of the verification + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The controller of the verification + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + // The DIDNamespace of the verification + Method DIDNamespace `protobuf:"varint,3,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + // The value of the linked identifier + Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"` + // The subject of the verification + Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` + // The public key of the verification + PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (m *VerificationMethod) Reset() { *m = VerificationMethod{} } +func (m *VerificationMethod) String() string { return proto.CompactTextString(m) } +func (*VerificationMethod) ProtoMessage() {} +func (*VerificationMethod) Descriptor() ([]byte, []int) { + return fileDescriptor_f44bb702879c34b4, []int{4} +} +func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VerificationMethod.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 *VerificationMethod) XXX_Merge(src proto.Message) { + xxx_messageInfo_VerificationMethod.Merge(m, src) +} +func (m *VerificationMethod) XXX_Size() int { + return m.Size() +} +func (m *VerificationMethod) XXX_DiscardUnknown() { + xxx_messageInfo_VerificationMethod.DiscardUnknown(m) +} + +var xxx_messageInfo_VerificationMethod proto.InternalMessageInfo + +func (m *VerificationMethod) GetId() string { if m != nil { - return m.Metadata + return m.Id + } + return "" +} + +func (m *VerificationMethod) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *VerificationMethod) GetMethod() DIDNamespace { + if m != nil { + return m.Method + } + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED +} + +func (m *VerificationMethod) GetIssuer() string { + if m != nil { + return m.Issuer + } + return "" +} + +func (m *VerificationMethod) GetSubject() string { + if m != nil { + return m.Subject + } + return "" +} + +func (m *VerificationMethod) GetPublicKey() *PubKey { + if m != nil { + return m.PublicKey } return nil } func init() { - proto.RegisterType((*Authentication)(nil), "did.v1.Authentication") - proto.RegisterType((*Assertion)(nil), "did.v1.Assertion") + proto.RegisterType((*Account)(nil), "did.v1.Account") proto.RegisterType((*Controller)(nil), "did.v1.Controller") - proto.RegisterType((*Delegation)(nil), "did.v1.Delegation") + proto.RegisterType((*Proof)(nil), "did.v1.Proof") proto.RegisterType((*ServiceRecord)(nil), "did.v1.ServiceRecord") proto.RegisterMapType((map[string]string)(nil), "did.v1.ServiceRecord.ServiceEndpointsEntry") + proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") } func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 833 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x95, 0x41, 0x6f, 0x23, 0x35, - 0x14, 0xc7, 0x3b, 0x33, 0x6d, 0x9a, 0xbc, 0xb4, 0x69, 0xd6, 0xed, 0x52, 0xd3, 0x8a, 0x21, 0x9b, - 0x3d, 0x10, 0x44, 0x49, 0xd4, 0x22, 0x04, 0xaa, 0xe0, 0x50, 0xca, 0x1e, 0x56, 0x0b, 0x12, 0x1a, - 0x16, 0x09, 0xed, 0x25, 0x38, 0x63, 0x2b, 0x35, 0x4c, 0xec, 0x91, 0xed, 0x89, 0x36, 0x1f, 0x81, - 0x0b, 0xe2, 0x13, 0xf0, 0x79, 0x38, 0x70, 0x58, 0x89, 0x0b, 0x27, 0x40, 0xad, 0xc4, 0x07, 0xe0, - 0x13, 0xa0, 0xb1, 0x3d, 0xcd, 0x34, 0x45, 0xaa, 0xe8, 0x89, 0x4b, 0x55, 0xff, 0xdf, 0xdf, 0xce, - 0x7b, 0xbf, 0xe7, 0xe7, 0x01, 0x44, 0x39, 0x1d, 0xcd, 0x8f, 0x47, 0xda, 0x10, 0xc3, 0x86, 0xb9, - 0x92, 0x46, 0xa2, 0x06, 0xe5, 0x74, 0x38, 0x3f, 0x3e, 0xd8, 0x4f, 0xa5, 0x9e, 0x49, 0x3d, 0x92, - 0x6a, 0x56, 0x5a, 0xa4, 0x9a, 0x39, 0xc3, 0xc1, 0x9e, 0xdf, 0x34, 0x65, 0x82, 0x69, 0xae, 0xbd, - 0xba, 0xeb, 0xd5, 0x99, 0xa4, 0x2c, 0xf3, 0x62, 0xff, 0x8f, 0x08, 0x3a, 0x67, 0x85, 0xb9, 0x60, - 0xc2, 0xf0, 0x94, 0x18, 0x2e, 0x05, 0xea, 0x40, 0xc8, 0x29, 0x0e, 0x7a, 0xc1, 0xa0, 0x95, 0x84, - 0x9c, 0xa2, 0x18, 0x20, 0x95, 0xc2, 0x28, 0x99, 0x65, 0x4c, 0xe1, 0xd0, 0xea, 0x35, 0x05, 0xbd, - 0x0b, 0x90, 0x17, 0x93, 0x8c, 0xa7, 0xe3, 0xef, 0xd8, 0x02, 0x47, 0xbd, 0x60, 0xd0, 0x3e, 0xe9, - 0x0c, 0x5d, 0x8e, 0xc3, 0x2f, 0x8a, 0xc9, 0x33, 0xb6, 0x48, 0x5a, 0xce, 0xf1, 0x8c, 0x2d, 0xd0, - 0x6b, 0xd0, 0x90, 0x8a, 0x4f, 0xb9, 0xc0, 0xeb, 0xf6, 0x28, 0xbf, 0x42, 0x18, 0x36, 0x75, 0x31, - 0xf9, 0x96, 0xa5, 0x06, 0x6f, 0xd8, 0x40, 0xb5, 0x44, 0x8f, 0x61, 0x3b, 0x55, 0x8c, 0x96, 0x29, - 0x92, 0x6c, 0xcc, 0x29, 0x6e, 0xf4, 0x82, 0xc1, 0x56, 0xb2, 0xb5, 0x14, 0x9f, 0x52, 0xf4, 0x36, - 0x74, 0x6b, 0xa6, 0x8c, 0x4c, 0x58, 0x86, 0x37, 0xed, 0x39, 0x3b, 0x4b, 0xfd, 0xb3, 0x52, 0x46, - 0xc7, 0xb0, 0x57, 0xb3, 0x1a, 0x45, 0x84, 0xce, 0xa5, 0x32, 0xb8, 0xd9, 0x8b, 0x06, 0xad, 0x64, - 0x77, 0x19, 0x7b, 0x5e, 0x85, 0xca, 0xd3, 0x89, 0x31, 0xac, 0xec, 0x02, 0x97, 0x62, 0x6c, 0x16, - 0x39, 0xc3, 0x2d, 0x77, 0x7a, 0x4d, 0x7f, 0xbe, 0xc8, 0x19, 0x3a, 0x82, 0xe6, 0x8c, 0x19, 0x42, - 0x89, 0x21, 0x18, 0x2c, 0x8c, 0x6e, 0x05, 0xe3, 0x73, 0xaf, 0x27, 0xd7, 0x8e, 0xd3, 0x6f, 0xfe, - 0xfe, 0xe9, 0xd7, 0x1f, 0xa2, 0x17, 0xb0, 0x5e, 0x42, 0x47, 0x7b, 0xd0, 0xf1, 0x45, 0x1f, 0x39, - 0x2a, 0xdd, 0x00, 0x07, 0x68, 0x1f, 0x1e, 0x2c, 0x71, 0x57, 0x81, 0x10, 0x07, 0xe8, 0x11, 0x1c, - 0xd6, 0x02, 0xab, 0xe5, 0x77, 0x23, 0x1c, 0xe0, 0xa0, 0xff, 0x7d, 0x08, 0xad, 0x33, 0xad, 0x99, - 0xfa, 0x7f, 0x36, 0xb7, 0x8e, 0xab, 0x71, 0x27, 0xae, 0x8f, 0x2d, 0xae, 0x0f, 0xee, 0x85, 0x0b, - 0x87, 0xfd, 0x5f, 0x02, 0x80, 0xf3, 0x65, 0x71, 0xab, 0x30, 0x30, 0x6c, 0x12, 0x4a, 0x15, 0xd3, - 0xda, 0x93, 0xa8, 0x96, 0x36, 0x92, 0x71, 0xa2, 0x99, 0xc6, 0x91, 0xbd, 0x25, 0xd5, 0x72, 0x05, - 0xd0, 0xfa, 0x5d, 0x80, 0x0e, 0xa1, 0x35, 0x27, 0x45, 0x66, 0xc6, 0x29, 0xa7, 0x1e, 0x45, 0xd3, - 0x0a, 0xe7, 0x9c, 0x9e, 0x0e, 0x6d, 0x75, 0x03, 0x5f, 0xdd, 0xf6, 0x75, 0x36, 0xb6, 0xac, 0x9d, - 0xda, 0x4e, 0x5b, 0x4e, 0xd4, 0xff, 0x3d, 0x04, 0xf8, 0x94, 0x65, 0x6c, 0x7a, 0xbf, 0xc1, 0x7d, - 0x13, 0xda, 0xe9, 0x05, 0xe1, 0x62, 0xcc, 0x05, 0x65, 0x2f, 0x6d, 0x73, 0x4b, 0x43, 0x29, 0x3d, - 0x2d, 0x95, 0xff, 0x5a, 0xdb, 0x5b, 0xb0, 0x43, 0xd2, 0x54, 0x16, 0xc2, 0x8c, 0x2b, 0x8c, 0xae, - 0xc2, 0x8e, 0x97, 0xcf, 0x3c, 0xcd, 0xc7, 0xb0, 0x5d, 0x19, 0xdd, 0xa0, 0x36, 0xac, 0x6d, 0xcb, - 0x8b, 0x6e, 0x4a, 0x5f, 0x87, 0xa6, 0xcf, 0x8e, 0xfa, 0x41, 0xde, 0x74, 0xa9, 0xd1, 0xd3, 0xa9, - 0xe5, 0x44, 0x3c, 0xa7, 0x18, 0xf0, 0xca, 0xcf, 0x1e, 0x55, 0x1b, 0x2d, 0xb8, 0x18, 0x70, 0xed, - 0x3e, 0xdc, 0xf8, 0x61, 0x3b, 0x45, 0xfb, 0xb0, 0x5b, 0x9f, 0xa2, 0x6a, 0x6b, 0x84, 0xd7, 0xfb, - 0x7f, 0x45, 0xb0, 0xfd, 0x25, 0x53, 0x73, 0x9e, 0xb2, 0x84, 0xa5, 0x52, 0xd1, 0x5b, 0x8c, 0x1f, - 0xc1, 0x96, 0x76, 0x06, 0xf7, 0x28, 0x38, 0xca, 0x6d, 0xaf, 0xd9, 0x07, 0xe1, 0x66, 0x1b, 0xa2, - 0x5b, 0x6d, 0x78, 0x03, 0xc0, 0x5d, 0xd2, 0x71, 0xa1, 0xb8, 0x9f, 0x9b, 0x96, 0x53, 0xbe, 0x52, - 0x1c, 0xf5, 0xa0, 0x4d, 0x99, 0x4e, 0x15, 0xcf, 0xcb, 0x26, 0x7b, 0xa2, 0x75, 0x09, 0x7d, 0x0d, - 0x0f, 0xaa, 0x1c, 0x98, 0xa0, 0xb9, 0xe4, 0xc2, 0x68, 0xdc, 0xe8, 0x45, 0x83, 0xf6, 0xc9, 0x3b, - 0x55, 0xb7, 0x6e, 0x54, 0x51, 0xad, 0x9e, 0x54, 0xee, 0x27, 0xc2, 0xa8, 0x45, 0xd2, 0xd5, 0x2b, - 0x32, 0x7a, 0x1f, 0xda, 0x39, 0x53, 0x33, 0xae, 0x35, 0x97, 0x42, 0xdb, 0x36, 0xb4, 0x4f, 0x76, - 0xaf, 0x6f, 0xc0, 0x32, 0x94, 0xd4, 0x7d, 0x37, 0x66, 0xba, 0x79, 0xd7, 0x4c, 0x1f, 0x9c, 0xc3, - 0xc3, 0x7f, 0xcd, 0x07, 0x75, 0x21, 0x2a, 0xef, 0x9d, 0x83, 0x5d, 0xfe, 0x8b, 0xf6, 0x60, 0x63, - 0x4e, 0xb2, 0xa2, 0xc2, 0xec, 0x16, 0xa7, 0xe1, 0x87, 0xc1, 0xca, 0xc3, 0xd0, 0xad, 0x23, 0xb5, - 0x97, 0xe0, 0x10, 0x1e, 0xde, 0x7a, 0x14, 0x6c, 0xb0, 0x9c, 0xa4, 0x8d, 0x4f, 0x3e, 0xfa, 0xf9, - 0x32, 0x0e, 0x5e, 0x5d, 0xc6, 0xc1, 0x9f, 0x97, 0x71, 0xf0, 0xe3, 0x55, 0xbc, 0xf6, 0xea, 0x2a, - 0x5e, 0xfb, 0xed, 0x2a, 0x5e, 0x7b, 0xd1, 0x9f, 0x72, 0x73, 0x51, 0x4c, 0x86, 0xa9, 0x9c, 0x8d, - 0xa4, 0xd0, 0x52, 0xa8, 0x91, 0xfd, 0xf3, 0x72, 0x54, 0x7e, 0x4e, 0xcb, 0x9e, 0xeb, 0x49, 0xc3, - 0x7e, 0x4b, 0xdf, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x9d, 0xfa, 0x62, 0xad, 0x07, 0x00, - 0x00, + // 828 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x8f, 0xdb, 0x44, + 0x14, 0x5f, 0xdb, 0x59, 0x67, 0xf3, 0xb2, 0xbb, 0x84, 0xe9, 0xb2, 0x8c, 0x52, 0x88, 0xdc, 0x1c, + 0x20, 0x82, 0x90, 0xb4, 0xcb, 0x1f, 0xa1, 0x88, 0x4b, 0x49, 0x7b, 0x40, 0x15, 0xa8, 0x32, 0x08, + 0x21, 0x24, 0xb4, 0x72, 0x66, 0xa6, 0xbb, 0x03, 0xb6, 0xc7, 0x9a, 0x19, 0x47, 0xf5, 0x67, 0x40, + 0x42, 0xdc, 0xb8, 0x71, 0xe4, 0xb3, 0x20, 0x4e, 0x45, 0x5c, 0x38, 0xa2, 0xdd, 0x6f, 0xc0, 0x27, + 0x40, 0x33, 0x1e, 0x27, 0xde, 0x50, 0xa9, 0xea, 0x25, 0xca, 0xfb, 0xbd, 0x37, 0xf3, 0xde, 0xef, + 0xf7, 0x7e, 0x23, 0x03, 0xa2, 0x9c, 0xce, 0xd7, 0xf7, 0xe6, 0x4a, 0x27, 0x9a, 0xcd, 0x0a, 0x29, + 0xb4, 0x40, 0x21, 0xe5, 0x74, 0xb6, 0xbe, 0x37, 0x7c, 0x9d, 0x08, 0x95, 0x09, 0x35, 0x17, 0x32, + 0x33, 0x25, 0x42, 0x66, 0x75, 0xc1, 0xf0, 0xc4, 0x1d, 0xba, 0x60, 0x39, 0x53, 0x5c, 0x39, 0xf4, + 0x96, 0x43, 0x33, 0x41, 0x59, 0xea, 0xc0, 0xf1, 0x1f, 0x3e, 0x74, 0xef, 0x13, 0x22, 0xca, 0x5c, + 0xa3, 0x63, 0xf0, 0x39, 0xc5, 0x5e, 0xe4, 0x4d, 0x7a, 0xb1, 0xcf, 0x29, 0x1a, 0x01, 0x10, 0x91, + 0x6b, 0x29, 0xd2, 0x94, 0x49, 0xec, 0x5b, 0xbc, 0x85, 0xa0, 0xf7, 0x00, 0x8a, 0x72, 0x95, 0x72, + 0x72, 0xfe, 0x03, 0xab, 0x70, 0x10, 0x79, 0x93, 0xfe, 0xd9, 0xf1, 0xac, 0x1e, 0x6e, 0xf6, 0xb8, + 0x5c, 0x3d, 0x62, 0x55, 0xdc, 0xab, 0x2b, 0x1e, 0xb1, 0x0a, 0x61, 0xe8, 0x26, 0x94, 0x4a, 0xa6, + 0x14, 0xee, 0xd8, 0xbb, 0x9a, 0x10, 0x9d, 0xc0, 0x7e, 0x9a, 0xac, 0x58, 0x8a, 0xf7, 0x2d, 0x5e, + 0x07, 0xe8, 0x4d, 0x00, 0x72, 0x99, 0xf0, 0xfc, 0x9c, 0x08, 0xca, 0x70, 0x18, 0x79, 0x93, 0xa3, + 0xb8, 0x67, 0x91, 0xa5, 0xa0, 0xcc, 0x1c, 0xe2, 0x39, 0x65, 0x4f, 0x71, 0xd7, 0x66, 0xea, 0x00, + 0x9d, 0x42, 0x68, 0x4b, 0x14, 0x3e, 0x88, 0x82, 0x49, 0x2f, 0x76, 0xd1, 0x82, 0xfc, 0xfb, 0xeb, + 0x5f, 0x3f, 0x05, 0xdf, 0x41, 0xc7, 0x70, 0x44, 0xa7, 0x30, 0xd8, 0xf2, 0x98, 0xda, 0x76, 0x03, + 0x0f, 0x7b, 0x08, 0x03, 0x6a, 0xe1, 0x6e, 0xbc, 0x81, 0x8f, 0x3d, 0x74, 0x07, 0x6e, 0xb7, 0x32, + 0xdb, 0xb9, 0xa6, 0xb6, 0xed, 0x20, 0xc0, 0x1e, 0xf6, 0xc6, 0xbf, 0xf8, 0x00, 0xcb, 0xad, 0x3e, + 0xbb, 0x7a, 0xb6, 0x04, 0xf0, 0x6f, 0x0a, 0xf0, 0x36, 0x74, 0x93, 0x94, 0x27, 0x8a, 0x29, 0x1c, + 0x44, 0xc1, 0xa4, 0x7f, 0x76, 0xd4, 0xc8, 0x78, 0xdf, 0xc0, 0x71, 0x93, 0xdd, 0x91, 0xbc, 0xf3, + 0x22, 0xc9, 0x6f, 0x43, 0x6f, 0x9d, 0x94, 0xa9, 0x3e, 0x27, 0x9c, 0x3a, 0x71, 0x0f, 0x2c, 0xb0, + 0xe4, 0x14, 0x2d, 0xe0, 0x38, 0x29, 0xf5, 0x25, 0xcb, 0x35, 0x27, 0x89, 0xe6, 0x22, 0xc7, 0xa1, + 0xed, 0x8d, 0x9a, 0xfb, 0x96, 0x92, 0x51, 0x93, 0x4d, 0xd2, 0x78, 0xa7, 0x72, 0x31, 0xb3, 0x72, + 0x4e, 0x9c, 0x9c, 0x47, 0x1b, 0x62, 0x56, 0xc5, 0x57, 0x5a, 0x5d, 0x8d, 0x78, 0xd8, 0x1f, 0xff, + 0xe9, 0xc1, 0xfe, 0x63, 0x29, 0xc4, 0x93, 0x97, 0x36, 0xd9, 0x29, 0x84, 0x5c, 0xa9, 0x92, 0x49, + 0x6b, 0xb0, 0x5e, 0xec, 0x22, 0x34, 0x84, 0x83, 0x42, 0x8a, 0x82, 0x49, 0x5d, 0x39, 0x3b, 0x6d, + 0x62, 0x14, 0x41, 0x3f, 0x21, 0xa4, 0xcc, 0xca, 0x34, 0xd1, 0x42, 0x5a, 0xe2, 0x87, 0x71, 0x1b, + 0x42, 0x03, 0x08, 0x8c, 0x80, 0xa1, 0xcd, 0x98, 0xbf, 0x8b, 0xbb, 0x96, 0xd1, 0x3b, 0x8e, 0x51, + 0x04, 0xc3, 0xd6, 0xba, 0xeb, 0x96, 0xd3, 0xe6, 0x7e, 0x43, 0x12, 0x77, 0xc6, 0xbf, 0x05, 0x70, + 0xf4, 0x25, 0x93, 0x6b, 0x4e, 0x58, 0xcc, 0x88, 0x90, 0xf4, 0x7f, 0xdc, 0xee, 0xc0, 0xa1, 0xaa, + 0x0b, 0xce, 0x75, 0x55, 0x30, 0xc7, 0xae, 0xef, 0xb0, 0xaf, 0xaa, 0x82, 0xa1, 0x37, 0xa0, 0x67, + 0xa4, 0x15, 0x92, 0xeb, 0xca, 0x31, 0xdc, 0x02, 0x86, 0xbc, 0x90, 0xfc, 0x82, 0xe7, 0x8e, 0xa2, + 0x8b, 0x0c, 0x41, 0xca, 0x14, 0x91, 0xbc, 0xb0, 0x7b, 0xab, 0x37, 0xdb, 0x86, 0xd0, 0x37, 0xf0, + 0x6a, 0xd3, 0x9a, 0xe5, 0xb4, 0x10, 0x3c, 0xd7, 0xca, 0xed, 0xf7, 0xdd, 0x66, 0xbf, 0x37, 0x86, + 0x6f, 0xa2, 0x87, 0x4d, 0xf5, 0xc3, 0x5c, 0xcb, 0x2a, 0x1e, 0xa8, 0x1d, 0x18, 0x7d, 0x08, 0xfd, + 0x82, 0xc9, 0x8c, 0x2b, 0xc5, 0x45, 0xae, 0xec, 0xeb, 0xeb, 0x9f, 0xdd, 0xda, 0x78, 0x70, 0x9b, + 0x8a, 0xdb, 0x75, 0xc3, 0x25, 0xbc, 0xf6, 0xdc, 0x0e, 0xcd, 0x2a, 0x6a, 0xd5, 0xcc, 0x5f, 0xf3, + 0xb2, 0xd7, 0x49, 0x5a, 0x36, 0x7a, 0xd5, 0xc1, 0xc2, 0xff, 0xd8, 0x5b, 0x7c, 0x60, 0x97, 0x34, + 0x73, 0x4b, 0x3a, 0x6c, 0xd4, 0xb1, 0xae, 0x3b, 0x85, 0xc1, 0x46, 0xb8, 0xa9, 0xc3, 0x8d, 0xf9, + 0x82, 0xf1, 0x8f, 0x3e, 0xa0, 0xaf, 0x99, 0xe4, 0x4f, 0x9c, 0x7b, 0x3f, 0x67, 0xfa, 0x52, 0xd0, + 0x97, 0x76, 0xe2, 0x14, 0xc2, 0xcc, 0x9e, 0xb4, 0x7b, 0x3a, 0x3e, 0x3b, 0x69, 0x38, 0x3f, 0xf8, + 0xec, 0xc1, 0x17, 0x49, 0xc6, 0x54, 0x91, 0x10, 0x16, 0xbb, 0x9a, 0x96, 0x6f, 0x3b, 0x37, 0x7c, + 0x8b, 0xa1, 0xab, 0xca, 0xd5, 0xf7, 0x8c, 0x68, 0xb7, 0xb6, 0x26, 0xdc, 0x79, 0xdb, 0xe1, 0x0b, + 0xde, 0xf6, 0xe2, 0x23, 0xab, 0xc5, 0x5d, 0xa7, 0xc5, 0x5b, 0x10, 0xb5, 0x0c, 0x5b, 0xcf, 0xd0, + 0xf8, 0xd6, 0x35, 0xb0, 0xb6, 0xdd, 0xff, 0xf4, 0x93, 0xdf, 0xaf, 0x46, 0xde, 0xb3, 0xab, 0x91, + 0xf7, 0xcf, 0xd5, 0xc8, 0xfb, 0xf9, 0x7a, 0xb4, 0xf7, 0xec, 0x7a, 0xb4, 0xf7, 0xf7, 0xf5, 0x68, + 0xef, 0xdb, 0xf1, 0x05, 0xd7, 0x97, 0xe5, 0x6a, 0x46, 0x44, 0x36, 0x17, 0xb9, 0x12, 0xb9, 0x9c, + 0xdb, 0x9f, 0xa7, 0x73, 0xf3, 0xe5, 0x30, 0x0e, 0x56, 0xab, 0xd0, 0x7e, 0x36, 0xde, 0xff, 0x2f, + 0x00, 0x00, 0xff, 0xff, 0x31, 0x1c, 0x51, 0xe6, 0x98, 0x06, 0x00, 0x00, } -func (m *Authentication) Marshal() (dAtA []byte, err error) { +func (m *Account) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -610,144 +582,46 @@ func (m *Authentication) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Authentication) MarshalTo(dAtA []byte) (int, error) { +func (m *Account) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Authentication) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if len(m.AttestationType) > 0 { - i -= len(m.AttestationType) - copy(dAtA[i:], m.AttestationType) - i = encodeVarintState(dAtA, i, uint64(len(m.AttestationType))) - i-- - dAtA[i] = 0x4a - } - if len(m.CredentialTransport) > 0 { - for iNdEx := len(m.CredentialTransport) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CredentialTransport[iNdEx]) - copy(dAtA[i:], m.CredentialTransport[iNdEx]) - i = encodeVarintState(dAtA, i, uint64(len(m.CredentialTransport[iNdEx]))) + if len(m.Chains) > 0 { + for iNdEx := len(m.Chains) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Chains[iNdEx]) + copy(dAtA[i:], m.Chains[iNdEx]) + i = encodeVarintState(dAtA, i, uint64(len(m.Chains[iNdEx]))) i-- dAtA[i] = 0x42 } } - if len(m.CredentialLabel) > 0 { - i -= len(m.CredentialLabel) - copy(dAtA[i:], m.CredentialLabel) - i = encodeVarintState(dAtA, i, uint64(len(m.CredentialLabel))) + if m.Index != 0 { + i = encodeVarintState(dAtA, i, uint64(m.Index)) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x38 } - if len(m.CredentialId) > 0 { - i -= len(m.CredentialId) - copy(dAtA[i:], m.CredentialId) - i = encodeVarintState(dAtA, i, uint64(len(m.CredentialId))) + if m.ChainCode != 0 { + i = encodeVarintState(dAtA, i, uint64(m.ChainCode)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x30 } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintState(dAtA, i, uint64(len(m.Subject))) + if len(m.Label) > 0 { + i -= len(m.Label) + copy(dAtA[i:], m.Label) + i = encodeVarintState(dAtA, i, uint64(len(m.Label))) i-- dAtA[i] = 0x2a } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintState(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x22 - } - if m.PublicKey != nil { - { - size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintState(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Assertion) 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 *Assertion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Assertion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintState(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x2a - } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintState(dAtA, i, uint64(len(m.Origin))) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintState(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0x22 } @@ -800,6 +674,20 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Authentication) > 0 { + for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Authentication[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } if len(m.VaultCid) > 0 { i -= len(m.VaultCid) copy(dAtA[i:], m.VaultCid) @@ -821,9 +709,14 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { } if len(m.Aliases) > 0 { for iNdEx := len(m.Aliases) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Aliases[iNdEx]) - copy(dAtA[i:], m.Aliases[iNdEx]) - i = encodeVarintState(dAtA, i, uint64(len(m.Aliases[iNdEx]))) + { + size, err := m.Aliases[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } @@ -845,7 +738,7 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Delegation) Marshal() (dAtA []byte, err error) { +func (m *Proof) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -855,53 +748,41 @@ func (m *Delegation) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Delegation) MarshalTo(dAtA []byte) (int, error) { +func (m *Proof) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Proof) 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 = encodeVarintState(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x3a - } - if len(m.AccountLabel) > 0 { - i -= len(m.AccountLabel) - copy(dAtA[i:], m.AccountLabel) - i = encodeVarintState(dAtA, i, uint64(len(m.AccountLabel))) + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintState(dAtA, i, uint64(len(m.Key))) i-- dAtA[i] = 0x32 } - if len(m.AccountAddress) > 0 { - i -= len(m.AccountAddress) - copy(dAtA[i:], m.AccountAddress) - i = encodeVarintState(dAtA, i, uint64(len(m.AccountAddress))) + if len(m.Accumulator) > 0 { + i -= len(m.Accumulator) + copy(dAtA[i:], m.Accumulator) + i = encodeVarintState(dAtA, i, uint64(len(m.Accumulator))) i-- dAtA[i] = 0x2a } - if m.PublicKey != nil { - { - size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } + if len(m.Property) > 0 { + i -= len(m.Property) + copy(dAtA[i:], m.Property) + i = encodeVarintState(dAtA, i, uint64(len(m.Property))) i-- dAtA[i] = 0x22 } - if len(m.ChainIndex) > 0 { - i -= len(m.ChainIndex) - copy(dAtA[i:], m.ChainIndex) - i = encodeVarintState(dAtA, i, uint64(len(m.ChainIndex))) + if len(m.Issuer) > 0 { + i -= len(m.Issuer) + copy(dAtA[i:], m.Issuer) + i = encodeVarintState(dAtA, i, uint64(len(m.Issuer))) i-- dAtA[i] = 0x1a } @@ -942,18 +823,6 @@ func (m *ServiceRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } if m.Permissions != nil { { size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) @@ -992,17 +861,17 @@ func (m *ServiceRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if len(m.OriginUri) > 0 { - i -= len(m.OriginUri) - copy(dAtA[i:], m.OriginUri) - i = encodeVarintState(dAtA, i, uint64(len(m.OriginUri))) + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintState(dAtA, i, uint64(len(m.Origin))) i-- dAtA[i] = 0x22 } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintState(dAtA, i, uint64(len(m.Authority))) i-- dAtA[i] = 0x1a } @@ -1023,6 +892,74 @@ func (m *ServiceRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *VerificationMethod) 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 *VerificationMethod) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintState(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x2a + } + if len(m.Issuer) > 0 { + i -= len(m.Issuer) + copy(dAtA[i:], m.Issuer) + i = encodeVarintState(dAtA, i, uint64(len(m.Issuer))) + i-- + dAtA[i] = 0x22 + } + if m.Method != 0 { + i = encodeVarintState(dAtA, i, uint64(m.Method)) + i-- + dAtA[i] = 0x18 + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintState(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintState(dAtA []byte, offset int, v uint64) int { offset -= sovState(v) base := offset @@ -1034,7 +971,7 @@ func encodeVarintState(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *Authentication) Size() (n int) { +func (m *Account) Size() (n int) { if m == nil { return 0 } @@ -1052,69 +989,26 @@ func (m *Authentication) Size() (n int) { l = m.PublicKey.Size() n += 1 + l + sovState(uint64(l)) } - l = len(m.Origin) + l = len(m.Address) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Subject) + l = len(m.Label) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.CredentialId) - if l > 0 { - n += 1 + l + sovState(uint64(l)) + if m.ChainCode != 0 { + n += 1 + sovState(uint64(m.ChainCode)) } - l = len(m.CredentialLabel) - if l > 0 { - n += 1 + l + sovState(uint64(l)) + if m.Index != 0 { + n += 1 + sovState(uint64(m.Index)) } - if len(m.CredentialTransport) > 0 { - for _, s := range m.CredentialTransport { + if len(m.Chains) > 0 { + for _, s := range m.Chains { l = len(s) n += 1 + l + sovState(uint64(l)) } } - l = len(m.AttestationType) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovState(uint64(l)) - } - return n -} - -func (m *Assertion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.PublicKey != nil { - l = m.PublicKey.Size() - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovState(uint64(l)) - } return n } @@ -1133,8 +1027,8 @@ func (m *Controller) Size() (n int) { n += 1 + l + sovState(uint64(l)) } if len(m.Aliases) > 0 { - for _, s := range m.Aliases { - l = len(s) + for _, e := range m.Aliases { + l = e.Size() n += 1 + l + sovState(uint64(l)) } } @@ -1146,10 +1040,16 @@ func (m *Controller) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } + if len(m.Authentication) > 0 { + for _, e := range m.Authentication { + l = e.Size() + n += 1 + l + sovState(uint64(l)) + } + } return n } -func (m *Delegation) Size() (n int) { +func (m *Proof) Size() (n int) { if m == nil { return 0 } @@ -1163,23 +1063,19 @@ func (m *Delegation) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.ChainIndex) + l = len(m.Issuer) if l > 0 { n += 1 + l + sovState(uint64(l)) } - if m.PublicKey != nil { - l = m.PublicKey.Size() - n += 1 + l + sovState(uint64(l)) - } - l = len(m.AccountAddress) + l = len(m.Property) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.AccountLabel) + l = len(m.Accumulator) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.ChainId) + l = len(m.Key) if l > 0 { n += 1 + l + sovState(uint64(l)) } @@ -1200,11 +1096,11 @@ func (m *ServiceRecord) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Controller) + l = len(m.Authority) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.OriginUri) + l = len(m.Origin) if l > 0 { n += 1 + l + sovState(uint64(l)) } @@ -1224,8 +1120,36 @@ func (m *ServiceRecord) Size() (n int) { l = m.Permissions.Size() n += 1 + l + sovState(uint64(l)) } - if m.Metadata != nil { - l = m.Metadata.Size() + return n +} + +func (m *VerificationMethod) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if m.Method != 0 { + n += 1 + sovState(uint64(m.Method)) + } + l = len(m.Issuer) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Subject) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if m.PublicKey != nil { + l = m.PublicKey.Size() n += 1 + l + sovState(uint64(l)) } return n @@ -1237,7 +1161,7 @@ func sovState(x uint64) (n int) { func sozState(x uint64) (n int) { return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Authentication) Unmarshal(dAtA []byte) error { +func (m *Account) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1260,10 +1184,10 @@ func (m *Authentication) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Authentication: wiretype end group for non-group") + return fmt.Errorf("proto: Account: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Authentication: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1368,7 +1292,7 @@ func (m *Authentication) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1396,11 +1320,11 @@ func (m *Authentication) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Origin = string(dAtA[iNdEx:postIndex]) + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1428,13 +1352,13 @@ func (m *Authentication) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Subject = string(dAtA[iNdEx:postIndex]) + m.Label = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainCode", wireType) } - var byteLen int + m.ChainCode = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -1444,31 +1368,16 @@ func (m *Authentication) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.ChainCode |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialId = append(m.CredentialId[:0], dAtA[iNdEx:postIndex]...) - if m.CredentialId == nil { - m.CredentialId = []byte{} - } - iNdEx = postIndex case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialLabel", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } - var stringLen uint64 + m.Index = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -1478,27 +1387,14 @@ func (m *Authentication) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Index |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialLabel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialTransport", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Chains", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1526,325 +1422,7 @@ func (m *Authentication) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CredentialTransport = append(m.CredentialTransport, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - 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 ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttestationType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Assertion) 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 ErrIntOverflowState - } - 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: Assertion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Assertion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - 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 ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - 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 ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PublicKey == nil { - m.PublicKey = &PubKey{} - } - if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - 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 ErrIntOverflowState - } - 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 ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - 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 ErrIntOverflowState - } - 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 ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Chains = append(m.Chains, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -1964,7 +1542,7 @@ func (m *Controller) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -1974,23 +1552,25 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthState } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthState } if postIndex > l { return io.ErrUnexpectedEOF } - m.Aliases = append(m.Aliases, string(dAtA[iNdEx:postIndex])) + m.Aliases = append(m.Aliases, &Alias{}) + if err := m.Aliases[len(m.Aliases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: if wireType != 2 { @@ -2060,6 +1640,40 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } m.VaultCid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authentication = append(m.Authentication, &Credential{}) + if err := m.Authentication[len(m.Authentication)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) @@ -2081,7 +1695,7 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } return nil } -func (m *Delegation) Unmarshal(dAtA []byte) error { +func (m *Proof) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2104,10 +1718,10 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Delegation: wiretype end group for non-group") + return fmt.Errorf("proto: Proof: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Delegation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2176,7 +1790,7 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainIndex", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2204,13 +1818,13 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ChainIndex = string(dAtA[iNdEx:postIndex]) + m.Issuer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -2220,33 +1834,29 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthState } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthState } if postIndex > l { return io.ErrUnexpectedEOF } - if m.PublicKey == nil { - m.PublicKey = &PubKey{} - } - if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Property = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Accumulator", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -2256,29 +1866,31 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthState } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthState } if postIndex > l { return io.ErrUnexpectedEOF } - m.AccountAddress = string(dAtA[iNdEx:postIndex]) + m.Accumulator = append(m.Accumulator[:0], dAtA[iNdEx:postIndex]...) + if m.Accumulator == nil { + m.Accumulator = []byte{} + } iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountLabel", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -2288,55 +1900,25 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthState } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthState } if postIndex > l { return io.ErrUnexpectedEOF } - m.AccountLabel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - 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 ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2454,7 +2036,7 @@ func (m *ServiceRecord) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2482,11 +2064,11 @@ func (m *ServiceRecord) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Controller = string(dAtA[iNdEx:postIndex]) + m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2514,7 +2096,7 @@ func (m *ServiceRecord) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OriginUri = string(dAtA[iNdEx:postIndex]) + m.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { @@ -2711,9 +2293,206 @@ func (m *ServiceRecord) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 8: + default: + iNdEx = preIndex + skippy, err := skipState(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerificationMethod) 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 ErrIntOverflowState + } + 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: VerificationMethod: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerificationMethod: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + 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 ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + 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 ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + m.Method = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Method |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + 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 ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Issuer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 ErrIntOverflowState + } + 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 ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2740,10 +2519,10 @@ func (m *ServiceRecord) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Metadata == nil { - m.Metadata = &Metadata{} + if m.PublicKey == nil { + m.PublicKey = &PubKey{} } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/did/types/tx.pb.go b/x/did/types/tx.pb.go index 5492fb762..6463efcdf 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -208,6 +208,8 @@ type MsgAllocateVaultResponse struct { 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 RegistrationOptions string `protobuf:"bytes,3,opt,name=registration_options,json=registrationOptions,proto3" json:"registration_options,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{} } @@ -264,6 +266,13 @@ func (m *MsgAllocateVaultResponse) GetRegistrationOptions() string { return "" } +func (m *MsgAllocateVaultResponse) GetLocalhost() bool { + if m != nil { + return m.Localhost + } + return false +} + // MsgProveWitness is the message type for the ProveWitness RPC. type MsgProveWitness struct { // authority is the address of the governance account. @@ -390,26 +399,26 @@ func (m *MsgProveWitnessResponse) GetProperty() string { return "" } -// MsgSyncVault is the message type for the SyncVault RPC. -type MsgSyncVault struct { +// MsgSyncController is the message type for the SyncController RPC. +type MsgSyncController struct { // controller is the address of the controller to sync. Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` // Token is the public token to authenticate the operation. Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } -func (m *MsgSyncVault) Reset() { *m = MsgSyncVault{} } -func (m *MsgSyncVault) String() string { return proto.CompactTextString(m) } -func (*MsgSyncVault) ProtoMessage() {} -func (*MsgSyncVault) Descriptor() ([]byte, []int) { +func (m *MsgSyncController) Reset() { *m = MsgSyncController{} } +func (m *MsgSyncController) String() string { return proto.CompactTextString(m) } +func (*MsgSyncController) ProtoMessage() {} +func (*MsgSyncController) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{6} } -func (m *MsgSyncVault) XXX_Unmarshal(b []byte) error { +func (m *MsgSyncController) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSyncVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSyncController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSyncVault.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSyncController.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -419,49 +428,49 @@ func (m *MsgSyncVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *MsgSyncVault) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSyncVault.Merge(m, src) +func (m *MsgSyncController) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSyncController.Merge(m, src) } -func (m *MsgSyncVault) XXX_Size() int { +func (m *MsgSyncController) XXX_Size() int { return m.Size() } -func (m *MsgSyncVault) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSyncVault.DiscardUnknown(m) +func (m *MsgSyncController) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSyncController.DiscardUnknown(m) } -var xxx_messageInfo_MsgSyncVault proto.InternalMessageInfo +var xxx_messageInfo_MsgSyncController proto.InternalMessageInfo -func (m *MsgSyncVault) GetController() string { +func (m *MsgSyncController) GetController() string { if m != nil { return m.Controller } return "" } -func (m *MsgSyncVault) GetToken() *Token { +func (m *MsgSyncController) GetToken() *Token { if m != nil { return m.Token } return nil } -// MsgSyncVaultResponse is the response type for the SyncVault RPC. -type MsgSyncVaultResponse struct { +// MsgSyncControllerResponse is the response type for the SyncController RPC. +type MsgSyncControllerResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` } -func (m *MsgSyncVaultResponse) Reset() { *m = MsgSyncVaultResponse{} } -func (m *MsgSyncVaultResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSyncVaultResponse) ProtoMessage() {} -func (*MsgSyncVaultResponse) Descriptor() ([]byte, []int) { +func (m *MsgSyncControllerResponse) Reset() { *m = MsgSyncControllerResponse{} } +func (m *MsgSyncControllerResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSyncControllerResponse) ProtoMessage() {} +func (*MsgSyncControllerResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{7} } -func (m *MsgSyncVaultResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgSyncControllerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSyncVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSyncControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSyncVaultResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSyncControllerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -471,19 +480,19 @@ func (m *MsgSyncVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *MsgSyncVaultResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSyncVaultResponse.Merge(m, src) +func (m *MsgSyncControllerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSyncControllerResponse.Merge(m, src) } -func (m *MsgSyncVaultResponse) XXX_Size() int { +func (m *MsgSyncControllerResponse) XXX_Size() int { return m.Size() } -func (m *MsgSyncVaultResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSyncVaultResponse.DiscardUnknown(m) +func (m *MsgSyncControllerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSyncControllerResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgSyncVaultResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgSyncControllerResponse proto.InternalMessageInfo -func (m *MsgSyncVaultResponse) GetSuccess() bool { +func (m *MsgSyncControllerResponse) GetSuccess() bool { if m != nil { return m.Success } @@ -499,9 +508,7 @@ type MsgRegisterController struct { // Origin is the origin of the request in wildcard form. Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` // Credential is the list of keyshares to initialize the controller with. - Authentication []*Credential `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` - // token is the macron token to authenticate the operation. - Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + CredentialCreationResponse string `protobuf:"bytes,4,opt,name=credential_creation_response,json=credentialCreationResponse,proto3" json:"credential_creation_response,omitempty"` } func (m *MsgRegisterController) Reset() { *m = MsgRegisterController{} } @@ -558,18 +565,11 @@ func (m *MsgRegisterController) GetOrigin() string { return "" } -func (m *MsgRegisterController) GetAuthentication() []*Credential { +func (m *MsgRegisterController) GetCredentialCreationResponse() string { if m != nil { - return m.Authentication + return m.CredentialCreationResponse } - return nil -} - -func (m *MsgRegisterController) GetToken() *Token { - if m != nil { - return m.Token - } - return nil + return "" } // MsgRegisterControllerResponse is the response type for the InitializeController RPC. @@ -636,32 +636,30 @@ func (m *MsgRegisterControllerResponse) GetAccounts() map[string]string { return nil } -// MsgAuthorize is the message type for the Authorize RPC. -type MsgAuthorize struct { - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` +// MsgAuthorizeService is the message type for the AuthorizeService RPC. +type MsgAuthorizeService struct { // Controller is the address of the controller to authenticate. - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Address is the address to authenticate. - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` // Origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + // Permissions is the scope of the service. + Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` // token is the macron token to authenticate the operation. - Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + Token *Token `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` } -func (m *MsgAuthorize) Reset() { *m = MsgAuthorize{} } -func (m *MsgAuthorize) String() string { return proto.CompactTextString(m) } -func (*MsgAuthorize) ProtoMessage() {} -func (*MsgAuthorize) Descriptor() ([]byte, []int) { +func (m *MsgAuthorizeService) Reset() { *m = MsgAuthorizeService{} } +func (m *MsgAuthorizeService) String() string { return proto.CompactTextString(m) } +func (*MsgAuthorizeService) ProtoMessage() {} +func (*MsgAuthorizeService) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{10} } -func (m *MsgAuthorize) XXX_Unmarshal(b []byte) error { +func (m *MsgAuthorizeService) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthorize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAuthorizeService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthorize.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAuthorizeService.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -671,71 +669,64 @@ func (m *MsgAuthorize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *MsgAuthorize) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthorize.Merge(m, src) +func (m *MsgAuthorizeService) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthorizeService.Merge(m, src) } -func (m *MsgAuthorize) XXX_Size() int { +func (m *MsgAuthorizeService) XXX_Size() int { return m.Size() } -func (m *MsgAuthorize) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthorize.DiscardUnknown(m) +func (m *MsgAuthorizeService) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthorizeService.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthorize proto.InternalMessageInfo +var xxx_messageInfo_MsgAuthorizeService proto.InternalMessageInfo -func (m *MsgAuthorize) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgAuthorize) GetController() string { +func (m *MsgAuthorizeService) GetController() string { if m != nil { return m.Controller } return "" } -func (m *MsgAuthorize) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *MsgAuthorize) GetOrigin() string { +func (m *MsgAuthorizeService) GetOrigin() string { if m != nil { return m.Origin } return "" } -func (m *MsgAuthorize) GetToken() *Token { +func (m *MsgAuthorizeService) GetScopes() *Permissions { + if m != nil { + return m.Scopes + } + return nil +} + +func (m *MsgAuthorizeService) GetToken() *Token { if m != nil { return m.Token } return nil } -// MsgAuthorizeResponse is the response type for the Authorize RPC. -type MsgAuthorizeResponse struct { +// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC. +type MsgAuthorizeServiceResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Token *Token `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` } -func (m *MsgAuthorizeResponse) Reset() { *m = MsgAuthorizeResponse{} } -func (m *MsgAuthorizeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAuthorizeResponse) ProtoMessage() {} -func (*MsgAuthorizeResponse) Descriptor() ([]byte, []int) { +func (m *MsgAuthorizeServiceResponse) Reset() { *m = MsgAuthorizeServiceResponse{} } +func (m *MsgAuthorizeServiceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAuthorizeServiceResponse) ProtoMessage() {} +func (*MsgAuthorizeServiceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{11} } -func (m *MsgAuthorizeResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgAuthorizeServiceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthorizeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAuthorizeServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthorizeResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAuthorizeServiceResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -745,26 +736,26 @@ func (m *MsgAuthorizeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *MsgAuthorizeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthorizeResponse.Merge(m, src) +func (m *MsgAuthorizeServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthorizeServiceResponse.Merge(m, src) } -func (m *MsgAuthorizeResponse) XXX_Size() int { +func (m *MsgAuthorizeServiceResponse) XXX_Size() int { return m.Size() } -func (m *MsgAuthorizeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthorizeResponse.DiscardUnknown(m) +func (m *MsgAuthorizeServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthorizeServiceResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthorizeResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgAuthorizeServiceResponse proto.InternalMessageInfo -func (m *MsgAuthorizeResponse) GetSuccess() bool { +func (m *MsgAuthorizeServiceResponse) GetSuccess() bool { if m != nil { return m.Success } return false } -func (m *MsgAuthorizeResponse) GetToken() *Token { +func (m *MsgAuthorizeServiceResponse) GetToken() *Token { if m != nil { return m.Token } @@ -775,18 +766,10 @@ func (m *MsgAuthorizeResponse) GetToken() *Token { type MsgRegisterService struct { // authority is the address of the governance account. Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // origin is the origin of the request in wildcard form. - OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - // Permissions is the scope of the service. - Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` - // Description is the description of the service - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // service_endpoints is the endpoints of the service - ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Metadata is optional additional information about the service - Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + // origin is the origin of the request in wildcard form. Requires valid TXT record in DNS. + Service *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` // token is the macron token to authenticate the operation. - Token *Token `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"` + Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } func (m *MsgRegisterService) Reset() { *m = MsgRegisterService{} } @@ -829,37 +812,9 @@ func (m *MsgRegisterService) GetController() string { return "" } -func (m *MsgRegisterService) GetOriginUri() string { +func (m *MsgRegisterService) GetService() *Service { if m != nil { - return m.OriginUri - } - return "" -} - -func (m *MsgRegisterService) GetScopes() *Permissions { - if m != nil { - return m.Scopes - } - return nil -} - -func (m *MsgRegisterService) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *MsgRegisterService) GetServiceEndpoints() map[string]string { - if m != nil { - return m.ServiceEndpoints - } - return nil -} - -func (m *MsgRegisterService) GetMetadata() *Metadata { - if m != nil { - return m.Metadata + return m.Service } return nil } @@ -931,84 +886,79 @@ func init() { proto.RegisterType((*MsgAllocateVaultResponse)(nil), "did.v1.MsgAllocateVaultResponse") proto.RegisterType((*MsgProveWitness)(nil), "did.v1.MsgProveWitness") proto.RegisterType((*MsgProveWitnessResponse)(nil), "did.v1.MsgProveWitnessResponse") - proto.RegisterType((*MsgSyncVault)(nil), "did.v1.MsgSyncVault") - proto.RegisterType((*MsgSyncVaultResponse)(nil), "did.v1.MsgSyncVaultResponse") + proto.RegisterType((*MsgSyncController)(nil), "did.v1.MsgSyncController") + proto.RegisterType((*MsgSyncControllerResponse)(nil), "did.v1.MsgSyncControllerResponse") proto.RegisterType((*MsgRegisterController)(nil), "did.v1.MsgRegisterController") proto.RegisterType((*MsgRegisterControllerResponse)(nil), "did.v1.MsgRegisterControllerResponse") proto.RegisterMapType((map[string]string)(nil), "did.v1.MsgRegisterControllerResponse.AccountsEntry") - proto.RegisterType((*MsgAuthorize)(nil), "did.v1.MsgAuthorize") - proto.RegisterType((*MsgAuthorizeResponse)(nil), "did.v1.MsgAuthorizeResponse") + proto.RegisterType((*MsgAuthorizeService)(nil), "did.v1.MsgAuthorizeService") + proto.RegisterType((*MsgAuthorizeServiceResponse)(nil), "did.v1.MsgAuthorizeServiceResponse") proto.RegisterType((*MsgRegisterService)(nil), "did.v1.MsgRegisterService") - proto.RegisterMapType((map[string]string)(nil), "did.v1.MsgRegisterService.ServiceEndpointsEntry") proto.RegisterType((*MsgRegisterServiceResponse)(nil), "did.v1.MsgRegisterServiceResponse") } func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) } var fileDescriptor_d73284df019ff211 = []byte{ - // 992 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x89, 0x13, 0xbf, 0xfc, 0x33, 0x13, 0x97, 0xb8, 0x2b, 0xe2, 0x9a, 0x45, 0x48, - 0x51, 0x29, 0x76, 0x93, 0x4a, 0xa8, 0x0a, 0x48, 0x28, 0x89, 0x2a, 0x55, 0x42, 0x56, 0xca, 0x86, - 0x80, 0x54, 0x09, 0x59, 0x9b, 0xdd, 0xd1, 0x76, 0xc8, 0x7a, 0x67, 0x35, 0x33, 0x36, 0x31, 0x07, - 0x04, 0x3d, 0x73, 0xe0, 0x83, 0x70, 0xe8, 0xa1, 0x1f, 0x81, 0x43, 0x8f, 0x15, 0xe2, 0xc0, 0x09, - 0xa1, 0xe4, 0x50, 0x89, 0x4f, 0x81, 0x66, 0x67, 0xf6, 0x8f, 0x1d, 0x3b, 0x75, 0xcc, 0xc5, 0xde, - 0x79, 0xef, 0xcd, 0x7b, 0xbf, 0xf7, 0x7e, 0xbf, 0x99, 0x5d, 0x58, 0xf7, 0x88, 0xd7, 0xea, 0xef, - 0xb4, 0xc4, 0x79, 0x33, 0x62, 0x54, 0x50, 0x54, 0xf2, 0x88, 0xd7, 0xec, 0xef, 0x98, 0x9b, 0x2e, - 0xe5, 0x5d, 0xca, 0x5b, 0x5d, 0xee, 0x4b, 0x7f, 0x97, 0xfb, 0x2a, 0xc0, 0xbc, 0xad, 0x1c, 0x9d, - 0x78, 0xd5, 0x52, 0x0b, 0xed, 0xaa, 0xea, 0x64, 0x3e, 0x0e, 0x31, 0x27, 0x89, 0x75, 0x43, 0x5b, - 0xbb, 0xd4, 0xc3, 0x41, 0x1a, 0xea, 0x53, 0x9f, 0xaa, 0x14, 0xf2, 0x49, 0x59, 0xad, 0xdf, 0x0c, - 0x58, 0x6f, 0x73, 0xff, 0x24, 0xf2, 0x1c, 0x81, 0x9f, 0x38, 0xcc, 0xe9, 0x72, 0xf4, 0x09, 0x94, - 0x9d, 0x9e, 0x78, 0x46, 0x19, 0x11, 0x83, 0x9a, 0xd1, 0x30, 0xb6, 0xcb, 0x07, 0xb5, 0x3f, 0x5e, - 0x7e, 0x5c, 0xd5, 0x95, 0xf7, 0x3d, 0x8f, 0x61, 0xce, 0x8f, 0x05, 0x23, 0xa1, 0x6f, 0x67, 0xa1, - 0xe8, 0x1e, 0x94, 0xa2, 0x38, 0x43, 0xad, 0xd0, 0x30, 0xb6, 0x97, 0x77, 0xd7, 0x9a, 0xaa, 0xb3, - 0xa6, 0xca, 0x7b, 0x30, 0xff, 0xea, 0xef, 0x3b, 0x73, 0xb6, 0x8e, 0x41, 0x1f, 0xc0, 0x82, 0xa0, - 0x67, 0x38, 0xac, 0x15, 0xe3, 0xe0, 0xd5, 0x24, 0xf8, 0x2b, 0x69, 0xb4, 0x95, 0x6f, 0x6f, 0xed, - 0xf9, 0x9b, 0x17, 0x77, 0xb3, 0x12, 0xd6, 0x6d, 0xd8, 0x1c, 0x41, 0x6b, 0x63, 0x1e, 0xd1, 0x90, - 0x63, 0xeb, 0x17, 0x03, 0x2a, 0x6d, 0xee, 0xef, 0x07, 0x01, 0x75, 0x1d, 0x81, 0xbf, 0x76, 0x7a, - 0x81, 0x98, 0xb9, 0x95, 0x1a, 0x2c, 0xf2, 0xde, 0xe9, 0x77, 0xd8, 0x15, 0x71, 0x2f, 0x65, 0x3b, - 0x59, 0xa2, 0x77, 0xa1, 0x44, 0x19, 0xf1, 0x89, 0xc2, 0x5d, 0xb6, 0xf5, 0xea, 0x0a, 0xd2, 0xe7, - 0x06, 0xd4, 0x46, 0xe1, 0x24, 0x58, 0x51, 0x05, 0x8a, 0x2e, 0xf1, 0x14, 0x20, 0x5b, 0x3e, 0xa2, - 0xf7, 0x61, 0x05, 0x9f, 0x47, 0x84, 0x0d, 0x3a, 0xa7, 0x01, 0x75, 0xcf, 0xe2, 0xaa, 0x45, 0x7b, - 0x59, 0xd9, 0x0e, 0xa4, 0x09, 0xed, 0x40, 0x95, 0x61, 0x9f, 0x70, 0xc1, 0x1c, 0x41, 0x68, 0xd8, - 0xa1, 0x91, 0xfc, 0xe3, 0x1a, 0xc7, 0x46, 0xde, 0x77, 0xa4, 0x5c, 0xd6, 0x4b, 0xc5, 0xee, 0x13, - 0x46, 0xfb, 0xf8, 0x1b, 0x22, 0x42, 0xcc, 0x67, 0x67, 0xd7, 0x84, 0xa5, 0x88, 0xd1, 0x08, 0x33, - 0x31, 0xd0, 0x33, 0x49, 0xd7, 0x72, 0x5c, 0xdf, 0xab, 0xf4, 0x31, 0x9a, 0x15, 0x3b, 0x59, 0x66, - 0x2c, 0xcf, 0xdf, 0x80, 0xe5, 0xa3, 0x98, 0xe5, 0x3c, 0xea, 0x74, 0x72, 0x31, 0x31, 0xae, 0x2b, - 0x2b, 0x49, 0xec, 0x4b, 0x76, 0xb2, 0xbc, 0x0e, 0x9f, 0xf5, 0x23, 0xac, 0xb4, 0xb9, 0x7f, 0x3c, - 0x08, 0x5d, 0x25, 0x8b, 0x87, 0x00, 0x2e, 0x0d, 0x05, 0xa3, 0x41, 0x80, 0xd9, 0x5b, 0x87, 0x90, - 0x8b, 0x9d, 0x4e, 0xb5, 0xeb, 0xb2, 0x9f, 0xdc, 0x2e, 0xeb, 0x3e, 0x54, 0xf3, 0xf5, 0xdf, 0xde, - 0x8d, 0xf5, 0xaf, 0x01, 0xb7, 0xda, 0xdc, 0xb7, 0x63, 0x52, 0x31, 0x3b, 0xcc, 0x10, 0xcc, 0xca, - 0x9f, 0xd6, 0x5c, 0x21, 0xd3, 0xdc, 0x04, 0x29, 0xa3, 0x3d, 0x58, 0x93, 0xdb, 0x70, 0x28, 0x88, - 0x1b, 0xcb, 0xa9, 0x36, 0xdf, 0x28, 0x6e, 0x2f, 0xef, 0xa2, 0xa4, 0xd9, 0x43, 0x86, 0x3d, 0xe9, - 0x75, 0x02, 0x7b, 0x24, 0x32, 0x9b, 0xcf, 0xc2, 0x0d, 0xf8, 0xfe, 0xb9, 0x00, 0x5b, 0x63, 0x9b, - 0x9d, 0x82, 0xf6, 0x61, 0x2a, 0x0b, 0x37, 0xa0, 0xf2, 0x08, 0x96, 0x1c, 0xd7, 0xa5, 0xbd, 0x50, - 0x48, 0xd5, 0xca, 0x06, 0x1f, 0x24, 0x68, 0xaf, 0x05, 0xd3, 0xdc, 0xd7, 0xbb, 0x1e, 0x85, 0x82, - 0x0d, 0xec, 0x34, 0x89, 0xf9, 0x29, 0xac, 0x0e, 0xb9, 0xe4, 0xc8, 0xcf, 0xf0, 0x20, 0x39, 0xe6, - 0x67, 0x78, 0x80, 0xaa, 0xb0, 0xd0, 0x77, 0x82, 0x1e, 0xd6, 0x34, 0xa8, 0xc5, 0x5e, 0xe1, 0xa1, - 0x21, 0x67, 0x20, 0x35, 0xba, 0xaf, 0x86, 0xf2, 0x03, 0x9e, 0x99, 0xe7, 0xd9, 0x07, 0xb2, 0x0b, - 0x8b, 0x8e, 0x72, 0x2a, 0x41, 0x5c, 0xb3, 0x2d, 0x09, 0xcc, 0x69, 0x68, 0x7e, 0x48, 0x43, 0x33, - 0xe9, 0xe0, 0x24, 0x3e, 0x26, 0xe9, 0x08, 0xa6, 0x60, 0x3f, 0x2d, 0x53, 0x98, 0x5c, 0xc6, 0xfa, - 0xbd, 0x08, 0x28, 0xc7, 0xe8, 0x31, 0x66, 0x7d, 0xe2, 0xe2, 0xff, 0x71, 0x09, 0x6c, 0x01, 0xa8, - 0x36, 0x3b, 0x3d, 0x46, 0x34, 0x95, 0x65, 0x65, 0x39, 0x61, 0x04, 0x7d, 0x04, 0x25, 0xee, 0xd2, - 0x08, 0x73, 0x7d, 0x49, 0x6c, 0xa4, 0xef, 0x41, 0xcc, 0xba, 0x84, 0x73, 0x79, 0x35, 0xdb, 0x3a, - 0x04, 0x35, 0x60, 0xd9, 0xc3, 0xdc, 0x65, 0x24, 0xd2, 0x27, 0x4d, 0x26, 0xcb, 0x9b, 0xd0, 0xb7, - 0xf0, 0x0e, 0x57, 0x90, 0x3b, 0x38, 0xf4, 0x22, 0x4a, 0xa4, 0x60, 0x17, 0x62, 0xc1, 0xde, 0x1f, - 0x23, 0x58, 0xdd, 0x5e, 0x53, 0xff, 0x3f, 0x4a, 0xb6, 0x28, 0xb5, 0x56, 0xf8, 0x88, 0x19, 0xdd, - 0x83, 0xa5, 0x2e, 0x16, 0x8e, 0xe7, 0x08, 0xa7, 0x56, 0x8a, 0xf1, 0x56, 0xd2, 0xac, 0xda, 0x6e, - 0xa7, 0x11, 0xd9, 0xc0, 0x17, 0x27, 0x0f, 0xdc, 0x3c, 0x84, 0x5b, 0x63, 0xab, 0xdf, 0xe4, 0x40, - 0x5c, 0xbd, 0x44, 0x1f, 0x83, 0x79, 0xb5, 0xcd, 0x29, 0x34, 0x52, 0x81, 0xa2, 0x97, 0x5d, 0x7c, - 0x1e, 0xf1, 0x76, 0xff, 0x2c, 0x42, 0xb1, 0xcd, 0x7d, 0xf4, 0x18, 0x56, 0x86, 0x3e, 0x7c, 0x36, - 0x73, 0xe3, 0xcc, 0x3b, 0xcc, 0x3b, 0x13, 0x1c, 0x69, 0xf5, 0xcf, 0xa1, 0x9c, 0x9d, 0xdc, 0x6a, - 0x2e, 0x3a, 0xb5, 0x9a, 0xef, 0x8d, 0xb3, 0xa6, 0x09, 0xbe, 0x80, 0xd5, 0xe1, 0x2f, 0x97, 0x5a, - 0x3e, 0x3c, 0xef, 0x31, 0x1b, 0x93, 0x3c, 0x79, 0x34, 0xd9, 0xbb, 0x2e, 0x8f, 0x26, 0xb5, 0x0e, - 0xa1, 0xb9, 0xfa, 0x5e, 0x7a, 0x0a, 0x68, 0xcc, 0x9b, 0x67, 0xeb, 0xda, 0xeb, 0xd1, 0xfc, 0x70, - 0xaa, 0xdb, 0x13, 0x7d, 0x09, 0xeb, 0xa3, 0x27, 0xd1, 0x9c, 0x2c, 0x63, 0xd3, 0x9a, 0xec, 0x4b, - 0x52, 0x9a, 0x0b, 0x3f, 0xbd, 0x79, 0x71, 0xd7, 0x38, 0xf8, 0xec, 0xd5, 0x45, 0xdd, 0x78, 0x7d, - 0x51, 0x37, 0xfe, 0xb9, 0xa8, 0x1b, 0xbf, 0x5e, 0xd6, 0xe7, 0x5e, 0x5f, 0xd6, 0xe7, 0xfe, 0xba, - 0xac, 0xcf, 0x3d, 0xb5, 0x7c, 0x22, 0x9e, 0xf5, 0x4e, 0x9b, 0x2e, 0xed, 0xb6, 0x68, 0xc8, 0x69, - 0xc8, 0x5a, 0xf1, 0xcf, 0x79, 0x4b, 0x7e, 0x29, 0x8b, 0x41, 0x84, 0xf9, 0x69, 0x29, 0xfe, 0x20, - 0x7e, 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0xa6, 0x2b, 0x0b, 0xa0, 0x0b, 0x00, 0x00, + // 922 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0xd8, 0x89, 0x1b, 0xbf, 0xf9, 0x70, 0x98, 0x04, 0xe2, 0x6c, 0x5b, 0x37, 0xdd, 0x0a, + 0x29, 0x14, 0xb0, 0x95, 0x54, 0xa0, 0xaa, 0x70, 0x20, 0xa9, 0x90, 0x2a, 0x21, 0x93, 0xb2, 0x29, + 0x20, 0x55, 0x48, 0xd1, 0x66, 0x76, 0xb4, 0x19, 0xb2, 0xde, 0x59, 0xcd, 0x8c, 0x4d, 0xcc, 0x89, + 0x8f, 0x2b, 0x07, 0x7e, 0x02, 0x3f, 0x00, 0x89, 0x1e, 0xfa, 0x23, 0x2a, 0xb8, 0x54, 0x9c, 0x38, + 0x21, 0x94, 0x1c, 0xfa, 0x17, 0x38, 0x56, 0xbb, 0x33, 0xfb, 0x61, 0x3b, 0x4e, 0xdd, 0xe4, 0x62, + 0xef, 0x3b, 0xcf, 0x3b, 0xef, 0xd7, 0xf3, 0xcc, 0xec, 0x42, 0xcd, 0x63, 0x5e, 0xab, 0xb7, 0xd9, + 0x52, 0xc7, 0xcd, 0x48, 0x70, 0xc5, 0x71, 0xc5, 0x63, 0x5e, 0xb3, 0xb7, 0x69, 0xad, 0x12, 0x2e, + 0x3b, 0x5c, 0xb6, 0x3a, 0xd2, 0x8f, 0xf1, 0x8e, 0xf4, 0xb5, 0x83, 0xb5, 0xa6, 0x81, 0xfd, 0xc4, + 0x6a, 0x69, 0xc3, 0x40, 0x2b, 0x26, 0x98, 0x4f, 0x43, 0x2a, 0x59, 0xba, 0xba, 0x6c, 0x56, 0x3b, + 0xdc, 0xa3, 0x41, 0xe6, 0xea, 0x73, 0x9f, 0xeb, 0x10, 0xf1, 0x93, 0x5e, 0xb5, 0x7f, 0x47, 0x50, + 0x6b, 0x4b, 0xff, 0xcb, 0xc8, 0x73, 0x15, 0x7d, 0xe8, 0x0a, 0xb7, 0x23, 0xf1, 0x87, 0x50, 0x75, + 0xbb, 0xea, 0x90, 0x0b, 0xa6, 0xfa, 0x75, 0xb4, 0x8e, 0x36, 0xaa, 0x3b, 0xf5, 0xbf, 0x9f, 0xbe, + 0xbf, 0x62, 0x32, 0x6f, 0x7b, 0x9e, 0xa0, 0x52, 0xee, 0x29, 0xc1, 0x42, 0xdf, 0xc9, 0x5d, 0xf1, + 0x7b, 0x50, 0x89, 0x92, 0x08, 0xf5, 0xd2, 0x3a, 0xda, 0x98, 0xdb, 0x5a, 0x6c, 0xea, 0xce, 0x9a, + 0x3a, 0xee, 0xce, 0xf4, 0xb3, 0x7f, 0x6f, 0x4c, 0x39, 0xc6, 0x07, 0xdf, 0x82, 0x19, 0xc5, 0x8f, + 0x68, 0x58, 0x2f, 0x27, 0xce, 0x0b, 0xa9, 0xf3, 0xa3, 0x78, 0xd1, 0xd1, 0xd8, 0xbd, 0xc5, 0x9f, + 0x5e, 0x3c, 0xb9, 0x9d, 0xa7, 0xb0, 0xd7, 0x60, 0x75, 0xa8, 0x5a, 0x87, 0xca, 0x88, 0x87, 0x92, + 0xda, 0xbf, 0x20, 0x58, 0x6a, 0x4b, 0x7f, 0x3b, 0x08, 0x38, 0x71, 0x15, 0xfd, 0xca, 0xed, 0x06, + 0xea, 0xc2, 0xad, 0xd4, 0xe1, 0x8a, 0xec, 0x1e, 0x7c, 0x4b, 0x89, 0x4a, 0x7a, 0xa9, 0x3a, 0xa9, + 0x89, 0xdf, 0x82, 0x0a, 0x17, 0xcc, 0x67, 0xba, 0xee, 0xaa, 0x63, 0xac, 0x91, 0x4a, 0x7f, 0x43, + 0x50, 0x1f, 0x2e, 0x27, 0xad, 0x15, 0x2f, 0x41, 0x99, 0x30, 0x4f, 0x17, 0xe4, 0xc4, 0x8f, 0xf8, + 0x26, 0xcc, 0xd3, 0xe3, 0x88, 0x89, 0xfe, 0xfe, 0x41, 0xc0, 0xc9, 0x51, 0x92, 0xb5, 0xec, 0xcc, + 0xe9, 0xb5, 0x9d, 0x78, 0x09, 0x6f, 0xc2, 0x8a, 0xa0, 0x3e, 0x93, 0x4a, 0xb8, 0x8a, 0xf1, 0x70, + 0x9f, 0x47, 0xf1, 0x9f, 0x34, 0x75, 0x2c, 0x17, 0xb1, 0x5d, 0x0d, 0xe1, 0x6b, 0x50, 0x8d, 0xd3, + 0x07, 0x87, 0x5c, 0xaa, 0xfa, 0xf4, 0x3a, 0xda, 0x98, 0x75, 0xf2, 0x05, 0xfb, 0xa9, 0xe6, 0xfe, + 0xa1, 0xe0, 0x3d, 0xfa, 0x35, 0x53, 0x21, 0x95, 0x17, 0xe7, 0xde, 0x82, 0xd9, 0x48, 0xf0, 0x88, + 0x0a, 0xd5, 0x37, 0x13, 0xcb, 0xec, 0x78, 0x98, 0xdf, 0xe9, 0xf0, 0x49, 0xad, 0xf3, 0x4e, 0x6a, + 0xe6, 0x1a, 0x98, 0x7e, 0x0d, 0x0d, 0xec, 0x26, 0x1a, 0x28, 0x56, 0x9d, 0xcd, 0x35, 0xa1, 0x8d, + 0x90, 0x38, 0x13, 0x4a, 0xba, 0x4d, 0xcd, 0xf3, 0xea, 0xb3, 0x7f, 0x46, 0xf0, 0x46, 0x5b, 0xfa, + 0x7b, 0xfd, 0x90, 0xdc, 0xe7, 0xa1, 0x12, 0x3c, 0x08, 0xa8, 0xc0, 0x77, 0x01, 0x48, 0x66, 0xbd, + 0x72, 0x14, 0x05, 0xdf, 0xc9, 0x94, 0x5d, 0x8b, 0xbb, 0x2a, 0xec, 0xb2, 0x3f, 0x80, 0xb5, 0x91, + 0x22, 0x5e, 0xdd, 0x98, 0xfd, 0x17, 0x82, 0x37, 0xdb, 0xd2, 0x77, 0x12, 0xf6, 0xa9, 0x28, 0x34, + 0x70, 0x51, 0x2a, 0x8d, 0x38, 0x4b, 0xb9, 0x38, 0xc7, 0x68, 0x1e, 0x7f, 0x02, 0xd7, 0x88, 0xa0, + 0x1e, 0x0d, 0x15, 0x73, 0x83, 0x7d, 0x22, 0xa8, 0x16, 0xa6, 0x30, 0x55, 0x27, 0xac, 0x56, 0x1d, + 0x2b, 0xf7, 0xb9, 0x6f, 0x5c, 0xd2, 0xbe, 0x46, 0xb8, 0xfd, 0xb1, 0x04, 0xd7, 0xcf, 0xec, 0x66, + 0x02, 0x8a, 0x07, 0x09, 0x2b, 0xbd, 0x06, 0x61, 0xbb, 0x30, 0xeb, 0x12, 0xc2, 0xbb, 0xa1, 0x8a, + 0x15, 0x5a, 0xde, 0x98, 0xdb, 0xba, 0x93, 0x72, 0x76, 0x6e, 0x31, 0xcd, 0x6d, 0xb3, 0xeb, 0xd3, + 0x50, 0x89, 0xbe, 0x93, 0x05, 0xb1, 0x3e, 0x82, 0x85, 0x01, 0x28, 0x9e, 0xe9, 0x11, 0xed, 0xa7, + 0x07, 0xfe, 0x88, 0xf6, 0xf1, 0x0a, 0xcc, 0xf4, 0xdc, 0xa0, 0x4b, 0xcd, 0x9c, 0xb5, 0x71, 0xaf, + 0x74, 0x17, 0xd9, 0x7f, 0x22, 0x58, 0x8e, 0x6f, 0x0e, 0x3d, 0x94, 0xef, 0xe9, 0x1e, 0x15, 0x3d, + 0x46, 0xe8, 0x25, 0x04, 0x99, 0xf3, 0x57, 0x1a, 0xe0, 0xef, 0x5d, 0xa8, 0x48, 0xc2, 0x23, 0x2a, + 0x8d, 0x52, 0x97, 0xb3, 0x0b, 0x9b, 0x8a, 0x0e, 0x93, 0x32, 0xbe, 0x43, 0x1c, 0xe3, 0x32, 0xd9, + 0x59, 0x1d, 0x51, 0xf5, 0x37, 0x70, 0xf5, 0x8c, 0x5e, 0x26, 0x60, 0x33, 0x4b, 0x57, 0x1a, 0x9f, + 0xce, 0xfe, 0x03, 0x01, 0x2e, 0x30, 0x74, 0xf9, 0x49, 0xbd, 0x03, 0x57, 0xa4, 0x0e, 0x62, 0xf2, + 0xd6, 0xd2, 0xbc, 0x69, 0xe5, 0x29, 0x7e, 0xc1, 0x53, 0xfe, 0x00, 0xac, 0xd1, 0x82, 0x27, 0x18, + 0xc7, 0x12, 0x94, 0xbd, 0xfc, 0x50, 0x7a, 0xcc, 0xdb, 0xfa, 0xbf, 0x0c, 0xe5, 0xb6, 0xf4, 0xf1, + 0x03, 0x98, 0x1f, 0x78, 0x7b, 0xaf, 0x16, 0xa4, 0x5b, 0x04, 0xac, 0x1b, 0x63, 0x80, 0x2c, 0xfb, + 0x23, 0x58, 0x1a, 0x11, 0xdd, 0xd5, 0xc2, 0xa6, 0x61, 0xd0, 0xba, 0x75, 0x0e, 0x98, 0x45, 0xfd, + 0x0c, 0x16, 0x06, 0xdf, 0xc9, 0xf5, 0xe2, 0xae, 0x22, 0x62, 0xad, 0x8f, 0x43, 0xb2, 0x60, 0x9f, + 0xc3, 0xe2, 0xd0, 0x35, 0xbd, 0x56, 0xd8, 0x33, 0x08, 0x59, 0x37, 0xc7, 0x42, 0x59, 0xbc, 0xc7, + 0x80, 0xcf, 0xb8, 0x39, 0xaf, 0x9f, 0x7b, 0xfa, 0xad, 0xb7, 0x27, 0xba, 0x1c, 0xf0, 0x17, 0x50, + 0x1b, 0x16, 0xa6, 0x75, 0xc6, 0xce, 0x74, 0x98, 0xf6, 0x78, 0x2c, 0x0d, 0x69, 0xcd, 0xfc, 0xf0, + 0xe2, 0xc9, 0x6d, 0xb4, 0xf3, 0xf1, 0xb3, 0x93, 0x06, 0x7a, 0x7e, 0xd2, 0x40, 0xff, 0x9d, 0x34, + 0xd0, 0xaf, 0xa7, 0x8d, 0xa9, 0xe7, 0xa7, 0x8d, 0xa9, 0x7f, 0x4e, 0x1b, 0x53, 0x8f, 0x6d, 0x9f, + 0xa9, 0xc3, 0xee, 0x41, 0x93, 0xf0, 0x4e, 0x8b, 0x87, 0x92, 0x87, 0xa2, 0x95, 0xfc, 0x1c, 0xb7, + 0xe2, 0x4f, 0x42, 0xd5, 0x8f, 0xa8, 0x3c, 0xa8, 0x24, 0x5f, 0x7e, 0x77, 0x5e, 0x06, 0x00, 0x00, + 0xff, 0xff, 0x14, 0xb5, 0x39, 0x32, 0x89, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1027,13 +977,13 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // Authorize asserts the given controller is the owner of the given address. - Authorize(ctx context.Context, in *MsgAuthorize, opts ...grpc.CallOption) (*MsgAuthorizeResponse, error) + // AuthorizeService asserts the given controller is the owner of the given address. + AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) // 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) - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) + // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. + SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -1057,9 +1007,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) Authorize(ctx context.Context, in *MsgAuthorize, opts ...grpc.CallOption) (*MsgAuthorizeResponse, error) { - out := new(MsgAuthorizeResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/Authorize", in, out, opts...) +func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) { + out := new(MsgAuthorizeServiceResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/AuthorizeService", in, out, opts...) if err != nil { return nil, err } @@ -1075,9 +1025,9 @@ func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opt return out, nil } -func (c *msgClient) SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) { - out := new(MsgSyncVaultResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/SyncVault", in, out, opts...) +func (c *msgClient) SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) { + out := new(MsgSyncControllerResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/SyncController", in, out, opts...) if err != nil { return nil, err } @@ -1108,13 +1058,13 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // Authorize asserts the given controller is the owner of the given address. - Authorize(context.Context, *MsgAuthorize) (*MsgAuthorizeResponse, error) + // AuthorizeService asserts the given controller is the owner of the given address. + AuthorizeService(context.Context, *MsgAuthorizeService) (*MsgAuthorizeServiceResponse, error) // 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) - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) + // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. + SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -1128,14 +1078,14 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (*UnimplementedMsgServer) Authorize(ctx context.Context, req *MsgAuthorize) (*MsgAuthorizeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authorize not implemented") +func (*UnimplementedMsgServer) AuthorizeService(ctx context.Context, req *MsgAuthorizeService) (*MsgAuthorizeServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthorizeService not implemented") } func (*UnimplementedMsgServer) AllocateVault(ctx context.Context, req *MsgAllocateVault) (*MsgAllocateVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented") } -func (*UnimplementedMsgServer) SyncVault(ctx context.Context, req *MsgSyncVault) (*MsgSyncVaultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncVault not implemented") +func (*UnimplementedMsgServer) SyncController(ctx context.Context, req *MsgSyncController) (*MsgSyncControllerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncController not implemented") } func (*UnimplementedMsgServer) RegisterController(ctx context.Context, req *MsgRegisterController) (*MsgRegisterControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") @@ -1166,20 +1116,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_Authorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthorize) +func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAuthorizeService) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).Authorize(ctx, in) + return srv.(MsgServer).AuthorizeService(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Msg/Authorize", + FullMethod: "/did.v1.Msg/AuthorizeService", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Authorize(ctx, req.(*MsgAuthorize)) + return srv.(MsgServer).AuthorizeService(ctx, req.(*MsgAuthorizeService)) } return interceptor(ctx, in, info, handler) } @@ -1202,20 +1152,20 @@ func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_SyncVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSyncVault) +func _Msg_SyncController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSyncController) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SyncVault(ctx, in) + return srv.(MsgServer).SyncController(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Msg/SyncVault", + FullMethod: "/did.v1.Msg/SyncController", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SyncVault(ctx, req.(*MsgSyncVault)) + return srv.(MsgServer).SyncController(ctx, req.(*MsgSyncController)) } return interceptor(ctx, in, info, handler) } @@ -1265,16 +1215,16 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateParams_Handler, }, { - MethodName: "Authorize", - Handler: _Msg_Authorize_Handler, + MethodName: "AuthorizeService", + Handler: _Msg_AuthorizeService_Handler, }, { MethodName: "AllocateVault", Handler: _Msg_AllocateVault_Handler, }, { - MethodName: "SyncVault", - Handler: _Msg_SyncVault_Handler, + MethodName: "SyncController", + Handler: _Msg_SyncController_Handler, }, { MethodName: "RegisterController", @@ -1428,6 +1378,16 @@ func (m *MsgAllocateVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error _ = 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.RegistrationOptions) > 0 { i -= len(m.RegistrationOptions) copy(dAtA[i:], m.RegistrationOptions) @@ -1546,7 +1506,7 @@ func (m *MsgProveWitnessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgSyncVault) Marshal() (dAtA []byte, err error) { +func (m *MsgSyncController) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1556,12 +1516,12 @@ func (m *MsgSyncVault) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSyncVault) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSyncController) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSyncVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSyncController) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1588,7 +1548,7 @@ func (m *MsgSyncVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgSyncVaultResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgSyncControllerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1598,12 +1558,12 @@ func (m *MsgSyncVaultResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSyncVaultResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSyncControllerResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSyncVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSyncControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1641,31 +1601,12 @@ func (m *MsgRegisterController) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Token != nil { - { - size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } + if len(m.CredentialCreationResponse) > 0 { + i -= len(m.CredentialCreationResponse) + copy(dAtA[i:], m.CredentialCreationResponse) + i = encodeVarintTx(dAtA, i, uint64(len(m.CredentialCreationResponse))) i-- - dAtA[i] = 0x2a - } - if len(m.Authentication) > 0 { - for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Authentication[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } + dAtA[i] = 0x22 } if len(m.Origin) > 0 { i -= len(m.Origin) @@ -1750,7 +1691,7 @@ func (m *MsgRegisterControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgAuthorize) Marshal() (dAtA []byte, err error) { +func (m *MsgAuthorizeService) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1760,12 +1701,12 @@ func (m *MsgAuthorize) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthorize) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAuthorizeService) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthorize) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAuthorizeService) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1780,40 +1721,38 @@ func (m *MsgAuthorize) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 + } + if m.Scopes != nil { + { + size, err := m.Scopes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } 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] = 0x22 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.Controller) > 0 { i -= len(m.Controller) copy(dAtA[i:], m.Controller) i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) 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 *MsgAuthorizeResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgAuthorizeServiceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1823,12 +1762,12 @@ func (m *MsgAuthorizeResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthorizeResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAuthorizeServiceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthorizeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAuthorizeServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1888,62 +1827,17 @@ func (m *MsgRegisterService) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a - } - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.ServiceEndpoints) > 0 { - for k := range m.ServiceEndpoints { - v := m.ServiceEndpoints[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTx(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTx(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTx(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x22 - } - if m.Scopes != nil { - { - size, err := m.Scopes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x1a } - if len(m.OriginUri) > 0 { - i -= len(m.OriginUri) - copy(dAtA[i:], m.OriginUri) - i = encodeVarintTx(dAtA, i, uint64(len(m.OriginUri))) + if m.Service != nil { + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } @@ -2074,6 +1968,9 @@ func (m *MsgAllocateVaultResponse) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if m.Localhost { + n += 2 + } return n } @@ -2118,7 +2015,7 @@ func (m *MsgProveWitnessResponse) Size() (n int) { return n } -func (m *MsgSyncVault) Size() (n int) { +func (m *MsgSyncController) Size() (n int) { if m == nil { return 0 } @@ -2135,7 +2032,7 @@ func (m *MsgSyncVault) Size() (n int) { return n } -func (m *MsgSyncVaultResponse) Size() (n int) { +func (m *MsgSyncControllerResponse) Size() (n int) { if m == nil { return 0 } @@ -2165,14 +2062,8 @@ func (m *MsgRegisterController) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.Authentication) > 0 { - for _, e := range m.Authentication { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - if m.Token != nil { - l = m.Token.Size() + l = len(m.CredentialCreationResponse) + if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n @@ -2202,28 +2093,24 @@ func (m *MsgRegisterControllerResponse) Size() (n int) { return n } -func (m *MsgAuthorize) Size() (n int) { +func (m *MsgAuthorizeService) 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.Controller) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } l = len(m.Origin) if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if m.Scopes != nil { + l = m.Scopes.Size() + n += 1 + l + sovTx(uint64(l)) + } if m.Token != nil { l = m.Token.Size() n += 1 + l + sovTx(uint64(l)) @@ -2231,7 +2118,7 @@ func (m *MsgAuthorize) Size() (n int) { return n } -func (m *MsgAuthorizeResponse) Size() (n int) { +func (m *MsgAuthorizeServiceResponse) Size() (n int) { if m == nil { return 0 } @@ -2257,28 +2144,8 @@ func (m *MsgRegisterService) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.OriginUri) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Scopes != nil { - l = m.Scopes.Size() - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.ServiceEndpoints) > 0 { - for k, v := range m.ServiceEndpoints { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTx(uint64(len(k))) + 1 + len(v) + sovTx(uint64(len(v))) - n += mapEntrySize + 1 + sovTx(uint64(mapEntrySize)) - } - } - if m.Metadata != nil { - l = m.Metadata.Size() + if m.Service != nil { + l = m.Service.Size() n += 1 + l + sovTx(uint64(l)) } if m.Token != nil { @@ -2769,6 +2636,26 @@ func (m *MsgAllocateVaultResponse) Unmarshal(dAtA []byte) error { } m.RegistrationOptions = 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:]) @@ -3076,7 +2963,7 @@ func (m *MsgProveWitnessResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSyncVault) Unmarshal(dAtA []byte) error { +func (m *MsgSyncController) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3099,10 +2986,10 @@ func (m *MsgSyncVault) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSyncVault: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSyncController: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSyncVault: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSyncController: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3194,7 +3081,7 @@ func (m *MsgSyncVault) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSyncVaultResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSyncControllerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3217,10 +3104,10 @@ func (m *MsgSyncVaultResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSyncVaultResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSyncControllerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSyncVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSyncControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3391,9 +3278,9 @@ func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CredentialCreationResponse", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3403,61 +3290,23 @@ func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Authentication = append(m.Authentication, &Credential{}) - if err := m.Authentication[len(m.Authentication)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Token == nil { - m.Token = &Token{} - } - if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.CredentialCreationResponse = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3709,7 +3558,7 @@ func (m *MsgRegisterControllerResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAuthorize) Unmarshal(dAtA []byte) error { +func (m *MsgAuthorizeService) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3732,45 +3581,13 @@ func (m *MsgAuthorize) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAuthorize: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAuthorizeService: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthorize: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAuthorizeService: 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 Controller", wireType) } @@ -3802,39 +3619,7 @@ func (m *MsgAuthorize) Unmarshal(dAtA []byte) error { } m.Controller = string(dAtA[iNdEx:postIndex]) 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 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.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } @@ -3866,7 +3651,43 @@ func (m *MsgAuthorize) Unmarshal(dAtA []byte) error { } m.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scopes == nil { + m.Scopes = &Permissions{} + } + if err := m.Scopes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } @@ -3923,7 +3744,7 @@ func (m *MsgAuthorize) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAuthorizeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAuthorizeServiceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3946,10 +3767,10 @@ func (m *MsgAuthorizeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAuthorizeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAuthorizeServiceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthorizeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAuthorizeServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4092,9 +3913,9 @@ func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4104,256 +3925,29 @@ func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.OriginUri = string(dAtA[iNdEx:postIndex]) + if m.Service == nil { + m.Service = &Service{} + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scopes == nil { - m.Scopes = &Permissions{} - } - if err := m.Scopes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ServiceEndpoints == nil { - m.ServiceEndpoints = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTx - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTx - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTx - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTx - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ServiceEndpoints[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } diff --git a/x/did/types/utils.go b/x/did/types/utils.go deleted file mode 100644 index 42b592caf..000000000 --- a/x/did/types/utils.go +++ /dev/null @@ -1,66 +0,0 @@ -package types - -import ( - "crypto/hmac" - "crypto/sha512" - "encoding/binary" - "errors" - "math/big" - - "github.com/btcsuite/btcd/btcec/v2" -) - -// ComputeAccountPublicKey computes the public key of a child key given the extended public key, chain code, and index. -func ComputeAccountPublicKey(extPubKey []byte, chainCode uint32, index int) ([]byte, error) { - // Check if the index is a hardened child key - if chainCode&0x80000000 != 0 && index < 0 { - return nil, errors.New("invalid index") - } - - // Serialize the public key - pubKey, err := btcec.ParsePubKey(extPubKey) - if err != nil { - return nil, err - } - pubKeyBytes := pubKey.SerializeCompressed() - - // Serialize the index - indexBytes := make([]byte, 4) - binary.BigEndian.PutUint32(indexBytes, uint32(index)) - - // Compute the HMAC-SHA512 - mac := hmac.New(sha512.New, []byte{byte(chainCode)}) - mac.Write(pubKeyBytes) - mac.Write(indexBytes) - I := mac.Sum(nil) - - // Split I into two 32-byte sequences - IL := I[:32] - - // Convert IL to a big integer - ilNum := new(big.Int).SetBytes(IL) - - // Check if parse256(IL) >= n - curve := btcec.S256() - if ilNum.Cmp(curve.N) >= 0 { - return nil, errors.New("invalid child key") - } - - // Compute the child public key - ilx, ily := curve.ScalarBaseMult(IL) - childX, childY := curve.Add(ilx, ily, pubKey.X(), pubKey.Y()) - lx := newBigIntFieldVal(childX) - ly := newBigIntFieldVal(childY) - - // Create the child public key - childPubKey := btcec.NewPublicKey(lx, ly) - childPubKeyBytes := childPubKey.SerializeCompressed() - return childPubKeyBytes, nil -} - -// newBigIntFieldVal creates a new field value from a big integer. -func newBigIntFieldVal(val *big.Int) *btcec.FieldVal { - lx := new(btcec.FieldVal) - lx.SetByteSlice(val.Bytes()) - return lx -} diff --git a/x/did/types/zkprop.go b/x/did/types/zkprop.go index c90ba5422..27bf81ecf 100644 --- a/x/did/types/zkprop.go +++ b/x/did/types/zkprop.go @@ -7,12 +7,18 @@ import ( "github.com/onsonr/crypto/core/curves" ) +// Accumulator is the accumulator for the ZKP +type Accumulator []byte + // Element is the element for the BLS scheme type Element = accumulator.Element -// NewProperty creates a new Property which is used for ZKP -func NewProperty(propertyKey string, pubKey []byte) (*Property, error) { - input := append(pubKey, []byte(propertyKey)...) +// Witness is the witness for the ZKP +type Witness []byte + +// NewProof creates a new Proof which is used for ZKP +func NewProof(id, controller, issuer, property string, pubKey []byte) (*Proof, error) { + input := append(pubKey, []byte(property)...) hash := []byte(input) curve := curves.BLS12381(&curves.PointBls12381G1{}) @@ -26,47 +32,54 @@ func NewProperty(propertyKey string, pubKey []byte) (*Property, error) { return nil, fmt.Errorf("failed to marshal secret key: %w", err) } - return &Property{Key: keyBytes}, nil + return &Proof{ + Id: id, + Controller: controller, + Issuer: issuer, + Property: property, + Accumulator: keyBytes, + }, nil } -// CreateAccumulator creates a new accumulator -func CreateAccumulator(prop *Property, values ...string) (*Accumulator, error) { +// CreateAccumulator creates a new accumulator for a Proof +func CreateAccumulator(proof *Proof, values ...string) error { curve := curves.BLS12381(&curves.PointBls12381G1{}) acc, err := new(accumulator.Accumulator).New(curve) if err != nil { - return nil, err + return err } secretKey := new(accumulator.SecretKey) - if err := secretKey.UnmarshalBinary(prop.Key); err != nil { - return nil, err + if err := secretKey.UnmarshalBinary(proof.Accumulator); err != nil { + return err } fin, _, err := acc.Update(secretKey, ConvertValuesToZeroKnowledgeElements(values), nil) if err != nil { - return nil, err + return err } accBytes, err := fin.MarshalBinary() if err != nil { - return nil, fmt.Errorf("failed to marshal accumulator: %w", err) + return fmt.Errorf("failed to marshal accumulator: %w", err) } - return &Accumulator{Accumulator: accBytes}, nil + proof.Accumulator = accBytes + return nil } -// CreateWitness creates a witness for the accumulator for a given value -func CreateWitness(prop *Property, acc *Accumulator, value string) (*Witness, error) { +// CreateWitness creates a witness for the accumulator in a Proof for a given value +func CreateWitness(proof *Proof, value string) ([]byte, error) { curve := curves.BLS12381(&curves.PointBls12381G1{}) element := curve.Scalar.Hash([]byte(value)) secretKey := new(accumulator.SecretKey) - if err := secretKey.UnmarshalBinary(prop.Key); err != nil { + if err := secretKey.UnmarshalBinary(proof.Accumulator); err != nil { return nil, err } accObj := new(accumulator.Accumulator) - if err := accObj.UnmarshalBinary(acc.Accumulator); err != nil { + if err := accObj.UnmarshalBinary(proof.Accumulator); err != nil { return nil, fmt.Errorf("failed to unmarshal accumulator: %w", err) } @@ -79,14 +92,13 @@ func CreateWitness(prop *Property, acc *Accumulator, value string) (*Witness, er if err != nil { return nil, fmt.Errorf("failed to marshal witness: %w", err) } - - return &Witness{Witness: witnessBytes}, nil + return witnessBytes, nil } // VerifyWitness proves that a value is a member of the accumulator -func VerifyWitness(prop *Property, acc *Accumulator, witness *Witness) error { +func VerifyWitness(proof *Proof, acc Accumulator, witness Witness) error { secretKey := new(accumulator.SecretKey) - if err := secretKey.UnmarshalBinary(prop.Key); err != nil { + if err := secretKey.UnmarshalBinary([]byte(proof.Id)); err != nil { return err } @@ -97,41 +109,42 @@ func VerifyWitness(prop *Property, acc *Accumulator, witness *Witness) error { } accObj := new(accumulator.Accumulator) - if err := accObj.UnmarshalBinary(acc.Accumulator); err != nil { + if err := accObj.UnmarshalBinary(proof.Accumulator); err != nil { return fmt.Errorf("failed to unmarshal accumulator: %w", err) } witnessObj := new(accumulator.MembershipWitness) - if err := witnessObj.UnmarshalBinary(witness.Witness); err != nil { + if err := witnessObj.UnmarshalBinary(witness); err != nil { return fmt.Errorf("failed to unmarshal witness: %w", err) } return witnessObj.Verify(publicKey, accObj) } -// UpdateAccumulator updates the accumulator with new values -func UpdateAccumulator(prop *Property, acc *Accumulator, addValues []string, removeValues []string) (*Accumulator, error) { +// UpdateAccumulator updates the accumulator in a Proof with new values +func UpdateAccumulator(proof *Proof, addValues []string, removeValues []string) error { secretKey := new(accumulator.SecretKey) - if err := secretKey.UnmarshalBinary(prop.Key); err != nil { - return nil, err + if err := secretKey.UnmarshalBinary(proof.Accumulator); err != nil { + return err } accObj := new(accumulator.Accumulator) - if err := accObj.UnmarshalBinary(acc.Accumulator); err != nil { - return nil, fmt.Errorf("failed to unmarshal accumulator: %w", err) + if err := accObj.UnmarshalBinary(proof.Accumulator); err != nil { + return fmt.Errorf("failed to unmarshal accumulator: %w", err) } updatedAcc, _, err := accObj.Update(secretKey, ConvertValuesToZeroKnowledgeElements(addValues), ConvertValuesToZeroKnowledgeElements(removeValues)) if err != nil { - return nil, err + return err } updatedAccBytes, err := updatedAcc.MarshalBinary() if err != nil { - return nil, fmt.Errorf("failed to marshal updated accumulator: %w", err) + return fmt.Errorf("failed to marshal updated accumulator: %w", err) } - return &Accumulator{Accumulator: updatedAccBytes}, nil + proof.Accumulator = updatedAccBytes + return nil } // ConvertValuesToZeroKnowledgeElements converts a slice of strings to a slice of accumulator elements diff --git a/x/oracle/README.md b/x/oracle/README.md deleted file mode 100644 index 31422a72b..000000000 --- a/x/oracle/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# `x/oracle` - -Our `oracle` module serves as a ICS-20 Compliant middleware which leverages InterChain Accounts and the Transfer module to associate derived wallets with Oracles and facilitate the transfer of tokens between them. - -## Concepts - -Describe specialized concepts and definitions used throughout the spec. - -## State - -Specify and describe structures expected to marshalled into the store, and their keys - -## State Transitions - -Standard state transition operations triggered by hooks, messages, etc. - -## Messages - -Specify message structure(s) and expected state machine behaviour(s). https://api.coingecko.com/api/v3/coins/list - -## Begin Block - -Specify any begin-block operations. - -## End Block - -Specify any end-block operations. - -## Hooks - -Describe available hooks to be called by/from this module. - -## Events - -List and describe event tags used. - -## Client - -List and describe CLI commands and gRPC and REST endpoints. - -## Params - -List all module parameters, their types (in JSON) and services. - -## Future Improvements - -Describe future improvements of this module. - -## Tests - -Acceptance tests. - -## Appendix - -Supplementary details referenced elsewhere within the spec. diff --git a/x/oracle/ibc_middleware.go b/x/oracle/ibc_middleware.go deleted file mode 100644 index 0674a10a6..000000000 --- a/x/oracle/ibc_middleware.go +++ /dev/null @@ -1,168 +0,0 @@ -package oracle - -import ( - "github.com/onsonr/sonr/x/oracle/keeper" - - sdk "github.com/cosmos/cosmos-sdk/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" -) - -var _ porttypes.Middleware = &IBCMiddleware{} - -// IBCMiddleware implements the ICS26 callbacks for the middleware given the -// keeper and the underlying application. -type IBCMiddleware struct { - app porttypes.IBCModule - keeper keeper.Keeper -} - -// NewIBCMiddleware creates a new IBCMiddleware given the keeper and underlying application. -func NewIBCMiddleware(app porttypes.IBCModule, k keeper.Keeper) IBCMiddleware { - return IBCMiddleware{ - app: app, - keeper: k, - } -} - -// OnChanOpenInit implements the IBCMiddleware interface. -func (im IBCMiddleware) OnChanOpenInit( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID string, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version string, -) (string, error) { - return im.app.OnChanOpenInit( - ctx, - order, - connectionHops, - portID, - channelID, - chanCap, - counterparty, - version, - ) -} - -// OnChanOpenTry implements the IBCMiddleware interface. -func (im IBCMiddleware) OnChanOpenTry( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID, channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - counterpartyVersion string, -) (version string, err error) { - return im.app.OnChanOpenTry( - ctx, - order, - connectionHops, - portID, - channelID, - chanCap, - counterparty, - counterpartyVersion, - ) -} - -// OnChanOpenAck implements the IBCMiddleware interface. -func (im IBCMiddleware) OnChanOpenAck( - ctx sdk.Context, - portID, channelID string, - counterpartyChannelID string, - counterpartyVersion string, -) error { - return im.app.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelID, counterpartyVersion) -} - -// OnChanOpenConfirm implements the IBCMiddleware interface. -func (im IBCMiddleware) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error { - return im.app.OnChanOpenConfirm(ctx, portID, channelID) -} - -// OnChanCloseInit implements the IBCMiddleware interface. -func (im IBCMiddleware) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error { - return im.app.OnChanCloseInit(ctx, portID, channelID) -} - -// OnChanCloseConfirm implements the IBCMiddleware interface. -func (im IBCMiddleware) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error { - return im.app.OnChanCloseConfirm(ctx, portID, channelID) -} - -// OnRecvPacket implements the IBCMiddleware interface. -func (im IBCMiddleware) OnRecvPacket( - ctx sdk.Context, - packet channeltypes.Packet, - relayer sdk.AccAddress, -) ibcexported.Acknowledgement { - return im.app.OnRecvPacket(ctx, packet, relayer) -} - -// OnAcknowledgementPacket implements the IBCMiddleware interface. -func (im IBCMiddleware) OnAcknowledgementPacket( - ctx sdk.Context, - packet channeltypes.Packet, - acknowledgement []byte, - relayer sdk.AccAddress, -) error { - return im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) -} - -// OnTimeoutPacket implements the IBCMiddleware interface. -func (im IBCMiddleware) OnTimeoutPacket( - ctx sdk.Context, - packet channeltypes.Packet, - relayer sdk.AccAddress, -) error { - return im.app.OnTimeoutPacket(ctx, packet, relayer) -} - -// SendPacket implements the ICS4 Wrapper interface. -func (im IBCMiddleware) SendPacket( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - sourcePort string, - sourceChannel string, - timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, - data []byte, -) (sequence uint64, err error) { - return im.keeper.SendPacket( - ctx, - chanCap, - sourceChannel, - sourceChannel, - timeoutHeight, - timeoutTimestamp, - data, - ) -} - -// WriteAcknowledgement implements the ICS4 Wrapper interface. -func (im IBCMiddleware) WriteAcknowledgement( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - packet ibcexported.PacketI, - ack ibcexported.Acknowledgement, -) error { - return im.keeper.WriteAcknowledgement(ctx, chanCap, packet, ack) -} - -// GetAppVersion implements the ICS4 Wrapper interface. -func (im IBCMiddleware) GetAppVersion( - ctx sdk.Context, - portID string, - channelID string, -) (string, bool) { - return im.keeper.GetAppVersion(ctx, portID, channelID) -} diff --git a/x/oracle/keeper/genesis.go b/x/oracle/keeper/genesis.go deleted file mode 100644 index af1457f1b..000000000 --- a/x/oracle/keeper/genesis.go +++ /dev/null @@ -1,16 +0,0 @@ -package keeper - -import ( - "github.com/onsonr/sonr/x/oracle/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// InitGenesis initializes the middlewares state from a specified GenesisState. -func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState) { -} - -// ExportGenesis exports the middlewares state. -func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { - return &types.GenesisState{} -} diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go deleted file mode 100644 index 3cb2a7e11..000000000 --- a/x/oracle/keeper/keeper.go +++ /dev/null @@ -1,78 +0,0 @@ -package keeper - -import ( - "github.com/onsonr/sonr/x/oracle/types" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - - "cosmossdk.io/log" - - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" -) - -// Keeper defines the middleware keeper. -type Keeper struct { - cdc codec.BinaryCodec - msgServiceRouter *baseapp.MsgServiceRouter - - ics4Wrapper porttypes.ICS4Wrapper -} - -// NewKeeper creates a new swap Keeper instance. -func NewKeeper( - cdc codec.BinaryCodec, - msgServiceRouter *baseapp.MsgServiceRouter, - ics4Wrapper porttypes.ICS4Wrapper, -) Keeper { - return Keeper{ - cdc: cdc, - msgServiceRouter: msgServiceRouter, - ics4Wrapper: ics4Wrapper, - } -} - -// Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", "x/"+ibcexported.ModuleName+"-"+types.ModuleName) -} - -// SendPacket wraps IBC ChannelKeeper's SendPacket function. -func (k Keeper) SendPacket( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - sourcePort string, - sourceChannel string, - timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, - data []byte, -) (sequence uint64, err error) { - return k.ics4Wrapper.SendPacket( - ctx, - chanCap, - sourcePort, - sourceChannel, - timeoutHeight, - timeoutTimestamp, - data, - ) -} - -// WriteAcknowledgement wraps IBC ChannelKeeper's WriteAcknowledgement function. -func (k Keeper) WriteAcknowledgement( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - packet ibcexported.PacketI, - acknowledgement ibcexported.Acknowledgement, -) error { - return k.ics4Wrapper.WriteAcknowledgement(ctx, chanCap, packet, acknowledgement) -} - -// GetAppVersion wraps IBC ChannelKeeper's GetAppVersion function. -func (k Keeper) GetAppVersion(ctx sdk.Context, portID string, channelID string) (string, bool) { - return k.ics4Wrapper.GetAppVersion(ctx, portID, channelID) -} diff --git a/x/oracle/module.go b/x/oracle/module.go deleted file mode 100644 index 39016479a..000000000 --- a/x/oracle/module.go +++ /dev/null @@ -1,127 +0,0 @@ -package oracle - -import ( - "encoding/json" - - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/onsonr/sonr/x/oracle/keeper" - "github.com/onsonr/sonr/x/oracle/types" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - abci "github.com/cometbft/cometbft/abci/types" -) - -var ( - _ module.AppModuleBasic = AppModuleBasic{} - _ module.AppModule = AppModule{} - _ module.AppModuleSimulation = AppModule{} -) - -// AppModuleBasic is the middleware AppModuleBasic. -type AppModuleBasic struct{} - -// Name implements AppModuleBasic interface. -func (AppModuleBasic) Name() string { - return types.ModuleName -} - -// RegisterLegacyAminoCodec implements AppModuleBasic interface. -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} - -// RegisterInterfaces registers module concrete types into protobuf Any. -func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {} - -// DefaultGenesis returns default genesis state as raw bytes for the swap module. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return nil -} - -// ValidateGenesis performs genesis state validation for the swap module. -func (AppModuleBasic) ValidateGenesis( - cdc codec.JSONCodec, - config client.TxEncodingConfig, - bz json.RawMessage, -) error { - return nil -} - -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the swap module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {} - -// GetTxCmd implements AppModuleBasic interface. -func (AppModuleBasic) GetTxCmd() *cobra.Command { - return nil -} - -// GetQueryCmd implements AppModuleBasic interface. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return nil -} - -// AppModule is the middleware AppModule. -type AppModule struct { - AppModuleBasic - keeper keeper.Keeper -} - -// IsAppModule implements module.AppModule. -func (AppModule) IsAppModule() { -} - -// IsOnePerModuleType implements module.AppModule. -func (AppModule) IsOnePerModuleType() { -} - -// NewAppModule initializes a new AppModule for the middleware. -func NewAppModule(keeper keeper.Keeper) *AppModule { - return &AppModule{ - keeper: keeper, - } -} - -// RegisterInvariants implements the AppModule interface. -func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} - -// RegisterServices registers module services. -func (am AppModule) RegisterServices(cfg module.Configurator) {} - -// InitGenesis performs genesis initialization for the ibc-router module. It returns -// no validator updates. -func (am AppModule) InitGenesis( - ctx sdk.Context, - cdc codec.JSONCodec, - data json.RawMessage, -) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - -// ExportGenesis returns the exported genesis state as raw bytes for the swap module. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - return nil -} - -// ConsensusVersion returns the consensus state breaking version for the swap module. -func (am AppModule) ConsensusVersion() uint64 { return 1 } - -// GenerateGenesisState implements the AppModuleSimulation interface. -func (am AppModule) GenerateGenesisState(simState *module.SimulationState) {} - -// ProposalContents implements the AppModuleSimulation interface. -func (am AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { - return nil -} - -// RegisterStoreDecoder implements the AppModuleSimulation interface. -func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {} - -// WeightedOperations implements the AppModuleSimulation interface. -func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { - return nil -} diff --git a/x/oracle/types/errors.go b/x/oracle/types/errors.go deleted file mode 100644 index f46defe81..000000000 --- a/x/oracle/types/errors.go +++ /dev/null @@ -1,7 +0,0 @@ -package types - -import sdkerrors "cosmossdk.io/errors" - -var ( - ErrInvalidGenesisState = sdkerrors.Register(ModuleName, 1, "invalid genesis state") -) diff --git a/x/oracle/types/expected_keepers.go b/x/oracle/types/expected_keepers.go deleted file mode 100644 index 10772f1be..000000000 --- a/x/oracle/types/expected_keepers.go +++ /dev/null @@ -1,3 +0,0 @@ -package types - -// Define the expected interfaces that the middleware needs in order to properly function here. diff --git a/x/oracle/types/genesis.go b/x/oracle/types/genesis.go deleted file mode 100644 index efb7d8e03..000000000 --- a/x/oracle/types/genesis.go +++ /dev/null @@ -1,16 +0,0 @@ -package types - -// DefaultGenesisState returns the default middleware GenesisState. -func DefaultGenesisState() *GenesisState { - return &GenesisState{} -} - -// NewGenesisState initializes and returns a new GenesisState. -func NewGenesisState() *GenesisState { - return &GenesisState{} -} - -// Validate performs basic validation of the GenesisState. -func (gs *GenesisState) Validate() error { - return nil -} diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go deleted file mode 100644 index efeed87fb..000000000 --- a/x/oracle/types/genesis.pb.go +++ /dev/null @@ -1,264 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: oracle/v1/genesis.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the middlewares genesis state. -type GenesisState struct { -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_14b982a0a6345d1d, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func init() { - proto.RegisterType((*GenesisState)(nil), "oracle.v1.GenesisState") -} - -func init() { proto.RegisterFile("oracle/v1/genesis.proto", fileDescriptor_14b982a0a6345d1d) } - -var fileDescriptor_14b982a0a6345d1d = []byte{ - // 144 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x2f, 0x4a, 0x4c, - 0xce, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x48, 0xe8, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, - 0x83, 0x45, 0xf5, 0x41, 0x2c, 0x88, 0x02, 0x25, 0x3e, 0x2e, 0x1e, 0x77, 0x88, 0x8e, 0xe0, 0x92, - 0xc4, 0x92, 0x54, 0x27, 0xfb, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, - 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, - 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcf, 0x2b, 0xce, 0xcf, - 0x2b, 0xd2, 0x07, 0x13, 0x15, 0xfa, 0x50, 0xcb, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, - 0xe6, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x74, 0xe4, 0x19, 0x43, 0x93, 0x00, 0x00, 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/oracle/types/keys.go b/x/oracle/types/keys.go deleted file mode 100644 index d4fedb867..000000000 --- a/x/oracle/types/keys.go +++ /dev/null @@ -1,15 +0,0 @@ -package types - -const ( - // ModuleName defines the name of the middleware. - ModuleName = "oracle" - - // StoreKey is the store key string for the middleware. - StoreKey = ModuleName - - // RouterKey is the message route for the middleware. - RouterKey = ModuleName - - // QuerierRoute is the querier route for the middleware. - QuerierRoute = ModuleName -) diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go deleted file mode 100644 index bc3d610dc..000000000 --- a/x/oracle/types/query.pb.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: oracle/v1/query.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func init() { proto.RegisterFile("oracle/v1/query.proto", fileDescriptor_34238c8dfdfcd7ec) } - -var fileDescriptor_34238c8dfdfcd7ec = []byte{ - // 130 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0x2f, 0x4a, 0x4c, - 0xce, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0xe2, 0x84, 0x08, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x45, - 0xf5, 0x41, 0x2c, 0x88, 0x02, 0x27, 0xfb, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, - 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, - 0x88, 0x52, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcf, 0x2b, - 0xce, 0xcf, 0x2b, 0xd2, 0x07, 0x13, 0x15, 0xfa, 0x50, 0xab, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, - 0xd8, 0xc0, 0xe6, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xa3, 0x30, 0x06, 0x81, 0x00, - 0x00, 0x00, -} diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go deleted file mode 100644 index 8d38e5b0e..000000000 --- a/x/oracle/types/tx.pb.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: oracle/v1/tx.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func init() { proto.RegisterFile("oracle/v1/tx.proto", fileDescriptor_31571edce0094a5d) } - -var fileDescriptor_31571edce0094a5d = []byte{ - // 127 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2f, 0x4a, 0x4c, - 0xce, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, - 0x84, 0x88, 0xe9, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x45, 0xf5, 0x41, 0x2c, - 0x88, 0x02, 0x27, 0xfb, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, - 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x4d, - 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcf, 0x2b, 0xce, 0xcf, 0x2b, - 0xd2, 0x07, 0x13, 0x15, 0xfa, 0x50, 0x7b, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xe6, - 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x68, 0x9c, 0x2d, 0xc2, 0x7e, 0x00, 0x00, 0x00, -}