An encrypted personal cloud built on the AT Protocol.

Fix Identity interface to use snake_case matching Rust serde output

The WASM bridge serializes Identity with serde's default snake_case
field names, but the TypeScript interface declared camelCase, causing
undefined field accesses at runtime. Aligned TS to match. [CL-203]

+12 -12
+4 -4
web/src/lib/storage-types.ts
··· 16 16 17 17 export interface Identity { 18 18 did: string; 19 - publicKey: string; // base64 X25519 20 - privateKey: string; // base64 X25519 21 - signingKey: string | null; // base64 Ed25519 22 - verifyKey: string | null; // base64 Ed25519 19 + public_key: string; // base64 X25519 20 + private_key: string; // base64 X25519 21 + signing_key: string | null; // base64 Ed25519 22 + verify_key: string | null; // base64 Ed25519 23 23 } 24 24 25 25 // Mirrors: opake-core Session enum (client/xrpc/mod.rs)
+2 -2
web/src/stores/auth.ts
··· 277 277 await publishPublicKey( 278 278 pending.pdsUrl, 279 279 did, 280 - identity.publicKey, 281 - identity.verifyKey, 280 + identity.public_key, 281 + identity.verify_key, 282 282 session.accessToken, 283 283 session.dpopKey, 284 284 session.dpopNonce,
+6 -6
web/tests/lib/indexeddb-storage.test.ts
··· 21 21 22 22 const testIdentity: Identity = { 23 23 did: "did:plc:alice", 24 - publicKey: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", 25 - privateKey: "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=", 26 - signingKey: "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI=", 27 - verifyKey: "AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM=", 24 + public_key: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", 25 + private_key: "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=", 26 + signing_key: "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI=", 27 + verify_key: "AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM=", 28 28 }; 29 29 30 30 const testSession: Session = { ··· 98 98 99 99 it("overwrite preserves latest", async () => { 100 100 await storage.saveIdentity("did:plc:alice", testIdentity); 101 - const updated: Identity = { ...testIdentity, publicKey: "NEWKEY=" }; 101 + const updated: Identity = { ...testIdentity, public_key: "NEWKEY=" }; 102 102 await storage.saveIdentity("did:plc:alice", updated); 103 103 const loaded = await storage.loadIdentity("did:plc:alice"); 104 - expect(loaded.publicKey).toBe("NEWKEY="); 104 + expect(loaded.public_key).toBe("NEWKEY="); 105 105 }); 106 106 107 107 it("different DIDs are independent", async () => {