(no commit message provided)

This commit is contained in:
Prad Nukala 2024-08-10 17:01:14 -04:00 committed by Prad Nukala (aider)
parent 24db9de0ad
commit 2923b8866b
23 changed files with 9499 additions and 1677 deletions

View File

@ -0,0 +1,70 @@
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package didv1
import (
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: 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)
)
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, 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, 0x68, 0x77, 0x61, 0x79, 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_goTypes = []interface{}{}
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
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_did_v1_accounts_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_did_v1_accounts_proto_goTypes,
DependencyIndexes: file_did_v1_accounts_proto_depIdxs,
}.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
}

File diff suppressed because it is too large Load Diff

View File

@ -20,8 +20,11 @@ const _ = grpc.SupportPackageIsVersion7
const ( const (
Query_Params_FullMethodName = "/did.v1.Query/Params" Query_Params_FullMethodName = "/did.v1.Query/Params"
Query_ResolveIdentifier_FullMethodName = "/did.v1.Query/ResolveIdentifier" Query_Accounts_FullMethodName = "/did.v1.Query/Accounts"
Query_WitnessCredential_FullMethodName = "/did.v1.Query/WitnessCredential" Query_Credentials_FullMethodName = "/did.v1.Query/Credentials"
Query_Identities_FullMethodName = "/did.v1.Query/Identities"
Query_Resolve_FullMethodName = "/did.v1.Query/Resolve"
Query_Service_FullMethodName = "/did.v1.Query/Service"
) )
// QueryClient is the client API for Query service. // QueryClient is the client API for Query service.
@ -30,10 +33,16 @@ const (
type QueryClient interface { type QueryClient interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// Accounts returns associated wallet accounts with the DID.
Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error)
// Credentials returns associated credentials with the DID and Service Origin.
Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error)
// Identities returns associated identity with the DID.
Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error)
// Resolve queries the DID document by its id. // Resolve queries the DID document by its id.
ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
// LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. // Service returns associated ServiceInfo for a given Origin
WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error)
} }
type queryClient struct { type queryClient struct {
@ -53,18 +62,45 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
return out, nil return out, nil
} }
func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) {
out := new(QueryResolveResponse) out := new(QueryAccountsResponse)
err := c.cc.Invoke(ctx, Query_ResolveIdentifier_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Accounts_FullMethodName, in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) { func (c *queryClient) Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) {
out := new(QueryWitnessCredentialResponse) out := new(QueryCredentialsResponse)
err := c.cc.Invoke(ctx, Query_WitnessCredential_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Credentials_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) {
out := new(QueryIdentitiesResponse)
err := c.cc.Invoke(ctx, Query_Identities_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) {
out := new(QueryResolveResponse)
err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) {
out := new(QueryServiceResponse)
err := c.cc.Invoke(ctx, Query_Service_FullMethodName, in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -77,10 +113,16 @@ func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCre
type QueryServer interface { type QueryServer interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// Accounts returns associated wallet accounts with the DID.
Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error)
// Credentials returns associated credentials with the DID and Service Origin.
Credentials(context.Context, *QueryCredentialsRequest) (*QueryCredentialsResponse, error)
// Identities returns associated identity with the DID.
Identities(context.Context, *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error)
// Resolve queries the DID document by its id. // Resolve queries the DID document by its id.
ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error)
// LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. // Service returns associated ServiceInfo for a given Origin
WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error)
mustEmbedUnimplementedQueryServer() mustEmbedUnimplementedQueryServer()
} }
@ -91,11 +133,20 @@ type UnimplementedQueryServer struct {
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
} }
func (UnimplementedQueryServer) ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) { func (UnimplementedQueryServer) Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ResolveIdentifier not implemented") return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented")
} }
func (UnimplementedQueryServer) WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) { func (UnimplementedQueryServer) Credentials(context.Context, *QueryCredentialsRequest) (*QueryCredentialsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method WitnessCredential not implemented") return nil, status.Errorf(codes.Unimplemented, "method Credentials not implemented")
}
func (UnimplementedQueryServer) Identities(context.Context, *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Identities not implemented")
}
func (UnimplementedQueryServer) Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
}
func (UnimplementedQueryServer) Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Service not implemented")
} }
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
@ -128,38 +179,92 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Query_ResolveIdentifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryAccountsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Accounts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Accounts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Credentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryCredentialsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Credentials(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Credentials_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Credentials(ctx, req.(*QueryCredentialsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Identities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryIdentitiesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Identities(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Identities_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Identities(ctx, req.(*QueryIdentitiesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryResolveRequest) in := new(QueryResolveRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(QueryServer).ResolveIdentifier(ctx, in) return srv.(QueryServer).Resolve(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: Query_ResolveIdentifier_FullMethodName, FullMethod: Query_Resolve_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ResolveIdentifier(ctx, req.(*QueryResolveRequest)) return srv.(QueryServer).Resolve(ctx, req.(*QueryResolveRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Query_WitnessCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryWitnessCredentialRequest) in := new(QueryServiceRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(QueryServer).WitnessCredential(ctx, in) return srv.(QueryServer).Service(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: Query_WitnessCredential_FullMethodName, FullMethod: Query_Service_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).WitnessCredential(ctx, req.(*QueryWitnessCredentialRequest)) return srv.(QueryServer).Service(ctx, req.(*QueryServiceRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
@ -176,12 +281,24 @@ var Query_ServiceDesc = grpc.ServiceDesc{
Handler: _Query_Params_Handler, Handler: _Query_Params_Handler,
}, },
{ {
MethodName: "ResolveIdentifier", MethodName: "Accounts",
Handler: _Query_ResolveIdentifier_Handler, Handler: _Query_Accounts_Handler,
}, },
{ {
MethodName: "WitnessCredential", MethodName: "Credentials",
Handler: _Query_WitnessCredential_Handler, Handler: _Query_Credentials_Handler,
},
{
MethodName: "Identities",
Handler: _Query_Identities_Handler,
},
{
MethodName: "Resolve",
Handler: _Query_Resolve_Handler,
},
{
MethodName: "Service",
Handler: _Query_Service_Handler,
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},

View File

@ -17,9 +17,9 @@ type AliasesTable interface {
Has(ctx context.Context, id string) (found bool, err 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 returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
Get(ctx context.Context, id string) (*Aliases, error) Get(ctx context.Context, id string) (*Aliases, error)
HasByHandle(ctx context.Context, handle string) (found bool, err error) HasBySubject(ctx context.Context, subject string) (found bool, err error)
// GetByHandle returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. // GetBySubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetByHandle(ctx context.Context, handle string) (*Aliases, error) GetBySubject(ctx context.Context, subject string) (*Aliases, error)
List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error)
ListRange(ctx context.Context, from, to AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) ListRange(ctx context.Context, from, to AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error)
DeleteBy(ctx context.Context, prefixKey AliasesIndexKey) error DeleteBy(ctx context.Context, prefixKey AliasesIndexKey) error
@ -60,16 +60,16 @@ func (this AliasesIdIndexKey) WithId(id string) AliasesIdIndexKey {
return this return this
} }
type AliasesHandleIndexKey struct { type AliasesSubjectIndexKey struct {
vs []interface{} vs []interface{}
} }
func (x AliasesHandleIndexKey) id() uint32 { return 1 } func (x AliasesSubjectIndexKey) id() uint32 { return 1 }
func (x AliasesHandleIndexKey) values() []interface{} { return x.vs } func (x AliasesSubjectIndexKey) values() []interface{} { return x.vs }
func (x AliasesHandleIndexKey) aliasesIndexKey() {} func (x AliasesSubjectIndexKey) aliasesIndexKey() {}
func (this AliasesHandleIndexKey) WithHandle(handle string) AliasesHandleIndexKey { func (this AliasesSubjectIndexKey) WithSubject(subject string) AliasesSubjectIndexKey {
this.vs = []interface{}{handle} this.vs = []interface{}{subject}
return this return this
} }
@ -109,16 +109,16 @@ func (this aliasesTable) Get(ctx context.Context, id string) (*Aliases, error) {
return &aliases, nil return &aliases, nil
} }
func (this aliasesTable) HasByHandle(ctx context.Context, handle string) (found bool, err error) { func (this aliasesTable) HasBySubject(ctx context.Context, subject string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
handle, subject,
) )
} }
func (this aliasesTable) GetByHandle(ctx context.Context, handle string) (*Aliases, error) { func (this aliasesTable) GetBySubject(ctx context.Context, subject string) (*Aliases, error) {
var aliases Aliases var aliases Aliases
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &aliases, found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &aliases,
handle, subject,
) )
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -18,7 +18,7 @@ var (
md_Aliases protoreflect.MessageDescriptor md_Aliases protoreflect.MessageDescriptor
fd_Aliases_id protoreflect.FieldDescriptor fd_Aliases_id protoreflect.FieldDescriptor
fd_Aliases_origin protoreflect.FieldDescriptor fd_Aliases_origin protoreflect.FieldDescriptor
fd_Aliases_handle protoreflect.FieldDescriptor fd_Aliases_subject protoreflect.FieldDescriptor
fd_Aliases_controller protoreflect.FieldDescriptor fd_Aliases_controller protoreflect.FieldDescriptor
fd_Aliases_expiration protoreflect.FieldDescriptor fd_Aliases_expiration protoreflect.FieldDescriptor
) )
@ -28,7 +28,7 @@ func init() {
md_Aliases = File_did_v1_state_proto.Messages().ByName("Aliases") md_Aliases = File_did_v1_state_proto.Messages().ByName("Aliases")
fd_Aliases_id = md_Aliases.Fields().ByName("id") fd_Aliases_id = md_Aliases.Fields().ByName("id")
fd_Aliases_origin = md_Aliases.Fields().ByName("origin") fd_Aliases_origin = md_Aliases.Fields().ByName("origin")
fd_Aliases_handle = md_Aliases.Fields().ByName("handle") fd_Aliases_subject = md_Aliases.Fields().ByName("subject")
fd_Aliases_controller = md_Aliases.Fields().ByName("controller") fd_Aliases_controller = md_Aliases.Fields().ByName("controller")
fd_Aliases_expiration = md_Aliases.Fields().ByName("expiration") fd_Aliases_expiration = md_Aliases.Fields().ByName("expiration")
} }
@ -110,9 +110,9 @@ func (x *fastReflection_Aliases) Range(f func(protoreflect.FieldDescriptor, prot
return return
} }
} }
if x.Handle != "" { if x.Subject != "" {
value := protoreflect.ValueOfString(x.Handle) value := protoreflect.ValueOfString(x.Subject)
if !f(fd_Aliases_handle, value) { if !f(fd_Aliases_subject, value) {
return return
} }
} }
@ -147,8 +147,8 @@ func (x *fastReflection_Aliases) Has(fd protoreflect.FieldDescriptor) bool {
return x.Id != "" return x.Id != ""
case "did.v1.Aliases.origin": case "did.v1.Aliases.origin":
return x.Origin != "" return x.Origin != ""
case "did.v1.Aliases.handle": case "did.v1.Aliases.subject":
return x.Handle != "" return x.Subject != ""
case "did.v1.Aliases.controller": case "did.v1.Aliases.controller":
return x.Controller != "" return x.Controller != ""
case "did.v1.Aliases.expiration": case "did.v1.Aliases.expiration":
@ -173,8 +173,8 @@ func (x *fastReflection_Aliases) Clear(fd protoreflect.FieldDescriptor) {
x.Id = "" x.Id = ""
case "did.v1.Aliases.origin": case "did.v1.Aliases.origin":
x.Origin = "" x.Origin = ""
case "did.v1.Aliases.handle": case "did.v1.Aliases.subject":
x.Handle = "" x.Subject = ""
case "did.v1.Aliases.controller": case "did.v1.Aliases.controller":
x.Controller = "" x.Controller = ""
case "did.v1.Aliases.expiration": case "did.v1.Aliases.expiration":
@ -201,8 +201,8 @@ func (x *fastReflection_Aliases) Get(descriptor protoreflect.FieldDescriptor) pr
case "did.v1.Aliases.origin": case "did.v1.Aliases.origin":
value := x.Origin value := x.Origin
return protoreflect.ValueOfString(value) return protoreflect.ValueOfString(value)
case "did.v1.Aliases.handle": case "did.v1.Aliases.subject":
value := x.Handle value := x.Subject
return protoreflect.ValueOfString(value) return protoreflect.ValueOfString(value)
case "did.v1.Aliases.controller": case "did.v1.Aliases.controller":
value := x.Controller value := x.Controller
@ -234,8 +234,8 @@ func (x *fastReflection_Aliases) Set(fd protoreflect.FieldDescriptor, value prot
x.Id = value.Interface().(string) x.Id = value.Interface().(string)
case "did.v1.Aliases.origin": case "did.v1.Aliases.origin":
x.Origin = value.Interface().(string) x.Origin = value.Interface().(string)
case "did.v1.Aliases.handle": case "did.v1.Aliases.subject":
x.Handle = value.Interface().(string) x.Subject = value.Interface().(string)
case "did.v1.Aliases.controller": case "did.v1.Aliases.controller":
x.Controller = value.Interface().(string) x.Controller = value.Interface().(string)
case "did.v1.Aliases.expiration": case "did.v1.Aliases.expiration":
@ -264,8 +264,8 @@ func (x *fastReflection_Aliases) Mutable(fd protoreflect.FieldDescriptor) protor
panic(fmt.Errorf("field id of message did.v1.Aliases is not mutable")) panic(fmt.Errorf("field id of message did.v1.Aliases is not mutable"))
case "did.v1.Aliases.origin": case "did.v1.Aliases.origin":
panic(fmt.Errorf("field origin of message did.v1.Aliases is not mutable")) panic(fmt.Errorf("field origin of message did.v1.Aliases is not mutable"))
case "did.v1.Aliases.handle": case "did.v1.Aliases.subject":
panic(fmt.Errorf("field handle of message did.v1.Aliases is not mutable")) panic(fmt.Errorf("field subject of message did.v1.Aliases is not mutable"))
case "did.v1.Aliases.controller": case "did.v1.Aliases.controller":
panic(fmt.Errorf("field controller of message did.v1.Aliases is not mutable")) panic(fmt.Errorf("field controller of message did.v1.Aliases is not mutable"))
case "did.v1.Aliases.expiration": case "did.v1.Aliases.expiration":
@ -287,7 +287,7 @@ func (x *fastReflection_Aliases) NewField(fd protoreflect.FieldDescriptor) proto
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
case "did.v1.Aliases.origin": case "did.v1.Aliases.origin":
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
case "did.v1.Aliases.handle": case "did.v1.Aliases.subject":
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
case "did.v1.Aliases.controller": case "did.v1.Aliases.controller":
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
@ -370,7 +370,7 @@ func (x *fastReflection_Aliases) ProtoMethods() *protoiface.Methods {
if l > 0 { if l > 0 {
n += 1 + l + runtime.Sov(uint64(l)) n += 1 + l + runtime.Sov(uint64(l))
} }
l = len(x.Handle) l = len(x.Subject)
if l > 0 { if l > 0 {
n += 1 + l + runtime.Sov(uint64(l)) n += 1 + l + runtime.Sov(uint64(l))
} }
@ -422,10 +422,10 @@ func (x *fastReflection_Aliases) ProtoMethods() *protoiface.Methods {
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
if len(x.Handle) > 0 { if len(x.Subject) > 0 {
i -= len(x.Handle) i -= len(x.Subject)
copy(dAtA[i:], x.Handle) copy(dAtA[i:], x.Subject)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Handle))) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
@ -558,7 +558,7 @@ func (x *fastReflection_Aliases) ProtoMethods() *protoiface.Methods {
iNdEx = postIndex iNdEx = postIndex
case 3: case 3:
if wireType != 2 { if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType) return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
} }
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
@ -586,7 +586,7 @@ func (x *fastReflection_Aliases) ProtoMethods() *protoiface.Methods {
if postIndex > l { if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
} }
x.Handle = string(dAtA[iNdEx:postIndex]) x.Subject = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 4: case 4:
if wireType != 2 { if wireType != 2 {
@ -5151,8 +5151,8 @@ type Aliases struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Origin is the Alias provider // Origin is the Alias provider
Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
// Handle is the user defined alias // Subject is the user defined alias
Handle string `protobuf:"bytes,3,opt,name=handle,proto3" json:"handle,omitempty"` Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
// Controller of the alias // Controller of the alias
Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"`
// Expiration of the alias // Expiration of the alias
@ -5193,9 +5193,9 @@ func (x *Aliases) GetOrigin() string {
return "" return ""
} }
func (x *Aliases) GetHandle() string { func (x *Aliases) GetSubject() string {
if x != nil { if x != nil {
return x.Handle return x.Subject
} }
return "" return ""
} }
@ -5624,109 +5624,109 @@ var file_did_v1_state_proto_rawDesc = []byte{
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 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, 0x12, 0x64, 0x69, 0x64, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x64, 0x69, 0x64,
0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xa7, 0x01, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0xaa, 0x01, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f,
0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69,
0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03,
0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1e, 0x0a,
0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1c, 0xf2, 0x9e, 0xd3, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1d, 0xf2,
0x8e, 0x03, 0x16, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x9e, 0xd3, 0x8e, 0x03, 0x17, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0d, 0x0a, 0x07, 0x73,
0x64, 0x6c, 0x65, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a, 0x09, 0x41, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a,
0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65,
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65,
0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65,
0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31,
0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72,
0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a,
0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, 0x94, 0x01, 0x0a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22,
0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x94, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08,
0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72,
0x6f, 0x6f, 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
0x6c, 0x65, 0x72, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x03, 0x22, 0xaf, 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, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x64, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b,
0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c,
0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f,
0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74,
0x43, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69,
0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72,
0x70, 0x72, 0x69, 0x6e, 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69,
0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68,
0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69,
0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f,
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62,
0x61, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65,
0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64,
0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77,
0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64,
0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49,
0x64, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77,
0x6b, 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, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x05, 0x22, 0xdc, 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, 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, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x52, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04,
0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72,
0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69,
0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18,
0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x64, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79,
0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75,
0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x1a, 0x43, 0x0a, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61,
0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c,
0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x18, 0x06, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02,
0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,
0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69,
0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a,
0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x72, 0x44, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b,
0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01,
0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c,
0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65,
0x79, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x49, 0x64, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65,
0x79, 0x4a, 0x77, 0x6b, 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, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x22, 0xdc, 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, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 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, 0x52, 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, 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,
0x2f, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x06, 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,
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, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x06, 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, 0x68, 0x77, 0x61, 0x79, 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 ( var (

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,6 @@
{ {
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.5/.schema/devbox.schema.json", "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.5/.schema/devbox.schema.json",
"packages": [ "packages": ["golangci-lint@latest", "go@1.21", "templ@latest", "air@latest"],
"ipfs@latest",
"golangci-lint@latest",
"go@1.21",
"templ@latest",
"air@latest"
],
"env": { "env": {
"GOPATH": "$HOME/go", "GOPATH": "$HOME/go",
"PATH": "$HOME/go/bin:$PATH" "PATH": "$HOME/go/bin:$PATH"
@ -14,7 +8,6 @@
"shell": { "shell": {
"scripts": { "scripts": {
"proto": ["make proto-gen"], "proto": ["make proto-gen"],
"templ": ["templ generate"],
"ps": ["devbox services ls"] "ps": ["devbox services ls"]
} }
} }

View File

@ -1,8 +0,0 @@
version: "0.5"
processes:
ipfs:
command: ipfs daemon
restart: always
sonrd:
command: task testnet

View File

@ -0,0 +1,4 @@
syntax = "proto3";
package did.v1;
option go_package = "github.com/onsonr/hway/x/did/types";

View File

@ -3,6 +3,7 @@ package did.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "did/v1/genesis.proto"; import "did/v1/genesis.proto";
import "did/v1/types.proto";
option go_package = "github.com/onsonr/hway/x/did/types"; option go_package = "github.com/onsonr/hway/x/did/types";
@ -13,14 +14,29 @@ service Query {
option (google.api.http).get = "/did/params"; option (google.api.http).get = "/did/params";
} }
// Resolve queries the DID document by its id. // Accounts returns associated wallet accounts with the DID.
rpc ResolveIdentifier(QueryResolveRequest) returns (QueryResolveResponse) { rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) {
option (google.api.http).get = "/did/resolve/{id}"; option (google.api.http).get = "/did/{did}/accounts";
} }
// LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. // Credentials returns associated credentials with the DID and Service Origin.
rpc WitnessCredential(QueryWitnessCredentialRequest) returns (QueryWitnessCredentialResponse) { rpc Credentials(QueryCredentialsRequest) returns (QueryCredentialsResponse) {
option (google.api.http).get = "/did/assertion/{id}/witness"; option (google.api.http).get = "/did/{did}/{origin}/credentials";
}
// Identities returns associated identity with the DID.
rpc Identities(QueryIdentitiesRequest) returns (QueryIdentitiesResponse) {
option (google.api.http).get = "/did/{did}/identities";
}
// Resolve queries the DID document by its id.
rpc Resolve(QueryResolveRequest) returns (QueryResolveResponse) {
option (google.api.http).get = "/did/resolve/{did}";
}
// Service returns associated ServiceInfo for a given Origin
rpc Service(QueryServiceRequest) returns (QueryServiceResponse) {
option (google.api.http).get = "/did/service/{origin}";
} }
} }
@ -33,35 +49,56 @@ message QueryParamsResponse {
Params params = 1; Params params = 1;
} }
// QueryExistsRequest is the request type for the Query/Exists RPC method. // QueryAccountsRequest is the request type for the Query/Exists RPC method.
message QueryExistsRequest { message QueryAccountsRequest {
string kind = 1; string did = 1;
string value = 2;
} }
// QueryExistsResponse is the response type for the Query/Exists RPC method. // QueryAccountsResponse is the response type for the Query/Exists RPC method.
message QueryExistsResponse { message QueryAccountsResponse {
bool exists = 1; bool exists = 1;
} }
// QueryCredentialsRequest is the request type for the Query/Exists RPC method.
message QueryCredentialsRequest {
string did = 1;
string origin = 2;
}
// QueryCredentialsResponse is the response type for the Query/Exists RPC method.
message QueryCredentialsResponse {
map<string, bytes> credentials = 1;
}
// QueryIdentitiesRequest is the request type for the Query/Exists RPC method.
message QueryIdentitiesRequest {
string did = 1;
}
// QueryIdentitiesResponse is the response type for the Query/Exists RPC method.
message QueryIdentitiesResponse {
bool exists = 1;
repeated VerificationMethod verificationMethod = 2;
}
// QueryResolveRequest is the request type for the Query/Resolve RPC method. // QueryResolveRequest is the request type for the Query/Resolve RPC method.
message QueryResolveRequest { message QueryResolveRequest {
string id = 1; string did = 1;
} }
// QueryResolveResponse is the response type for the Query/Resolve RPC method. // QueryResolveResponse is the response type for the Query/Resolve RPC method.
message QueryResolveResponse { message QueryResolveResponse {
// document is the DID document // document is the DID document
string document = 1; Document document = 1;
} }
// QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method. // QueryServiceRequest is the request type for the Query/LoginOptions RPC method.
message QueryWitnessCredentialRequest { message QueryServiceRequest {
string id = 1; string origin = 1;
} }
// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method.
message QueryWitnessCredentialResponse { message QueryServiceResponse {
// options is the PublicKeyCredentialAttestationOptions // options is the PublicKeyCredentialAttestationOptions
string options = 1; string options = 1;
} }

View File

@ -12,7 +12,7 @@ message Aliases {
option (cosmos.orm.v1.table) = { option (cosmos.orm.v1.table) = {
id: 1 id: 1
primary_key: {fields: "id"} primary_key: {fields: "id"}
index: { id: 1, fields: "handle", unique: true } index: { id: 1, fields: "subject", unique: true }
}; };
// The unique identifier of the alias // The unique identifier of the alias
@ -21,8 +21,8 @@ message Aliases {
// Origin is the Alias provider // Origin is the Alias provider
string origin = 2; string origin = 2;
// Handle is the user defined alias // Subject is the user defined alias
string handle = 3; string subject = 3;
// Controller of the alias // Controller of the alias
string controller = 4; string controller = 4;

View File

@ -9,9 +9,19 @@ import "cosmos_proto/cosmos.proto";
option go_package = "github.com/onsonr/hway/x/did/types"; option go_package = "github.com/onsonr/hway/x/did/types";
// Credential defines a WebAuthn credential
message Credential {
string id = 1;
string credential_type = 2;
bytes credential_id = 3;
repeated string transport = 4;
string attestation_type = 5;
string display_name = 6;
string controller = 7;
}
// BaseDocument defines a DID document // Document defines a DID document
message BaseDocument { message Document {
string id = 1; string id = 1;
repeated VerificationMethod verification_methods = 2; repeated VerificationMethod verification_methods = 2;
repeated string authentication = 4; repeated string authentication = 4;
@ -20,6 +30,23 @@ message BaseDocument {
repeated string capability_invocation = 8; repeated string capability_invocation = 8;
} }
// Identity defines an associated profile for a did subject
message Identity {
string id = 1;
string subject = 2;
string controller = 3;
repeated Credential credentials = 4;
repeated VerificationMethod verification_methods = 5;
}
// PubKey defines a public key for a did
message PubKey {
string id = 1;
bytes key = 2;
string key_type = 3;
string controller = 4;
}
// VerificationMethod defines a verification method // VerificationMethod defines a verification method
message VerificationMethod { message VerificationMethod {
string id = 1; string id = 1;

View File

@ -31,23 +31,32 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type
return &types.QueryParamsResponse{Params: &p}, nil return &types.QueryParamsResponse{Params: &p}, nil
} }
// PropertyExists implements types.QueryServer. // Accounts implements types.QueryServer.
func (k Querier) PropertyExists(goCtx context.Context, req *types.QueryExistsRequest) (*types.QueryExistsResponse, error) { func (k Querier) Accounts(goCtx context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx) // ctx := sdk.UnwrapSDKContext(goCtx)
panic("PropertyExists is unimplemented") return &types.QueryAccountsResponse{}, nil
return &types.QueryExistsResponse{}, nil
} }
// ResolveIdentifier implements types.QueryServer. // Credentials implements types.QueryServer.
func (k Querier) ResolveIdentifier(goCtx context.Context, req *types.QueryResolveRequest) (*types.QueryResolveResponse, error) { func (k Querier) Credentials(goCtx context.Context, req *types.QueryCredentialsRequest) (*types.QueryCredentialsResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx)
return &types.QueryCredentialsResponse{}, nil
}
// Identities implements types.QueryServer.
func (k Querier) Identities(goCtx context.Context, req *types.QueryIdentitiesRequest) (*types.QueryIdentitiesResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx)
return &types.QueryIdentitiesResponse{}, nil
}
// Resolve implements types.QueryServer.
func (k Querier) Resolve(goCtx context.Context, req *types.QueryResolveRequest) (*types.QueryResolveResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx) // ctx := sdk.UnwrapSDKContext(goCtx)
panic("ResolveIdentifier is unimplemented")
return &types.QueryResolveResponse{}, nil return &types.QueryResolveResponse{}, nil
} }
// WitnessCredential implements types.QueryServer. // Service implements types.QueryServer.
func (k Querier) WitnessCredential(goCtx context.Context, req *types.QueryWitnessCredentialRequest) (*types.QueryWitnessCredentialResponse, error) { func (k Querier) Service(goCtx context.Context, req *types.QueryServiceRequest) (*types.QueryServiceResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx) // ctx := sdk.UnwrapSDKContext(goCtx)
panic("WitnessCredential is unimplemented") return &types.QueryServiceResponse{}, nil
return &types.QueryWitnessCredentialResponse{}, nil
} }

View File

@ -3,9 +3,11 @@ package keeper
import ( import (
"context" "context"
sdk "github.com/cosmos/cosmos-sdk/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"cosmossdk.io/errors" "cosmossdk.io/errors"
didv1 "github.com/onsonr/hway/api/did/v1"
"github.com/onsonr/hway/x/did/types" "github.com/onsonr/hway/x/did/types"
) )
@ -29,23 +31,33 @@ func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams
return nil, ms.k.Params.Set(ctx, msg.Params) return nil, ms.k.Params.Set(ctx, msg.Params)
} }
// RegisterController implements types.MsgServer.
func (ms msgServer) RegisterController(ctx context.Context, msg *types.MsgRegisterController) (*types.MsgRegisterControllerResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx)
panic("RegisterController is unimplemented")
return &types.MsgRegisterControllerResponse{}, nil
}
// Authenticate implements types.MsgServer. // Authenticate implements types.MsgServer.
func (ms msgServer) Authenticate(ctx context.Context, msg *types.MsgAuthenticate) (*types.MsgAuthenticateResponse, error) { func (ms msgServer) Authenticate(ctx context.Context, msg *types.MsgAuthenticate) (*types.MsgAuthenticateResponse, 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) // ctx := sdk.UnwrapSDKContext(goCtx)
panic("Authenticate is unimplemented")
return &types.MsgAuthenticateResponse{}, nil return &types.MsgAuthenticateResponse{}, nil
} }
// RegisterController implements types.MsgServer.
func (ms msgServer) RegisterController(goCtx context.Context, msg *types.MsgRegisterController) (*types.MsgRegisterControllerResponse, 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)
svc := didv1.Service{
ControllerDid: msg.Authority,
}
ms.k.OrmDB.ServiceTable().Insert(ctx, &svc)
return &types.MsgRegisterControllerResponse{}, nil
}
// RegisterService implements types.MsgServer. // RegisterService implements types.MsgServer.
func (ms msgServer) RegisterService(ctx context.Context, msg *types.MsgRegisterService) (*types.MsgRegisterServiceResponse, error) { func (ms msgServer) RegisterService(ctx context.Context, msg *types.MsgRegisterService) (*types.MsgRegisterServiceResponse, 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) // ctx := sdk.UnwrapSDKContext(goCtx)
panic("RegisterService is unimplemented")
return &types.MsgRegisterServiceResponse{}, nil return &types.MsgRegisterServiceResponse{}, nil
} }

View File

@ -1 +1,16 @@
package keeper package keeper
func (k Keeper) insertAliasFromDisplayName() {
}
func (k Keeper) insertAssertionFromIdentity() {
}
func (k Keeper) insertAuthenticationFromCredential() {
}
func (k Keeper) insertControllerFromMotrVault() {
}
func (k Keeper) insertDelegationFromAccount() {
}

View File

@ -0,0 +1,35 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: did/v1/accounts.proto
package types
import (
fmt "fmt"
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("did/v1/accounts.proto", fileDescriptor_2125a09fb14c3bc3) }
var fileDescriptor_2125a09fb14c3bc3 = []byte{
// 122 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0xc9, 0x4c, 0xd1,
0x2f, 0x33, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f,
0xc9, 0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x74, 0xb2, 0x39, 0xf1, 0x48, 0x8e, 0xf1,
0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e,
0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa5, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc,
0x5c, 0xfd, 0xfc, 0xbc, 0xe2, 0xfc, 0xbc, 0x22, 0xfd, 0x8c, 0xf2, 0xc4, 0x4a, 0xfd, 0x0a, 0x7d,
0x90, 0x89, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0xc3, 0x8c, 0x01, 0x01, 0x00, 0x00,
0xff, 0xff, 0x28, 0xd1, 0x54, 0x54, 0x65, 0x00, 0x00, 0x00,
}

View File

@ -34,7 +34,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterImplementations( registry.RegisterImplementations(
(*sdk.Msg)(nil), (*sdk.Msg)(nil),
&MsgUpdateParams{}, &MsgUpdateParams{},
&MsgInitializeController{}, &MsgRegisterController{},
&MsgRegisterService{},
) )
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
} }

View File

@ -7,6 +7,10 @@ import (
var _ sdk.Msg = &MsgUpdateParams{} var _ sdk.Msg = &MsgUpdateParams{}
//
// [UpdateParams]
//
// NewMsgUpdateParams creates new instance of MsgUpdateParams // NewMsgUpdateParams creates new instance of MsgUpdateParams
func NewMsgUpdateParams( func NewMsgUpdateParams(
sender sdk.Address, sender sdk.Address,
@ -44,33 +48,72 @@ func (msg *MsgUpdateParams) Validate() error {
return msg.Params.Validate() return msg.Params.Validate()
} }
// NewMsgInitializeController creates a new instance of MsgInitializeController //
func NewMsgInitializeController( // [RegisterController]
//
// NewMsgRegisterController creates a new instance of MsgRegisterController
func NewMsgRegisterController(
sender sdk.Address, sender sdk.Address,
) (*MsgInitializeController, error) { ) (*MsgRegisterController, error) {
return &MsgInitializeController{ return &MsgRegisterController{
Authority: sender.String(), Authority: sender.String(),
}, nil }, nil
} }
// Route returns the name of the module // Route returns the name of the module
func (msg MsgInitializeController) Route() string { return ModuleName } func (msg MsgRegisterController) Route() string { return ModuleName }
// Type returns the the action // Type returns the the action
func (msg MsgInitializeController) Type() string { return "initialize_controller" } func (msg MsgRegisterController) Type() string { return "initialize_controller" }
// GetSignBytes implements the LegacyMsg interface. // GetSignBytes implements the LegacyMsg interface.
func (msg MsgInitializeController) GetSignBytes() []byte { func (msg MsgRegisterController) GetSignBytes() []byte {
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg))
} }
// GetSigners returns the expected signers for a MsgUpdateParams message. // GetSigners returns the expected signers for a MsgUpdateParams message.
func (msg *MsgInitializeController) GetSigners() []sdk.AccAddress { func (msg *MsgRegisterController) GetSigners() []sdk.AccAddress {
addr, _ := sdk.AccAddressFromBech32(msg.Authority) addr, _ := sdk.AccAddressFromBech32(msg.Authority)
return []sdk.AccAddress{addr} return []sdk.AccAddress{addr}
} }
// ValidateBasic does a sanity check on the provided data. // ValidateBasic does a sanity check on the provided data.
func (msg *MsgInitializeController) Validate() error { func (msg *MsgRegisterController) Validate() error {
return nil
}
//
// [RegisterService]
//
// NewMsgRegisterController creates a new instance of MsgRegisterController
func NewMsgRegisterService(
sender sdk.Address,
) (*MsgRegisterService, error) {
return &MsgRegisterService{
Authority: sender.String(),
}, nil
}
// Route returns the name of the module
func (msg MsgRegisterService) Route() string { return ModuleName }
// Type returns the the action
func (msg MsgRegisterService) Type() string { return "initialize_controller" }
// GetSignBytes implements the LegacyMsg interface.
func (msg MsgRegisterService) GetSignBytes() []byte {
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg))
}
// GetSigners returns the expected signers for a MsgUpdateParams message.
func (msg *MsgRegisterService) GetSigners() []sdk.AccAddress {
addr, _ := sdk.AccAddressFromBech32(msg.Authority)
return []sdk.AccAddress{addr}
}
// ValidateBasic does a sanity check on the provided data.
func (msg *MsgRegisterService) Validate() error {
return nil return nil
} }

View File

@ -3,7 +3,7 @@ package types
import "gopkg.in/macaroon-bakery.v2/bakery/checkers" import "gopkg.in/macaroon-bakery.v2/bakery/checkers"
var ( var (
PermissionScope_PERMISSION_SCOPEStrings = [...]string{ PermissionScopeStrings = [...]string{
"profile.name", "profile.name",
"identifiers.email", "identifiers.email",
"identifiers.phone", "identifiers.phone",
@ -19,7 +19,7 @@ var (
"admin.validator", "admin.validator",
} }
StringToPermissionScope_PERMISSION_SCOPE = map[string]PermissionScope{ StringToPermissionScope = map[string]PermissionScope{
"PERMISSION_SCOPE_UNSPECIFIED": PermissionScope_PERMISSION_SCOPE_UNSPECIFIED, "PERMISSION_SCOPE_UNSPECIFIED": PermissionScope_PERMISSION_SCOPE_UNSPECIFIED,
"PERMISSION_SCOPE_PROFILE_NAME": PermissionScope_PERMISSION_SCOPE_PROFILE_NAME, "PERMISSION_SCOPE_PROFILE_NAME": PermissionScope_PERMISSION_SCOPE_PROFILE_NAME,
"PERMISSION_SCOPE_IDENTIFIERS_EMAIL": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL, "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL,
@ -35,6 +35,19 @@ var (
"PERMISSION_SCOPE_ADMIN_USER": PermissionScope_PERMISSION_SCOPE_ADMIN_USER, "PERMISSION_SCOPE_ADMIN_USER": PermissionScope_PERMISSION_SCOPE_ADMIN_USER,
"PERMISSION_SCOPE_ADMIN_VALIDATOR": PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR, "PERMISSION_SCOPE_ADMIN_VALIDATOR": PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR,
} }
PermissionNamespace *checkers.Namespace
) )
func ResolvePermissionScope(scope string) (PermissionScope, bool) {
uriToPrefix := make(map[string]string)
for _, scope := range PermissionScopeStrings {
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 := StringToPermissionScope[prefix]
return permScope, ok
}

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,191 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal
} }
func request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { func request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryAccountsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["did"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
}
protoReq.Did, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
}
msg, err := client.Accounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryAccountsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["did"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
}
protoReq.Did, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
}
msg, err := server.Accounts(ctx, &protoReq)
return msg, metadata, err
}
func request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryCredentialsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["did"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
}
protoReq.Did, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
}
val, ok = pathParams["origin"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
}
protoReq.Origin, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
}
msg, err := client.Credentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryCredentialsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["did"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
}
protoReq.Did, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
}
val, ok = pathParams["origin"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
}
protoReq.Origin, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
}
msg, err := server.Credentials(ctx, &protoReq)
return msg, metadata, err
}
func request_Query_Identities_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryIdentitiesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["did"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
}
protoReq.Did, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
}
msg, err := client.Identities(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_Identities_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryIdentitiesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["did"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
}
protoReq.Did, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
}
msg, err := server.Identities(ctx, &protoReq)
return msg, metadata, err
}
func request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryResolveRequest var protoReq QueryResolveRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
@ -62,23 +246,23 @@ func request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runtime.Ma
_ = err _ = err
) )
val, ok = pathParams["id"] val, ok = pathParams["did"]
if !ok { if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
} }
protoReq.Id, err = runtime.String(val) protoReq.Did, err = runtime.String(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
} }
msg, err := client.ResolveIdentifier(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) msg, err := client.Resolve(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err return msg, metadata, err
} }
func local_request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { func local_request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryResolveRequest var protoReq QueryResolveRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
@ -89,24 +273,24 @@ func local_request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runt
_ = err _ = err
) )
val, ok = pathParams["id"] val, ok = pathParams["did"]
if !ok { if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
} }
protoReq.Id, err = runtime.String(val) protoReq.Did, err = runtime.String(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
} }
msg, err := server.ResolveIdentifier(ctx, &protoReq) msg, err := server.Resolve(ctx, &protoReq)
return msg, metadata, err return msg, metadata, err
} }
func request_Query_WitnessCredential_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { func request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryWitnessCredentialRequest var protoReq QueryServiceRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
var ( var (
@ -116,24 +300,24 @@ func request_Query_WitnessCredential_0(ctx context.Context, marshaler runtime.Ma
_ = err _ = err
) )
val, ok = pathParams["id"] val, ok = pathParams["origin"]
if !ok { if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
} }
protoReq.Id, err = runtime.String(val) protoReq.Origin, err = runtime.String(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
} }
msg, err := client.WitnessCredential(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) msg, err := client.Service(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err return msg, metadata, err
} }
func local_request_Query_WitnessCredential_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { func local_request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryWitnessCredentialRequest var protoReq QueryServiceRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
var ( var (
@ -143,18 +327,18 @@ func local_request_Query_WitnessCredential_0(ctx context.Context, marshaler runt
_ = err _ = err
) )
val, ok = pathParams["id"] val, ok = pathParams["origin"]
if !ok { if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
} }
protoReq.Id, err = runtime.String(val) protoReq.Origin, err = runtime.String(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
} }
msg, err := server.WitnessCredential(ctx, &protoReq) msg, err := server.Service(ctx, &protoReq)
return msg, metadata, err return msg, metadata, err
} }
@ -188,7 +372,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
}) })
mux.Handle("GET", pattern_Query_ResolveIdentifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_Accounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream var stream runtime.ServerTransportStream
@ -199,7 +383,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
} }
resp, md, err := local_request_Query_ResolveIdentifier_0(rctx, inboundMarshaler, server, req, pathParams) resp, md, err := local_request_Query_Accounts_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
@ -207,11 +391,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
forward_Query_ResolveIdentifier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
}) })
mux.Handle("GET", pattern_Query_WitnessCredential_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_Credentials_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream var stream runtime.ServerTransportStream
@ -222,7 +406,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
} }
resp, md, err := local_request_Query_WitnessCredential_0(rctx, inboundMarshaler, server, req, pathParams) resp, md, err := local_request_Query_Credentials_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
@ -230,7 +414,76 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
forward_Query_WitnessCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) forward_Query_Credentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_Identities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Query_Identities_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_Identities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_Resolve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Query_Resolve_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_Resolve_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_Service_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Query_Service_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_Service_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
}) })
@ -295,7 +548,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}) })
mux.Handle("GET", pattern_Query_ResolveIdentifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_Accounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
@ -304,18 +557,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
} }
resp, md, err := request_Query_ResolveIdentifier_0(rctx, inboundMarshaler, client, req, pathParams) resp, md, err := request_Query_Accounts_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
} }
forward_Query_ResolveIdentifier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
}) })
mux.Handle("GET", pattern_Query_WitnessCredential_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_Credentials_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
@ -324,14 +577,74 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
} }
resp, md, err := request_Query_WitnessCredential_0(rctx, inboundMarshaler, client, req, pathParams) resp, md, err := request_Query_Credentials_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
} }
forward_Query_WitnessCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) forward_Query_Credentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_Identities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_Identities_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_Identities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_Resolve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_Resolve_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_Resolve_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_Service_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_Service_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_Service_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
}) })
@ -341,15 +654,27 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
var ( var (
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"did", "params"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"did", "params"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_ResolveIdentifier_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"did", "resolve", "id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "accounts"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_WitnessCredential_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"did", "assertion", "id", "witness"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Credentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"did", "origin", "credentials"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Identities_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "identities"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0}, []string{"did", "resolve"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Service_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"did", "service", "origin"}, "", runtime.AssumeColonVerbOpt(false)))
) )
var ( var (
forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_Params_0 = runtime.ForwardResponseMessage
forward_Query_ResolveIdentifier_0 = runtime.ForwardResponseMessage forward_Query_Accounts_0 = runtime.ForwardResponseMessage
forward_Query_WitnessCredential_0 = runtime.ForwardResponseMessage forward_Query_Credentials_0 = runtime.ForwardResponseMessage
forward_Query_Identities_0 = runtime.ForwardResponseMessage
forward_Query_Resolve_0 = runtime.ForwardResponseMessage
forward_Query_Service_0 = runtime.ForwardResponseMessage
) )

View File

@ -29,8 +29,8 @@ type Aliases struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Origin is the Alias provider // Origin is the Alias provider
Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
// Handle is the user defined alias // Subject is the user defined alias
Handle string `protobuf:"bytes,3,opt,name=handle,proto3" json:"handle,omitempty"` Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
// Controller of the alias // Controller of the alias
Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"`
// Expiration of the alias // Expiration of the alias
@ -84,9 +84,9 @@ func (m *Aliases) GetOrigin() string {
return "" return ""
} }
func (m *Aliases) GetHandle() string { func (m *Aliases) GetSubject() string {
if m != nil { if m != nil {
return m.Handle return m.Subject
} }
return "" return ""
} }
@ -566,55 +566,55 @@ func init() {
func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) }
var fileDescriptor_f44bb702879c34b4 = []byte{ var fileDescriptor_f44bb702879c34b4 = []byte{
// 755 bytes of a gzipped FileDescriptorProto // 760 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x3f, 0x6f, 0x3b, 0x35, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbd, 0x6e, 0x2b, 0x45,
0x18, 0xc7, 0x7b, 0xb9, 0xfc, 0x7d, 0xf2, 0x87, 0x60, 0x95, 0x5f, 0x8f, 0x40, 0x43, 0x08, 0xaa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, 0xeb, 0x9c, 0xc2, 0x5b, 0xcf, 0x9e, 0xfd, 0x02, 0x7b, 0xcb, 0x9f, 0x7d, 0xf2, 0xdb, 0x7d, 0x67, 0x17, 0x69, 0x7c, 0x6a, 0xd2, 0x7a, 0xc7, 0xf0, 0xd6, 0x93, 0x67, 0x3f, 0xc3, 0xde, 0xea,
0xd7, 0xba, 0xbb, 0xef, 0x5a, 0x7f, 0xdd, 0x77, 0xad, 0x1f, 0x1f, 0xba, 0x3b, 0x77, 0x0f, 0xdd, 0x67, 0x9f, 0xfc, 0x7a, 0xdf, 0xb7, 0xee, 0xee, 0xfb, 0xd6, 0x9f, 0xf7, 0x7d, 0xeb, 0x87, 0x87,
0x9d, 0x3f, 0x1e, 0xba, 0x3b, 0xdf, 0xf4, 0x67, 0x54, 0xcd, 0x97, 0xd3, 0xa1, 0xcf, 0x43, 0x97, 0xfe, 0xde, 0xdd, 0x43, 0x7f, 0xef, 0xf7, 0x87, 0xfe, 0xde, 0x37, 0xc3, 0x05, 0x55, 0x57, 0xf1,
0x33, 0xc9, 0x99, 0x70, 0xe7, 0x37, 0x5e, 0xec, 0xde, 0xba, 0xc9, 0x4b, 0x91, 0xf8, 0x2d, 0xa7, 0x7c, 0xec, 0xf3, 0xd0, 0xe5, 0x4c, 0x72, 0x26, 0xdc, 0xab, 0x1b, 0x2f, 0x71, 0x6f, 0xdd, 0xf4,
0xe5, 0xf4, 0x9d, 0xf8, 0xe8, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x5a, 0x9d, 0xc9, 0x88, 0xb1, 0x48, 0xfd, 0x96, 0xf3, 0x6a, 0xf6, 0x54, 0x7c, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff,
0x06, 0x00, 0x00, 0x54, 0xb1, 0xb7, 0x51, 0x8b, 0x06, 0x00, 0x00,
} }
func (m *Aliases) Marshal() (dAtA []byte, err error) { func (m *Aliases) Marshal() (dAtA []byte, err error) {
@ -649,10 +649,10 @@ func (m *Aliases) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
if len(m.Handle) > 0 { if len(m.Subject) > 0 {
i -= len(m.Handle) i -= len(m.Subject)
copy(dAtA[i:], m.Handle) copy(dAtA[i:], m.Subject)
i = encodeVarintState(dAtA, i, uint64(len(m.Handle))) i = encodeVarintState(dAtA, i, uint64(len(m.Subject)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
@ -1061,7 +1061,7 @@ func (m *Aliases) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovState(uint64(l)) n += 1 + l + sovState(uint64(l))
} }
l = len(m.Handle) l = len(m.Subject)
if l > 0 { if l > 0 {
n += 1 + l + sovState(uint64(l)) n += 1 + l + sovState(uint64(l))
} }
@ -1351,7 +1351,7 @@ func (m *Aliases) Unmarshal(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
case 3: case 3:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
} }
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
@ -1379,7 +1379,7 @@ func (m *Aliases) Unmarshal(dAtA []byte) error {
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
m.Handle = string(dAtA[iNdEx:postIndex]) m.Subject = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 4: case 4:
if wireType != 2 { if wireType != 2 {

File diff suppressed because it is too large Load Diff