§04Documentation
Build against sealed state.
What exists today: the devnet SDK, the encrypted account layout, and the parameters the network runs on.
Architecture
A confidential instruction crosses four boundaries. Exactly one of them can turn ciphertext back into a value, and it needs 64 independent parties to agree to do it.
01
Client keyring
Keys never leave the device. The client encrypts inputs and holds the only path to a plaintext result.
02
Solana settlement
Ordering, fees and account ownership stay on Solana. Latens adds a ciphertext field, not a new chain.
03
Evaluator mesh
Stateless workers that apply homomorphic circuits to ciphertext. They can compute; they cannot read.
04
Threshold committee
A t-of-n committee holds shares of the decryption key. Output is revealed only to the address that owns it.
Quickstart
The client SDK handles keygen, encryption and the re-keying dance for private outputs. Programs declare their circuit in Rust and are compiled to a homomorphic instruction set.
TypeScript · client
transfer.ts
import { Latens, seal } from "@latens/sdk";
const latens = await Latens.connect("devnet");
const keyring = await latens.keyring(); // stays in the browser
// balances are sealed under the committee key
const amount = seal(75n, keyring.publicKey);
const sig = await latens.invoke("transfer", {
from: wallet.publicKey,
to: recipient,
amount, // ciphertext, 3.1 KB
});
// only the owner can open the resulting balance
const balance = await latens.reveal(sig, keyring);
console.log(balance); // 337nRust · program
lib.rs
use latens_sdk::prelude::*;
#[latens::program(depth = 3)]
pub mod vault {
use super::*;
pub fn transfer(ctx: Context<Transfer>, amount: Enc<u64>) -> Result<()> {
let from = &mut ctx.accounts.from.sealed;
let to = &mut ctx.accounts.to.sealed;
// evaluated on ciphertext; no branch observes a value
let ok = fhe::ge(from, &amount);
*from = fhe::sub(from, &fhe::mul(&amount, &ok));
*to = fhe::add(to, &fhe::mul(&amount, &ok));
Ok(())
}
}Shell
install
npm i @latens/sdk
cargo add latens-sdk
latens dev --cluster devnetNetwork parameters
| Scheme | TFHE (CGGI) | torus-based, programmable bootstrapping |
|---|---|---|
| LWE dimension | n = 1024 | 128-bit classical security |
| Ciphertext | 3,128 B | packed 64-bit integer |
| Noise budget | 128 bits | fresh ciphertext |
| Bootstrap cost | ~170 ms | single-threaded evaluator, devnet |
| Committee | t = 64, n = 128 | proactive re-sharing per epoch |
| Epoch | 8 hours | committee rotation interval |
| Settlement | Solana | ordering, fees, account ownership |
Roadmap
- P0DevnetTFHE evaluator, 32-node threshold committee, encrypted SPL-compatible transfers.shipped
- P1Sealed programsRust SDK for encrypted account state; homomorphic ALU exposed as a Solana CPI target.active
- P2Encrypted inferenceQuantised transformer blocks over ciphertext; model weights sealed to the committee.next
- P3Mainnet-beta128-node committee, hardware acceleration, permissionless evaluator onboarding.planned
Questions
- Is this a new chain?
- No. Latens is an execution layer attached to Solana. Accounts, signatures, fees and ordering are Solana’s; Latens adds an encrypted data path and the machinery to compute on it.
- Who can decrypt my state?
- Only the key holder for private outputs. Public outputs are opened by a threshold committee where no member holds a complete key and at least 64 of 128 must cooperate.
- What happens if the noise budget runs out?
- The plaintext is unrecoverable. Programs declare their circuit depth statically, and the runtime inserts bootstraps so this cannot happen in a deployed program.
- Can I run an evaluator?
- On devnet, by request. Permissionless onboarding is gated on the P3 milestone, together with the slashing conditions for circuit-proof failures.