Namespaces allow you to create an on-chain unique place for your business and your assets on the blockchain.
Find below the complete list of configurable properties.
Namespaces function similarly to internet domains.
Creating a namespace starts with choosing a name that you will use to refer to an account or asset.
The name must be unique in the network, and may have a maximum length of 64
characters, and the allowed characters are a, b, c, …, z, 0, 1, 2, …, 9, _ , -.
At the time of the namespace registration, you must set the number of confirmed blocks you would like to rent the namespace for.
The public network defines a minimum namespace duration of 30
days and a maximum of 365
days, being these parameters editable per network.
By default, the network is configured to generate a block every 15
seconds.
You can use the following formula to convert approximately days to blocks:
During the renting period, the namespace creator can create subnamespaces, alias accounts and mosaics. The creator can also extend the rental by sending a NamespaceRegistrationTransaction with the desired number of additional blocks.
The network can define a grace period that enables the namespace creator to renew the namespace past the expiration date before it becomes publicly available for registration.
Symbol’s public network has set the grace period to 30
days.
When the grace period ends, the namespace is deleted. At this point, the namespace becomes available for its registration again.
Action | Available | Registration Period | Grace Period |
---|---|---|---|
Register a new namespace | ✔️ | ❌ | ❌ |
Renew the namespace | ❌ | ✔️ | ✔️ |
Create subnamespaces | ❌ | ✔️ | ❌ |
Link an alias to an address or mosaic | ❌ | ✔️ | ❌ |
Send a transaction using an alias | ❌ | ✔️ | ❌ |
Note
Only namespaces created during the nemesis block can have perpetual duration.
On the internet, a domain can have a sub-domain. Symbol namespaces can have subnamespaces to identify and organize assets.
In the public network, namespaces can have up to 3
levels—a namespace and its two levels of subnamespace domains.
Each root namespace can have up to 256
subnamespaces.
A subnamespace does not have a duration by its own; it inherits the duration from its parent namespace.
You can create multiple subnamespaces with the same name in different namespaces.
For example, you can create the subnamespaces foo.bar
and foo2.bar
, but the combination rootnamespace + subnamespace must remain unique.
Alias transactions link namespaces to accounts and mosaics. An alias or its linked asset can be used interchangeably when sending a transaction. Using the alias makes long addresses rememberable and mosaics recognizable.
The creator of the namespace can link the namespace to an account or mosaic. This link will be editable, so the creator may unlink a previously set alias and link the namespace to a different asset.
The block receipts store the resolution of the alias for a given transaction.
Alias transactions have the following restrictions:
An account willing to register a namespace or extend its duration has to pay a rental fee in addition to the transaction fee. Both fees will be deducted from the account’s balance after the announcement of a valid NamespaceRegistrationTransaction.
The REST Gateway provides an endpoint to get an estimation of how much network currency will cost you to register a namespace:
const nodeUrl = 'http://api-01.us-east-1.096x.symboldev.network:3000';
const repositoryHttp = new RepositoryFactoryHttp(nodeUrl);
const networkHttp = repositoryHttp.createNetworkRepository();
networkHttp.getRentalFees().subscribe((rentalFees) => {
console.log('RootNamespaceRentalFeePerBlock',
rentalFees.effectiveRootNamespaceRentalFeePerBlock.compact());
console.log('ChildNamespaceRentalFee',
rentalFees.effectiveChildNamespaceRentalFee.compact());
});
const nodeUrl = 'http://api-01.us-east-1.096x.symboldev.network:3000';
const repositoryHttp = new symbol_sdk_1.RepositoryFactoryHttp(nodeUrl);
const networkHttp = repositoryHttp.createNetworkRepository();
networkHttp.getRentalFees().subscribe((rentalFees) => {
console.log('RootNamespaceRentalFeePerBlock', rentalFees.effectiveRootNamespaceRentalFeePerBlock.compact());
console.log('ChildNamespaceRentalFee', rentalFees.effectiveChildNamespaceRentalFee.compact());
});
The default namespace rental fees are configurable per network, but the network dynamically adjusts the namespace rental fees over time.
Property | Value |
---|---|
Registering a namespace | 0.000001 symbol.xym per block |
Extending a namespace duration | 0.000001 symbol.xym per block |
Creating a subnamespace | 0.0001 symbol.xym |
To calculate the effective rental fee, the network multiplies the default value set in the configuration by the median network multiplier over last maxDifficultyBlocks. In case there are zero multipliers, these are replaced by the defaultDynamicFeeMultiplier before the median calculation.
Create a unique name to identify your assets.
Once you have a registered root namespace, you can create up to 3
levels of subnamespaces to organize your assets.
Linking a namespace to a mosaic
Alias an mosaic with a namespace so that others can reference it in a more friendly way when issuing transactions.
Linking a namespace to an address
Alias an address with a namespace so that others can reference the account in a more friendly way when issuing transactions.
Getting the namespace information
Get the ownership and duration for a given namespace identifier.
Extending a namespace registration period
This guide shows you how to extend the rental period of a namespace.
Continue: Metadata.
Did you find what you were looking for? Give us your feedback.