# Getting started with the Provable SDK for Aleo **Published by:** [Colliseum](https://paragraph.com/@colliseum/) **Published on:** 2025-06-22 **URL:** https://paragraph.com/@colliseum/getting-started-with-the-provable-sdk-for-aleo ## Content My name is Heorhii, and if you're building private apps on Aleo, this guide is for you. Aleo introduces a new way to write applications, where logic can run privately, and only proofs are shared publicly. That means you can build apps where balances, messages, identity, or even AI inference data are hidden by default, but still verifiable. To make all this easier, the Provable SDK gives developers a JavaScript/TypeScript toolkit to interact with Aleo programs. In this guide, I’ll walk you through what the SDK is, how it works, and how to start using it in your full-stack apps. What makes Aleo private? Before diving into code, here’s a quick overview of how privacy works on Aleo.Function privacy. Leo programs can define functions with private inputs and private outputs. The result of these functions is a ZK Proof that the function was executed correctly, without revealing the data inside.Encrypted state. You can create persistent private state (via records), and even share it with another user without anyone else seeing it.This enables real use cases like:Private lending without revealing credit scoreShielded transfers and swapsPrivate identity checksEncrypted votes or machine learning predictionsWhat is the Provable SDK? The Provable SDK is a JavaScript library that helps you:Generate Aleo accountsInteract with Leo programsManage public and private stateBuild full-stack apps with privacy baked inLet’s walk through how to use it. https://www.provable.tools/ 1. Installing the SDK. You can add it via npm or yarn.npm install @provablehq/sdk # or yarn add @provablehq/sdk The SDK supports both mainnet and testnet networks. Choose the one you're targeting when importing:// For testnet (default) import { Account, ProgramManager, initThreadPool } from '@provablehq/sdk'; // For mainnet import { Account, ProgramManager, initThreadPool } from '@provablehq/sdk/mainnet.js'; 2. Enabling multithreaded webAssembly. By default, the SDK runs in single-threaded WebAssembly. For performance, you should enable multi-threaded mode as early as possible in your app.import { initThreadPool } from '@provablehq/sdk/mainnet.js'; await initThreadPool(); This step is important, it sets up worker threads so that heavy cryptographic operations don’t block the UI. 3. Creating an Account. After initializing the thread pool, you can create or load an Aleo account:import { Account } from '@provablehq/sdk/mainnet.js'; // Generate a new account const account = new Account(); // Or import from a private key string const existing = new Account({ privateKey: '<your-private-key>' }); console.log('Address:', account.address()); console.log('View Key:', account.viewKey()); 4. Reading public state from a program. Let’s say you have a Leo program deployed that tracks balances in a public mapping. You can query its state like this:import { ProgramManager } from '@provablehq/sdk/mainnet.js'; const manager = new ProgramManager(account); // Get a value from a mapping const value = await manager.getMappingValue( 'credits.aleo', // program ID 'account', // mapping name account.address() // key ); console.log('Public balance:', value); This example queries the credits.aleo program to check your public balance. 5. Executing a program function (transition). You can call a function from your Leo program like this:const programId = 'my_token.aleo'; const functionName = 'transfer_public'; const inputs = [ 'aleo1recipientaddress...', '1000000u64' // amount in microcredits ]; const response = await manager.execute(programId, functionName, inputs); console.log('Transaction ID:', response); This will:Generate a proof of the function callBroadcast it to the Aleo networkReturn the transaction ID (or result)6. Handling private state. To spend a private record, you'll need to:Scan your account for recordsSelect one that matches the required typePass it into the function executionExample:const records = await account.fetchRecords(programId); // Find a usable record const record = records.find(r => r.functionName === 'mint_private'); const inputs = [record, 'aleo1recipient...', '50000u64']; const tx = await manager.execute(programId, 'transfer_private', inputs); Each record represents an encrypted piece of state that only you (or the intended receiver) can decrypt. https://github.com/ProvableHQ/sdk Project configuration tips:Node.js version. Use Node.js 20+ (preferably 22) to ensure all SDK features work properly.Webpack configuration. If you're using webpack, enable these features:experiments: { asyncWebAssembly: true, topLevelAwait: true, } React/Next.js templates. The easiest way to start is with the official boilerplates:npx create-leo-app@latest This gives you a working React/Next.js project preconfigured with Aleo, the SDK, and WebAssembly support. More info about Intro-to-Aleo you can find here: https://docs.explorer.provable.com/docs/sdk/6p7047svvq2ox-intro-to-aleo Final words. The Provable SDK unlocks the power of Aleo for web developers. It abstracts the complexity of ZK Proofs and gives you the tools to build apps where privacy is the default not the exception. Whether you’re building shielded payments, private identity protocols, or confidential voting systems, this SDK gives you direct access to Aleo’s encrypted records, private functions, and composable program interfaces. The learning curve is real, but once you see how it works, the possibilities open up fast. Start small. Test often. And remember: on Aleo, users own their data and you, as a developer, can finally build with that in mind. Let privacy be your product.SubscribeTo know more about Aleo, join now!Aleo TwitterAleo DiscordAleo WebsiteList of Aleo and Leo code and resoursesPrepared by Colliseum ## Publication Information - [Colliseum](https://paragraph.com/@colliseum/): Publication homepage - [All Posts](https://paragraph.com/@colliseum/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@colliseum): Subscribe to updates - [Twitter](https://twitter.com/HeorhiiY): Follow on Twitter