Offline-first keys
Clients create the durable ML-DSA-44 account key locally. The relay sees the public key, account hash, and signatures, not the private key.
Offline-first keys for mesh-native sync
Device-created account keys, post-quantum proof of account authority, encrypted records, and remote events for native and web apps. Server-assisted today, built toward a mesh-native network.
Clients create the durable ML-DSA-44 account key locally. The relay sees the public key, account hash, and signatures, not the private key.
The durable account key is ML-DSA-44. Clients prove control with short-lived challenges before receiving operational bearer tokens.
Applications keep ownership of their data while the relay stores versions, opaque encrypted payloads, and shared projections.
WebSocket events wake clients when fresh sync data is available without exposing bearer tokens through URLs.
Signed pairing, local discovery, scoped replication, and trust-space names keep approved app data available through home and neighbor nodes.
Key creation starts offline. A device can create its account key before the first network request; first login registers the public key, and later logins prove control with fresh signatures.
Private records stay client encrypted. Daochi validates metadata and versions ciphertext, but plaintext and record encryption choices remain with clients and apps.
The post-quantum proof is account authority. Daochi uses ML-DSA-44 signatures for identity and account authorization; app manifest keys and token issuer keys are separate Ed25519 authorities.
Recommended private-record envelope, nonce rules, AAD, key rotation, and test-vector shape.
Shortest path from account key to login, signed app manifest, encrypted sync, and diagnostics.
Low-resource deployment targets, trust inspection checklist, and rollout checks for home or modest nodes.
Protocol v5 makes encrypted records the primary private-data surface while legacy typed rows remain available for compatibility. Protocol v1 through v5 remain valid through 2027-09-01.
/api/v1/appsLists registered apps, collection prefixes, visibility classes, and capabilities.
/api/v1/appsRegisters or updates an app when the admin token is set and X-Daochi-Admin matches it. X-Ksync-Admin remains accepted for compatibility.
/api/v1/sync/challenge?user_id=<sha256-public-key-hex>Issues a single-use 32-byte challenge nonce encoded as lowercase hex.
/api/v1/sync/loginVerifies the challenge signature and returns a cacheable bearer token plus server clock time.
/api/v1/sync/wsUpgrades to a WebSocket event stream authenticated with Authorization: Bearer <token>, or browser subprotocols daochi-sync-v1, bearer.<token>.
/api/v1/syncApplies typed local changes or stores an encrypted envelope, then returns remote changes newer than the requested server version.
/api/v1/sync/diagnosticsReturns bearer-authenticated sync state, table counts, compaction position, legacy client hints, and recent sync audit metadata.
/api/v1/node/pairing/invitesCreates a short-lived signed pairing payload with explicit replication scope.
/api/v1/node/pairing/acceptVerifies and consumes a pairing invite, then pins the peer identity and approved scope.
/api/v1/node/pairing/completeAuthenticates the accepting node back to the inviter and completes reciprocal trust.
/api/v1/node/peersLists paired nodes and their approved addresses and replication policies.
/api/v1/namespacesCreates a local trust-space authority for signed mesh-native names.
/api/v1/namespaces/claimsSigns or updates a name claim in a locally controlled trust space.
/api/v1/namespaces/resolveResolves a trust-space name to signed service endpoints.
/api/v1/node/mesh/exportExports policy-filtered signed app manifests, encrypted records, deletion tombstones, and names to an authenticated peer node.
/api/v1/node/mesh/importVerifies and imports policy-filtered app manifests, encrypted records, deletion tombstones, and names from an authenticated peer node.
/api/v1/tokens/issuerReturns the configured token issuer key.
/api/v1/tokens/productsLists configured token products and direct payment prices when direct purchases are enabled.
/api/v1/tokens/balanceReturns the bearer-authenticated account's token balance computed from signed ledger events.
/api/v1/tokens/activityReturns the account's Dew balance and full newest-first activity history across every app for the profile's Dew screen.
/api/v1/tokens/spendDebits tokens with app policy and idempotency enforcement.
/api/v1/tokens/giftsSends Dew to a friend; the debit and the friend's credit commit together.
/api/v1/rewardsLists the game rewards the node gives and their Dew.
/api/v1/rewardsClaims a game reward for the account; each reward credits an account once.
/api/v1/tokens/purchases/monero/invoicesCreates a bearer-authenticated invoice for a configured token product.
/api/v1/tokens/purchases/monero/invoices/{id}Returns invoice status and settles a confirmed payment against the authenticated account.
/api/v1/tokens/purchases/monero/addressReturns the authenticated account's permanent Monero purchase address.
/api/v1/tokens/purchases/monero/address/{recipient}Resolves an alias or public ID and returns the recipient's permanent Monero gift address.
/api/v1/tokens/purchases/monero/depositsReturns the authenticated account's detected and credited Monero deposits.
/api/v1/account/app-grantsLists or creates bearer-authenticated grants for sharing registered app collection prefixes across apps.
/api/v1/account/app-recordsReturns encrypted records from a granted collection prefix for cross-app use.
/api/v1/friendsBearer-authenticated friend requests, accepted friends, and app-neutral shared profile stats.
/api/v1/publicationsPublishes level collections and finds the newest public ones or the ones an author lets the caller see.
/api/v1/publications/{id}Fetches a visible publication with its document, or lets its author unpublish it.
/api/v1/account/deleteDeletes all remote data for the signed sync account without uploading the private key. It is kept on hold for 30 days, restorable with the same key, then deleted permanently.
/api/v1/accountLegacy signed deletion endpoint kept for older clients.
/api/v1/account/delete-with-keyDeletes all remote data for the sync account after verifying exported account key text, with the same 30-day hold.
daochi-sync-v1 <HTTP_METHOD> <HTTP_PATH> <sha256 hex of exact raw request body bytes> <challenge nonce hex>
Signed requests use X-Daochi-User, X-Daochi-Signature, and Content-Type: application/json. The older Ksync and Inbe signature headers remain accepted for shipped clients.