Documentation Index
Fetch the complete documentation index at: https://docs.privora.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Submit FHE-encrypted data to the content-addressable store.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "submitFheData",
"params": {
"data": "<base64-encoded-ciphertext>",
"type": "u8"
}
}
Parameters
| Parameter | Type | Description |
|---|
data | string | Base64-encoded ciphertext |
type | string | Type: “u8”, “u32”, or “u64” |
userRecovery | object | Optional user recovery data |
User Recovery (Optional)
{
"userRecovery": {
"ciphertext": "<base64>",
"nonce": "<base64>"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"hash": "abc123..."
}
}
Result
| Field | Type | Description |
|---|
hash | string | Hex-encoded SHA256 hash |
Errors
| Code | Message |
|---|
| -32000 | Invalid ciphertext |
| -32001 | Storage error |
Example
const response = await fetch('http://localhost:8899', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'submitFheData',
params: {
data: base64Ciphertext,
type: 'u8'
}
})
});
const { result } = await response.json();
console.log('Hash:', result.hash);