Back to Documentation
> GETTING_STARTED

Getting Started

Learn how to integrate ZKPrime privacy infrastructure into your Solana applications

Introduction

ZKPrime is a privacy infrastructure layer for Solana that enables confidential transactions and encrypted state management using zero-knowledge proofs.

With ZKPrime, developers can build privacy-preserving applications without compromising on performance or decentralization.

Key Features:

  • Zero-knowledge proof verification on Solana
  • Confidential transactions with encrypted states
  • High-performance privacy layer
  • Easy-to-use SDK for TypeScript and Rust

Installation

TypeScript SDK

# Install via npm
npm install @zkprime/sdk

Rust SDK

# Add to Cargo.toml
zkprime-sdk = "0.1.0"

Quick Start

Get started with ZKPrime in just a few lines of code:

1. Initialize the Client

import { ZKPrimeClient } from '@zkprime/sdk';

// Initialize with your Solana RPC endpoint
const client = new ZKPrimeClient({
  rpcUrl: 'https://api.mainnet-beta.solana.com',
  network: 'mainnet-beta'
});

2. Create a Private Transaction

// Create a confidential transfer
const tx = await client.createPrivateTransfer({
  from: senderWallet,
  to: recipientAddress,
  amount: 1000,
  memo: 'Private payment'
});

// Submit transaction
const signature = await client.submitTransaction(tx);
console.log('Transaction:', signature);

3. Verify Privacy

// Query transaction without revealing details
const proof = await client.verifyTransaction(signature);

console.log('Valid:', proof.isValid);
console.log('Privacy Level:', proof.privacyScore);

Configuration

Customize ZKPrime client behavior with configuration options:

const client = new ZKPrimeClient({
  rpcUrl: 'https://api.mainnet-beta.solana.com',
  network: 'mainnet-beta',
  
  // Privacy settings
  defaultPrivacyLevel: 'high', // 'low' | 'medium' | 'high'
  
  // Performance options
  proofCaching: true,
  batchTransactions: true,
  
  // Development mode
  debug: false,
  logLevel: 'info' // 'debug' | 'info' | 'warn' | 'error'
});

Next Steps