A command-line tool for creating and building Ownables - digital assets with unique visual and audio experiences.
Before using the Ownables CLI, you'll need to set up your development environment:
-
Install Rust:
- Visit https://rustup.rs/
- Download and run the installer
-
Install Visual Studio Build Tools:
- Download from Visual Studio Downloads
- Select "Desktop development with C++"
-
Install wasm-bindgen:
cargo install wasm-bindgen-cli
-
Add WebAssembly target:
rustup target add wasm32-unknown-unknown
-
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install Xcode Command Line Tools:
xcode-select --install
-
Install wasm-bindgen:
cargo install wasm-bindgen-cli
-
Add WebAssembly target:
rustup target add wasm32-unknown-unknown
-
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install build essentials:
sudo apt-get update sudo apt-get install build-essential
-
Install wasm-bindgen:
cargo install wasm-bindgen-cli
-
Add WebAssembly target:
rustup target add wasm32-unknown-unknown
Install the Ownables CLI globally:
npm install -g @ltonetwork/ownables-cli
-
Create a new project:
ownables create
-
Choose your template:
- Static Ownable: For displaying a single image
- Music Ownable: For audio with cover art and backdrop
-
Follow the prompts to:
- Name your ownable
- Add a description
- Set version
- Add authors
- Add keywords
- Add your image to
assets/images/
- Supported formats: jpg, jpeg, png, webp
- Minimum size: 300x300 pixels
- Maximum size: 4096x4096 pixels
- Maximum file size: 50MB
-
Add your audio file to
assets/audio/
- Format: mp3
- Maximum size: 50MB
-
Add your images to
assets/images/
:- Cover art: Name with 'cover' or 'front' (e.g., 'cover.jpg')
- Backdrop: Name with 'backdrop' or 'back' (e.g., 'backdrop.jpg')
- Same requirements as static ownable images
-
Run the build command:
ownables build
-
The CLI will:
- Compile your code
- Process your assets, schema, wasm and build
- Create a package (a zip file) in the
build
directory - this is your ownable!
your-ownable/
├── assets/
│ ├── images/ # Your image files
│ ├── audio/ # Your audio files (music ownables only)
│ └── index.html # Display template
├── src/ # Rust source code
└── Cargo.toml # Project configuration
If you encounter any issues:
- Check that all prerequisites are installed
- Verify your assets meet the requirements
- Ensure you're in the correct directory when running commands