FT4 Library: Asset and Account Management for Chromia's Rell and TypeScript Environments
The FT4 Library functions as a comprehensive toolkit engineered for both Rell and TypeScript modules in the Chromia blockchain ecosystem. Specialising in asset and account management, the library provides a suite of operations including asset issuance, allocation, and transfers, extending even to cross-chain capabilities. Furthermore, it establishes foundational data structures for account management, designed to operate independently of asset-related activities.
- Asset Management: Facilitate the creation, allocation, and management of assets. Asset Allocation and Transfers: Perform secure and efficient asset transfers.
- Cross-Chain Transfers: Enable the movement of assets between distinct blockchains.
- Account Management: Oversee user accounts independently of asset activities.
This repository contains the FT4 library and a comprehensive suite of tests written in Node.js and Jest. The current testing setup serves as a temporary measure, as a Rell-based testing suite is in development.
- [Optional] PostgreSQL for database sessions
Clone the repository and install the dependencies:
git clone firstname.lastname@example.org:chromawallet/ft3-lib.git
Build TypeScript library into
npm run build
How to Run Tests
Comprehensive Test Suite
Run the complete set of Rell and TypeScript tests:
npm run test
Run only Rell or TypeScript tests:
npm run test:rell
npm run test:js
Running Specific Rell Tests
To execute particular tests in Rell, use the
npm run test:rell -- --tests=test1,test2
npm run test:rell -- -t=test1,test2
Running Specific Jest Tests
Execute specific Jest tests by string matching:
npm run test:js 'string matching test(s)'
npm run test:js 'user'
npm run test:js 'rate|sso'
Running End-to-End Tests with Cypress
Run e2e tests interactively:
npm run test:e2e
Run e2e tests in headless mode:
npm run test:e2e:headless
How to Run the Blockchain
For running different blockchain configurations, you can use the following npm commands:
npm run postchain:test
npm run postchain:demo
To stop these environments:
npm run stop-postchain:jest
npm run stop-postchain:demo
Update changelog in
doc/release-notes/, then run
./compile-changelog.sh script to assemble
rell-changelog.md. Do not update