Get Ans Identity Certificates
get_ans_identity_certificatesRetrieve a registered agent's identity certificates, newest first, including the leaf certificate and ready-to-use x5c header so you can sign as that agent.
Instructions
EXPERIMENTAL. Get a registered agent's identity certificates, newest first, INCLUDING the certificate itself — this is what you need to sign something AS the agent. A signature carries the leaf certificate in its JWS x5c header; a verifier then hashes that certificate's DER and requires the result to appear in the transparency log's attested identity certificates (see verify_ans_host). x5c is returned ready to paste into a JWS header (base64 DER, no PEM armour, no line breaks) and signsWith names the JWS alg the key supports (ES256 for P-256, ES384 for P-384, RS256 for RSA), so you do not have to convert or infer either. certificatePEM, chainPEM and identityRootUrl are there for chain building — but chainPEM is a convenience, NOT a trust anchor: a verifier fetches the root from the log host itself or pins sha256(DER)=d914e2e37b5810362cb9575d54784ff3a95abe01ba3ec703d9bff826a280edcc. The issued certificate carries ONLY the URI SAN (ans://...); a DNS: SAN in the CSR is not carried over, so verify against the URI and never a DNS name. Several certificates is NORMAL, not an error: rotate_ans_identity adds one and the previous stays valid until its validTo, so newest: true marks the current one — and it is why a verifier must check WHICH certificate signed something rather than that one is listed. Porkbun never holds the private key: it stays with whoever generated the CSR and cannot be recovered. Nothing here is secret — the certificate is public once it is in the log. There is no certificate until the agent reaches ACTIVE (ANS_NO_CERTIFICATE); run advance_ans_agent first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>"
},
"name": "get_ans_identity_certificates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | The agentId from register_ans_agent or list_ans_agents. |