//! A federated naming system, allowing for multiple registrars to be added from a specified origin.
//! each of their fees). Registrar judgements are given as an `enum`, allowing for sophisticated,
//! All accounts may also have a limited number of sub-accounts which may be specified by the owner;
//! The number of registrars should be limited, and the deposit made sufficiently large, to ensure
//! The pallet provides functionality for username authorities to issue usernames. When an account
//! receives a username, they get a default instance of `IdentityInfo`. Usernames also serve as a
//! Users can have multiple usernames that map to the same `AccountId`, however one `AccountId` can
//! * `set_identity` - Set the associated identity of an account; a small deposit is reserved if not
//! * `remove_dangling_username` - Remove a username that maps to an account without an identity.
T::WeightInfo::set_subs_old(old_ids.len() as u32) // P: Real number of old accounts removed.
pub fn set_primary_username(origin: OriginFor<T>, username: Username<T>) -> DispatchResult {
/// conforms to the limit. It is not expected to pass a fully formatted username here (i.e. one
/// Validate a signature. Supports signatures on raw `data` or `data` wrapped in HTML `<Bytes>`.
/// Return type is a tuple of the number of registrars, `IdentityInfo` bytes, and sub accounts,
/// Set an identity with zero deposit. Used for benchmarking and XCM emulator tests that involve