Mint your DAT in RUST

This guide walks through the process of setting up your local environment, connecting your wallet, and minting your first Data Anchoring Token (DAT) using the LazAI Rust SDK.

It assumes familiarity with Rust, basic blockchain interactions, and access to the LazAI Pre-Testnet. For a guided walkthrough of the entire setup and minting process, watch the official tutorial: ➡️ https://youtu.be/LYN_ZaxFWXg

Dependencies

cargo init --bin lazai-dat-rust
cd lazai-dat-rust

# Alith (from GitHub) with needed features
cargo add alith --git https://github.com/0xLazAI/alith --features "lazai,wallet,crypto,ipfs"

# Runtime & utils
cargo add tokio --features full
cargo add reqwest --features json
cargo add anyhow
cargo add hex
cargo add rand_08

Env vars

export PRIVATE_KEY=<your wallet private key>   # must start with 0x
export IPFS_JWT=<your pinata ipfs jwt>

src/main.rs

Run

Expected output

Last updated