(no commit message provided)

This commit is contained in:
Prad Nukala 2024-07-23 14:18:15 -04:00 committed by Prad Nukala (aider)
parent 49b183cf48
commit c0809ecac6
16 changed files with 1808 additions and 2553 deletions

View File

@ -13,14 +13,5 @@ tasks:
proto: proto:
cmd: devbox -q run proto cmd: devbox -q run proto
templ:
cmd: templ generate
build:vltd:
cmd: go build -o ./bin/vltd ./cmd/vltd
build:sonrd: build:sonrd:
cmd: go build -o ./bin/sonrd ./cmd/sonrd cmd: go build -o ./bin/sonrd ./cmd/sonrd
build:dwn:
cmd: tinygo build -o ./bin/dwn.wasm -target wasi ./internal/dwn/db.go

File diff suppressed because it is too large Load Diff

View File

@ -20,10 +20,8 @@ const _ = grpc.SupportPackageIsVersion7
const ( const (
Query_Params_FullMethodName = "/did.v1.Query/Params" Query_Params_FullMethodName = "/did.v1.Query/Params"
Query_PropertyExists_FullMethodName = "/did.v1.Query/PropertyExists"
Query_ResolveIdentifier_FullMethodName = "/did.v1.Query/ResolveIdentifier" Query_ResolveIdentifier_FullMethodName = "/did.v1.Query/ResolveIdentifier"
Query_LoginOptions_FullMethodName = "/did.v1.Query/LoginOptions" Query_WitnessCredential_FullMethodName = "/did.v1.Query/WitnessCredential"
Query_RegisterOptions_FullMethodName = "/did.v1.Query/RegisterOptions"
) )
// QueryClient is the client API for Query service. // QueryClient is the client API for Query service.
@ -32,14 +30,10 @@ 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)
// Exists queries if an id exists.
PropertyExists(ctx context.Context, in *QueryExistsRequest, opts ...grpc.CallOption) (*QueryExistsResponse, 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) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
// LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow.
LoginOptions(ctx context.Context, in *QueryLoginOptionsRequest, opts ...grpc.CallOption) (*QueryLoginOptionsResponse, error) WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error)
// RegisterOptions queries the PublicKeyCredentialCreationOptions for starting a register flow.
RegisterOptions(ctx context.Context, in *QueryRegisterOptionsRequest, opts ...grpc.CallOption) (*QueryRegisterOptionsResponse, error)
} }
type queryClient struct { type queryClient struct {
@ -59,15 +53,6 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
return out, nil return out, nil
} }
func (c *queryClient) PropertyExists(ctx context.Context, in *QueryExistsRequest, opts ...grpc.CallOption) (*QueryExistsResponse, error) {
out := new(QueryExistsResponse)
err := c.cc.Invoke(ctx, Query_PropertyExists_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) {
out := new(QueryResolveResponse) out := new(QueryResolveResponse)
err := c.cc.Invoke(ctx, Query_ResolveIdentifier_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_ResolveIdentifier_FullMethodName, in, out, opts...)
@ -77,18 +62,9 @@ func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveReq
return out, nil return out, nil
} }
func (c *queryClient) LoginOptions(ctx context.Context, in *QueryLoginOptionsRequest, opts ...grpc.CallOption) (*QueryLoginOptionsResponse, error) { func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) {
out := new(QueryLoginOptionsResponse) out := new(QueryWitnessCredentialResponse)
err := c.cc.Invoke(ctx, Query_LoginOptions_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_WitnessCredential_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) RegisterOptions(ctx context.Context, in *QueryRegisterOptionsRequest, opts ...grpc.CallOption) (*QueryRegisterOptionsResponse, error) {
out := new(QueryRegisterOptionsResponse)
err := c.cc.Invoke(ctx, Query_RegisterOptions_FullMethodName, in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -101,14 +77,10 @@ func (c *queryClient) RegisterOptions(ctx context.Context, in *QueryRegisterOpti
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)
// Exists queries if an id exists.
PropertyExists(context.Context, *QueryExistsRequest) (*QueryExistsResponse, error)
// Resolve queries the DID document by its id. // Resolve queries the DID document by its id.
ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error)
// LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow.
LoginOptions(context.Context, *QueryLoginOptionsRequest) (*QueryLoginOptionsResponse, error) WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error)
// RegisterOptions queries the PublicKeyCredentialCreationOptions for starting a register flow.
RegisterOptions(context.Context, *QueryRegisterOptionsRequest) (*QueryRegisterOptionsResponse, error)
mustEmbedUnimplementedQueryServer() mustEmbedUnimplementedQueryServer()
} }
@ -119,17 +91,11 @@ 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) PropertyExists(context.Context, *QueryExistsRequest) (*QueryExistsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PropertyExists not implemented")
}
func (UnimplementedQueryServer) ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) { func (UnimplementedQueryServer) ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ResolveIdentifier not implemented") return nil, status.Errorf(codes.Unimplemented, "method ResolveIdentifier not implemented")
} }
func (UnimplementedQueryServer) LoginOptions(context.Context, *QueryLoginOptionsRequest) (*QueryLoginOptionsResponse, error) { func (UnimplementedQueryServer) WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoginOptions not implemented") return nil, status.Errorf(codes.Unimplemented, "method WitnessCredential not implemented")
}
func (UnimplementedQueryServer) RegisterOptions(context.Context, *QueryRegisterOptionsRequest) (*QueryRegisterOptionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterOptions not implemented")
} }
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
@ -162,24 +128,6 @@ 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_PropertyExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryExistsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).PropertyExists(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_PropertyExists_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).PropertyExists(ctx, req.(*QueryExistsRequest))
}
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_ResolveIdentifier_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 {
@ -198,38 +146,20 @@ func _Query_ResolveIdentifier_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Query_LoginOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Query_WitnessCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryLoginOptionsRequest) in := new(QueryWitnessCredentialRequest)
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).LoginOptions(ctx, in) return srv.(QueryServer).WitnessCredential(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: Query_LoginOptions_FullMethodName, FullMethod: Query_WitnessCredential_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).LoginOptions(ctx, req.(*QueryLoginOptionsRequest)) return srv.(QueryServer).WitnessCredential(ctx, req.(*QueryWitnessCredentialRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_RegisterOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRegisterOptionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).RegisterOptions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_RegisterOptions_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).RegisterOptions(ctx, req.(*QueryRegisterOptionsRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
@ -245,21 +175,13 @@ var Query_ServiceDesc = grpc.ServiceDesc{
MethodName: "Params", MethodName: "Params",
Handler: _Query_Params_Handler, Handler: _Query_Params_Handler,
}, },
{
MethodName: "PropertyExists",
Handler: _Query_PropertyExists_Handler,
},
{ {
MethodName: "ResolveIdentifier", MethodName: "ResolveIdentifier",
Handler: _Query_ResolveIdentifier_Handler, Handler: _Query_ResolveIdentifier_Handler,
}, },
{ {
MethodName: "LoginOptions", MethodName: "WitnessCredential",
Handler: _Query_LoginOptions_Handler, Handler: _Query_WitnessCredential_Handler,
},
{
MethodName: "RegisterOptions",
Handler: _Query_RegisterOptions_Handler,
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},

View File

@ -9,6 +9,120 @@ import (
ormerrors "cosmossdk.io/orm/types/ormerrors" ormerrors "cosmossdk.io/orm/types/ormerrors"
) )
type AliasesTable interface {
Insert(ctx context.Context, aliases *Aliases) error
Update(ctx context.Context, aliases *Aliases) error
Save(ctx context.Context, aliases *Aliases) error
Delete(ctx context.Context, aliases *Aliases) error
Has(ctx context.Context, id string) (found bool, err error)
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
Get(ctx context.Context, id string) (*Aliases, error)
List(ctx context.Context, prefixKey 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
DeleteRange(ctx context.Context, from, to AliasesIndexKey) error
doNotImplement()
}
type AliasesIterator struct {
ormtable.Iterator
}
func (i AliasesIterator) Value() (*Aliases, error) {
var aliases Aliases
err := i.UnmarshalMessage(&aliases)
return &aliases, err
}
type AliasesIndexKey interface {
id() uint32
values() []interface{}
aliasesIndexKey()
}
// primary key starting index..
type AliasesPrimaryKey = AliasesIdIndexKey
type AliasesIdIndexKey struct {
vs []interface{}
}
func (x AliasesIdIndexKey) id() uint32 { return 0 }
func (x AliasesIdIndexKey) values() []interface{} { return x.vs }
func (x AliasesIdIndexKey) aliasesIndexKey() {}
func (this AliasesIdIndexKey) WithId(id string) AliasesIdIndexKey {
this.vs = []interface{}{id}
return this
}
type aliasesTable struct {
table ormtable.Table
}
func (this aliasesTable) Insert(ctx context.Context, aliases *Aliases) error {
return this.table.Insert(ctx, aliases)
}
func (this aliasesTable) Update(ctx context.Context, aliases *Aliases) error {
return this.table.Update(ctx, aliases)
}
func (this aliasesTable) Save(ctx context.Context, aliases *Aliases) error {
return this.table.Save(ctx, aliases)
}
func (this aliasesTable) Delete(ctx context.Context, aliases *Aliases) error {
return this.table.Delete(ctx, aliases)
}
func (this aliasesTable) Has(ctx context.Context, id string) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this aliasesTable) Get(ctx context.Context, id string) (*Aliases, error) {
var aliases Aliases
found, err := this.table.PrimaryKey().Get(ctx, &aliases, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &aliases, nil
}
func (this aliasesTable) List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return AliasesIterator{it}, err
}
func (this aliasesTable) ListRange(ctx context.Context, from, to AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return AliasesIterator{it}, err
}
func (this aliasesTable) DeleteBy(ctx context.Context, prefixKey AliasesIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this aliasesTable) DeleteRange(ctx context.Context, from, to AliasesIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this aliasesTable) doNotImplement() {}
var _ AliasesTable = aliasesTable{}
func NewAliasesTable(db ormtable.Schema) (AliasesTable, error) {
table := db.GetTable(&Aliases{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Aliases{}).ProtoReflect().Descriptor().FullName()))
}
return aliasesTable{table}, nil
}
type AssertionTable interface { type AssertionTable interface {
Insert(ctx context.Context, assertion *Assertion) error Insert(ctx context.Context, assertion *Assertion) error
Update(ctx context.Context, assertion *Assertion) error Update(ctx context.Context, assertion *Assertion) error
@ -580,6 +694,7 @@ func NewServiceTable(db ormtable.Schema) (ServiceTable, error) {
} }
type StateStore interface { type StateStore interface {
AliasesTable() AliasesTable
AssertionTable() AssertionTable AssertionTable() AssertionTable
AttestationTable() AttestationTable AttestationTable() AttestationTable
ControllerTable() ControllerTable ControllerTable() ControllerTable
@ -590,6 +705,7 @@ type StateStore interface {
} }
type stateStore struct { type stateStore struct {
aliases AliasesTable
assertion AssertionTable assertion AssertionTable
attestation AttestationTable attestation AttestationTable
controller ControllerTable controller ControllerTable
@ -597,6 +713,10 @@ type stateStore struct {
service ServiceTable service ServiceTable
} }
func (x stateStore) AliasesTable() AliasesTable {
return x.aliases
}
func (x stateStore) AssertionTable() AssertionTable { func (x stateStore) AssertionTable() AssertionTable {
return x.assertion return x.assertion
} }
@ -622,6 +742,11 @@ func (stateStore) doNotImplement() {}
var _ StateStore = stateStore{} var _ StateStore = stateStore{}
func NewStateStore(db ormtable.Schema) (StateStore, error) { func NewStateStore(db ormtable.Schema) (StateStore, error) {
aliasesTable, err := NewAliasesTable(db)
if err != nil {
return nil, err
}
assertionTable, err := NewAssertionTable(db) assertionTable, err := NewAssertionTable(db)
if err != nil { if err != nil {
return nil, err return nil, err
@ -648,6 +773,7 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) {
} }
return stateStore{ return stateStore{
aliasesTable,
assertionTable, assertionTable,
attestationTable, attestationTable,
controllerTable, controllerTable,

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,8 @@ import (
"os" "os"
"cosmossdk.io/log" "cosmossdk.io/log"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
_ "github.com/joho/godotenv/autoload"
"github.com/onsonr/hway/app" "github.com/onsonr/hway/app"
) )

View File

@ -3,25 +3,19 @@
"packages": [ "packages": [
"ipfs@latest", "ipfs@latest",
"golangci-lint@latest", "golangci-lint@latest",
"go_1_21@latest", "go_1_22@latest",
"templ@latest", "templ@latest",
"air@latest" "air@latest"
], ],
"env": { "env": {
"GOPATH": "$HOME/go", "GOPATH": "$HOME/go",
"PATH": "$HOME/go/bin:$PATH" "PATH": "$HOME/go/bin:$PATH"
}, },
"shell": { "shell": {
"scripts": { "scripts": {
"proto": [ "proto": ["make proto-gen"],
"make proto-gen" "templ": ["templ generate"],
], "ps": ["devbox services ls"]
"templ": [
"templ generate"
],
"ps": [
"devbox services ls"
]
} }
} }
} }

3
go.mod
View File

@ -2,8 +2,6 @@ module github.com/onsonr/hway
go 1.22 go 1.22
toolchain go1.22.3
// overrides // overrides
replace ( replace (
cosmossdk.io/core => cosmossdk.io/core v0.11.0 cosmossdk.io/core => cosmossdk.io/core v0.11.0
@ -198,6 +196,7 @@ require (
github.com/jbenet/goprocess v0.1.4 // indirect github.com/jbenet/goprocess v0.1.4 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/pretty v0.3.1 // indirect github.com/kr/pretty v0.3.1 // indirect

2
go.sum
View File

@ -1538,6 +1538,8 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U=
github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=

View File

@ -56,25 +56,13 @@ message QueryResolveResponse {
} }
// QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method. // QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method.
message QueryLoginOptionsRequest { message QueryWitnessCredentialRequest {
string origin = 1; string id = 1;
string handle = 2;
} }
// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method.
message QueryLoginOptionsResponse { message QueryWitnessCredentialResponse {
// options is the PublicKeyCredentialAttestationOptions // options is the PublicKeyCredentialAttestationOptions
string options = 1; string options = 1;
} }
// QueryRegisterOptionsRequest is the request type for the Query/RegisterOptions RPC method.
message QueryRegisterOptionsRequest {
string origin = 1;
string handle = 2;
}
// QueryRegisterOptionsResponse is the response type for the Query/RegisterOptions RPC method.
message QueryRegisterOptionsResponse {
string options = 1;
}

View File

@ -6,10 +6,33 @@ option go_package = "github.com/onsonr/hway/x/did/types";
import "cosmos/orm/v1/orm.proto"; import "cosmos/orm/v1/orm.proto";
import "did/v1/genesis.proto"; import "did/v1/genesis.proto";
// Aliases represents the `alsoKnownAs` property associated with a DID Controller
message Aliases {
option (cosmos.orm.v1.table) = {
id: 1
primary_key: {fields: "id"}
};
// The unique identifier of the alias
string id = 1;
// Origin is the Alias provider
string origin = 2;
// Handle is the user defined alias
string handle = 3;
// Controller of the alias
string controller = 4;
// Expiration of the alias
uint64 expiration = 5;
}
// Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) // Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave)
message Assertion { message Assertion {
option (cosmos.orm.v1.table) = { option (cosmos.orm.v1.table) = {
id: 1 id: 2
primary_key: {fields: "id"} primary_key: {fields: "id"}
}; };
@ -33,7 +56,7 @@ message Assertion {
// Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) // Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone)
message Attestation { message Attestation {
option (cosmos.orm.v1.table) = { option (cosmos.orm.v1.table) = {
id: 2 id: 3
primary_key: {fields: "id"} primary_key: {fields: "id"}
}; };
@ -57,7 +80,7 @@ message Attestation {
// Controller represents a Sonr DWN Vault // Controller represents a Sonr DWN Vault
message Controller { message Controller {
option (cosmos.orm.v1.table) = { option (cosmos.orm.v1.table) = {
id: 3 id: 4
primary_key: {fields: "id"} primary_key: {fields: "id"}
}; };
@ -80,7 +103,7 @@ message Controller {
// Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC) // Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC)
message Delegation { message Delegation {
option (cosmos.orm.v1.table) = { option (cosmos.orm.v1.table) = {
id: 4 id: 5
primary_key: {fields: "id"} primary_key: {fields: "id"}
}; };
@ -112,7 +135,7 @@ message Delegation {
// Service represents a service in a DID Document // Service represents a service in a DID Document
message Service { message Service {
option (cosmos.orm.v1.table) = { option (cosmos.orm.v1.table) = {
id: 5 id: 6
primary_key: {fields: "id"} primary_key: {fields: "id"}
}; };

View File

@ -31,19 +31,6 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type
return &types.QueryParamsResponse{Params: &p}, nil return &types.QueryParamsResponse{Params: &p}, nil
} }
// LoginOptions implements types.QueryServer.
func (k Querier) LoginOptions(goCtx context.Context, req *types.QueryLoginOptionsRequest) (*types.QueryLoginOptionsResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx)
panic("LoginOptions is unimplemented")
return &types.QueryLoginOptionsResponse{}, nil
}
// RegisterOptions implements types.QueryServer.
func (k Querier) RegisterOptions(goCtx context.Context, req *types.QueryRegisterOptionsRequest) (*types.QueryRegisterOptionsResponse, error) {
panic("RegisterOptions is unimplemented")
return &types.QueryRegisterOptionsResponse{}, nil
}
// PropertyExists implements types.QueryServer. // PropertyExists implements types.QueryServer.
func (k Querier) PropertyExists(goCtx context.Context, req *types.QueryExistsRequest) (*types.QueryExistsResponse, error) { func (k Querier) PropertyExists(goCtx context.Context, req *types.QueryExistsRequest) (*types.QueryExistsResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx) // ctx := sdk.UnwrapSDKContext(goCtx)
@ -57,3 +44,10 @@ func (k Querier) ResolveIdentifier(goCtx context.Context, req *types.QueryResolv
panic("ResolveIdentifier is unimplemented") panic("ResolveIdentifier is unimplemented")
return &types.QueryResolveResponse{}, nil return &types.QueryResolveResponse{}, nil
} }
// WitnessCredential implements types.QueryServer.
func (k Querier) WitnessCredential(goCtx context.Context, req *types.QueryWitnessCredentialRequest) (*types.QueryWitnessCredentialResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx)
panic("WitnessCredential is unimplemented")
return &types.QueryWitnessCredentialResponse{}, nil
}

View File

@ -50,7 +50,6 @@ func TestParams(t *testing.T) {
require.EqualValues(&tc.request.Params, r.Params) require.EqualValues(&tc.request.Params, r.Params)
} }
}) })
} }
} }

View File

@ -301,23 +301,22 @@ func (m *QueryResolveResponse) GetDocument() string {
} }
// QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method. // QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method.
type QueryLoginOptionsRequest struct { type QueryWitnessCredentialRequest struct {
Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Handle string `protobuf:"bytes,2,opt,name=handle,proto3" json:"handle,omitempty"`
} }
func (m *QueryLoginOptionsRequest) Reset() { *m = QueryLoginOptionsRequest{} } func (m *QueryWitnessCredentialRequest) Reset() { *m = QueryWitnessCredentialRequest{} }
func (m *QueryLoginOptionsRequest) String() string { return proto.CompactTextString(m) } func (m *QueryWitnessCredentialRequest) String() string { return proto.CompactTextString(m) }
func (*QueryLoginOptionsRequest) ProtoMessage() {} func (*QueryWitnessCredentialRequest) ProtoMessage() {}
func (*QueryLoginOptionsRequest) Descriptor() ([]byte, []int) { func (*QueryWitnessCredentialRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ae1fa9bb626e2869, []int{6} return fileDescriptor_ae1fa9bb626e2869, []int{6}
} }
func (m *QueryLoginOptionsRequest) XXX_Unmarshal(b []byte) error { func (m *QueryWitnessCredentialRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
} }
func (m *QueryLoginOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *QueryWitnessCredentialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic { if deterministic {
return xxx_messageInfo_QueryLoginOptionsRequest.Marshal(b, m, deterministic) return xxx_messageInfo_QueryWitnessCredentialRequest.Marshal(b, m, deterministic)
} else { } else {
b = b[:cap(b)] b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b) n, err := m.MarshalToSizedBuffer(b)
@ -327,50 +326,43 @@ func (m *QueryLoginOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]
return b[:n], nil return b[:n], nil
} }
} }
func (m *QueryLoginOptionsRequest) XXX_Merge(src proto.Message) { func (m *QueryWitnessCredentialRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryLoginOptionsRequest.Merge(m, src) xxx_messageInfo_QueryWitnessCredentialRequest.Merge(m, src)
} }
func (m *QueryLoginOptionsRequest) XXX_Size() int { func (m *QueryWitnessCredentialRequest) XXX_Size() int {
return m.Size() return m.Size()
} }
func (m *QueryLoginOptionsRequest) XXX_DiscardUnknown() { func (m *QueryWitnessCredentialRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryLoginOptionsRequest.DiscardUnknown(m) xxx_messageInfo_QueryWitnessCredentialRequest.DiscardUnknown(m)
} }
var xxx_messageInfo_QueryLoginOptionsRequest proto.InternalMessageInfo var xxx_messageInfo_QueryWitnessCredentialRequest proto.InternalMessageInfo
func (m *QueryLoginOptionsRequest) GetOrigin() string { func (m *QueryWitnessCredentialRequest) GetId() string {
if m != nil { if m != nil {
return m.Origin return m.Id
}
return ""
}
func (m *QueryLoginOptionsRequest) GetHandle() string {
if m != nil {
return m.Handle
} }
return "" return ""
} }
// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method.
type QueryLoginOptionsResponse struct { type QueryWitnessCredentialResponse struct {
// options is the PublicKeyCredentialAttestationOptions // options is the PublicKeyCredentialAttestationOptions
Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
} }
func (m *QueryLoginOptionsResponse) Reset() { *m = QueryLoginOptionsResponse{} } func (m *QueryWitnessCredentialResponse) Reset() { *m = QueryWitnessCredentialResponse{} }
func (m *QueryLoginOptionsResponse) String() string { return proto.CompactTextString(m) } func (m *QueryWitnessCredentialResponse) String() string { return proto.CompactTextString(m) }
func (*QueryLoginOptionsResponse) ProtoMessage() {} func (*QueryWitnessCredentialResponse) ProtoMessage() {}
func (*QueryLoginOptionsResponse) Descriptor() ([]byte, []int) { func (*QueryWitnessCredentialResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ae1fa9bb626e2869, []int{7} return fileDescriptor_ae1fa9bb626e2869, []int{7}
} }
func (m *QueryLoginOptionsResponse) XXX_Unmarshal(b []byte) error { func (m *QueryWitnessCredentialResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
} }
func (m *QueryLoginOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *QueryWitnessCredentialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic { if deterministic {
return xxx_messageInfo_QueryLoginOptionsResponse.Marshal(b, m, deterministic) return xxx_messageInfo_QueryWitnessCredentialResponse.Marshal(b, m, deterministic)
} else { } else {
b = b[:cap(b)] b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b) n, err := m.MarshalToSizedBuffer(b)
@ -380,117 +372,19 @@ func (m *QueryLoginOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([
return b[:n], nil return b[:n], nil
} }
} }
func (m *QueryLoginOptionsResponse) XXX_Merge(src proto.Message) { func (m *QueryWitnessCredentialResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryLoginOptionsResponse.Merge(m, src) xxx_messageInfo_QueryWitnessCredentialResponse.Merge(m, src)
} }
func (m *QueryLoginOptionsResponse) XXX_Size() int { func (m *QueryWitnessCredentialResponse) XXX_Size() int {
return m.Size() return m.Size()
} }
func (m *QueryLoginOptionsResponse) XXX_DiscardUnknown() { func (m *QueryWitnessCredentialResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryLoginOptionsResponse.DiscardUnknown(m) xxx_messageInfo_QueryWitnessCredentialResponse.DiscardUnknown(m)
} }
var xxx_messageInfo_QueryLoginOptionsResponse proto.InternalMessageInfo var xxx_messageInfo_QueryWitnessCredentialResponse proto.InternalMessageInfo
func (m *QueryLoginOptionsResponse) GetOptions() string { func (m *QueryWitnessCredentialResponse) GetOptions() string {
if m != nil {
return m.Options
}
return ""
}
// QueryRegisterOptionsRequest is the request type for the Query/RegisterOptions RPC method.
type QueryRegisterOptionsRequest struct {
Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
Handle string `protobuf:"bytes,2,opt,name=handle,proto3" json:"handle,omitempty"`
}
func (m *QueryRegisterOptionsRequest) Reset() { *m = QueryRegisterOptionsRequest{} }
func (m *QueryRegisterOptionsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryRegisterOptionsRequest) ProtoMessage() {}
func (*QueryRegisterOptionsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ae1fa9bb626e2869, []int{8}
}
func (m *QueryRegisterOptionsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryRegisterOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryRegisterOptionsRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryRegisterOptionsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryRegisterOptionsRequest.Merge(m, src)
}
func (m *QueryRegisterOptionsRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryRegisterOptionsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryRegisterOptionsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryRegisterOptionsRequest proto.InternalMessageInfo
func (m *QueryRegisterOptionsRequest) GetOrigin() string {
if m != nil {
return m.Origin
}
return ""
}
func (m *QueryRegisterOptionsRequest) GetHandle() string {
if m != nil {
return m.Handle
}
return ""
}
// QueryRegisterOptionsResponse is the response type for the Query/RegisterOptions RPC method.
type QueryRegisterOptionsResponse struct {
Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
}
func (m *QueryRegisterOptionsResponse) Reset() { *m = QueryRegisterOptionsResponse{} }
func (m *QueryRegisterOptionsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryRegisterOptionsResponse) ProtoMessage() {}
func (*QueryRegisterOptionsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ae1fa9bb626e2869, []int{9}
}
func (m *QueryRegisterOptionsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryRegisterOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryRegisterOptionsResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryRegisterOptionsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryRegisterOptionsResponse.Merge(m, src)
}
func (m *QueryRegisterOptionsResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryRegisterOptionsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryRegisterOptionsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryRegisterOptionsResponse proto.InternalMessageInfo
func (m *QueryRegisterOptionsResponse) GetOptions() string {
if m != nil { if m != nil {
return m.Options return m.Options
} }
@ -504,52 +398,43 @@ func init() {
proto.RegisterType((*QueryExistsResponse)(nil), "did.v1.QueryExistsResponse") proto.RegisterType((*QueryExistsResponse)(nil), "did.v1.QueryExistsResponse")
proto.RegisterType((*QueryResolveRequest)(nil), "did.v1.QueryResolveRequest") proto.RegisterType((*QueryResolveRequest)(nil), "did.v1.QueryResolveRequest")
proto.RegisterType((*QueryResolveResponse)(nil), "did.v1.QueryResolveResponse") proto.RegisterType((*QueryResolveResponse)(nil), "did.v1.QueryResolveResponse")
proto.RegisterType((*QueryLoginOptionsRequest)(nil), "did.v1.QueryLoginOptionsRequest") proto.RegisterType((*QueryWitnessCredentialRequest)(nil), "did.v1.QueryWitnessCredentialRequest")
proto.RegisterType((*QueryLoginOptionsResponse)(nil), "did.v1.QueryLoginOptionsResponse") proto.RegisterType((*QueryWitnessCredentialResponse)(nil), "did.v1.QueryWitnessCredentialResponse")
proto.RegisterType((*QueryRegisterOptionsRequest)(nil), "did.v1.QueryRegisterOptionsRequest")
proto.RegisterType((*QueryRegisterOptionsResponse)(nil), "did.v1.QueryRegisterOptionsResponse")
} }
func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) } func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) }
var fileDescriptor_ae1fa9bb626e2869 = []byte{ var fileDescriptor_ae1fa9bb626e2869 = []byte{
// 571 bytes of a gzipped FileDescriptorProto // 459 bytes of a gzipped FileD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fd, 0x79, 0x03, 0x00, 0x00,
0xff, 0x29, 0x9b, 0xb8, 0x83, 0x4f, 0x19, 0xde, 0x8f, 0x7c, 0xf0, 0xe0, 0xd2, 0xd2, 0xd5, 0xc9,
0x95, 0xa5, 0x07, 0x95, 0x59, 0x2c, 0xd8, 0x3d, 0xbb, 0x09, 0x97, 0x61, 0x76, 0x99, 0x1b, 0xe4,
0x1a, 0xbe, 0xde, 0x75, 0xfd, 0x7d, 0x9f, 0x87, 0xf7, 0x3e, 0xcf, 0x42, 0xef, 0x74, 0x16, 0x7a,
0xdf, 0x67, 0xa1, 0xf7, 0x71, 0x1e, 0x56, 0x4e, 0xe7, 0x61, 0xe5, 0xdb, 0x3c, 0xac, 0xbc, 0xa2,
0x89, 0x30, 0xbd, 0xe1, 0x61, 0xfb, 0x48, 0x0d, 0x98, 0x92, 0x5a, 0xc9, 0x8c, 0xf5, 0xde, 0x46,
0x63, 0x76, 0x62, 0xd1, 0x66, 0x9c, 0x72, 0x7d, 0xe8, 0xdb, 0xef, 0xd7, 0xed, 0x9f, 0x01, 0x00,
0x00, 0xff, 0xff, 0xa8, 0xc6, 0x26, 0xa6, 0x11, 0x05, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -566,14 +451,10 @@ const _ = grpc.SupportPackageIsVersion4
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)
// Exists queries if an id exists.
PropertyExists(ctx context.Context, in *QueryExistsRequest, opts ...grpc.CallOption) (*QueryExistsResponse, 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) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
// LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow.
LoginOptions(ctx context.Context, in *QueryLoginOptionsRequest, opts ...grpc.CallOption) (*QueryLoginOptionsResponse, error) WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error)
// RegisterOptions queries the PublicKeyCredentialCreationOptions for starting a register flow.
RegisterOptions(ctx context.Context, in *QueryRegisterOptionsRequest, opts ...grpc.CallOption) (*QueryRegisterOptionsResponse, error)
} }
type queryClient struct { type queryClient struct {
@ -593,15 +474,6 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
return out, nil return out, nil
} }
func (c *queryClient) PropertyExists(ctx context.Context, in *QueryExistsRequest, opts ...grpc.CallOption) (*QueryExistsResponse, error) {
out := new(QueryExistsResponse)
err := c.cc.Invoke(ctx, "/did.v1.Query/PropertyExists", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) {
out := new(QueryResolveResponse) out := new(QueryResolveResponse)
err := c.cc.Invoke(ctx, "/did.v1.Query/ResolveIdentifier", in, out, opts...) err := c.cc.Invoke(ctx, "/did.v1.Query/ResolveIdentifier", in, out, opts...)
@ -611,18 +483,9 @@ func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveReq
return out, nil return out, nil
} }
func (c *queryClient) LoginOptions(ctx context.Context, in *QueryLoginOptionsRequest, opts ...grpc.CallOption) (*QueryLoginOptionsResponse, error) { func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) {
out := new(QueryLoginOptionsResponse) out := new(QueryWitnessCredentialResponse)
err := c.cc.Invoke(ctx, "/did.v1.Query/LoginOptions", in, out, opts...) err := c.cc.Invoke(ctx, "/did.v1.Query/WitnessCredential", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) RegisterOptions(ctx context.Context, in *QueryRegisterOptionsRequest, opts ...grpc.CallOption) (*QueryRegisterOptionsResponse, error) {
out := new(QueryRegisterOptionsResponse)
err := c.cc.Invoke(ctx, "/did.v1.Query/RegisterOptions", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -633,14 +496,10 @@ func (c *queryClient) RegisterOptions(ctx context.Context, in *QueryRegisterOpti
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)
// Exists queries if an id exists.
PropertyExists(context.Context, *QueryExistsRequest) (*QueryExistsResponse, error)
// Resolve queries the DID document by its id. // Resolve queries the DID document by its id.
ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error)
// LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow.
LoginOptions(context.Context, *QueryLoginOptionsRequest) (*QueryLoginOptionsResponse, error) WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error)
// RegisterOptions queries the PublicKeyCredentialCreationOptions for starting a register flow.
RegisterOptions(context.Context, *QueryRegisterOptionsRequest) (*QueryRegisterOptionsResponse, error)
} }
// UnimplementedQueryServer can be embedded to have forward compatible implementations. // UnimplementedQueryServer can be embedded to have forward compatible implementations.
@ -650,17 +509,11 @@ type UnimplementedQueryServer struct {
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { func (*UnimplementedQueryServer) Params(ctx context.Context, req *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) PropertyExists(ctx context.Context, req *QueryExistsRequest) (*QueryExistsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PropertyExists not implemented")
}
func (*UnimplementedQueryServer) ResolveIdentifier(ctx context.Context, req *QueryResolveRequest) (*QueryResolveResponse, error) { func (*UnimplementedQueryServer) ResolveIdentifier(ctx context.Context, req *QueryResolveRequest) (*QueryResolveResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ResolveIdentifier not implemented") return nil, status.Errorf(codes.Unimplemented, "method ResolveIdentifier not implemented")
} }
func (*UnimplementedQueryServer) LoginOptions(ctx context.Context, req *QueryLoginOptionsRequest) (*QueryLoginOptionsResponse, error) { func (*UnimplementedQueryServer) WitnessCredential(ctx context.Context, req *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoginOptions not implemented") return nil, status.Errorf(codes.Unimplemented, "method WitnessCredential not implemented")
}
func (*UnimplementedQueryServer) RegisterOptions(ctx context.Context, req *QueryRegisterOptionsRequest) (*QueryRegisterOptionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterOptions not implemented")
} }
func RegisterQueryServer(s grpc1.Server, srv QueryServer) { func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
@ -685,24 +538,6 @@ 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_PropertyExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryExistsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).PropertyExists(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/did.v1.Query/PropertyExists",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).PropertyExists(ctx, req.(*QueryExistsRequest))
}
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_ResolveIdentifier_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 {
@ -721,38 +556,20 @@ func _Query_ResolveIdentifier_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Query_LoginOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Query_WitnessCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryLoginOptionsRequest) in := new(QueryWitnessCredentialRequest)
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).LoginOptions(ctx, in) return srv.(QueryServer).WitnessCredential(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/did.v1.Query/LoginOptions", FullMethod: "/did.v1.Query/WitnessCredential",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).LoginOptions(ctx, req.(*QueryLoginOptionsRequest)) return srv.(QueryServer).WitnessCredential(ctx, req.(*QueryWitnessCredentialRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_RegisterOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRegisterOptionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).RegisterOptions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/did.v1.Query/RegisterOptions",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).RegisterOptions(ctx, req.(*QueryRegisterOptionsRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
@ -765,21 +582,13 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "Params", MethodName: "Params",
Handler: _Query_Params_Handler, Handler: _Query_Params_Handler,
}, },
{
MethodName: "PropertyExists",
Handler: _Query_PropertyExists_Handler,
},
{ {
MethodName: "ResolveIdentifier", MethodName: "ResolveIdentifier",
Handler: _Query_ResolveIdentifier_Handler, Handler: _Query_ResolveIdentifier_Handler,
}, },
{ {
MethodName: "LoginOptions", MethodName: "WitnessCredential",
Handler: _Query_LoginOptions_Handler, Handler: _Query_WitnessCredential_Handler,
},
{
MethodName: "RegisterOptions",
Handler: _Query_RegisterOptions_Handler,
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
@ -974,7 +783,7 @@ func (m *QueryResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *QueryLoginOptionsRequest) Marshal() (dAtA []byte, err error) { func (m *QueryWitnessCredentialRequest) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size]) n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -984,34 +793,27 @@ func (m *QueryLoginOptionsRequest) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil return dAtA[:n], nil
} }
func (m *QueryLoginOptionsRequest) MarshalTo(dAtA []byte) (int, error) { func (m *QueryWitnessCredentialRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size() size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size]) return m.MarshalToSizedBuffer(dAtA[:size])
} }
func (m *QueryLoginOptionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { func (m *QueryWitnessCredentialRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA) i := len(dAtA)
_ = i _ = i
var l int var l int
_ = l _ = l
if len(m.Handle) > 0 { if len(m.Id) > 0 {
i -= len(m.Handle) i -= len(m.Id)
copy(dAtA[i:], m.Handle) copy(dAtA[i:], m.Id)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Handle))) i = encodeVarintQuery(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0x12
}
if len(m.Origin) > 0 {
i -= len(m.Origin)
copy(dAtA[i:], m.Origin)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *QueryLoginOptionsResponse) Marshal() (dAtA []byte, err error) { func (m *QueryWitnessCredentialResponse) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size]) n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -1021,79 +823,12 @@ func (m *QueryLoginOptionsResponse) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil return dAtA[:n], nil
} }
func (m *QueryLoginOptionsResponse) MarshalTo(dAtA []byte) (int, error) { func (m *QueryWitnessCredentialResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size() size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size]) return m.MarshalToSizedBuffer(dAtA[:size])
} }
func (m *QueryLoginOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { func (m *QueryWitnessCredentialResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Options) > 0 {
i -= len(m.Options)
copy(dAtA[i:], m.Options)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Options)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryRegisterOptionsRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryRegisterOptionsRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryRegisterOptionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Handle) > 0 {
i -= len(m.Handle)
copy(dAtA[i:], m.Handle)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Handle)))
i--
dAtA[i] = 0x12
}
if len(m.Origin) > 0 {
i -= len(m.Origin)
copy(dAtA[i:], m.Origin)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryRegisterOptionsResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryRegisterOptionsResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryRegisterOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA) i := len(dAtA)
_ = i _ = i
var l int var l int
@ -1196,54 +931,20 @@ func (m *QueryResolveResponse) Size() (n int) {
return n return n
} }
func (m *QueryLoginOptionsRequest) Size() (n int) { func (m *QueryWitnessCredentialRequest) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
} }
var l int var l int
_ = l _ = l
l = len(m.Origin) l = len(m.Id)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
l = len(m.Handle)
if l > 0 { if l > 0 {
n += 1 + l + sovQuery(uint64(l)) n += 1 + l + sovQuery(uint64(l))
} }
return n return n
} }
func (m *QueryLoginOptionsResponse) Size() (n int) { func (m *QueryWitnessCredentialResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Options)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryRegisterOptionsRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Origin)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
l = len(m.Handle)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryRegisterOptionsResponse) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
} }
@ -1746,7 +1447,7 @@ func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *QueryLoginOptionsRequest) Unmarshal(dAtA []byte) error { func (m *QueryWitnessCredentialRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
for iNdEx < l { for iNdEx < l {
@ -1769,15 +1470,15 @@ func (m *QueryLoginOptionsRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3) fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7) wireType := int(wire & 0x7)
if wireType == 4 { if wireType == 4 {
return fmt.Errorf("proto: QueryLoginOptionsRequest: wiretype end group for non-group") return fmt.Errorf("proto: QueryWitnessCredentialRequest: wiretype end group for non-group")
} }
if fieldNum <= 0 { if fieldNum <= 0 {
return fmt.Errorf("proto: QueryLoginOptionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: QueryWitnessCredentialRequest: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 1: case 1:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
} }
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
@ -1805,39 +1506,7 @@ func (m *QueryLoginOptionsRequest) Unmarshal(dAtA []byte) error {
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
m.Origin = string(dAtA[iNdEx:postIndex]) m.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Handle = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
@ -1860,7 +1529,7 @@ func (m *QueryLoginOptionsRequest) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *QueryLoginOptionsResponse) Unmarshal(dAtA []byte) error { func (m *QueryWitnessCredentialResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
for iNdEx < l { for iNdEx < l {
@ -1883,206 +1552,10 @@ func (m *QueryLoginOptionsResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3) fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7) wireType := int(wire & 0x7)
if wireType == 4 { if wireType == 4 {
return fmt.Errorf("proto: QueryLoginOptionsResponse: wiretype end group for non-group") return fmt.Errorf("proto: QueryWitnessCredentialResponse: wiretype end group for non-group")
} }
if fieldNum <= 0 { if fieldNum <= 0 {
return fmt.Errorf("proto: QueryLoginOptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: QueryWitnessCredentialResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Options = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryRegisterOptionsRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryRegisterOptionsRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryRegisterOptionsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Handle = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryRegisterOptionsResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryRegisterOptionsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryRegisterOptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 1: case 1:

View File

@ -51,82 +51,6 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal
} }
func request_Query_PropertyExists_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryExistsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["kind"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "kind")
}
protoReq.Kind, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "kind", err)
}
val, ok = pathParams["value"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "value")
}
protoReq.Value, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "value", err)
}
msg, err := client.PropertyExists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_PropertyExists_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryExistsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["kind"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "kind")
}
protoReq.Kind, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "kind", err)
}
val, ok = pathParams["value"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "value")
}
protoReq.Value, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "value", err)
}
msg, err := server.PropertyExists(ctx, &protoReq)
return msg, metadata, err
}
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_ResolveIdentifier_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
@ -181,8 +105,8 @@ func local_request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runt
} }
func request_Query_LoginOptions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { 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) {
var protoReq QueryLoginOptionsRequest var protoReq QueryWitnessCredentialRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
var ( var (
@ -192,35 +116,24 @@ func request_Query_LoginOptions_0(ctx context.Context, marshaler runtime.Marshal
_ = err _ = err
) )
val, ok = pathParams["origin"] val, ok = pathParams["id"]
if !ok { if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
} }
protoReq.Origin, err = runtime.String(val) protoReq.Id, err = runtime.String(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
} }
val, ok = pathParams["handle"] msg, err := client.WitnessCredential(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "handle")
}
protoReq.Handle, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "handle", err)
}
msg, err := client.LoginOptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err return msg, metadata, err
} }
func local_request_Query_LoginOptions_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_WitnessCredential_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryLoginOptionsRequest var protoReq QueryWitnessCredentialRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
var ( var (
@ -230,105 +143,18 @@ func local_request_Query_LoginOptions_0(ctx context.Context, marshaler runtime.M
_ = err _ = err
) )
val, ok = pathParams["origin"] val, ok = pathParams["id"]
if !ok { if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
} }
protoReq.Origin, err = runtime.String(val) protoReq.Id, err = runtime.String(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
} }
val, ok = pathParams["handle"] msg, err := server.WitnessCredential(ctx, &protoReq)
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "handle")
}
protoReq.Handle, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "handle", err)
}
msg, err := server.LoginOptions(ctx, &protoReq)
return msg, metadata, err
}
func request_Query_RegisterOptions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryRegisterOptionsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["origin"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
}
protoReq.Origin, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
}
val, ok = pathParams["handle"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "handle")
}
protoReq.Handle, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "handle", err)
}
msg, err := client.RegisterOptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_RegisterOptions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryRegisterOptionsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["origin"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
}
protoReq.Origin, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
}
val, ok = pathParams["handle"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "handle")
}
protoReq.Handle, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "handle", err)
}
msg, err := server.RegisterOptions(ctx, &protoReq)
return msg, metadata, err return msg, metadata, err
} }
@ -362,29 +188,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
}) })
mux.Handle("GET", pattern_Query_PropertyExists_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_PropertyExists_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_PropertyExists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_ResolveIdentifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_ResolveIdentifier_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()
@ -408,7 +211,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
}) })
mux.Handle("GET", pattern_Query_LoginOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_WitnessCredential_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
@ -419,7 +222,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_LoginOptions_0(rctx, inboundMarshaler, server, req, pathParams) resp, md, err := local_request_Query_WitnessCredential_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 {
@ -427,30 +230,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
forward_Query_LoginOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) forward_Query_WitnessCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_RegisterOptions_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_RegisterOptions_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_RegisterOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
}) })
@ -515,26 +295,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}) })
mux.Handle("GET", pattern_Query_PropertyExists_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_PropertyExists_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_PropertyExists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_ResolveIdentifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_ResolveIdentifier_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()
@ -555,7 +315,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}) })
mux.Handle("GET", pattern_Query_LoginOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_WitnessCredential_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)
@ -564,34 +324,14 @@ 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_LoginOptions_0(rctx, inboundMarshaler, client, req, pathParams) resp, md, err := request_Query_WitnessCredential_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_LoginOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) forward_Query_WitnessCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_RegisterOptions_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_RegisterOptions_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_RegisterOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
}) })
@ -601,23 +341,15 @@ 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_PropertyExists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"did", "exists", "kind", "value"}, "", 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_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_LoginOptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"did", "login", "origin", "handle", "options"}, "", 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_RegisterOptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"did", "register", "origin", "handle", "options"}, "", runtime.AssumeColonVerbOpt(false)))
) )
var ( var (
forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_Params_0 = runtime.ForwardResponseMessage
forward_Query_PropertyExists_0 = runtime.ForwardResponseMessage
forward_Query_ResolveIdentifier_0 = runtime.ForwardResponseMessage forward_Query_ResolveIdentifier_0 = runtime.ForwardResponseMessage
forward_Query_LoginOptions_0 = runtime.ForwardResponseMessage forward_Query_WitnessCredential_0 = runtime.ForwardResponseMessage
forward_Query_RegisterOptions_0 = runtime.ForwardResponseMessage
) )

View File

@ -23,6 +23,88 @@ var _ = math.Inf
// proto package needs to be updated. // proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// Aliases represents the `alsoKnownAs` property associated with a DID Controller
type Aliases struct {
// The unique identifier of the alias
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Origin is the Alias provider
Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
// Handle is the user defined alias
Handle string `protobuf:"bytes,3,opt,name=handle,proto3" json:"handle,omitempty"`
// Controller of the alias
Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"`
// Expiration of the alias
Expiration uint64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"`
}
func (m *Aliases) Reset() { *m = Aliases{} }
func (m *Aliases) String() string { return proto.CompactTextString(m) }
func (*Aliases) ProtoMessage() {}
func (*Aliases) Descriptor() ([]byte, []int) {
return fileDescriptor_f44bb702879c34b4, []int{0}
}
func (m *Aliases) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Aliases) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Aliases.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Aliases) XXX_Merge(src proto.Message) {
xxx_messageInfo_Aliases.Merge(m, src)
}
func (m *Aliases) XXX_Size() int {
return m.Size()
}
func (m *Aliases) XXX_DiscardUnknown() {
xxx_messageInfo_Aliases.DiscardUnknown(m)
}
var xxx_messageInfo_Aliases proto.InternalMessageInfo
func (m *Aliases) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Aliases) GetOrigin() string {
if m != nil {
return m.Origin
}
return ""
}
func (m *Aliases) GetHandle() string {
if m != nil {
return m.Handle
}
return ""
}
func (m *Aliases) GetController() string {
if m != nil {
return m.Controller
}
return ""
}
func (m *Aliases) GetExpiration() uint64 {
if m != nil {
return m.Expiration
}
return 0
}
// Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) // Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave)
type Assertion struct { type Assertion struct {
// The unique identifier of the attestation // The unique identifier of the attestation
@ -41,7 +123,7 @@ func (m *Assertion) Reset() { *m = Assertion{} }
func (m *Assertion) String() string { return proto.CompactTextString(m) } func (m *Assertion) String() string { return proto.CompactTextString(m) }
func (*Assertion) ProtoMessage() {} func (*Assertion) ProtoMessage() {}
func (*Assertion) Descriptor() ([]byte, []int) { func (*Assertion) Descriptor() ([]byte, []int) {
return fileDescriptor_f44bb702879c34b4, []int{0} return fileDescriptor_f44bb702879c34b4, []int{1}
} }
func (m *Assertion) XXX_Unmarshal(b []byte) error { func (m *Assertion) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -123,7 +205,7 @@ func (m *Attestation) Reset() { *m = Attestation{} }
func (m *Attestation) String() string { return proto.CompactTextString(m) } func (m *Attestation) String() string { return proto.CompactTextString(m) }
func (*Attestation) ProtoMessage() {} func (*Attestation) ProtoMessage() {}
func (*Attestation) Descriptor() ([]byte, []int) { func (*Attestation) Descriptor() ([]byte, []int) {
return fileDescriptor_f44bb702879c34b4, []int{1} return fileDescriptor_f44bb702879c34b4, []int{2}
} }
func (m *Attestation) XXX_Unmarshal(b []byte) error { func (m *Attestation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -205,7 +287,7 @@ func (m *Controller) Reset() { *m = Controller{} }
func (m *Controller) String() string { return proto.CompactTextString(m) } func (m *Controller) String() string { return proto.CompactTextString(m) }
func (*Controller) ProtoMessage() {} func (*Controller) ProtoMessage() {}
func (*Controller) Descriptor() ([]byte, []int) { func (*Controller) Descriptor() ([]byte, []int) {
return fileDescriptor_f44bb702879c34b4, []int{2} return fileDescriptor_f44bb702879c34b4, []int{3}
} }
func (m *Controller) XXX_Unmarshal(b []byte) error { func (m *Controller) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -293,7 +375,7 @@ func (m *Delegation) Reset() { *m = Delegation{} }
func (m *Delegation) String() string { return proto.CompactTextString(m) } func (m *Delegation) String() string { return proto.CompactTextString(m) }
func (*Delegation) ProtoMessage() {} func (*Delegation) ProtoMessage() {}
func (*Delegation) Descriptor() ([]byte, []int) { func (*Delegation) Descriptor() ([]byte, []int) {
return fileDescriptor_f44bb702879c34b4, []int{3} return fileDescriptor_f44bb702879c34b4, []int{4}
} }
func (m *Delegation) XXX_Unmarshal(b []byte) error { func (m *Delegation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -394,7 +476,7 @@ func (m *Service) Reset() { *m = Service{} }
func (m *Service) String() string { return proto.CompactTextString(m) } func (m *Service) String() string { return proto.CompactTextString(m) }
func (*Service) ProtoMessage() {} func (*Service) ProtoMessage() {}
func (*Service) Descriptor() ([]byte, []int) { func (*Service) Descriptor() ([]byte, []int) {
return fileDescriptor_f44bb702879c34b4, []int{4} return fileDescriptor_f44bb702879c34b4, []int{5}
} }
func (m *Service) XXX_Unmarshal(b []byte) error { func (m *Service) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -452,6 +534,7 @@ func (m *Service) GetControllerDid() string {
} }
func init() { func init() {
proto.RegisterType((*Aliases)(nil), "did.v1.Aliases")
proto.RegisterType((*Assertion)(nil), "did.v1.Assertion") proto.RegisterType((*Assertion)(nil), "did.v1.Assertion")
proto.RegisterMapType((map[string]string)(nil), "did.v1.Assertion.MetadataEntry") proto.RegisterMapType((map[string]string)(nil), "did.v1.Assertion.MetadataEntry")
proto.RegisterType((*Attestation)(nil), "did.v1.Attestation") proto.RegisterType((*Attestation)(nil), "did.v1.Attestation")
@ -464,46 +547,105 @@ 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{
// 621 bytes of a gzipped FileDescriptorProto // 672 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xc1, 0x6e, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xbf, 0x6e, 0x13, 0x4f,
0x10, 0x86, 0xeb, 0x38, 0x6d, 0x93, 0x49, 0xd2, 0x56, 0xab, 0x4a, 0x98, 0x20, 0x4c, 0x08, 0xaa, 0x10, 0xc7, 0x73, 0x3e, 0xff, 0x1d, 0xdb, 0x49, 0xb4, 0x8a, 0x7e, 0xbf, 0xc3, 0x08, 0x63, 0x8c,
0x14, 0x2e, 0x36, 0x85, 0x0b, 0x6a, 0x39, 0x50, 0xda, 0x1e, 0x00, 0x55, 0x42, 0x81, 0x13, 0x97, 0x22, 0x85, 0xc6, 0x47, 0xa0, 0x41, 0x09, 0x05, 0x26, 0x49, 0x01, 0x28, 0x12, 0x32, 0x54, 0x34,
0xc8, 0xf1, 0x6e, 0xd3, 0x25, 0xf6, 0xae, 0xb5, 0xbb, 0x49, 0xf1, 0x8d, 0x3b, 0x12, 0xe2, 0xc0, 0xd6, 0xfa, 0x76, 0x63, 0x2f, 0x3e, 0xef, 0x9e, 0x76, 0xd7, 0x4e, 0xae, 0xa3, 0x47, 0x42, 0x14,
0xb9, 0xaf,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c, 0xf9,
0x7a, 0xd1, 0x5c, 0x79, 0xd5, 0x1e, 0x32, 0x3d, 0x9a, 0x0e, 0x3a, 0x9e, 0x98, 0xb8, 0x82, 0x2b,
0xc1, 0xa5, 0x3b, 0x3a, 0xc6, 0xa1, 0x7b, 0xe2, 0x46, 0xef, 0x6b, 0x44, 0xac, 0x06, 0xc5, 0xf8,
0x6d, 0xbd, 0xff, 0x23, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x24, 0xdd, 0x73, 0xa8, 0x05, 0x00, 0x00,
}
func (m *Aliases) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Aliases) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Aliases) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Expiration != 0 {
i = encodeVarintState(dAtA, i, uint64(m.Expiration))
i--
dAtA[i] = 0x28
}
if len(m.Controller) > 0 {
i -= len(m.Controller)
copy(dAtA[i:], m.Controller)
i = encodeVarintState(dAtA, i, uint64(len(m.Controller)))
i--
dAtA[i] = 0x22
}
if len(m.Handle) > 0 {
i -= len(m.Handle)
copy(dAtA[i:], m.Handle)
i = encodeVarintState(dAtA, i, uint64(len(m.Handle)))
i--
dAtA[i] = 0x1a
}
if len(m.Origin) > 0 {
i -= len(m.Origin)
copy(dAtA[i:], m.Origin)
i = encodeVarintState(dAtA, i, uint64(len(m.Origin)))
i--
dAtA[i] = 0x12
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintState(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
} }
func (m *Assertion) Marshal() (dAtA []byte, err error) { func (m *Assertion) Marshal() (dAtA []byte, err error) {
@ -843,6 +985,34 @@ func encodeVarintState(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v) dAtA[offset] = uint8(v)
return base return base
} }
func (m *Aliases) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Id)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
l = len(m.Origin)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
l = len(m.Handle)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
l = len(m.Controller)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
if m.Expiration != 0 {
n += 1 + sovState(uint64(m.Expiration))
}
return n
}
func (m *Assertion) Size() (n int) { func (m *Assertion) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -1009,6 +1179,203 @@ func sovState(x uint64) (n int) {
func sozState(x uint64) (n int) { func sozState(x uint64) (n int) {
return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63))))
} }
func (m *Aliases) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Aliases: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Aliases: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Handle = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Controller = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType)
}
m.Expiration = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Expiration |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipState(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthState
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Assertion) Unmarshal(dAtA []byte) error { func (m *Assertion) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0