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.
Profile API
The Profile API lets you read and update authenticated user profiles. All profile endpoints require a JWT token.
Get My Profile
GET /profile/me
Returns the full profile of the currently authenticated user, including private fields (balance, privacy settings).
Authorization: Bearer <token>Get Profile by Address
GET /profile/<address>
Returns a user's profile by their Secra address. The caller only sees their own balance; other private fields are hidden per the target's privacy settings.
Update Profile
PUT /profile/update
Update one or more profile fields. All fields are optional — send only what you want to change.
| Field | Type | Description |
|---|---|---|
| username | string | 3–64 chars, letters/digits/_/-, globally unique |
| displayName | string | Display name (shown in chats) |
| avatar | string | URL or base64 image (pass null to remove) |
| banner | string | Profile banner URL or base64 |
| bio | string | About me text |
| frame | string | Item key, e.g. "frame:neon" |
| theme | string | Item key, e.g. "theme:cosmos" or "c:<uuid>" for community themes |
| deco | string | Chat background deco key, e.g. "deco:aurora" |
| emoji_status | string | Single emoji shown next to username |
| gift_status_id | string | ID of an owned mythic gift to display as status |
| privacy | object | Privacy flags — see table below |
Privacy fields (all booleans):
| Field | Default | Description |
|---|---|---|
| can_receive_messages | true | Allow others to message you |
| show_online | true | Show online presence indicator |
| show_balance | false | Show vDARKO balance on public profile |
| show_avatar | true | Show avatar publicly |
| show_banner | true | Show banner publicly |
| show_bio | true | Show bio publicly |
| allow_profile_view | true | Allow anyone to view your profile page |
| allow_dm_from_strangers | true | Allow DMs from people not in your chats |
| show_badge | true | Show role/verified badge |
Check Username Availability
POST /profile/check-username
Check if a username is available before attempting to change it.
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | required | Username to check |
Cosmetics & Nova Store
The cosmetics system powers the Nova Store — frames, themes, chat decorations, and community-created themes. Purchases use vDARKO, the in-app currency.
Get All Decorations
GET /decorations
Public endpoint. Returns all enabled decoration items grouped by kind, plus approved community themes and gifts.
theme to "c:<uuid>" via PUT /profile/update.My Cosmetics Inventory
GET /shop/cosmetics/me
Returns owned item keys, current vDARKO balance, and equipped items. Add ?include_catalog=true to also return full catalog with prices.
Cosmetics Catalog
GET /shop/cosmetics/catalog
Public catalog of all items with prices and availability status. No auth required.
Buy an Item
POST /shop/cosmetics/buy
Purchase a cosmetic item using vDARKO balance. The item is added to your inventory. You can optionally equip it immediately.
| Parameter | Type | Required | Description |
|---|---|---|---|
| item_key | string | required | Item key, e.g. "frame:neon" or "theme:c:<uuid>" |
| equip | boolean | optional | If true, equips the item immediately after purchase (default: false) |
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 |
| 400 | Invalid username | Username format invalid or too short/long |
| 400 | Username already taken | Username is in use by another account |
| 400 | Invalid avatar URL/data | Avatar URL rejected (unsafe or malformed) |
| 400 | already_owned | Cosmetic item is already in your inventory |
| 400 | insufficient_balance | Not enough vDARKO to purchase the item |
| 400 | item_not_found | Cosmetic item key does not exist in catalog |
| 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