Quick Start With Sindri
Create your first circuit and proof with Sindri in minutes
What is Sindri?β
Sindri is a company devoted to making Zero-Knowledge (ZK) development as easy and painless as possible. We do this by hosting circuits, streamlining deployment, and accelerating proving.
Workflow Example:β
Hereβs an easy-to-follow-along workflow using the Sindri CLI and our examples repository to compile a circom circuit:
Before getting started, you to need create a Sindri account.
π§ Dependenciesβ
- Node.js You'll want v18.13.0 or later.
- Sindri CLI Don't worry about installing this, it's covered below!
π₯ Becoming a ZK Ninja with Sindriβ
- Authenticate and log in with the Sindri CLI.
First things first: let's run the latest CLI and log in with our credentials.
npx sindri@latest login
## Returns the below callback:
Username: {your-username}
Password: ****************************
New API Key Name: my-laptop-sdk
Select a Team: my-team-name
[12:49:18.420] INFO: You have successfully authorized the client with your Sindri account.
- Download some helper files and artifacts.
Clone the Sindri Resources repo where you can find a ton of great resources for template development with Sindri.
git clone https://github.com/Sindri-Labs/sindri-resources.git
- Navigate to the Circom multiplier directory.
For now, we'll be focused on the multiplier2 circuit... because who doesn't love a good multiplier? π€·ββοΈ
cd sindri-resources/circuit_database/circom/multiplier2
- Name your circuit.
Open sindri.json
(this is where a bunch of cool settings live).
In the name
field, provide a more unique name than multiplier2 - life is too short for bad circuit names! π«
{
"$schema": "https://sindri.app/api/v1/sindri-manifest-schema.json",
"name": "multiplier2", ## Change this to your spirit animal
"circuitType": "circom",
"curve": "bn254",
"provingScheme": "groth16",
"witnessCompiler": "c++"
}
- Compile and deploy.
Now, it's time to compile your circuit and deploy it to Sindri!
Be sure you're in the multiplier2
directory.
Run the command below:
npx sindri@latest deploy
- You just compiled your first circuit!
Feel that? You compiled your first circuit! π
npx sindri@latest deploy
### Generates the output below:
[12:49:58.056] INFO: Creating "{your-circuit-name}.tar.gz" package with 5 files.
[12:49:58.063] INFO: Circuit compilation initiated.
[12:50:22.879] INFO: Circuit compiled successfully after 23.8 seconds.
- Generate your proof.
Run sindri proof create
and take it in.
You have just run your first proof run on Sindri.
Tweet it.
Print it out.
Frame it.
Verify it.
Do whatever you'd like because that proof is yours! π
# Create a new proof for the inputs in `input.json`.
npx sindri@latest proof create --input input.json
### Generates the output below:
[12:51:15.345] INFO: Proof generated successfully after 2.9 seconds.
{ ... proof data ... }
Looking for More?β
Here are some commonly accessed pages:
- Getting Started with the Sindri CLI Learn more about what the CLI can do
- Getting Started with the Python SDK Generate your first ZK proof with Sindri in just ten lines of code - 5 min β±οΈ
- Getting Started with the TypeScript SDK Leverage the power of TypeScript with the Sindri API
- Supported Frameworks Circom, Gnark, Halo2, Noir, etc.
- Sindri Infrastructure An overview of the design and architecture of Sindri and the advantages it brings to you as a user.