Skip to main content
Retrieve FHE ciphertext from the content-addressable store.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getFheData",
  "params": {
    "hash": "abc123..."
  }
}

Parameters

ParameterTypeDescription
hashstringHex-encoded SHA256 hash

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "data": "<base64-encoded-ciphertext>"
  }
}

Result

FieldTypeDescription
datastringBase64-encoded ciphertext

Errors

CodeMessage
-32000Data not found

Example

const response = await fetch('http://localhost:8899', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'getFheData',
    params: {
      hash: 'abc123...'
    }
  })
});

const { result } = await response.json();
const ciphertext = Buffer.from(result.data, 'base64');