Install Leani
Build from source
The tutorials use a source checkout, which also holds their example
configurations. To install a published release instead, see
published releases.
You need Git, Rust installed through rustup, and your platform’s C/C++ build
tools. The repository’s rust-toolchain.toml selects Rust 1.97.0 automatically.
The first build downloads dependencies and can take several minutes.
git clone --branch v0.1.1 https://github.com/smart-byte/leani.gitcd leanicargo build --locked -p leaniexport LEANI_SOURCE="$PWD"export PATH="$LEANI_SOURCE/target/debug:$PATH"leani --versionExpect leani 0.1.1. If you already have the checkout, start at
cargo build --locked -p leani in its root directory.
LEANI_SOURCE points to the checkout; later tutorials use it to find example
configs. The PATH setting makes leani available in this terminal. In each
additional terminal, return to the checkout and run:
export LEANI_SOURCE="$PWD"export PATH="$LEANI_SOURCE/target/debug:$PATH"Continue with your first Ethereum block. For a check without network access, run the offline fixture.
Prepare the TypeScript SDK
The examples use Bun 1.2 or later. From the checkout:
bun install --cwd packages/sdk --frozen-lockfilebun run --cwd packages/sdk buildRepository examples resolve @smart-byte/leani-sdk to the local source. To use the built
package in your own application, run this from that application’s directory:
bun add "$LEANI_SOURCE/packages/sdk"Then follow the query and subscription example. For Rust applications, see build a custom node.
Published releases
Install with brew install smart-byte/tap/leani, or choose a matching
archive from the GitHub releases.
Verify the archive’s published checksum and provenance before running it, as
Verify a release shows. Containers use
ghcr.io/smart-byte/leani:v<version>, such as leani:v0.1.1; pin the
release’s digest for deployment.
The Linux archives need glibc 2.39 or newer: Ubuntu 24.04, Debian 13, Fedora
40, RHEL 10 and its rebuilds, or a later release of these. On an older or
musl-based distribution, run the container image or build from source.
Select the v0.1.1 binary release and install the matching
SDK with bun add @smart-byte/[email protected]. An install without the exact version
resolves npm’s latest tag, which may not match your node.
Keep binary, SDK, and configuration versions aligned with the release you selected.
Built by Smart-Byte · Legal notice (Impressum) · Privacy