| Crates.io | baliusd |
| lib.rs | baliusd |
| version | 0.5.2 |
| created_at | 2025-08-06 22:20:23.081697+00 |
| updated_at | 2025-08-07 14:52:49.659619+00 |
| description | A standalone Balius runtime that can be used as a daemon |
| homepage | |
| repository | https://github.com/txpipe/balius |
| max_upload_size | |
| id | 1784401 |
| size | 144,710 |
baliusd)A standalone Balius runtime that can be used as a daemon. The Balius Daemon
executes WebAssembly dApps built with balius-sdk, manages chain
synchronization, JSON-RPC APIs, metrics, logging, and persistent state stores.
Install via Cargo:
cargo install baliusd
Run the daemon (it automatically loads configuration files and environment
variable overrides). You can also enable debug mode with the --debug flag,
which loads both the chain cursor store and key-value backend into ephemeral
(in-memory) mode so that all runtime state is lost when the process exits:
baliusd --debug
You can also use the get-public-key subcommand to retrieve the public key for a given signing key:
baliusd get-public-key <worker> <key>
Note: This subcommand only works with the in-memory signing interface (
[signing] type = "memory") and for keys that are explicitly defined in the signing keys section of the TOML configuration file.
baliusd is configured using a TOML file (baliusd.toml). Configuration files are loaded in this order:
/etc/baliusd/daemon.toml (optional system-wide config)baliusd.toml in the current working directory (optional project config)BALIUSD_*) override any setting from filesAny configuration field can be overridden by an environment variable prefixed
with BALIUSD_, using underscores to separate nested keys. For example:
export BALIUSD_RPC_LISTEN_ADDRESS=0.0.0.0:4000
baliusd.toml)This is an example toml file, it loads up the comprehensive example worker,
which is a worker that does a walkthrough of most of the features. Some
prerequisites to run this are:
Compile the worker: Run cargo balius build on the examples/comprehensive
directory. This creates the ../examples/comprehensive/comprehensive-c.wasm
WASM file refferenced on the config.
Have a local U5C instance running on port 50051. The easiest way to have
this is to install dolos locally and run a testnet network (for more
information, see https://docs.txpipe.io/dolos).
# Persist information for intersecting with the chain. If undefined, the daemon
# will always intersect with the tip
[store]
path = "cursors"
[rpc]
listen_address = "0.0.0.0:3001"
# Configuration for Prometheus server. If undefined, metrics will not be exposed.
[metrics]
listen_address = "0.0.0.0:8080"
# Logging configuration for the daemon.
[logging]
max_level = "info"
include_tokio = true
# U5C endpoint to resolve ledger queries.
[ledger]
endpoint_url = "http://localhost:50051"
# U5C endpoint to perform chainsync.
[chainsync]
endpoint_url = "http://localhost:50051"
# Key value backend.
[kv]
# Ephemeral memory backend, with initial state.
type = "memory"
[[kv.keys]]
worker = "worker"
key = "key"
value = "68656c6c6f" # Hex encoded value
# ReDB for having persistence across restarts.
# type = "redb"
# path = "kv"
# Worker logs backend.
[logger]
# Ignore logs
# type = "silent"
# Write each worker logs into a different file inside the `logs` folder
type = "file"
folder = "logs"
# Subscribe worker logs into tracing output.
# type = "tracing"
# Backend for providing signing keys to workers.
[signing]
type = "memory"
# You can hardcode the keys for the workers. If a key is undefined it will be
# created randomly, not consistent across restarts.
[[signing.keys]]
worker = "comprehensive"
name = "alice"
algorithm = "ed25519"
private_key = "06cc7c4372cd1036719cd79b8349de5ca6b54ccf5487578834d32064b4b1ec53"
# List of workers to be loaded by the runtime.
[[workers]]
name = "comprehensive"
module = "../examples/comprehensive/comprehensive-c.wasm"
config = "comprehensive.json"
"0.0.0.0:3001"./metrics). If omitted, no metrics server is started."error", "warn", "info", "debug", "trace"): Sets the
maximum log level for the daemon's console output.false): Include logs from the Tokio
runtime (e.g. async task management).type ("memory" or "redb"): Type of key-value store.
keys (array of tables, optional for "memory"): List of initial key-value pairs to populate the store.
Each [[kv.keys]] entry:
path (string, required for "redb"): Filesystem path for the Redb store.
cache_size (integer, optional for "redb"): Cache size in bytes for Redb.
Default: If the
[kv]section is omitted, an in-memory mock KV store is used (no persistence).
"silent", "tracing", or "file"): Runtime logging mode."file"): Directory to write log files.
Defaults to the current directory.Default: Silent (no runtime logs).
"memory"): Only in-memory signing is supported.Each [[signing.keys]] entry:
"ed25519" supported).Default: No signing keys registered, they are generated randomly on each restart.
If undefined, the default HTTP client will be created with a timeout of 10 seconds.
"reqwest"): HTTP client backend.10): Request timeout..wasm).See the example-mainnet/ and example-preview/ directories for
production-ready examples targeting Cardano mainnet and preview networks.