keeper

package
v0.0.0-...-2fe96dc Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Keeper

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

Keeper defines the identity keeper

func NewKeeper

func NewKeeper(cdc codec.Codec, key storetypes.StoreKey) Keeper

NewKeeper creates a new identity Keeper instance

func (Keeper) AddCertificate

func (k Keeper) AddCertificate(ctx sdk.Context, identityID tmbytes.HexBytes, certificate string) error

AddCertificate adds the given certificate for the identity

func (Keeper) AddPubKey

func (k Keeper) AddPubKey(ctx sdk.Context, identityID tmbytes.HexBytes, pubKey *types.PubKeyInfo) error

AddPubKey adds the given public key for the identity

func (Keeper) CreateIdentity

func (k Keeper) CreateIdentity(
	ctx sdk.Context,
	id tmbytes.HexBytes,
	pubKey *types.PubKeyInfo,
	certificate,
	credentials string,
	data string,
	owner sdk.AccAddress,
) error

CreateIdentity creates an identity

func (Keeper) GetCredentials

func (k Keeper) GetCredentials(ctx sdk.Context, identityID tmbytes.HexBytes) (string, bool)

GetCredentials retrieves the credentials of the specified identity

func (Keeper) GetData

func (k Keeper) GetData(ctx sdk.Context, identityID tmbytes.HexBytes) (string, bool)

GetData retrieves the credentials of the specified identity

func (Keeper) GetIdentity

func (k Keeper) GetIdentity(ctx sdk.Context, id tmbytes.HexBytes) (identity types.Identity, found bool)

GetIdentity retrieves the identity of the specified ID

func (Keeper) GetOwner

func (k Keeper) GetOwner(ctx sdk.Context, identityID tmbytes.HexBytes) (sdk.AccAddress, bool)

GetOwner gets the owner of the specified identity

func (Keeper) GetPubKeyIdentity

func (k Keeper) GetPubKeyIdentity(ctx sdk.Context, pubKey *types.PubKeyInfo) (tmbytes.HexBytes, bool)

GetPubKeyIdentity gets the identity ID of the specified public key

func (Keeper) HasCertificate

func (k Keeper) HasCertificate(ctx sdk.Context, id tmbytes.HexBytes, certHash []byte) bool

HasCertificate returns true if the specified certificate exists for the identity, false otherwise

func (Keeper) HasIdentity

func (k Keeper) HasIdentity(ctx sdk.Context, id tmbytes.HexBytes) bool

HasIdentity returns true if the specified identity exists, false otherwise

func (Keeper) Identity

Identity queries an identity by id

func (Keeper) IterateCertificates

func (k Keeper) IterateCertificates(
	ctx sdk.Context,
	identityID tmbytes.HexBytes,
	op func(cert string) (stop bool),
)

IterateCertificates iterates through all certificates with the specified identity

func (Keeper) IterateIdentities

func (k Keeper) IterateIdentities(
	ctx sdk.Context,
	op func(identity types.Identity) (stop bool),
)

IterateIdentities iterates through all identities

func (Keeper) IteratePubKeys

func (k Keeper) IteratePubKeys(
	ctx sdk.Context,
	identityID tmbytes.HexBytes,
	op func(pubKey types.PubKeyInfo) (stop bool),
)

IteratePubKeys iterates through all public keys with the specified identity

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) SetCertificate

func (k Keeper) SetCertificate(
	ctx sdk.Context,
	identityID tmbytes.HexBytes,
	certHash []byte,
	certificate string,
)

SetCertificate sets the given certificate

func (Keeper) SetCredentials

func (k Keeper) SetCredentials(ctx sdk.Context, identityID tmbytes.HexBytes, credentials string)

SetCredentials sets the given credentials

func (Keeper) SetData

func (k Keeper) SetData(ctx sdk.Context, identityID tmbytes.HexBytes, data string)

SetData sets the given credentials

func (Keeper) SetIdentity

func (k Keeper) SetIdentity(ctx sdk.Context, identity types.Identity) error

SetIdentity sets the given identity

func (Keeper) SetOwner

func (k Keeper) SetOwner(ctx sdk.Context, identityID tmbytes.HexBytes, owner sdk.AccAddress)

SetOwner sets the owner of the given identity

func (Keeper) SetPubKey

func (k Keeper) SetPubKey(ctx sdk.Context, identityID tmbytes.HexBytes, pubKey *types.PubKeyInfo)

SetPubKey sets the given public key

func (Keeper) UpdateIdentity

func (k Keeper) UpdateIdentity(
	ctx sdk.Context,
	id tmbytes.HexBytes,
	pubKey *types.PubKeyInfo,
	certificate string,
	credentials string,
	data string,
	owner sdk.AccAddress,
) error

UpdateIdentity updates the specified identity by adding the given public key and certificate or modifying the credentials

Jump to

Keyboard shortcuts

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