인증서 폐기
발급된 인증서를 폐기합니다.
주의
burnable: true로 배포된 컨트랙트에서만 폐기가 가능합니다.
burnable: false이면 CONTRACT_NOT_BURNABLE 오류가 반환됩니다.
요청
POST /certificates/:certificateId/revoke/:tokenId
경로 파라미터
| 파라미터 | 타입 | 설명 |
|---|---|---|
certificateId | string | 인증서 ID |
tokenId | string | 폐기할 토큰 ID |
요청 바디 — 없음
응답
{
"success": true,
"data": {
"id": "abc123-...",
"type": "revoke",
"status": "pending",
"txHash": null,
"from": "0x592C4D1b...",
"to": "0xd2D53c7b...",
"contractId": "8ce493b5-...",
"createdAt": "2024-01-01T00:00:00.000Z",
"confirmedAt": null
}
}
- TypeScript
- Python
const tx = await api('POST', `/certificates/${certificateId}/revoke/${tokenId}`);
tx = api('POST', f'/certificates/{certificate_id}/revoke/{token_id}')
폐기 완료 후 웹훅 certificate.revoked 이벤트가 발생하며, 이후 검증 시 status: "revoked"로 반환됩니다.