pub struct IdentityCallApi<'api> { /* private fields */ }Implementations§
Source§impl<'api> IdentityCallApi<'api>
impl<'api> IdentityCallApi<'api>
Sourcepub fn cdd_register_did(
&self,
target_account: AccountId,
secondary_keys: Vec<SecondaryKey<AccountId>>,
) -> Result<WrappedCall>
pub fn cdd_register_did( &self, target_account: AccountId, secondary_keys: Vec<SecondaryKey<AccountId>>, ) -> Result<WrappedCall>
Register target_account with a new Identity.
§Failure
originhas to be an active DID registrar. Inactive DID registrars cannot register new identities.target_account(primary key of the new Identity) can be linked to just one and only one identity.- External secondary keys can be linked to just one identity.
Sourcepub fn accept_primary_key(&self, rotation_auth_id: u64) -> Result<WrappedCall>
pub fn accept_primary_key(&self, rotation_auth_id: u64) -> Result<WrappedCall>
Call this with the new primary key. By invoking this method, caller accepts authorization to become the new primary key of the issuing identity. If a CDD service provider approved this change (or this is not required), primary key of the DID is updated.
The caller (new primary key) must be either a secondary key of the issuing identity, or unlinked to any identity.
Differs from rotate_primary_key_to_secondary in that it will unlink the old primary key instead of leaving it as a secondary key.
§Arguments
rotation_auth_idAuthorization from the owner who initiated the change
Sourcepub fn join_identity_as_key(&self, auth_id: u64) -> Result<WrappedCall>
pub fn join_identity_as_key(&self, auth_id: u64) -> Result<WrappedCall>
Join an identity as a secondary key.
Sourcepub fn leave_identity_as_key(&self) -> Result<WrappedCall>
pub fn leave_identity_as_key(&self) -> Result<WrappedCall>
Leave the secondary key’s identity.
Sourcepub fn add_claim(
&self,
target: IdentityId,
claim: Claim,
expiry: Option<u64>,
) -> Result<WrappedCall>
pub fn add_claim( &self, target: IdentityId, claim: Claim, expiry: Option<u64>, ) -> Result<WrappedCall>
Adds a new claim record or edits an existing one.
Only called by did_issuer’s secondary key.
Sourcepub fn revoke_claim(
&self,
target: IdentityId,
claim: Claim,
) -> Result<WrappedCall>
pub fn revoke_claim( &self, target: IdentityId, claim: Claim, ) -> Result<WrappedCall>
Marks the specified claim as revoked.
Sourcepub fn freeze_secondary_keys(&self) -> Result<WrappedCall>
pub fn freeze_secondary_keys(&self) -> Result<WrappedCall>
It disables all secondary keys at did identity.
§Errors
Sourcepub fn unfreeze_secondary_keys(&self) -> Result<WrappedCall>
pub fn unfreeze_secondary_keys(&self) -> Result<WrappedCall>
Re-enables all secondary keys of the caller’s identity.
Adds an authorization.
Removes an authorization.
_auth_issuer_pays determines whether the issuer of the authorisation pays the transaction fee
Sourcepub fn gc_add_cdd_claim(&self, target: IdentityId) -> Result<WrappedCall>
pub fn gc_add_cdd_claim(&self, target: IdentityId) -> Result<WrappedCall>
Assuming this is executed by the GC voting majority, adds a new cdd claim record.
Sourcepub fn gc_revoke_cdd_claim(&self, target: IdentityId) -> Result<WrappedCall>
pub fn gc_revoke_cdd_claim(&self, target: IdentityId) -> Result<WrappedCall>
Assuming this is executed by the GC voting majority, removes an existing cdd claim record.
Sourcepub fn revoke_claim_by_index(
&self,
target: IdentityId,
claim_type: ClaimType,
scope: Option<Scope>,
) -> Result<WrappedCall>
pub fn revoke_claim_by_index( &self, target: IdentityId, claim_type: ClaimType, scope: Option<Scope>, ) -> Result<WrappedCall>
Revokes a specific claim using its Claim Unique Index composed by target,
claim_type, and scope.
Please note that origin must be the issuer of the target claim.
Sourcepub fn rotate_primary_key_to_secondary(
&self,
auth_id: u64,
) -> Result<WrappedCall>
pub fn rotate_primary_key_to_secondary( &self, auth_id: u64, ) -> Result<WrappedCall>
Call this with the new primary key. By invoking this method, caller accepts authorization to become the new primary key of the issuing identity. If a CDD service provider approved this change, (or this is not required), primary key of the DID is updated.
The caller (new primary key) must be either a secondary key of the issuing identity, or unlinked to any identity.
Differs from accept_primary_key in that it will leave the old primary key as a secondary key with the permissions specified in the corresponding RotatePrimaryKeyToSecondary authorization instead of unlinking the old primary key.
§Arguments
auth_idAuthorization from the owner who initiated the change
Adds secondary keys to target identity id.
Keys are directly added to identity because each of them has an authorization.
§Arguments
originwhich must be the primary key of the identityid.additional_keyswhich includes secondary keys, coupled with authorization data, to add to target identity.expires_atexpiration time for the authorizations.
§Errors
- Can only called by primary key owner.
- Keys should be able to linked to any identity.
Sourcepub fn set_secondary_key_permissions(
&self,
key: AccountId,
perms: Permissions,
) -> Result<WrappedCall>
pub fn set_secondary_key_permissions( &self, key: AccountId, perms: Permissions, ) -> Result<WrappedCall>
Sets permissions for an specific target_key key.
Only the primary key of an identity is able to set secondary key permissions.
Sourcepub fn remove_secondary_keys(
&self,
keys_to_remove: Vec<AccountId>,
) -> Result<WrappedCall>
pub fn remove_secondary_keys( &self, keys_to_remove: Vec<AccountId>, ) -> Result<WrappedCall>
Removes specified secondary keys of a DID if present.
§Errors
The extrinsic can only called by primary key owner.
Sourcepub fn register_custom_claim_type(&self, ty: Vec<u8>) -> Result<WrappedCall>
pub fn register_custom_claim_type(&self, ty: Vec<u8>) -> Result<WrappedCall>
Register custom claim type.
§Errors
CustomClaimTypeAlreadyExistsThe type that is being registered already exists.CounterOverflowCustomClaimTypeId has overflowed.TooLongThe type being registered is too lang.
Sourcepub fn cdd_register_did_with_cdd(
&self,
target_account: AccountId,
secondary_keys: Vec<SecondaryKey<AccountId>>,
expiry: Option<u64>,
) -> Result<WrappedCall>
pub fn cdd_register_did_with_cdd( &self, target_account: AccountId, secondary_keys: Vec<SecondaryKey<AccountId>>, expiry: Option<u64>, ) -> Result<WrappedCall>
Register target_account with a new Identity and issue a CDD claim with a blank CddId
§Failure
originhas to be an active DID registrar. Inactive DID registrars cannot register new identities.target_account(primary key of the new Identity) can be linked to just one and only one identity.- External secondary keys can be linked to just one identity.
Sourcepub fn register_did(&self, target_account: AccountId) -> Result<WrappedCall>
pub fn register_did(&self, target_account: AccountId) -> Result<WrappedCall>
Register a new DID for the target account.
Caller must be a DID registrar (formerly CDD provider). No CDD claim is added - DID existence is sufficient for onboarding.
Note: This extrinsic does NOT support secondary keys.
Use the deprecated cdd_register_did if secondary keys are needed.
§Failure
originhas to be an active DID registrar. Inactive DID registrars cannot register new identities.target_account(primary key of the new Identity) can be linked to just one and only one identity.
Sourcepub fn self_register_did(&self) -> Result<WrappedCall>
pub fn self_register_did(&self) -> Result<WrappedCall>
Register for a new DID for the caller’s account.
This is callable by any account that is not already linked to an identity, and will create a new DID with the caller as the primary key. This allows users to self onboard without needing to go through a DID registrar (formerly CDD provider).
No CDD claim is added - DID existence is sufficient for onboarding.
§Errors
- Caller must not already have an identity.
Trait Implementations§
Source§impl<'api> Clone for IdentityCallApi<'api>
impl<'api> Clone for IdentityCallApi<'api>
Source§fn clone(&self) -> IdentityCallApi<'api>
fn clone(&self) -> IdentityCallApi<'api>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'api> Freeze for IdentityCallApi<'api>
impl<'api> !RefUnwindSafe for IdentityCallApi<'api>
impl<'api> Send for IdentityCallApi<'api>
impl<'api> Sync for IdentityCallApi<'api>
impl<'api> Unpin for IdentityCallApi<'api>
impl<'api> UnsafeUnpin for IdentityCallApi<'api>
impl<'api> !UnwindSafe for IdentityCallApi<'api>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read moreSource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.