Add DID support and improve login state handling

Introduces a 'did' field to SwarmUserProfile and related API routes to support decentralized identifiers. Refactors login flow to use soft navigation and synchronize AuthContext state, including new 'login' and enhanced 'unlockIdentity' methods for better user state management.
This commit is contained in:
Christopher
2026-01-27 19:10:07 -08:00
parent 4627917921
commit 33295b744e
5 changed files with 51 additions and 12 deletions
+2 -1
View File
@@ -271,7 +271,7 @@ async function deliverSwarmInteraction(
// SECURITY: Sign the payload with the node's private key
const { signPayload, getNodePrivateKey } = await import('./signature');
const privateKey = await getNodePrivateKey();
const signature = signPayload(payload, privateKey);
const signedPayload = { ...payload as object, signature };
@@ -331,6 +331,7 @@ export interface SwarmUserProfile {
botOwnerHandle?: string; // Handle of the bot's owner (e.g., "user" or "user@domain")
nodeDomain: string;
chatPublicKey?: string;
did?: string;
}
export interface SwarmUserPost {