<feed xmlns='http://www.w3.org/2005/Atom'>
<title>digiid-ts-demo/src/server/utils.ts, branch dev</title>
<subtitle>[MIRROR] Digi-ID TypeScript Integration Demo</subtitle>
<id>https://git.zelu.dev/digiid-ts-demo/atom?h=dev</id>
<link rel='self' href='https://git.zelu.dev/digiid-ts-demo/atom?h=dev'/>
<link rel='alternate' type='text/html' href='https://git.zelu.dev/digiid-ts-demo/'/>
<updated>2026-05-23T09:11:53Z</updated>
<entry>
<title>feat: harden demo security and add full test suite</title>
<updated>2026-05-23T09:11:53Z</updated>
<author>
<name>Pawel Zelawski</name>
<email>pawel@pzelawski.com</email>
</author>
<published>2026-05-23T09:11:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zelu.dev/digiid-ts-demo/commit/?id=04d93d7d235d328ef40c9dae4e1f56dc8a5e893f'/>
<id>urn:sha1:04d93d7d235d328ef40c9dae4e1f56dc8a5e893f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>chore: upgrade digiid-ts to v3 and stabilize dev/build scripts</title>
<updated>2026-05-23T08:33:53Z</updated>
<author>
<name>Pawel Zelawski</name>
<email>pawel@pzelawski.com</email>
</author>
<published>2026-05-23T08:33:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zelu.dev/digiid-ts-demo/commit/?id=376feecb280c28504788c9677c6cb3cc455f00b6'/>
<id>urn:sha1:376feecb280c28504788c9677c6cb3cc455f00b6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat(server): implement basic backend API</title>
<updated>2025-04-10T08:50:57Z</updated>
<author>
<name>Pawel Zelawski</name>
<email>pawel.zelawski@outlook.com</email>
</author>
<published>2025-04-10T08:50:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zelu.dev/digiid-ts-demo/commit/?id=326caf949ec8622c04b0e3352c5eac5370f161e4'/>
<id>urn:sha1:326caf949ec8622c04b0e3352c5eac5370f161e4</id>
<content type='text'>
- Added basic Express server setup in `src/server/main.ts`.
- Configured `dotenv` to load environment variables.
- Implemented in-memory storage for session state (pending, success, failed).
- Created `/api/digiid/start` endpoint:
    - Generates session ID and nonce.
    - Constructs callback URL from `PUBLIC_URL`.
    - Determines `unsecure` flag based on URL scheme.
    - Stores initial session state.
    - Generates QR code data URL.
    - Returns `sessionId` and `qrCodeDataUrl`.
    - Includes placeholder for `digiidTs.generateDigiIDUri`.
- Created `/api/digiid/callback` endpoint:
    - Receives address, uri, signature from DigiID app.
    - Parses nonce from received URI.
    - Looks up session by nonce.
    - Reconstructs expected callback URL.
    - Updates session state based on placeholder verification.
    - Includes placeholder for `digiidTs.verifyDigiIDCallback`.
    - Responds 200 OK as per DigiID protocol.
- Created `/api/digiid/status/:sessionId` endpoint:
    - Retrieves and returns session status, address, and error.
- Added address type helper `getDigiByteAddressType` in `src/server/utils.ts` (with placeholder logic for DGA).
- Added `dev:backend` script to `package.json` using `nodemon` and `ts-node/esm`.
- Added `"type": "module"` to `package.json`.
- Installed `@types/dotenv`.
- (Note: Outstanding TypeScript linter errors related to async Express handlers require further investigation).
</content>
</entry>
</feed>
