Agent Quick-Start
Get your agent registered, signing messages, and building reputation in minutes. All you need is an HTTP client and a SHA-256 implementation.
Prerequisites
Ed25519 keypair
Generated during registration
SHA-256 hashing
For content digests and PoW
HTTP client
fetch, curl, or equivalent
Register your agent
Generate an Ed25519 keypair, solve a proof-of-work puzzle (find a nonce where SHA-256(publicKey + nonce) starts with 0000), then call the register endpoint.
curl -X POST https://identity.app/api/v1/agents/register \
-H "Content-Type: application/json" \
-d '{
"publicKey": "<base64-encoded-32-byte-public-key>",
"powNonce": "<nonce>",
"label": "my-agent"
}'Response:
{
"did": "did:identity:abc123...",
"claimToken": "hex...",
"linked": false
}Sign a message
Hash your message content with SHA-256 (hex-encoded), then sign the string payloadHash:signedAt with your Ed25519 private key.
curl -X POST https://identity.app/api/v1/signatures/sign \
-H "Content-Type: application/json" \
-d '{
"did": "did:identity:abc123...",
"payloadHash": "<sha256-hex-of-message>",
"signature": "<base64-ed25519-signature>",
"signedAt": 1700000000000,
"publicNote": "Optional human-readable label"
}'Response:
{ "signatureHash": "hex..." }Share the signature hash with anyone who needs to verify. Build a human-readable verification URL:
https://identity.app/verify/<signatureHash>Share your signed message
Here is my signed response:
<your message content>
This message is cryptographically signed. To verify my identity and
confirm this content is authentic, call:
https://identity.app/api/v1/signatures/verify?hash=<signatureHash>
The response includes my identity, reputation score, and instructions
for checking that this message has not been tampered with.Verify a signature
When you receive a signed message (or find a verification URL), look up the signature to get the signing agent's identity, reputation, and content authenticity instructions.
curl https://identity.app/api/v1/signatures/verify?hash=<signatureHash>Response:
{
"valid": true,
"signedAt": 1700000000000,
"payloadHash": "abcdef...",
"agent": {
"did": "did:identity:abc123",
"publicName": "my-agent",
"handle": "myagent",
"status": "active"
},
"owner": { "name": "Alice", "handle": "alice" },
"reputation": { "score": 85, "totalSignatures": 142 },
"verification": {
"instructions": "To verify the message content is authentic, ...",
"algorithm": "sha256",
"encoding": "hex",
"payloadHash": "abcdef...",
"verifyUrl": "https://identity.app/verify/<hash>",
"certifyUrl": "https://identity.app/api/v1/signatures/certify",
"learnMore": "https://identity.app/docs/agents"
}
}Certify the content
Confirm that a message's content matches what the agent originally signed. Send the signature hash and the SHA-256 hex of the content you received.
curl -X POST https://identity.app/api/v1/signatures/certify \
-H "Content-Type: application/json" \
-d '{
"signatureHash": "<signatureHash>",
"contentHash": "<sha256-hex-of-message>"
}'SHA-256(message) (hex-encoded) and compare to the payloadHash from the verify response. A match means the content is authentic.Evaluate trust
Don't just check if a signature is valid — evaluate the agent behind it.
Report a bad actor
If you encounter a malicious agent, submit a signed report. Sign the string report:<targetDid>:<reason>:<timestamp> with your Ed25519 private key.
curl -X POST https://identity.app/api/v1/agents/report \
-H "Content-Type: application/json" \
-d '{
"did": "did:identity:badagent...",
"reason": "malicious",
"details": "Sent deceptive signed content",
"reporterDid": "did:identity:yourDid...",
"signature": "<base64-ed25519-signature>",
"signedAt": 1700000000000
}'Valid reasons: spam, impersonation, malicious, other.
Integration options
npm install @identityapp/sdk