アセットを識別する、一意の名前を作成します。
3. Enter the information for your new namespace. Click 「Send」. Verify the information on the popup and enter your wallet password. Click 「Confirm」.
注釈
名前はネットワーク上で一意でなければならず、最大64文字、利用可能な文字は a, b, c, …, z, 0, 1, 2, …, 9, _ , – です。
4. You can check that the namespace has been created by going back to the 「Owned namespaces」 tab. If you don’t see your namespace, try clicking on the update icon.
注釈
あなたのネームスペース所有権を維持するためには 期限が切れる前にネームスペース期間の延長 を行ってください。
トランザクションが承認されたら、次のガイドの サブネームスペースの取得 へ進めます。
// replace with namespace name
const namespaceName = 'foo';
// replace with duration (in blocks)
const duration = UInt64.fromUint(172800);
// replace with network type
const networkType = NetworkType.TEST_NET;
const namespaceRegistrationTransaction = NamespaceRegistrationTransaction.createRootNamespace(
Deadline.create(epochAdjustment),
namespaceName,
duration,
networkType,
UInt64.fromUint(2000000),
);
// replace with private key
const privateKey =
'1111111111111111111111111111111111111111111111111111111111111111';
const account = Account.createFromPrivateKey(privateKey, networkType);
// replace with meta.networkGenerationHash (nodeUrl + '/node/info')
const networkGenerationHash =
'1DFB2FAA9E7F054168B0C5FCB84F4DEB62CC2B4D317D861F3168D161F54EA78B';
const signedTransaction = account.sign(
namespaceRegistrationTransaction,
networkGenerationHash,
);
// replace with node endpoint
const nodeUrl = 'http://api-01.us-east-1.testnet.symboldev.network:3000';
const repositoryFactory = new RepositoryFactoryHttp(nodeUrl);
const transactionHttp = repositoryFactory.createTransactionRepository();
transactionHttp.announce(signedTransaction).subscribe(
(x) => console.log(x),
(err) => console.error(err),
);
// replace with namespace name
const namespaceName = 'foo';
// replace with duration (in blocks)
const duration = symbol_sdk_1.UInt64.fromUint(172800);
// replace with network type
const networkType = symbol_sdk_1.NetworkType.TEST_NET;
const namespaceRegistrationTransaction = symbol_sdk_1.NamespaceRegistrationTransaction.createRootNamespace(
symbol_sdk_1.Deadline.create(epochAdjustment),
namespaceName,
duration,
networkType,
symbol_sdk_1.UInt64.fromUint(2000000),
);
// replace with private key
const privateKey =
'1111111111111111111111111111111111111111111111111111111111111111';
const account = symbol_sdk_1.Account.createFromPrivateKey(
privateKey,
networkType,
);
// replace with meta.networkGenerationHash (nodeUrl + '/node/info')
const networkGenerationHash =
'1DFB2FAA9E7F054168B0C5FCB84F4DEB62CC2B4D317D861F3168D161F54EA78B';
const signedTransaction = account.sign(
namespaceRegistrationTransaction,
networkGenerationHash,
);
// replace with node endpoint
const nodeUrl = 'http://api-01.us-east-1.testnet.symboldev.network:3000';
const repositoryFactory = new symbol_sdk_1.RepositoryFactoryHttp(nodeUrl);
const transactionHttp = repositoryFactory.createTransactionRepository();
transactionHttp.announce(signedTransaction).subscribe(
(x) => console.log(x),
(err) => console.error(err),
);
注釈
あなたのネームスペース所有権を維持するためには 期限が切れる前にネームスペース期間の延長 を行ってください。
お探しのものは見つかりましたか? フィードバックをください。