| Crates.io | newton-prover-core |
| lib.rs | newton-prover-core |
| version | 0.1.29 |
| created_at | 2025-11-14 07:42:27.751863+00 |
| updated_at | 2026-01-06 17:00:45.316635+00 |
| description | newton protocol core sdk |
| homepage | |
| repository | https://github.com/newt-foundation/newton-prover-avs |
| max_upload_size | |
| id | 1932432 |
| size | 16,910,003 |
The NEWTON Prover supports two zkvm proof systems: Risc0 and Sp1.
The Risc0 zkvm proof system is a zero-knowledge proof system that uses the Risc0 zkvm as its proof generator. The Risc0 zkvm is a zero-knowledge proof system that uses the Risc0 instruction set architecture (ISA) to generate proofs.
The expected ImageID to perform SNARK verification on-chain for the Risc0 zkvm proof system is:
4cf071b3cc25d73e77f430b65f5700dd53522dacc21c1bfc0862b2e46fda3584
The Sp1 zkvm proof system is a zero-knowledge proof system that uses the Sp1 zkvm as its proof generator. The Sp1 zkvm is a zero-knowledge proof system that uses the Sp1 instruction set architecture (ISA) to generate proofs.
The expected VKEY to perform SNARK verification on-chain for the Sp1 zkvm proof system is:
0021feaf3f6c78429dac7756fac5cfed39b606e34603443409733e13a1cf06cc
The database module provides PostgreSQL integration for the Gateway with type-safe query execution and connection pooling.
api_keys.rs: API key management with permissions, rate limiting, and expiration supportpolicy_client_owner.rs: Global ownership enforcement for policy clients (first-come-first-served model)wasm_secrets.rs: Encrypted secrets storage and retrieval scoped to (policy_client, policy_data) pairspermissions.rs: Permission system (RpcRead, RpcWrite, Admin)mod.rs: Database manager with dual-pool architecture (deadpool-postgres + sqlx)use newton_prover_core::database::{
initialize_database, get_database, DatabaseConfig,
ApiKeyRepository, PolicyClientOwnerRepository, WasmSecretRepository
};
// Initialize database singleton
let config = DatabaseConfig::default();
initialize_database(config).await?;
// Access database
let db = get_database();
let pool = db.pool();
// Use repositories
let api_key_repo = ApiKeyRepository::new(db.clone());
let keys = api_key_repo.get_all_active().await?;
For database management guide, see src/database/README.md.
For secrets management data model, see ../gateway/src/rpc/api/README.md.