PrivacyPoolSDK is the client-side boundary between an application and the Soroban privacy-pool contract. It prepares the cryptographic inputs for PrivacyPoolsContract.transact; it does not manage disclosure cases, reports, or auditor permissions.

Boundary

AreaReference or partner applicationPrivacyPoolSDKArcane Auditing Portal
End-user UIYesNoNo
Stellar wallet connectionYesUses signatures / transaction flowNo
Coin constructionCalls SDKYesNo
Merkle witness preparationCalls SDKYesNo
Proof generationCalls SDKYesNo
Soroban argument serializationCalls SDKYesNo
Contract event indexingNoNoYes
Audit interpretationNoNoYes
Disclosure cases and reportsNoNoYes

SDK responsibilities

SDK areaFunction examples
Stealth address derivationbuildStealthAddressSignMessage, generateStealthAddressFromStellarSignature
Coin creationgenerateCoin, generateCoinWithSharedSecret, generateCoinForDepositWithSharedHex
Witness preparationbuildWithdrawMerkleWitness
Proof generationproveWithdrawal, proveTransaction
Soroban serializationproofToHex, publicToHex
Nullifier helpercalculateNullifierHash
ECDH helpersecdhEphemeralPublicKeyFromScalarHex, ecdhSharedKey, shared-secret helpers

Application flow

Install

npm install @auditable/privacy-pool-zk-sdk
Runtime requirements:
  • Node.js >=19.0.0, or
  • A browser with Web Crypto (crypto.subtle)

Soroban call shape

The application submits:
transact(from, proof_bytes, pub_signals_bytes, encoded)
ArgumentProduced by
fromWallet-authenticated Stellar address
proof_bytesSDK proof serialization
pub_signals_bytesSDK public-signal serialization
encodedEncrypted audit payload prepared by the application/SDK flow
After a successful transaction, the contract emits AuditEncodedDigest; the backend scanner reads it later through Stellar RPC.