pub struct TransactionApi;Implementations§
Source§impl TransactionApi
impl TransactionApi
Sourcepub fn add_registrar(&self, account: Account) -> StaticPayload<AddRegistrar>
pub fn add_registrar(&self, account: Account) -> StaticPayload<AddRegistrar>
Add a registrar to the system.
The dispatch origin for this call must be T::RegistrarOrigin.
account: the account of the registrar.
Emits RegistrarAdded if successful.
Sourcepub fn set_identity(&self, info: Info) -> StaticPayload<SetIdentity>
pub fn set_identity(&self, info: Info) -> StaticPayload<SetIdentity>
Set an account’s identity information and reserve the appropriate deposit.
If the account already has identity information, the deposit is taken as part payment for the new deposit.
The dispatch origin for this call must be Signed.
info: The identity information.
Emits IdentitySet if successful.
Sourcepub fn set_subs(&self, subs: Subs) -> StaticPayload<SetSubs>
pub fn set_subs(&self, subs: Subs) -> StaticPayload<SetSubs>
Set the sub-accounts of the sender.
Payment: Any aggregate balance reserved by previous set_subs calls will be returned
and an amount SubAccountDeposit will be reserved for each item in subs.
The dispatch origin for this call must be Signed and the sender must have a registered identity.
subs: The identity’s (new) sub-accounts.
Sourcepub fn clear_identity(&self) -> StaticPayload<ClearIdentity>
pub fn clear_identity(&self) -> StaticPayload<ClearIdentity>
Clear an account’s identity info and all sub-accounts and return all deposits.
Payment: All reserved balances on the account are returned.
The dispatch origin for this call must be Signed and the sender must have a registered identity.
Emits IdentityCleared if successful.
Sourcepub fn request_judgement(
&self,
reg_index: RegIndex,
max_fee: MaxFee,
) -> StaticPayload<RequestJudgement>
pub fn request_judgement( &self, reg_index: RegIndex, max_fee: MaxFee, ) -> StaticPayload<RequestJudgement>
Request a judgement from a registrar.
Payment: At most max_fee will be reserved for payment to the registrar if judgement
given.
The dispatch origin for this call must be Signed and the sender must have a registered identity.
reg_index: The index of the registrar whose judgement is requested.max_fee: The maximum fee that may be paid. This should just be auto-populated as:
Self::registrars().get(reg_index).unwrap().feeEmits JudgementRequested if successful.
Sourcepub fn cancel_request(
&self,
reg_index: RegIndex,
) -> StaticPayload<CancelRequest>
pub fn cancel_request( &self, reg_index: RegIndex, ) -> StaticPayload<CancelRequest>
Cancel a previous request.
Payment: A previously reserved deposit is returned on success.
The dispatch origin for this call must be Signed and the sender must have a registered identity.
reg_index: The index of the registrar whose judgement is no longer requested.
Emits JudgementUnrequested if successful.
Sourcepub fn set_fee(&self, index: Index, fee: Fee) -> StaticPayload<SetFee>
pub fn set_fee(&self, index: Index, fee: Fee) -> StaticPayload<SetFee>
Set the fee required for a judgement to be requested from a registrar.
The dispatch origin for this call must be Signed and the sender must be the account
of the registrar whose index is index.
index: the index of the registrar whose fee is to be set.fee: the new fee.
Sourcepub fn set_account_id(
&self,
index: Index,
new: New,
) -> StaticPayload<SetAccountId>
pub fn set_account_id( &self, index: Index, new: New, ) -> StaticPayload<SetAccountId>
Change the account associated with a registrar.
The dispatch origin for this call must be Signed and the sender must be the account
of the registrar whose index is index.
index: the index of the registrar whose fee is to be set.new: the new account ID.
Sourcepub fn set_fields(
&self,
index: Index,
fields: Fields,
) -> StaticPayload<SetFields>
pub fn set_fields( &self, index: Index, fields: Fields, ) -> StaticPayload<SetFields>
Set the field information for a registrar.
The dispatch origin for this call must be Signed and the sender must be the account
of the registrar whose index is index.
index: the index of the registrar whose fee is to be set.fields: the fields that the registrar concerns themselves with.
Sourcepub fn provide_judgement(
&self,
reg_index: RegIndex,
target: Target,
judgement: Judgement,
identity: Identity,
) -> StaticPayload<ProvideJudgement>
pub fn provide_judgement( &self, reg_index: RegIndex, target: Target, judgement: Judgement, identity: Identity, ) -> StaticPayload<ProvideJudgement>
Provide a judgement for an account’s identity.
The dispatch origin for this call must be Signed and the sender must be the account
of the registrar whose index is reg_index.
reg_index: the index of the registrar whose judgement is being made.target: the account whose identity the judgement is upon. This must be an account with a registered identity.judgement: the judgement of the registrar of indexreg_indexabouttarget.identity: The hash of the [IdentityInformationProvider] for that the judgement is provided.
Note: Judgements do not apply to a username.
Emits JudgementGiven if successful.
Sourcepub fn kill_identity(&self, target: Target) -> StaticPayload<KillIdentity>
pub fn kill_identity(&self, target: Target) -> StaticPayload<KillIdentity>
Remove an account’s identity and sub-account information and slash the deposits.
Payment: Reserved balances from set_subs and set_identity are slashed and handled by
Slash. Verification request deposits are not returned; they should be cancelled
manually using cancel_request.
The dispatch origin for this call must match T::ForceOrigin.
target: the account whose identity the judgement is upon. This must be an account with a registered identity.
Emits IdentityKilled if successful.
Sourcepub fn add_sub(&self, sub: Sub, data: Data) -> StaticPayload<AddSub>
pub fn add_sub(&self, sub: Sub, data: Data) -> StaticPayload<AddSub>
Add the given account to the sender’s subs.
Payment: Balance reserved by a previous set_subs call for one sub will be repatriated
to the sender.
The dispatch origin for this call must be Signed and the sender must have a registered
sub identity of sub.
Sourcepub fn rename_sub(&self, sub: Sub, data: Data) -> StaticPayload<RenameSub>
pub fn rename_sub(&self, sub: Sub, data: Data) -> StaticPayload<RenameSub>
Alter the associated name of the given sub-account.
The dispatch origin for this call must be Signed and the sender must have a registered
sub identity of sub.
Sourcepub fn remove_sub(&self, sub: Sub) -> StaticPayload<RemoveSub>
pub fn remove_sub(&self, sub: Sub) -> StaticPayload<RemoveSub>
Remove the given account from the sender’s subs.
Payment: Balance reserved by a previous set_subs call for one sub will be repatriated
to the sender.
The dispatch origin for this call must be Signed and the sender must have a registered
sub identity of sub.
Sourcepub fn quit_sub(&self) -> StaticPayload<QuitSub>
pub fn quit_sub(&self) -> StaticPayload<QuitSub>
Remove the sender as a sub-account.
Payment: Balance reserved by a previous set_subs call for one sub will be repatriated
to the sender (not the original depositor).
The dispatch origin for this call must be Signed and the sender must have a registered super-identity.
NOTE: This should not normally be used, but is provided in the case that the non- controller of an account is maliciously registered as a sub-account.
Add an AccountId with permission to grant usernames with a given suffix appended.
The authority can grant up to allocation usernames. To top up their allocation, they
should just issue (or request via governance) a new add_username_authority call.
Remove authority from the username authorities.
Sourcepub fn set_username_for(
&self,
who: Who,
username: Username,
signature: Signature,
) -> StaticPayload<SetUsernameFor>
pub fn set_username_for( &self, who: Who, username: Username, signature: Signature, ) -> StaticPayload<SetUsernameFor>
Set the username for who. Must be called by a username authority.
The authority must have an allocation. Users can either pre-sign their usernames or
accept them later.
Usernames must:
- Only contain lowercase ASCII characters or digits.
- When combined with the suffix of the issuing authority be less than the
MaxUsernameLength.
Sourcepub fn accept_username(
&self,
username: Username,
) -> StaticPayload<AcceptUsername>
pub fn accept_username( &self, username: Username, ) -> StaticPayload<AcceptUsername>
Accept a given username that an authority granted. The call must include the full
username, as in username.suffix.
Sourcepub fn remove_expired_approval(
&self,
username: Username,
) -> StaticPayload<RemoveExpiredApproval>
pub fn remove_expired_approval( &self, username: Username, ) -> StaticPayload<RemoveExpiredApproval>
Remove an expired username approval. The username was approved by an authority but never
accepted by the user and must now be beyond its expiration. The call must include the
full username, as in username.suffix.
Sourcepub fn set_primary_username(
&self,
username: Username,
) -> StaticPayload<SetPrimaryUsername>
pub fn set_primary_username( &self, username: Username, ) -> StaticPayload<SetPrimaryUsername>
Set a given username as the primary. The username should include the suffix.
Sourcepub fn remove_dangling_username(
&self,
username: Username,
) -> StaticPayload<RemoveDanglingUsername>
pub fn remove_dangling_username( &self, username: Username, ) -> StaticPayload<RemoveDanglingUsername>
Remove a username that corresponds to an account with no identity. Exists when a user
gets a username but then calls clear_identity.
Auto Trait Implementations§
impl Freeze for TransactionApi
impl RefUnwindSafe for TransactionApi
impl Send for TransactionApi
impl Sync for TransactionApi
impl Unpin for TransactionApi
impl UnwindSafe for TransactionApi
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> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.