keeper

package
v0.6.12-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAccount added in v0.6.10

func DeleteAccount(accDid string) error

func FetchCredential added in v0.6.10

func FetchCredential(keyDid string) (types.Credential, error)

func GetAccount added in v0.6.10

func GetAccount(accDid string) (models.Account, error)

func InsertAccount added in v0.6.10

func InsertAccount(acc models.Account) error

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func ReadInbox added in v0.6.10

func ReadInbox(accDid string) ([]*models.InboxMessage, error)

ReadInbox reads the inbox for the account

func StoreCredential added in v0.6.10

func StoreCredential(cred types.Credential) error

func WriteInbox added in v0.6.10

func WriteInbox(toDid string, msg *models.InboxMessage) error

WriteInbox writes a message to the inbox for the account

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,

	accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, groupKeeper types.GroupKeeper,
) *Keeper

func (Keeper) AliasAvailable added in v0.6.10

func (Keeper) CheckAlias added in v0.6.12

func (k Keeper) CheckAlias(ctx sdk.Context, alias string) error

CheckAlias checks if an alias is already used

func (Keeper) DidAll

func (Keeper) DidByAlsoKnownAs added in v0.4.0

func (Keeper) DidByKeyID added in v0.4.0

func (Keeper) GetAllBlockchainIdentities added in v0.6.3

func (k Keeper) GetAllBlockchainIdentities(ctx sdk.Context) (list []types.DidDocument)

GetAllDidDocument returns all didDocument

func (Keeper) GetAllPrimaryIdentities added in v0.6.3

func (k Keeper) GetAllPrimaryIdentities(ctx sdk.Context) (list []types.DidDocument)

GetAllDidDocument returns all didDocument

func (Keeper) GetAllRelationships added in v0.5.1

func (k Keeper) GetAllRelationships(ctx sdk.Context) (list []types.VerificationRelationship)

GetAllRelationships returns all Relationship

func (Keeper) GetBlockchainIdentity added in v0.6.3

func (k Keeper) GetBlockchainIdentity(
	ctx sdk.Context,
	did string,

) (val types.DidDocument, found bool)

GetDidDocument returns a didDocument from its index

func (Keeper) GetBlockchainIdentityByAddress added in v0.6.10

func (k Keeper) GetBlockchainIdentityByAddress(
	ctx sdk.Context,
	addr string,
) (val types.DidDocument, found bool)

GetBlockchainIdentityByAddress iterates over all didDocuments and returns the first one that matches the address

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetPrimaryIdentity added in v0.6.3

func (k Keeper) GetPrimaryIdentity(
	ctx sdk.Context,
	did string,
) (val types.DidDocument, found bool)

GetDidDocument returns a didDocument from its index

func (Keeper) GetPrimaryIdentityByAddress added in v0.6.10

func (k Keeper) GetPrimaryIdentityByAddress(
	ctx sdk.Context,
	addr string,
) (val types.DidDocument, found bool)

GetPrimaryIdentityByAddress iterates over all didDocuments and returns the first one that matches the address

func (Keeper) GetPrimaryIdentityByAlias added in v0.6.12

func (k Keeper) GetPrimaryIdentityByAlias(
	ctx sdk.Context,
	alias string,
) (val types.DidDocument, found bool)

GetPrimaryIdentityByAlias returns a didDocument from its index

func (Keeper) GetRelationship added in v0.5.1

func (k Keeper) GetRelationship(ctx sdk.Context, reference string) (val types.VerificationRelationship, found bool)

GetRelationship returns a Service from its index

func (Keeper) GetRelationshipsFromList added in v0.5.1

func (k Keeper) GetRelationshipsFromList(ctx sdk.Context, addrs ...string) ([]types.VerificationRelationship, error)

func (Keeper) HasRelationship added in v0.5.1

func (k Keeper) HasRelationship(ctx sdk.Context, reference string) bool

HasRelationship checks if the element exists in the store

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Params

func (Keeper) RemoveBlockchainIdentity added in v0.6.3

func (k Keeper) RemoveBlockchainIdentity(
	ctx sdk.Context,
	did string,

)

RemoveDidDocument removes a didDocument from the store

func (Keeper) RemovePrimaryIdentity added in v0.6.3

func (k Keeper) RemovePrimaryIdentity(
	ctx sdk.Context,
	did string,

)

RemoveDidDocument removes a didDocument from the store

func (Keeper) SetAliasForPrimaryIdentity added in v0.6.12

func (k Keeper) SetAliasForPrimaryIdentity(ctx sdk.Context, didDocument types.DidDocument, alias string)

SetAliasForDidDocument set a specific didDocument in the store from its index

func (Keeper) SetBlockchainIdentities added in v0.6.7

func (k Keeper) SetBlockchainIdentities(ctx sdk.Context, docs ...*types.DidDocument)

SetDidDocument set a specific didDocument in the store from its index

func (Keeper) SetBlockchainIdentity added in v0.6.3

func (k Keeper) SetBlockchainIdentity(ctx sdk.Context, didDocument types.DidDocument)

SetDidDocument set a specific didDocument in the store from its index

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetPrimaryIdentity added in v0.6.3

func (k Keeper) SetPrimaryIdentity(ctx sdk.Context, didDocument types.DidDocument)

SetDidDocument set a specific didDocument in the store from its index

func (Keeper) SetRelationship added in v0.5.1

func (k Keeper) SetRelationship(ctx sdk.Context, VerificationRelationship types.VerificationRelationship)

SetRelationship set a specific Service in the store from its index

func (Keeper) ValidateNewPrimaryDidDocument added in v0.6.10

func (k Keeper) ValidateNewPrimaryDidDocument(ctx sdk.Context, doc *types.DidDocument) error

type Vault added in v0.6.10

type Vault interface {
	// InsertAccount inserts the account and its keyshares into the IPFS store
	InsertAccount(acc models.Account) error

	// GetAccount gets the account and its keyshares from the IPFS store
	GetAccount(accDid string) (models.Account, error)

	// DeleteAccount deletes the account and its keyshares from the IPFS store
	DeleteAccount(accDid string) error

	// ReadInbox reads the inbox from the IPFS store
	ReadInbox(accDid string) ([]*models.InboxMessage, error)

	// WriteInbox writes the inbox to the IPFS store
	WriteInbox(toDid string, msg *models.InboxMessage) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL