[][src]Crate pallet_identity

Identity Module

Overview

A federated naming system, allowing for multiple registrars to be added from a specified origin. Registrars can set a fee to provide identity-verification service. Anyone can put forth a proposed identity for a fixed deposit and ask for review by any number of registrars (paying each of their fees). Registrar judgements are given as an enum, allowing for sophisticated, multi-tier opinions.

Some judgements are identified as sticky, which means they cannot be removed except by complete removal of the identity, or by the registrar. Judgements are allowed to represent a portion of funds that have been reserved for the registrar.

A super-user can remove accounts and in doing so, slash the deposit.

All accounts may also have a limited number of sub-accounts which may be specified by the owner; by definition, these have equivalent ownership and each has an individual name.

The number of registrars should be limited, and the deposit made sufficiently large, to ensure no state-bloat attack is viable.

Interface

Dispatchable Functions

For general users

  • set_identity - Set the associated identity of an account; a small deposit is reserved if not already taken.
  • set_subs - Set the sub-accounts of an identity.
  • clear_identity - Remove an account's associated identity; the deposit is returned.
  • request_judgement - Request a judgement from a registrar, paying a fee.
  • cancel_request - Cancel the previous request for a judgement.

For registrars

  • set_fee - Set the fee required to be paid for a judgement to be given by the registrar.
  • set_fields - Set the fields that a registrar cares about in their judgements.
  • provide_judgement - Provide a judgement to an identity.

For super-users

  • add_registrar - Add a new registrar to the system.
  • kill_identity - Forcibly remove the associated identity; the deposit is lost.

Structs

IdentityFields

Wrapper type for BitFlags<IdentityField> that implements Codec.

IdentityInfo

Information concerning the identity of the controller of an account.

IdentityOf

Information that is pertinent to identify the entity behind an account.

Module
RegistrarInfo

Information concerning a registrar.

Registrars

The set of registrars. Not expected to get very big as can only be added through a special origin (likely a council motion).

Registration

Information concerning the identity of the controller of an account.

SubsOf

Alternative "sub" identities of this account.

SuperOf

The super-identity of an alternative "sub" identity together with its name, within that context. If the account is not some other account's sub-identity, then just None.

Enums

Call

Dispatchable calls.

Data

Either underlying data blob if it is at most 32 bytes, or a hash of it. If the data is greater than 32-bytes then it will be truncated when encoding.

Error

Error for the identity module.

IdentityField

The fields that we use to identify the owner of an account with. Each corresponds to a field in the IdentityInfo struct.

Judgement

An attestation of a registrar over how accurate some IdentityInfo is in describing an account.

RawEvent

Events for this module.

Traits

Trait

Type Definitions

Event

RawEvent specialized for the configuration Trait

RegistrarIndex

An identifier for a single name registrar/identity verification service.