司法存证服务
提供基于区块链的电子数据存证、验证及查询服务,确保数据的不可篡改性和法律效力。
POST
/api/v1/evidence/store上传存证
将文件哈希及元数据上链存证。
请求参数 (Parameters)
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| fileHash | string | Yes | 文件的 SHA-256 哈希值 |
| fileName | string | Yes | 原始文件名 |
| fileSize | number | Yes | 文件大小(字节) |
| metadata | object | No | 其他扩展元数据 |
OpenPlatform.demo_code
// Node.js 示例
const axios = require('axios');
async function storeEvidence() {
const response = await axios.post('https://api.ezjur.com/api/v1/evidence/store', {
fileHash: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
fileName: 'contract.pdf',
fileSize: 102400,
metadata: { author: 'Alice' }
}, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
console.log(response.data);
}OpenPlatform.response_example
{
"code": 200,
"msg": "success",
"data": {
"txId": "1234567890abcdef...",
"blockHeight": 1024,
"timestamp": 1678901234
}
}GET
/api/v1/evidence/verify验证存证
验证文件哈希是否在链上存在且未被篡改。
请求参数 (Parameters)
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| fileHash | string | Yes | 待验证的文件哈希 |
| txId | string | No | 存证交易 ID (可选,加快检索) |
OpenPlatform.demo_code
// cURL 示例
curl -X GET "https://api.ezjur.com/api/v1/evidence/verify?fileHash=e3b0c44298fc..." \
-H "Authorization: Bearer YOUR_API_KEY"OpenPlatform.response_example
{
"code": 200,
"data": {
"exists": true,
"storeTime": 1678901234,
"blockHeight": 1024,
"verified": true
}
}