Configure FT4 accounts
In this section, we’ll guide you through installing the FT4 library and configuring FT4 accounts in your project.
Install the FT4 library
To manage FT4 accounts, you’ll need to install the FT4 library. Add the following configuration to your chromia.yml
file:
libs:
ft4:
registry: https://gitlab.com/chromaway/ft4-lib.git
path: rell/src/lib/ft4
tagOrBranch: v1.0.0r
rid: x"FA487D75E63B6B58381F8D71E0700E69BEDEAD3A57D1E6C1A9ABB149FAC9E65F"
insecure: false
Then, run the following command to install the library:
chr install
After running this command, a new folder named src/lib/ft4
should appear in your project directory, containing the FT4 library code.
Configure FT4 accounts
To incorporate FT4 accounts into your application, start by importing the necessary modules. This setup enables enhanced authentication and account management.
Add the following imports to your main Rell file:
module;
import lib.ft4.accounts.{ ft4_account: account };
import ft4_auth: lib.ft4.auth;
import lib.ft4.accounts.strategies.open;
For more detailed information on FT4 account permissions and usage, see the FT4 accounts documentation.
Update chromia.yml
for testing
Next, ensure your chromia.yml
file is properly set up to run tests by organizing the test
section under the blockchains
tag. Your updated configuration should look as follows:
blockchains:
tic_tac_toe:
module: main
compile:
rellVersion: 0.13.5
database:
schema: schema_tic_tac_toe
test:
modules:
- test.tic_tac_toe
libs:
ft4:
registry: https://gitlab.com/chromaway/ft4-lib.git
path: rell/src/lib/ft4
tagOrBranch: v1.0.0r
rid: x"FA487D75E63B6B58381F8D71E0700E69BEDEAD3A57D1E6C1A9ABB149FAC9E65F"
insecure: false
This chromia.yml
configuration ensures that your blockchain project, database schema, FT4 library, and tests are all correctly set up. For additional details on configuring your project, refer to the Chromia project configuration documentation.