Enum pallet_identity::pallet::Call
source · pub enum Call<T: Config> {
create_identity {
owner_key: T::AccountId,
},
confirm_identity {
idty_name: IdtyName,
},
change_owner_key {
new_key: T::AccountId,
new_key_sig: T::Signature,
},
revoke_identity {
idty_index: T::IdtyIndex,
revocation_key: T::AccountId,
revocation_sig: T::Signature,
},
prune_item_identities_names {
names: Vec<IdtyName>,
},
fix_sufficients {
owner_key: T::AccountId,
inc: bool,
},
link_account {
account_id: T::AccountId,
payload_sig: T::Signature,
},
// some variants omitted
}
Expand description
Contains a variant per dispatchable extrinsic that this pallet has.
Variants§
create_identity
Fields
owner_key: T::AccountId
Create an identity for an existing account
owner_key
: the public key corresponding to the identity to be created
The origin must be allowed to create an identity.
confirm_identity
Confirm the creation of an identity and give it a name
idty_name
: the name uniquely associated to this identity. Must match the validation rules defined by the runtime.
The identity must have been created using create_identity
before it can be confirmed.
change_owner_key
Change identity owner key.
new_key
: the new owner key.new_key_sig
: the signature of the encoded form ofIdtyIndexAccountIdPayload
. Must be signed bynew_key
.
The origin should be the old identity owner key.
revoke_identity
Revoke an identity using a revocation signature
idty_index
: the index of the identity to be revoked.revocation_key
: the key used to sign the revocation payload.revocation_sig
: the signature of the encoded form ofRevocationPayload
. Must be signed byrevocation_key
.
Any signed origin can execute this call.
prune_item_identities_names
Remove identity names from storage.
This function allows a privileged root origin to remove multiple identity names from storage in bulk.
origin
- The origin of the call. It must be root.names
- A vector containing the identity names to be removed from storage.
fix_sufficients
Change sufficient reference count for a given key.
This function allows a privileged root origin to increment or decrement the sufficient reference count associated with a specified owner key.
origin
- The origin of the call. It must be root.owner_key
- The account whose sufficient reference count will be modified.inc
- A boolean indicating whether to increment (true
) or decrement (false
) the count.
link_account
Link an account to an identity.
This function links a specified account to an identity, requiring both the account and the identity to sign the operation.
origin
- The origin of the call, which must have an associated identity index.account_id
- The account ID to link, which must sign the payload.payload_sig
- The signature with the linked identity.
Implementations§
source§impl<T: Config> Call<T>
impl<T: Config> Call<T>
sourcepub fn new_call_variant_create_identity(owner_key: T::AccountId) -> Self
pub fn new_call_variant_create_identity(owner_key: T::AccountId) -> Self
Create a call with the variant create_identity
.
sourcepub fn new_call_variant_confirm_identity(idty_name: IdtyName) -> Self
pub fn new_call_variant_confirm_identity(idty_name: IdtyName) -> Self
Create a call with the variant confirm_identity
.
sourcepub fn new_call_variant_change_owner_key(
new_key: T::AccountId,
new_key_sig: T::Signature
) -> Self
pub fn new_call_variant_change_owner_key( new_key: T::AccountId, new_key_sig: T::Signature ) -> Self
Create a call with the variant change_owner_key
.
sourcepub fn new_call_variant_revoke_identity(
idty_index: T::IdtyIndex,
revocation_key: T::AccountId,
revocation_sig: T::Signature
) -> Self
pub fn new_call_variant_revoke_identity( idty_index: T::IdtyIndex, revocation_key: T::AccountId, revocation_sig: T::Signature ) -> Self
Create a call with the variant revoke_identity
.
sourcepub fn new_call_variant_prune_item_identities_names(
names: Vec<IdtyName>
) -> Self
pub fn new_call_variant_prune_item_identities_names( names: Vec<IdtyName> ) -> Self
Create a call with the variant prune_item_identities_names
.
sourcepub fn new_call_variant_fix_sufficients(
owner_key: T::AccountId,
inc: bool
) -> Self
pub fn new_call_variant_fix_sufficients( owner_key: T::AccountId, inc: bool ) -> Self
Create a call with the variant fix_sufficients
.
sourcepub fn new_call_variant_link_account(
account_id: T::AccountId,
payload_sig: T::Signature
) -> Self
pub fn new_call_variant_link_account( account_id: T::AccountId, payload_sig: T::Signature ) -> Self
Create a call with the variant link_account
.
Trait Implementations§
source§impl<T: Config> CheckIfFeeless for Call<T>
impl<T: Config> CheckIfFeeless for Call<T>
source§fn is_feeless(&self, origin: &Self::Origin) -> bool
fn is_feeless(&self, origin: &Self::Origin) -> bool
#[pallet::feeless_if]
source§impl<T: Config> Decode for Call<T>
impl<T: Config> Decode for Call<T>
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
source§impl<T: Config> Encode for Call<T>
impl<T: Config> Encode for Call<T>
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
source§impl<T: Config> GetCallIndex for Call<T>
impl<T: Config> GetCallIndex for Call<T>
source§fn get_call_index(&self) -> u8
fn get_call_index(&self) -> u8
source§fn get_call_indices() -> &'static [u8] ⓘ
fn get_call_indices() -> &'static [u8] ⓘ
GetCallName
].source§impl<T: Config> GetCallName for Call<T>
impl<T: Config> GetCallName for Call<T>
source§fn get_call_name(&self) -> &'static str
fn get_call_name(&self) -> &'static str
source§fn get_call_names() -> &'static [&'static str]
fn get_call_names() -> &'static [&'static str]
GetCallIndex
].source§impl<T: Config> GetDispatchInfo for Call<T>
impl<T: Config> GetDispatchInfo for Call<T>
source§fn get_dispatch_info(&self) -> DispatchInfo
fn get_dispatch_info(&self) -> DispatchInfo
DispatchInfo
, containing relevant information of this dispatch. Read moresource§impl<T: Config> PartialEq for Call<T>
impl<T: Config> PartialEq for Call<T>
source§impl<T> TypeInfo for Call<T>where
PhantomData<(T,)>: TypeInfo + 'static,
T::AccountId: TypeInfo + 'static,
T::Signature: TypeInfo + 'static,
T::IdtyIndex: TypeInfo + 'static,
T: Config + 'static,
impl<T> TypeInfo for Call<T>where
PhantomData<(T,)>: TypeInfo + 'static,
T::AccountId: TypeInfo + 'static,
T::Signature: TypeInfo + 'static,
T::IdtyIndex: TypeInfo + 'static,
T: Config + 'static,
source§impl<T: Config> UnfilteredDispatchable for Call<T>
impl<T: Config> UnfilteredDispatchable for Call<T>
§type RuntimeOrigin = <T as Config>::RuntimeOrigin
type RuntimeOrigin = <T as Config>::RuntimeOrigin
frame_system::Config::RuntimeOrigin
).source§fn dispatch_bypass_filter(
self,
origin: Self::RuntimeOrigin
) -> DispatchResultWithPostInfo
fn dispatch_bypass_filter( self, origin: Self::RuntimeOrigin ) -> DispatchResultWithPostInfo
impl<T: Config> EncodeLike for Call<T>
impl<T: Config> Eq for Call<T>
Auto Trait Implementations§
impl<T> Freeze for Call<T>
impl<T> RefUnwindSafe for Call<T>where
T: RefUnwindSafe,
<T as Config>::AccountId: RefUnwindSafe,
<T as Config>::IdtyIndex: RefUnwindSafe,
<T as Config>::Signature: RefUnwindSafe,
impl<T> Send for Call<T>
impl<T> Sync for Call<T>
impl<T> Unpin for Call<T>
impl<T> UnwindSafe for Call<T>where
T: UnwindSafe,
<T as Config>::AccountId: UnwindSafe,
<T as Config>::IdtyIndex: UnwindSafe,
<T as Config>::Signature: UnwindSafe,
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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.