feature/implement did state (#15)

* refactor: update model proto

* feat: add status field to Controller

* feat: add Verification.Kind field to state protobuf to support different verification types

* fix: remove QueryService and QueryResolve RPCs from query.proto
This commit is contained in:
Prad Nukala
2024-09-18 17:27:30 -04:00
committed by GitHub
parent 2c1cf56e3c
commit 6d8bd8fc85
18 changed files with 1348 additions and 5998 deletions
+8 -8
View File
@@ -47,9 +47,9 @@ func (ms msgServer) AllocateVault(
) (*types.MsgAllocateVaultResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
// 1.Check if the service origin is valid
if ms.k.IsValidServiceOrigin(ctx, msg.Origin) {
return nil, types.ErrInvalidServiceOrigin
}
// if ms.k.IsValidServiceOrigin(ctx, msg.Origin) {
// return nil, types.ErrInvalidServiceOrigin
// }
cid, expiryBlock, err := ms.k.assembleInitialVault(ctx)
if err != nil {
@@ -92,13 +92,13 @@ func (ms msgServer) RegisterService(
goCtx context.Context,
msg *types.MsgRegisterService,
) (*types.MsgRegisterServiceResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
// ctx := sdk.UnwrapSDKContext(goCtx)
// 1.Check if the service origin is valid
if !ms.k.IsValidServiceOrigin(ctx, msg.Service.Origin) {
return nil, types.ErrInvalidServiceOrigin
}
return ms.k.insertService(ctx, msg.Service)
// if !ms.k.IsValidServiceOrigin(ctx, msg.Service.Origin) {
// return nil, types.ErrInvalidServiceOrigin
// }
return nil, errors.Wrapf(types.ErrInvalidServiceOrigin, "invalid service origin")
}
// # UpdateParams