Secra API
The Secra API provides cryptographic identity and authentication services for Arkonova Network. It implements a challenge-response authentication flow using Ed25519 signatures, allowing any application to verify user identity without passwords.
https://arkonova.network/api/v2/secraAuthentication
Most endpoints require no authentication themselves — they are used to establish authentication. Once authenticated, you receive a JWT token to use in subsequent requests to other APIs.
For endpoints that do require auth, pass the JWT token in the Authorization header:
Authentication Flow
Secra uses a 3-step challenge-response flow. No passwords are ever transmitted:
- Request a challenge — server returns a unique one-time string
- Sign the challenge — user signs it with their Ed25519 private key (via extension or SDK)
- Verify the signature — server verifies, returns a JWT token on success
1. Get Challenge
POST /auth/challenge
Request a one-time challenge string for the given address.
| Parameter | Type | Required | Description |
|---|---|---|---|
| address | string | required | The user's Secra address (Ed25519 public key fingerprint) |
2. Verify Signature
POST /auth/verify
Submit the signed challenge for server-side verification. Returns a JWT token on success.
| Parameter | Type | Required | Description |
|---|---|---|---|
| address | string | required | The user's Secra address |
| challenge | string | required | The challenge string received from /auth/challenge |
| signature | string | required | Hex-encoded Ed25519 signature of the challenge |
| publicKey | string | required | Hex-encoded Ed25519 public key |
3. Set Flask Session
POST /auth/session
Persist the JWT token as a server-side session cookie. Call this after a successful verify to enable session-based authentication across page loads.
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | required | JWT token received from /auth/verify |
Signing Data (Client-Side)
The Secra extension handles signing via postMessage. Here's the full client-side flow:
About Ed25519 Keys
Secra uses Ed25519 (Edwards-curve Digital Signature Algorithm) for all cryptographic operations. Ed25519 provides:
- 128-bit security level
- Deterministic signatures (no random nonce needed)
- Fast key generation and signing (~64-byte signatures)
- Resistance to side-channel attacks
Get User Info
GET /user/<address>
Retrieve public information about a registered Secra user. No authentication required.
Error Codes
All errors return JSON with an error field and an appropriate HTTP status:
| Status | Error | Meaning |
|---|---|---|
| 400 | missing_fields | Required parameters are absent |
| 400 | invalid_challenge | Challenge is expired or already used |
| 400 | invalid_signature | Ed25519 signature verification failed |
| 401 | unauthorized | Invalid or missing JWT token |
| 404 | user_not_found | Address is not registered in the system |
| 429 | rate_limited | Too many requests — slow down |
| 500 | server_error | Internal server error |
Need help integrating Secra? Join our developer community in Quanta.
Open Quanta Messenger Back to Wiki