IMP Extrinsic, Events and Error Events

Extrinsic (called by user/extension)

IMP extrinsics refer to the set of instructions that can be executed on the parachain to update the IdentityHub. These extrinsics can include actions such as creating a new identity, linking a new identity, updating existing identity attributes, revoking access to an identity, or delegating identity management privileges to another user or entity. These extrinsics are called by the user or the IDhub and they are encrypted with a TEE shielding key. Below are the Litentry IMP extrinsics and their callers:

  • linkIdentity([payload]) - Request to link the given identities to the call origin (user). The payload is forwarded and packed in a trusted call of call_worker extrinsic in pallet-teerex.

  • unlinkIdentity([payload])- Request to unlink(delete) the given identities from the call origin. Here, the payload is serialized JSON bytes.

  • verifyIdentity([payload])- Request to verify the identities using the included validation data (within the identity struct). The payload here is also serialized JSON bytes.

No events will be emitted for these extrinsics, or something like callForwarded() at its maximum because the real business logic will be handled inside TEE which is carried out asynchronously.

IMP Events

An Identity management pallet event is a message that is emitted by the pallet when a specific action related to identity management is performed on the pallet. An event may be triggered when a user creates a new identity, updates their identity attributes, or revokes access to an identity. These events typically include information such as the identity account involved, the type of action performed, and any associated metadata or attributes. The event emissions are triggered by the pub fn which is called by the pallet-teerex/enclave. The events are encrypted with the user’s shielding key.

  • UserShieldingKeySet - user shielding key is set { who: T::AccountId, key: UserShieldingKeyType }

  • ChallengeCodeSet - challenge code is set { who: T::AccountId, identity: Identity, code: ChallengeCode }

  • ChallengeCodeRemoved - challenge code is removed { who: T::AccountId, identity: Identity }

  • IdentityCreated - an identity is created { who: T::AccountId, identity: Identity }

  • IdentityRemoved - an identity was removed { who: T::AccountId, identity: Identity }

IMP Error Events

Pallet error events are messages or notifications that are emitted by the pallet when errors or exceptions occur during the execution of an identity management action. Error events typically include information such as the type of error, the identity account or action involved, and any associated metadata or attributes.

For example, an Identity management pallet error event may be emitted if a user attempts to update their identity attributes with invalid or unauthorized information or if an identity already exists.

  • ChallengeCodeNotExist - challenge code doesn't exist

  • IdentityAlreadyVerified - the pair (litentry-account, identity) already verified when creating an identity

  • IdentityNotExist - the pair (litentry-account, identity) doesn't exist

  • IdentityNotCreated - the identity was not created before the verification

  • IdentityShouldBeDisallowed- the identity should be disallowed

  • VerificationRequestTooEarly - a verification request comes too early

  • VerificationRequestTooLate - a verification request comes too late

  • RemovePrimeIdentityDisallowed - remove prime identity should be disallowed

Last updated