Quickstart — Gankpo Gateway en quinze minutes.
Ce guide part d'un poste de développement neuf et arrive à l'émission d'un document .gkp signé via l'API REST de Gankpo Gateway. Pré-requis : Docker et curl.
1. Démarrer la Gateway
docker pull registry.gankpo.com/gateway:latest
docker run -d \
--name gankpo-gateway \
-p 8080:8080 \
-v $(pwd)/data:/var/lib/gankpo \
registry.gankpo.com/gateway:latestVérifier que la Gateway répond :
curl http://localhost:8080/health
# {"status":"ok","version":"..."}2. Générer une paire de clés d'éditeur
curl -X POST http://localhost:8080/v1/keys \
-H "Content-Type: application/json" \
-d '{"alg":"Ed25519","label":"demo"}'Réponse :
{
"kid": "k_01HN...",
"alg": "Ed25519",
"public_key": "MCowBQYDK2VwAy..."
}Conserver le kid retourné.
3. Obtenir un jeton d'API
curl -X POST http://localhost:8080/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"client_id":"demo","client_secret":"<votre-secret>"}'Le jeton renvoyé est un JWT RS256 signé par la Gateway. Il doit être inclus en header Authorization: Bearer <token> sur les appels suivants.
4. Sceller un document
curl -X POST http://localhost:8080/v1/documents/seal \
-H "Authorization: Bearer <token>" \
-F "file=@contrat.pdf" \
-F "kid=k_01HN..." \
-F "mime=application/pdf" \
-o contrat.gkpLe fichier contrat.gkp est maintenant un document scellé, vérifiable hors ligne par Gankpo Reader.
5. Vérifier depuis la Gateway
curl -X POST http://localhost:8080/v1/documents/verify \
-H "Authorization: Bearer <token>" \
-F "file=@contrat.gkp"Réponse en cas de succès :
{
"status": "valid",
"issuer": "k_01HN...",
"issued_at": "2026-04-20T10:15:00Z",
"payload_hash": "blake3:..."
}