Privacy
Endpoints for managing privacy features: key generation, viewing key grants, wallet deployment, and key rotation.
All endpoints require authentication and accept entityId as a body parameter (POST) or query parameter (GET).
Get Privacy Status
GET /api/privacy/status?entityId={entityId}Returns the current privacy configuration for an entity.
Response
{
"privacy": {
"enabled": true,
"publicKey": "0x1a2b3c...",
"walletAddress": "0x4d5e6f...",
"activeGrants": 2
},
"grants": [
{
"id": "uuid",
"auditorAddress": "0xAuditor...",
"scope": "incoming",
"grantedAt": "2026-01-15T00:00:00Z",
"expiresAt": null
}
]
}Initialize Privacy
POST /api/privacy/initializeGenerates a Master Spending Key (MSK), encrypts it with the entity's DEK, and stores it. Derives viewing keys and stores the public key.
Request Body
{
"entityId": "uuid"
}Response
{
"success": true,
"publicKey": "0x1a2b3c..."
}Rotate Keys
POST /api/privacy/rotateGenerates a new MSK, re-derives all keys, and re-encrypts all active viewing key grants.
Request Body
{
"entityId": "uuid"
}Response
{
"success": true,
"publicKey": "0xNewPubKey...",
"grantsUpdated": 2
}Deploy Wallet
POST /api/privacy/deploy-walletDeploys an Axiomatic Wallet (smart contract wallet) for the entity using the WalletFactory's CREATE2 deterministic deployment.
Request Body
{
"entityId": "uuid"
}Response
{
"success": true,
"walletAddress": "0x4d5e6f...",
"alreadyDeployed": false
}Grant Viewing Access
POST /api/privacy/grant-viewingCreates a viewing key grant for a delegate (auditor, compliance officer, etc.).
Request Body
{
"entityId": "uuid",
"auditorAddress": "0xDelegate...",
"scope": "incoming",
"expiresAt": "2027-12-31T23:59:59Z"
}| Field | Type | Required | Description |
|---|---|---|---|
entityId | string | Yes | The entity granting access |
auditorAddress | string | Yes | The delegate's identifier |
scope | string | No | incoming, outgoing, or full (default: full) |
expiresAt | string | No | ISO 8601 expiration date |
Response
{
"success": true,
"grant": {
"id": "uuid",
"auditorAddress": "0xDelegate...",
"scope": "incoming",
"grantedAt": "2026-03-04T00:00:00Z",
"expiresAt": "2027-12-31T23:59:59Z"
}
}Revoke Grant
POST /api/privacy/revoke-grantRevokes an active viewing key grant by setting its revokedAt timestamp.
Request Body
{
"grantId": "uuid"
}Response
{
"success": true
}