Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddCertificate(ctx sdk.Context, identityID tmbytes.HexBytes, certificate string) error
- func (k Keeper) AddPubKey(ctx sdk.Context, identityID tmbytes.HexBytes, pubKey *types.PubKeyInfo) error
- func (k Keeper) CreateIdentity(ctx sdk.Context, id tmbytes.HexBytes, pubKey *types.PubKeyInfo, ...) error
- func (k Keeper) GetCredentials(ctx sdk.Context, identityID tmbytes.HexBytes) (string, bool)
- func (k Keeper) GetData(ctx sdk.Context, identityID tmbytes.HexBytes) (string, bool)
- func (k Keeper) GetIdentity(ctx sdk.Context, id tmbytes.HexBytes) (identity types.Identity, found bool)
- func (k Keeper) GetOwner(ctx sdk.Context, identityID tmbytes.HexBytes) (sdk.AccAddress, bool)
- func (k Keeper) GetPubKeyIdentity(ctx sdk.Context, pubKey *types.PubKeyInfo) (tmbytes.HexBytes, bool)
- func (k Keeper) HasCertificate(ctx sdk.Context, id tmbytes.HexBytes, certHash []byte) bool
- func (k Keeper) HasIdentity(ctx sdk.Context, id tmbytes.HexBytes) bool
- func (k Keeper) Identity(c context.Context, req *types.QueryIdentityRequest) (*types.QueryIdentityResponse, error)
- func (k Keeper) IterateCertificates(ctx sdk.Context, identityID tmbytes.HexBytes, op func(cert string) (stop bool))
- func (k Keeper) IterateIdentities(ctx sdk.Context, op func(identity types.Identity) (stop bool))
- func (k Keeper) IteratePubKeys(ctx sdk.Context, identityID tmbytes.HexBytes, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetCertificate(ctx sdk.Context, identityID tmbytes.HexBytes, certHash []byte, ...)
- func (k Keeper) SetCredentials(ctx sdk.Context, identityID tmbytes.HexBytes, credentials string)
- func (k Keeper) SetData(ctx sdk.Context, identityID tmbytes.HexBytes, data string)
- func (k Keeper) SetIdentity(ctx sdk.Context, identity types.Identity) error
- func (k Keeper) SetOwner(ctx sdk.Context, identityID tmbytes.HexBytes, owner sdk.AccAddress)
- func (k Keeper) SetPubKey(ctx sdk.Context, identityID tmbytes.HexBytes, pubKey *types.PubKeyInfo)
- func (k Keeper) UpdateIdentity(ctx sdk.Context, id tmbytes.HexBytes, pubKey *types.PubKeyInfo, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
GetCredentials retrieves the credentials of the specified identity
func (Keeper) GetData ¶
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 ¶
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 ¶
HasCertificate returns true if the specified certificate exists for the identity, false otherwise
func (Keeper) HasIdentity ¶
HasIdentity returns true if the specified identity exists, false otherwise
func (Keeper) Identity ¶
func (k Keeper) Identity(c context.Context, req *types.QueryIdentityRequest) (*types.QueryIdentityResponse, error)
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 ¶
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 ¶
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 ¶
SetCredentials sets the given credentials
func (Keeper) SetData ¶
SetData sets the given credentials
func (Keeper) SetIdentity ¶
SetIdentity sets the given identity
func (Keeper) SetOwner ¶
SetOwner sets the owner of the given identity
func (Keeper) SetPubKey ¶
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