11.2 Non-homogeneous Assets

Non-homogeneous assets, also known as NH assets, are props in the game.

Preconditions

  1. Account private key needs to be imported to command line wallet;
  2. There should be sufficient funds in the accounts, and the specific consumption amount is yet to be determined;
  3. Unlock the wallet when executing the command;

1. Register as a developer

Open command line wallet cli_wallet, and execute the following command:

Command Format:

register_nh_asset_creator <creator> <broadcast>

Parameter explanation:

creator: string Creator account name

broadcast: bool Whether to broadcast or not

Example:

register_nh_asset_creator official-account true

2. Create Worldview

Command Format:

create_world_view <creator> <world_view> <broadcast>

Parameter explanation:

creator: string Creator account name

world_view: string Created worldview

broadcast: bool Whether to broadcast or not

Example:

create_world_view official-account MOBA true

3. Propose connecting worldview

Command Format:

propose_relate_world_view proposing_account,expiration_time, world_view_owner,world_view,broadcast

Parameter explanation:

proposing_account: string Associated account name

expiration_time: fc::time_point_sec type Propose expiration time

world_view_owner: string The current owner of the worldview

world_view: string Worldview name

broadcast: bool Whether to broadcast or not

Example:

propose_relate_world_view nicotest1 "2019-09-02T06:22:48" init1 bWorldView true

4. Create and Issue Homogeneous Assets

Command Format:

create_nh_asset <ceator> <owner> <asset_qualifier> <world_view> <base_describe> <broadcast>

Parameter explanation:

creator: string Creator account name

owner: string Created worldview

asset_qualifier: string Asset qualifier

world_view: string Worldview name

base_describe: string Description

broadcast: bool Whether to broadcast or not

Example:

create_nh_asset official-account official-account 1.3.0 MOBA “this is a describe” true

Tips

Demo program of JS-SDK (provided by Cocos-BCX) can be used for issuing NH assets as well.

Updated 20 days ago


11.2 Non-homogeneous Assets


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.