ネームスペース

Namespaces are human-readable text strings that can be used in place of an アドレス or a モザイク ID.

They create an on-chain unique place for your project and your assets on the blockchain.

プロパティ

名称

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 has a maximum length of 64 characters (the only allowed characters are a through z, 0 through 9, _ and -).

期間

ネームスペース登録の際にネームスペースを借りたい確認済みブロックの数を設定する必要があります。

The public network defines a minimum namespace duration of 30 days and a maximum of 365 days, being these parameters editable per network.

You can use the following formula to convert approximately days to blocks:

\[duration ≈ \frac{numberOfDays * 86400}{blockGenerationTargetTimeInSeconds}\]

By default, blockGenerationTargetTimeInSeconds is 30 seconds.

ネームスペース作成者は レンタル期間中 にサブネームスペース、エイリアスアカウント、およびモザイクを作成できます。作成者は NamespaceRegistrationTransaction を希望する追加ブロック数で送信することにより レンタルを延長する こともできます。

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.

猶予期間が終了するとネームスペースは 削除済み になります。この時点でネームスペースは再び登録可能になります。

../_images/namespace-life-cycle.png

ネームスペースのライフサイクル

ネームスペースステータスのパーミッション

アクション

Namespace unregistered

Namespace registered

猶予期間

新しいネームスペースの取得

✔️

ネームスペースの更新

✔️

✔️

サブネームスペースを作成

✔️

アドレスまたはモザイクにエイリアスをリンクする

✔️

エイリアスを使ってトランザクションを送信する

✔️

注釈

ネメシスブロック で作成されたネームスペースだけは恒久的な期間になります。

サブネームスペース

インターネット上でドメインはサブドメインを持ちます。 Symbol において、ネームスペースは資産を識別したり整理するためにサブネームスペースを持ちます。

../_images/namespace-setup.png

ネームスペースでアセットを整理する

In the public network namespaces can have up to 3 levels, i.e., a namespace and two levels of subnamespace domains. Each root namespace can have up to 256 subnamespaces.

サブネームスペースはそれ自身で期間を持っていません。親のネームスペース期間を継承します。

複数のサブネームスペース を異なるネームスペースに同じ名前で作ることができます。例えば foo.barfoo2.bar を作ることができますが、 rootnamespace と subnamespace の組み合わせは一意を保つ必要があります。

エイリアス

AddressAliasTransaction 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 block receipts store the resolution of the alias for a given transaction. This is, what was the actual address or mosaic ID behind a namespace when a transaction was issued.

エイリアストランザクションには次の制限があります:

  • An account or mosaic can be linked to many namespaces but a namespace can only be linked to one account or mosaic.

  • アカウントは AddressAliasTransaction の 受信を許可している どのアドレスに対してもネームスペースを割り当てることができます。

  • An account can only link the alias to a mosaic id when the account is the creator of the mosaic.

レンタル手数料

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.

REST ゲートウェイ はネームスペースの登録に必要なネットワーク通貨の概算を取得するためのエンドポイントを提供します。

const nodeUrl = 'NODE_URL';
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 = 'NODE_URL';
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(),
  );
});

デフォルトのネームスペースレンタル手数料は ネットワークごとに設定可能 ですが、 ネットワークはモザイクレンタル手数料を動的に調整 していきます。

パブリックネットワークのデフォルト値

プロパティ

Value

ネームスペースの取得

0.000001 symbol.xym per block.

ネームスペース期間の延長

0.000001 symbol.xym per block.

サブネームスペースの作成

0.0001 symbol.xym.

有効レンタル料金を計算するために、ネットワークは構成で設定されたデフォルト値にネットワークの 動的手数料乗数 を掛けます。