!!! KALATORI IS IN PUBLIC BETA !!!
Kalatori is an open-source daemon designed to enable secure and scalable blockchain payment processing. Licensed under GPLv3 (LICENSE), Kalatori currently supports assets on the Asset Hub parachain.
The daemon derives unique accounts for each payment using a provided seed phrase and outputs all payments to a specified recipient wallet. It also offers limited transaction tracking for order management. Kalatori operates in a multithreaded mode and supports multiple currencies configured in a simple TOML-based configuration file.
Client facing frontends can communicate with Kalatori leveraging exposed API described in the API documentation.
Download the latest Docker container or x86-64 release from the GitHub releases page.
The daemon relies on SQL syntax that is supported starting from SQLite 3.47.0. At the moment, sqlx allows using the bundled (built-in) SQLite with sqlite feature enabled, but it enforces an older SQLite dependency. Once selecting the SQLite version is supported by sqlx (expected around sqlx 0.9), the bundled SQLite will be used, and a local SQLite installation will no longer be required.
If you plan to run the daemon on Linux, it is recommended to build SQLite from source, as the version provided by the package manager may be outdated. Build instructions can be found here, the latest version can be downloaded from this page.
There is a setup example for MacOS, which may be usefull for tests and local development.
- Install SQLite via
brew:
brew install sqlite3- Export the following environmental variables:
export PATH="/opt/homebrew/opt/sqlite/bin:$PATH"
export SQLITE3_LIB_DIR=/opt/homebrew/opt/sqlite/lib
export SQLITE3_INCLUDE_DIR=/opt/homebrew/opt/sqlite/includeTo compile the daemon, ensure you have the latest stable version of the Rust compiler installed. In order to compile
the daemon it also required to have blockchain node's metadata which can be fetched using subxt-cli. Step by step
workflow to compile the project will be following:
- Install
subxt-clilocally, into thebinfolder:
make install-subxt-cli- Download Asset Hub's node metadata:
make download-node-metadata-ci- Build the daemon:
make build-releaseThe compiled binaries will be located in the target/release folder.
chopsticks: Contains configuration files for the Chopsticks tool and a Docker Compose setup for spawning AssetHub test chain.configs: Contains configuration files for supported chains and assets.docs: Includes project documentation.src: The source code for the Kalatori daemon.tests: Black-box test suite with a Docker Compose setup for testing the daemon.Dockerfile: Instructions for building a Docker image of the daemon.
You can use .json files or environment variables for daemon configuration.
Required configs are:
chain.json:name,endpointsandassetsfields are mandatory.assetscan not be reconfigured over env vars;payments.json: onlyrecipientfield is mandatory;seed.json: onlyseedfield is mandatory.
Non-required configs are optional. If you don’t set them, default values will be used.
All config examples can be found in configs folder of this project.
Any config field (except chain.json's assets) can be overridden using environment variables. If both value in .json file and env var present,
daemon will use the one from env var.
If any value is already set in env var it's not required to be present in config file.
In order to make daemon read some field from env var, var's name should be named in convenient {ENV_PREFIX}{CONFIG_FILE_NAME}{CONFIG_FIELD_NAME}={CONFIG_VALUE}.
Default ENV_PREFIX is KALATORI, so to set recipient field of payments config you can use the following sentence:
export KALATORI_PAYMENTS_RECIPIENT=your_recipient_hereENV_PREFIX also can be overridden using env var KALATORI_APP_ENV_PREFIX. For example if you set the prefix to MY_SUPER_KALATORI using export KALATORI_APP_ENV_PREFIX=MY_SUPER_KALATORI then you can use following sentence to override config from previous example:
export MY_SUPER_KALATORI_RECIPIENT=your_recipient_hereFor development and testing purposes Kalatori can be configured to connect to chopsticks instead of real chain.
In order to run Kalatori with chopsticks connection follow next steps:
- Copy configs from example files:
make copy-configs- Run
chopsticksin docker and build and run Kalatori daemon locally:
make run- When you finished, clean up
chopstickscontainers:
make stop-chopsticksAnother way is to run Kalatori for the Asset Hub parachain (without chopsticks):
- We still can copy example configs but also use real chain RPC nodes:
make copy-configs
make copy-ah-production-config- Feel free to update any configs you need. After that we're ready to run Kalatori daemon:
make run-releaseThe black-box test suite verifies the daemon's functionality by interacting with a running instance. Use the following steps to set it up:
- Start the daemon and test environment:
cd tests docker-compose up - Run the tests manually using Yarn:
ct tests/kalatori-api-test-suite yarn yarn test
Ensure the DAEMON_HOST environment variable points to the running daemon (default: localhost:16726).
For more details, refer to the testing suite README.md.
We welcome contributions! Please refer to the CONTRIBUTING.md file for guidelines on contributing and submitting pull requests.
Kalatori is open-source software licensed under the GPLv3 License. See the LICENSE file for more details.
Join the discussion and get support on:
Refer to the Kalatori project board and milestones for the current roadmap and upcoming features.
- Polkadot community
- Liberland team