Page cover

POST Generate Commitment

-------------------------------------------
OVERVIEW
-------------------------------------------

Endpoint: POST /api/v1/commitment/generate
Method: POST
Authentication: Not Required
Rate Limit: 50 requests/minute

PURPOSE:
Generates cryptographic commitment data (secret, nullifier, and commitment hash)
required for making privacy-preserving deposits.

-------------------------------------------
REQUEST BODY
-------------------------------------------

{
  "poolId": "cipherx-bsc-01",
  "denomination": "0.1",
  "entropy": "0x1a2b3c4d5e6f7a8b9c0d1e2f...",
  "version": "1.0"
}

-------------------------------------------
EXAMPLE RESPONSE
-------------------------------------------

{
  "success": true,
  "commitmentData": {
    "secret": "0x1b29c3e4f7a8d9e0...",
    "nullifier": "0x9f8e7d6c5b4a3210...",
    "commitment": "0x7c5b3a1d9e8f0c2b...",
    "leafIndex": 847,
    "version": "1.0"
  },
  "secretNote": "cipherx-zk-0.1-eyJzIjoiMHgxYjI5...",
  "warnings": [
    "⚠️ CRITICAL: Save the secretNote immediately",
    "⚠️ Store secretNote offline in a secure location",
    "⚠️ Anyone with the secretNote can withdraw your funds"
  ]
}

Last updated