Sindri now supports compiled Leo programs, enabling developers to leverage SnarkVM, the zero-knowledge virtual machine powering Aleo.
Leo is a high-level language for writing applications on Aleo, while SnarkVM executes these programs efficiently using zero-knowledge proofs.
One of the features of Leo that developers find beneficial is that it feels natural to use because it's designed with Rust-like syntax.
SnarkVM Integration & Network Specification
When using Sindri with SnarkVM, your project should include your Aleo program file(s) and a sindri.json
file.
Unique to SnarkVM, however, is the ability to specify the network
inside this file.
By default, the network
is set to mainnet
, but you can also specify testnet
.
A circuit must be compiled and proved on the same network, so the network must be provided during compilation, not just at prove time.
Of course, if you are developing locally, no network needs to be specified.
Additionally, your functionName
should specify the function in your main Aleo program that you want Sindri to prove.
An example sindri.json
with these fields demonstrated is below:
sindri.json
{
"name": "battleship_initialize_board",
"circuitType": "snarkvm",
"functionName": "initialize_board",
"network": "mainnet"
}
Input Passing for Aleo Programs
If your Aleo program includes a record or network definition, you will need to supply a private key in your input.json file.
Important: Only use development/test private keys - never include production or mainnet private keys in your input files.
Production private keys should be managed through secure key management systems.
An example input.json
is below:
input.json
{
"PRIVATE_KEY": "APrivateKey1zk...",
"inputs": ["aleo14vccuxzlf2rsh8rf6ky...", "100000u64"]
}
Example Implementations
For more details and example implementations, check out our Sindri resources repository.