51 releases (32 major breaking)

34.0.0 May 23, 2024
33.0.0 May 1, 2024
32.0.0 Apr 8, 2024
31.0.0 Mar 18, 2024
2.0.0-alpha.5 Mar 24, 2020

#1357 in Magic Beans

Download history 1089/week @ 2024-02-08 1578/week @ 2024-02-15 1749/week @ 2024-02-22 1128/week @ 2024-02-29 739/week @ 2024-03-07 1158/week @ 2024-03-14 1352/week @ 2024-03-21 1504/week @ 2024-03-28 1445/week @ 2024-04-04 1101/week @ 2024-04-11 1026/week @ 2024-04-18 1088/week @ 2024-04-25 1150/week @ 2024-05-02 913/week @ 2024-05-09 1347/week @ 2024-05-16 1717/week @ 2024-05-23

5,466 downloads per month
Used in 59 crates (8 directly)

Apache-2.0

2MB
40K SLoC

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.
  • 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 general users with sub-identities

  • set_subs - Set the sub-accounts of an identity.
  • add_sub - Add a sub-identity to an identity.
  • remove_sub - Remove a sub-identity of an identity.
  • rename_sub - Rename a sub-identity of an identity.
  • quit_sub - Remove a sub-identity of an identity (called by the sub-identity).

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.

License: Apache-2.0

Dependencies

~18–34MB
~557K SLoC