fix: WIP: update did_generator.ts to use registration table

Changes:
- Update SQL query to use registration table instead of accounts
- Add proper column names for registration table schema
- Add issuanceDate sorting for latest admin DID
- Improve error messages for database queries
- Add TypeScript types for database row results

This fixes DID generation by using the correct table schema
from the endorser database.
This commit is contained in:
Matthew Raymer
2025-03-03 13:21:51 +00:00
parent 053306217e
commit 722f4132ce
5 changed files with 916 additions and 137 deletions

View File

@@ -29,7 +29,9 @@
"pywebview:build": "vite build --config vite.config.pywebview.mts && .venv/bin/python src/pywebview/main.py",
"pywebview:package-linux": "vite build --mode pywebview --config vite.config.pywebview.mts && .venv/bin/python -m PyInstaller --name TimeSafari --add-data 'dist:www' src/pywebview/main.py",
"pywebview:package-win": "vite build --mode pywebview --config vite.config.pywebview.mts && .venv/Scripts/python -m PyInstaller --name TimeSafari --add-data 'dist;www' src/pywebview/main.py",
"pywebview:package-mac": "vite build --mode pywebview --config vite.config.pywebview.mts && .venv/bin/python -m PyInstaller --name TimeSafari --add-data 'dist:www' src/pywebview/main.py"
"pywebview:package-mac": "vite build --mode pywebview --config vite.config.pywebview.mts && .venv/bin/python -m PyInstaller --name TimeSafari --add-data 'dist:www' src/pywebview/main.py",
"build:did-generator": "tsc -p test-scripts/tsconfig.json",
"generate-did": "node test-scripts/dist/did_generator.js --db-path ../endorser-ch-test-local.sqlite3"
},
"dependencies": {
"@capacitor/android": "^6.2.0",
@@ -91,6 +93,7 @@
"reflect-metadata": "^0.1.14",
"register-service-worker": "^1.7.2",
"simple-vue-camera": "^1.1.3",
"sqlite3": "^5.1.7",
"stream-browserify": "^3.0.0",
"three": "^0.156.1",
"ua-parser-js": "^1.0.37",
@@ -112,6 +115,7 @@
"@types/node": "^20.14.11",
"@types/node-fetch": "^2.6.12",
"@types/ramda": "^0.29.11",
"@types/sqlite3": "^3.1.11",
"@types/three": "^0.155.1",
"@types/ua-parser-js": "^0.7.39",
"@typescript-eslint/eslint-plugin": "^6.21.0",