Enterprise-grade confidential transactions on XDC Network
Privacy-preserving transactions where only parties involved can see transaction details. On-chain commitments ensure integrity without revealing sensitive data.
π Live Demo: https://privacy.xdc.network
- π End-to-End Encryption - Transaction details encrypted for each party
- βοΈ On-Chain Commitments - Hash recorded on XDC, details stay private
- ποΈ Selective Disclosure - Grant auditors access to specific fields only
- π’ Privacy Domains - Create consortiums with member roles
- π Wallet Connect - MetaMask/XDCPay integration for on-chain commits
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β XDC PRIVACY MODEL β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Party A ββββββββΊ Private Transaction ββββββββΊ Party B β
β β β β β
β β βββββββββββ΄ββββββββββ β β
β β β Off-Chain Store β β β
β β β (Encrypted Data) β β β
β β βββββββββββ¬ββββββββββ β β
β β β β β
β βΌ βΌ βΌ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β XDC Network (Public Ledger) β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β Only Commitment Hash visible on-chain β β β
β β β 0x8a7b6c5d4e3f2a1b... β β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β β Party A sees full details β Party B sees full details β
β β Public cannot see details β Third parties cannot see β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Party A creates transaction with encrypted payload
β
System generates commitment hash (SHA3-256)
β
Payload encrypted separately for each party
β
Transaction stored off-chain (encrypted)
Each party signs with their private key
β
Signatures collected
β
Status: PENDING β PARTIALLY_SIGNED β FULLY_SIGNED
Commitment hash recorded on XDC Network
β
Only hash visible publicly
β
Full details remain private to parties
Party grants auditor access to specific fields
β
Auditor sees: amount, parties (disclosed)
β
Auditor cannot see: pricing, terms (hidden)
β
Merkle proof verifies authenticity
| Use Case | Description |
|---|---|
| Trade Finance | Letters of credit, invoices with full confidentiality |
| RWA Tokenization | Private asset transfers with regulatory compliance |
| Confidential DvP | Delivery vs Payment with hidden terms |
| Private Payments | Confidential payment instructions |
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend ββββββΆβ Backend ββββββΆβ PostgreSQL β
β (Next.js) β β (Express) β β (Encrypted) β
β Port 3001 β β Port 4000 β β Port 5432 β
βββββββββββββββββββ ββββββββββ¬βββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β XDC Network β
β (Commitments) β
βββββββββββββββββββ
- Node.js 20+
- Docker & Docker Compose
- PostgreSQL (or use Docker)
# Clone the repository
git clone https://github.com/XDCFoundation/XDCPrivacy.git
cd XDCPrivacy
# Install backend dependencies
cd backend && npm install
# Install frontend dependencies
cd ../frontend && npm install
# Start with Docker
docker compose up -dBackend (.env)
DATABASE_URL=postgresql://user:pass@localhost:5432/xdc_privacy
JWT_SECRET=your-secret-key
XDC_RPC_URL=https://rpc.apothem.network
XDC_CHAIN_ID=51Frontend (.env)
NEXT_PUBLIC_API_URL=https://api.privacy.xdc.network| Endpoint | Method | Description |
|---|---|---|
/api/v1/auth/register |
POST | Register new party |
/api/v1/auth/login |
POST | Authenticate |
/api/v1/transactions |
POST | Create private transaction |
/api/v1/transactions |
GET | List your transactions |
/api/v1/transactions/:id/sign |
POST | Sign transaction |
/api/v1/disclosures |
POST | Create selective disclosure |
| Actor | Can See | Cannot See |
|---|---|---|
| Transaction Party | Full details | - |
| Auditor (with disclosure) | Disclosed fields only | Hidden fields |
| Public (XDC Explorer) | Commitment hash only | All details |
| Third Party | Nothing | Everything |
- Encryption: AES-256-GCM + ECIES hybrid encryption
- Key Management: Private keys never leave client
- Commitments: SHA3-256 hash with random nonce
- Selective Disclosure: Merkle proofs for field verification
| Network | Chain ID | RPC |
|---|---|---|
| XDC Mainnet | 50 | https://rpc.xdc.org |
| Apothem Testnet | 51 | https://rpc.apothem.network |
MIT License - see LICENSE
- π Live: https://privacy.xdc.network
- π Docs: https://docs.xdc.network
- π¬ Discord: https://discord.gg/xdc