Skip to main content

DownloadCertificate

Downloads a digital certificate in a shareable format with all metadata, hex-encoded and base64-encoded content, and verification instructions.

Request

GET /nxt?requestType=downloadCertificate

All endpoints use port 22024 by default.

Parameters

NameTypeDescriptionRequired
certificateIdstringCertificate ID (unsigned long)Yes*
accountstringAccount ID or SHAMWARI addressYes*
issuerstringIssuer account ID or SHAMWARI addressYes*
certificateNamestringCertificate nameYes*
certificateTypestringCertificate typeNo

*Provide either certificateId OR (account + issuer + certificateName).

Response

{
"certificateId": "9876543210123456789",
"issuer": "9876543210123456789",
"issuerRS": "SHAMWARI-ABCD-EFGH-IJKL-MNOPQ",
"account": "1234567890123456789",
"accountRS": "SHAMWARI-WXYZ-ABCD-EFGH-IJKLM",
"name": "IdentityCert",
"type": "IDENTITY",
"timestamp": 1700000000,
"expiration": 1893456000,
"revoked": false,
"active": true,
"canonicalContent": "hex_encoded_content...",
"signature": "hex_encoded_signature...",
"canonicalContentBase64": "base64_encoded_content...",
"signatureBase64": "base64_encoded_signature...",
"algorithm": "Dilithium",
"signatureScheme": "CRYSTALS-Dilithium",
"version": "1.0",
"format": "ShamwariCertificate-v1",
"blockchain": "Shamwari",
"currentHeight": 1234567,
"downloadTime": 1700000000,
"verificationInstructions": {
"publicKeySource": "Retrieve issuer public key from blockchain account: SHAMWARI-ABCD-EFGH-IJKL-MNOPQ",
"signatureAlgorithm": "Dilithium signature over canonical content",
"canonicalFormat": "id(8) + issuerId(8) + accountId(8) + nameLength(4) + name(N) + typeLength(4) + type(M) + expiration(4)"
},
"errorCode": 0,
"errorDescription": ""
}

Example

curl "http://localhost:22024/nxt?requestType=downloadCertificate&certificateId=9876543210123456789"