[−][src]Crate names
A pallet that defines a system to register and update names in a Substrate chain. This provides (roughly) the functionality of the Namecoin blockchain.
The core concept is that of a name. This is some identifier (the exact
type can be configured through the module's Trait
),
e.g. a human-readable name as string. Each name is unique, and has an
associated value and owner. Everyone can read the database of names, but
only the owner can make changes to it. This typically means changing the
value to publish some data with the name, but the owner can also transfer
names to a different owner.
Names are given out on a first come, first serve basis. Each name that is not yet registered (and valid for the system) can be registered by any account (which may incur a fee for registration, and then maybe also for updates to the name). Once registered, the name is owned by the account that first registered it.
After a certain number of blocks, names may expire and become usable again. By updating a name before the expiration, the current owner can keep ownership.
The names
module defines basic extrinsics to perform name operations
(register / update /
transfer names) and events corresponding to
changes in the name database. But if custom logic needs to be applied in
addition by the runtime, it may use the exposed functions
check_assuming_signed
and
execute
directly. The name database can be accessed
from external code by using lookup
.
Structs
Module | |
NameData | All data stored with a name in the database. |
Operation | All data necessary to actually perform a name operation. |
Enums
Call | Dispatchable calls. |
OperationType | Type of a name operation. |
RawEvent | Events for this module. |
Traits
Trait | The pallet's configuration trait. |
Type Definitions
Event |