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
-24
View File
@@ -1,24 +0,0 @@
package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/onsonr/sonr/x/did/builder"
"github.com/onsonr/sonr/x/did/types"
)
// insertService inserts a service record into the database
func (k Keeper) insertService(
ctx sdk.Context,
svc *types.Service,
) (*types.MsgRegisterServiceResponse, error) {
record := builder.APIFormatServiceRecord(svc)
err := k.OrmDB.ServiceRecordTable().Insert(ctx, record)
if err != nil {
return nil, err
}
return &types.MsgRegisterServiceResponse{
Success: true,
Did: record.Id,
}, nil
}