DEV Community

Daniel Ioni
Daniel Ioni

Posted on

🌱 Building a Plant NFT Template on Tari (Monero's Privacy Sidechain) I'

How I'm using Rust, WASM, and blockchain to create verifiable digital identities—starting with plants, heading toward pets.
The Big Idea: From Plants to Pets

We often think of NFTs as digital art, but their real potential lies in verifiable digital identity. Imagine a world where your pet's microchip is linked to an immutable blockchain record containing their medical history, pedigree, and ownership.

This is the vision behind my latest project. To test the concept, I started small—with plants.

I built a custom NFT template for the Tari network, Monero's privacy-by-default sidechain. The template allows anyone to mint an NFT that represents a plant with metadata like name, species, age, and price. The same logic can easily be extended to pets, livestock, or any living asset.

💡 Why Tari? Privacy is non-negotiable. Tari inherits Monero's privacy features, meaning the owner's identity and the plant's data can be cryptographically secured.
Enter fullscreen mode Exit fullscreen mode

🛠️ The Tech Stack
Layer Technology Purpose
Language Rust Safe, fast, and WebAssembly-ready
Blockchain Tari Privacy-focused sidechain
Template Library tari_template_abi v0.18.0 Interact with Tari's smart contract system
Compilation WASM (wasm32-unknown-unknown) Executable format for Tari
Containerization Docker Easy deployment & reproducibility
📦 The Plant NFT Template

Here's the core structure of the template I built:

  1. Plant Metadata rust

use tari_template_abi::*;
use serde::{Deserialize, Serialize};

[derive(Serialize, Deserialize, Clone, Debug)]

pub struct PlantMetadata {
pub name: String,
pub species: String,
pub age_years: u32,
pub price_in_xmr: f64,
pub image_hash: String,
}

  1. Plant NFT Structure rust

[derive(Clone, Debug)]

pub struct PlantNFT {
pub id: u64,
pub owner: [u8; 32], // Address as a 32-byte array
pub metadata: PlantMetadata,
}

  1. Core Functions Implemented

    mint_plant(owner, metadata) → Creates a new plant NFT.

    transfer_plant(plant, new_owner) → Transfers ownership securely.

    get_plant_metadata(plant) → Returns the plant's immutable metadata.

🔧 Building the WASM File

I compiled the template to WASM for deployment on Tari. Here's the command I used:
bash

cargo build --target wasm32-unknown-unknown --release

After a few dependency version trials (tari_template_abi v0.18.0 worked best), the compilation succeeded:
bash

target/wasm32-unknown-unknown/release/tari_nft_template.wasm

I then renamed it to plant_nft_template.wasm and included it in the repository.
🐳 Docker Support

The template is also Dockerized for easy testing and deployment. You can pull the image:
bash

docker pull myzubster/tari-nft-template:latest
docker run --rm myzubster/tari-nft-template:latest

This gives you a ready-to-use WASM file and a full Rust environment to modify the template.
🌍 Why This Matters for MyZubster

This NFT template is the first step toward integrating digital assets into the MyZubster ecosystem, which already includes:

MyZubsterGateway: A Monero payment engine.

MyZubster-Marketplace: An API backend for a decentralized marketplace.

MyZubster-App: A React Native mobile app with privacy features (Orbot, end-to-end encryption).
Enter fullscreen mode Exit fullscreen mode

My goal is to allow NFTs to be bought, sold, and traded within the marketplace using Monero payments—all with Tari as the underlying NFT layer.
🐾 Future Vision: Pet NFTs (PetChain)

The same template can be adapted for pets. Imagine:

A Dog NFT with metadata: breed, age, vaccination_history, microchip_id.

Verifiable health records uploaded by certified veterinarians.

Decentralized pet insurance managed by smart contracts (similar to projects like PawGuard).

Immutable proof of ownership to prevent pet theft and disputes.
Enter fullscreen mode Exit fullscreen mode

This is not sci-fi. Projects like BreedProof, OpenPet, and VetBlock are already working on similar concepts. My goal is to build the first fully open-source, privacy-first implementation on Tari.
📂 Repository & Links

GitHub: DanielIoni-creator/tari-nft-template

Docker Hub: myzubster/tari-nft-template

MyZubster Ecosystem: DanielIoni-creator/myzubster
Enter fullscreen mode Exit fullscreen mode

🤝 Contribute

If you're interested in building decentralized identity for living assets, here's how to get involved:

Fork the repository.

Create a new branch (feat/pet-nft-template).

Modify the template to support animal metadata (breed, microchip, vaccinations).

Submit a Pull Request.
Enter fullscreen mode Exit fullscreen mode

⭐ Support the Vision

If you believe in privacy-first digital identity for all living beings, please:

⭐ Star the repository on GitHub.

🐦 Follow me on X: @myzubster

📖 Read more on my blog: DEV.to - Daniel Ioni
Enter fullscreen mode Exit fullscreen mode

Built with ❤️ for the Monero, Tari, and open-source communities. Let's build a future where your pet's identity is secure, private, and truly yours. 🌱🐾

Top comments (0)