Rust crate for interacting with F1r3fly blockchain nodes. Usable as a library or CLI tool.
# Build
cargo build --release
# Check node status and native token info
cargo run --release -- status -H localhost -p 40413
# Deploy and wait for result
cargo run --release -- deploy-and-wait -f contract.rho
# Read-only query
cargo run --release -- exploratory-deploy -f query.rho -H localhost -p 40452
# Query native token metadata from on-chain contract
cargo run --release -- exploratory-deploy -f rho_examples/query_token_metadata.rho -H localhost -p 40452Commands need a signing key, provided via --private-key or the FIREFLY_PRIVATE_KEY environment variable; if neither is set, the command exits with an error. Local dev/test Docker node setups are funded with a well-known development key (not a secret — it ships in those Docker configs). Export it when running against a local node:
export FIREFLY_PRIVATE_KEY=5f668a7ee96d944a4494cc947e4005e172d7ab3461ee5538f1f2a45a835e9657- deploy -- submit Rholang code to the blockchain
- deploy-and-wait -- deploy, wait for finalization, read result
- exploratory-deploy -- read-only Rholang execution
- estimate-cost -- estimate phlogiston cost before deploying
- get-deploy -- get deploy execution details
- get-data -- read deploy result data
- propose -- manually propose a block
- is-finalized -- check block finalization
- transfer -- transfer native tokens
- Node inspection -- status, blocks, bonds, balance, etc.
- Key management -- generate keys, addresses
- Advanced -- load-test, watch-events, dag, bond-validator
- Getting started -- ConnectionManager API, config, examples
- Events -- WebSocket deploy finalization
- Architecture -- module structure, deploy flow, node endpoints
- Testing guide -- integration tests (
cargo test --test smoke) and CLI smoke test
| Variable | Required | Default | Description |
|---|---|---|---|
FIREFLY_PRIVATE_KEY |
Yes | -- | Signing key (64 hex chars) |
FIREFLY_HOST |
No | localhost |
Node hostname |
FIREFLY_GRPC_PORT |
No | 40401 |
gRPC port |
FIREFLY_HTTP_PORT |
No | 40403 |
HTTP port |
FIREFLY_OBSERVER_HOST |
No | same as host | Observer for finalization |
FIREFLY_OBSERVER_GRPC_PORT |
No | 40452 |
Observer gRPC port |
FIREFLY_DEPLOY_TIMEOUT |
No | 60 |
Max seconds for block inclusion |
FIREFLY_FINALIZATION_TIMEOUT |
No | 30 |
Max seconds for finalization |