sonr/x/did/keeper/state.go
github-actions[bot] 228adb7f93
master -> develop (#20)
* Squash merge develop into master

* feat: add automated production release workflow

* feat: add Gitflow workflow for syncing branches

* ci: update workflow runner to latest ubuntu version

* feat: enable buf.build publishing on master and develop branches

---------

Co-authored-by: Prad Nukala <prad@sonr.io>
2024-09-23 12:39:59 -04:00

38 lines
820 B
Go

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
func (k Keeper) insertAliasFromDisplayName() {
}
func (k Keeper) insertAssertionFromIdentity() {
}
func (k Keeper) insertAuthenticationFromCredential() {
}
func (k Keeper) insertControllerFromMotrVault() {
}
func (k Keeper) insertDelegationFromAccount() {
}