Apps
Since AIN Blockchain is essentially a large public decentralized database, we have designed a concept of "Apps", where each app could represent a service or an organization.
Registration
An App can be created and registered by setting app configs at /manage_app/${appName}/create/${key}
. App configs include admin, billing, and service configs.
Options
[boolean] is_public: When is_public option is set to
true
, the created app will allow anyone to set value and give branch_owner, write_function, and write_rule owner permissions to anyone at the app's path (/apps/${appName}
). Note that this option does not override the admin / billing / service configs, but sets additional permissions on top of the given configs.
Configuration
Admin Config
Admin config is a mapping of address and boolean (true), and if an address is added as an admin, upon the creation of the app, the address obtains all the owner permissions (branch_owner, write_function, write_owner, write_rule) as well as the write rule permission for the path /apps/${appName}
.
Billing Config
The billing config specifies the names of the billing accounts associated with the app and the addresses that can use the billing accounts when sending transactions.
Service Config
The service config contains service-specific configurations. For example, if the app uses a staking service, it could set the default lock-up duration by setting the config as follows:
Last updated