Expand description
§dpo2u-sdk
Rust client SDK for the DPO2U on-chain compliance programs on Solana. Provides canonical program IDs, PDA derivers, and purpose-hash helpers for integrators building Anchor programs that CPI into DPO2U or off-chain clients that build DPO2U transactions directly.
§Programs covered
| Program | Program ID (devnet) | Purpose |
|---|---|---|
compliance_registry | 7q19zbMMFCPSDhJhh3cfUVJstin6r1Q4dgmeDAuQERyK | DPIA/audit attestation with ZK binding |
sp1_verifier | 5xrWphWXoFnXJh7jYt3tyWZAwX1itbyyxJQs8uumiRTW | Groth16 pairing CPI target |
consent_manager | D5mLHU4uUQAkoMvtviAzBe1ugpdxfdqQ7VuGoKLaTjfB | DPDP India consent events |
art_vault | C7sGZFeWPxEkaGHACwqdzCcy4QkacqPLYEwEarVpidna | MiCAR ART safeguards (PoR + liquidity + buffer + velocity) |
aiverify_attestation | DSCVxsdJd5wVJan5WqQfpKkqxazWJR7D7cjd3r65s6cm | AI Verify Singapore attestation |
agent_registry | 5qeuUAaJi9kTzsfmiphQ89PNrpqy7xW7sCvhBZQ6mya7 | DPO/auditor DIDs with capability bits |
payment_gateway | 4Qj6GziMjUfh4TszuSnasnEqnASqQBS6SHw6YAu9U23Q | MCP invoicing (SPL Token CPI) |
fee_distributor | 88eKEEMMnugv8AFWRvqa4i7LEiL7tM9bEuPTVkRbD76x | Atomic 70/20/10 split |
agent_wallet_factory | AjRqmxyieQieov2qsNefdYpa6HbPhzciED7s5TfZi1in | Deterministic PDA wallets |
§Quick start — derive a consent PDA
use dpo2u_sdk::{programs, pdas};
use solana_program::pubkey::Pubkey;
use std::str::FromStr;
let user = Pubkey::from_str("7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU").unwrap();
let fiduciary = Pubkey::from_str("5qeuUAaJi9kTzsfmiphQ89PNrpqy7xW7sCvhBZQ6mya7").unwrap();
let purpose_hash = pdas::purpose_hash(b"marketing_communications");
let (consent_pda, _bump) = pdas::consent_pda(&user, &fiduciary, &purpose_hash);
assert_ne!(consent_pda, Pubkey::default());Re-exports§
pub use programs::*;
Modules§
- pdas
- PDA derivers — all match the
#[account(seeds = ...)]declarations in the on-chain programs. Use these exact functions client-side to avoid seed drift. - programs
- Canonical program IDs (devnet === mainnet addresses — upgrades keep IDs).
- public_
values - Helpers for parsing the 96-byte
PublicValuesStructABI layout used by bothcompliance-registry::create_verified_attestationandconsent-manager::record_verified_consent. - seeds
- Raw seed constants (for callers building transactions that need to
mirror the Rust program’s
#[account(seeds = ...)]exactly).