@swal/edge-mesh 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +128 -0
- package/NOTICE +37 -0
- package/README.md +470 -2
- package/dist/adapters/gpu-agent/index.d.ts +61 -0
- package/dist/adapters/gpu-agent/index.d.ts.map +1 -0
- package/dist/adapters/gpu-agent/index.js +364 -0
- package/dist/adapters/gpu-agent/index.js.map +1 -0
- package/dist/adapters/maloca-salud/citas-distribuidas.d.ts +19 -0
- package/dist/adapters/maloca-salud/citas-distribuidas.d.ts.map +1 -0
- package/dist/adapters/maloca-salud/citas-distribuidas.js +51 -0
- package/dist/adapters/maloca-salud/citas-distribuidas.js.map +1 -0
- package/dist/adapters/maloca-salud/eps-bridge.d.ts +15 -0
- package/dist/adapters/maloca-salud/eps-bridge.d.ts.map +1 -0
- package/dist/adapters/maloca-salud/eps-bridge.js +27 -0
- package/dist/adapters/maloca-salud/eps-bridge.js.map +1 -0
- package/dist/adapters/maloca-salud/patient-profile.d.ts +20 -0
- package/dist/adapters/maloca-salud/patient-profile.d.ts.map +1 -0
- package/dist/adapters/maloca-salud/patient-profile.js +36 -0
- package/dist/adapters/maloca-salud/patient-profile.js.map +1 -0
- package/dist/adapters/maloca-salud/types.d.ts +40 -0
- package/dist/adapters/maloca-salud/types.d.ts.map +1 -0
- package/dist/adapters/maloca-salud/types.js +2 -0
- package/dist/adapters/maloca-salud/types.js.map +1 -0
- package/dist/adapters/maloca-veeduria/contract-bridge.d.ts +31 -0
- package/dist/adapters/maloca-veeduria/contract-bridge.d.ts.map +1 -0
- package/dist/adapters/maloca-veeduria/contract-bridge.js +103 -0
- package/dist/adapters/maloca-veeduria/contract-bridge.js.map +1 -0
- package/dist/adapters/maloca-veeduria/evidentia-veeduria.d.ts +14 -0
- package/dist/adapters/maloca-veeduria/evidentia-veeduria.d.ts.map +1 -0
- package/dist/adapters/maloca-veeduria/evidentia-veeduria.js +40 -0
- package/dist/adapters/maloca-veeduria/evidentia-veeduria.js.map +1 -0
- package/dist/adapters/maloca-veeduria/licitante-profile.d.ts +21 -0
- package/dist/adapters/maloca-veeduria/licitante-profile.d.ts.map +1 -0
- package/dist/adapters/maloca-veeduria/licitante-profile.js +58 -0
- package/dist/adapters/maloca-veeduria/licitante-profile.js.map +1 -0
- package/dist/adapters/maloca-veeduria/types.d.ts +30 -0
- package/dist/adapters/maloca-veeduria/types.d.ts.map +1 -0
- package/dist/adapters/maloca-veeduria/types.js +2 -0
- package/dist/adapters/maloca-veeduria/types.js.map +1 -0
- package/dist/adapters/maloca-xavier/agent-profile.d.ts +32 -0
- package/dist/adapters/maloca-xavier/agent-profile.d.ts.map +1 -0
- package/dist/adapters/maloca-xavier/agent-profile.js +56 -0
- package/dist/adapters/maloca-xavier/agent-profile.js.map +1 -0
- package/dist/adapters/maloca-xavier/codegraph-bridge.d.ts +27 -0
- package/dist/adapters/maloca-xavier/codegraph-bridge.d.ts.map +1 -0
- package/dist/adapters/maloca-xavier/codegraph-bridge.js +58 -0
- package/dist/adapters/maloca-xavier/codegraph-bridge.js.map +1 -0
- package/dist/adapters/maloca-xavier/llm-router.d.ts +25 -0
- package/dist/adapters/maloca-xavier/llm-router.d.ts.map +1 -0
- package/dist/adapters/maloca-xavier/llm-router.js +58 -0
- package/dist/adapters/maloca-xavier/llm-router.js.map +1 -0
- package/dist/authz/index.d.ts +81 -0
- package/dist/authz/index.d.ts.map +1 -0
- package/dist/authz/index.js +271 -0
- package/dist/authz/index.js.map +1 -0
- package/dist/chat/index.d.ts +138 -0
- package/dist/chat/index.d.ts.map +1 -0
- package/dist/chat/index.js +394 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/offline-queue.d.ts +32 -0
- package/dist/chat/offline-queue.d.ts.map +1 -0
- package/dist/chat/offline-queue.js +93 -0
- package/dist/chat/offline-queue.js.map +1 -0
- package/dist/core/DefaultEdgeMeshNode.d.ts +17 -0
- package/dist/core/DefaultEdgeMeshNode.d.ts.map +1 -0
- package/dist/core/DefaultEdgeMeshNode.js +57 -0
- package/dist/core/DefaultEdgeMeshNode.js.map +1 -0
- package/dist/core/node.d.ts +26 -0
- package/dist/core/node.d.ts.map +1 -0
- package/dist/core/node.js +16 -0
- package/dist/core/node.js.map +1 -0
- package/dist/edge-mesh.d.ts +139 -0
- package/dist/edge-mesh.d.ts.map +1 -0
- package/dist/edge-mesh.js +1146 -0
- package/dist/edge-mesh.js.map +1 -0
- package/dist/gos/GosBridge.d.ts +49 -0
- package/dist/gos/GosBridge.d.ts.map +1 -0
- package/dist/gos/GosBridge.js +133 -0
- package/dist/gos/GosBridge.js.map +1 -0
- package/dist/governance/authority.d.ts +44 -0
- package/dist/governance/authority.d.ts.map +1 -0
- package/dist/governance/authority.js +123 -0
- package/dist/governance/authority.js.map +1 -0
- package/dist/governance/index.d.ts +66 -0
- package/dist/governance/index.d.ts.map +1 -0
- package/dist/governance/index.js +210 -0
- package/dist/governance/index.js.map +1 -0
- package/dist/governance/merge.d.ts +31 -0
- package/dist/governance/merge.d.ts.map +1 -0
- package/dist/governance/merge.js +167 -0
- package/dist/governance/merge.js.map +1 -0
- package/dist/identity/index.d.ts +199 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +415 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -0
- package/dist/maloca/backoffice.d.ts +31 -0
- package/dist/maloca/backoffice.d.ts.map +1 -0
- package/dist/maloca/backoffice.js +40 -0
- package/dist/maloca/backoffice.js.map +1 -0
- package/dist/maloca/event-bus.d.ts +60 -0
- package/dist/maloca/event-bus.d.ts.map +1 -0
- package/dist/maloca/event-bus.js +175 -0
- package/dist/maloca/event-bus.js.map +1 -0
- package/dist/maloca/evidentia.d.ts +136 -0
- package/dist/maloca/evidentia.d.ts.map +1 -0
- package/dist/maloca/evidentia.js +447 -0
- package/dist/maloca/evidentia.js.map +1 -0
- package/dist/maloca/gateway/api.d.ts +146 -0
- package/dist/maloca/gateway/api.d.ts.map +1 -0
- package/dist/maloca/gateway/api.js +228 -0
- package/dist/maloca/gateway/api.js.map +1 -0
- package/dist/maloca/gateway/auth.d.ts +20 -0
- package/dist/maloca/gateway/auth.d.ts.map +1 -0
- package/dist/maloca/gateway/auth.js +115 -0
- package/dist/maloca/gateway/auth.js.map +1 -0
- package/dist/maloca/gateway/dashboard.d.ts +42 -0
- package/dist/maloca/gateway/dashboard.d.ts.map +1 -0
- package/dist/maloca/gateway/dashboard.js +67 -0
- package/dist/maloca/gateway/dashboard.js.map +1 -0
- package/dist/maloca/gateway/websocket.d.ts +34 -0
- package/dist/maloca/gateway/websocket.d.ts.map +1 -0
- package/dist/maloca/gateway/websocket.js +71 -0
- package/dist/maloca/gateway/websocket.js.map +1 -0
- package/dist/maloca/karma.d.ts +165 -0
- package/dist/maloca/karma.d.ts.map +1 -0
- package/dist/maloca/karma.js +307 -0
- package/dist/maloca/karma.js.map +1 -0
- package/dist/maloca/kernel.d.ts +20 -0
- package/dist/maloca/kernel.d.ts.map +1 -0
- package/dist/maloca/kernel.js +76 -0
- package/dist/maloca/kernel.js.map +1 -0
- package/dist/maloca/metadata.d.ts +30 -0
- package/dist/maloca/metadata.d.ts.map +1 -0
- package/dist/maloca/metadata.js +80 -0
- package/dist/maloca/metadata.js.map +1 -0
- package/dist/maloca/perfil.d.ts +57 -0
- package/dist/maloca/perfil.d.ts.map +1 -0
- package/dist/maloca/perfil.js +113 -0
- package/dist/maloca/perfil.js.map +1 -0
- package/dist/maloca/plugin-registry.d.ts +27 -0
- package/dist/maloca/plugin-registry.d.ts.map +1 -0
- package/dist/maloca/plugin-registry.js +76 -0
- package/dist/maloca/plugin-registry.js.map +1 -0
- package/dist/maloca/polygon-bridge.d.ts +63 -0
- package/dist/maloca/polygon-bridge.d.ts.map +1 -0
- package/dist/maloca/polygon-bridge.js +198 -0
- package/dist/maloca/polygon-bridge.js.map +1 -0
- package/dist/maloca/types.d.ts +44 -0
- package/dist/maloca/types.d.ts.map +1 -0
- package/dist/maloca/types.js +2 -0
- package/dist/maloca/types.js.map +1 -0
- package/dist/medico/aval.d.ts +149 -0
- package/dist/medico/aval.d.ts.map +1 -0
- package/dist/medico/aval.js +281 -0
- package/dist/medico/aval.js.map +1 -0
- package/dist/medico/canonica.d.ts +96 -0
- package/dist/medico/canonica.d.ts.map +1 -0
- package/dist/medico/canonica.js +148 -0
- package/dist/medico/canonica.js.map +1 -0
- package/dist/medico/credencial.d.ts +160 -0
- package/dist/medico/credencial.d.ts.map +1 -0
- package/dist/medico/credencial.js +240 -0
- package/dist/medico/credencial.js.map +1 -0
- package/dist/medico/index.d.ts +36 -0
- package/dist/medico/index.d.ts.map +1 -0
- package/dist/medico/index.js +39 -0
- package/dist/medico/index.js.map +1 -0
- package/dist/medico/malla.d.ts +218 -0
- package/dist/medico/malla.d.ts.map +1 -0
- package/dist/medico/malla.js +347 -0
- package/dist/medico/malla.js.map +1 -0
- package/dist/medico/registro-profesional.d.ts +84 -0
- package/dist/medico/registro-profesional.d.ts.map +1 -0
- package/dist/medico/registro-profesional.js +135 -0
- package/dist/medico/registro-profesional.js.map +1 -0
- package/dist/medico/registro.d.ts +149 -0
- package/dist/medico/registro.d.ts.map +1 -0
- package/dist/medico/registro.js +173 -0
- package/dist/medico/registro.js.map +1 -0
- package/dist/medico/types.d.ts +287 -0
- package/dist/medico/types.d.ts.map +1 -0
- package/dist/medico/types.js +135 -0
- package/dist/medico/types.js.map +1 -0
- package/dist/medico/verificacion-registro.d.ts +300 -0
- package/dist/medico/verificacion-registro.d.ts.map +1 -0
- package/dist/medico/verificacion-registro.js +319 -0
- package/dist/medico/verificacion-registro.js.map +1 -0
- package/dist/mesh/index.d.ts +457 -0
- package/dist/mesh/index.d.ts.map +1 -0
- package/dist/mesh/index.js +929 -0
- package/dist/mesh/index.js.map +1 -0
- package/dist/namespaces/encrypted-plugin.d.ts +56 -0
- package/dist/namespaces/encrypted-plugin.d.ts.map +1 -0
- package/dist/namespaces/encrypted-plugin.js +173 -0
- package/dist/namespaces/encrypted-plugin.js.map +1 -0
- package/dist/namespaces/index.d.ts +52 -0
- package/dist/namespaces/index.d.ts.map +1 -0
- package/dist/namespaces/index.js +134 -0
- package/dist/namespaces/index.js.map +1 -0
- package/dist/namespaces/ivn-proofs.d.ts +54 -0
- package/dist/namespaces/ivn-proofs.d.ts.map +1 -0
- package/dist/namespaces/ivn-proofs.js +162 -0
- package/dist/namespaces/ivn-proofs.js.map +1 -0
- package/dist/namespaces/offers-gossip.d.ts +95 -0
- package/dist/namespaces/offers-gossip.d.ts.map +1 -0
- package/dist/namespaces/offers-gossip.js +213 -0
- package/dist/namespaces/offers-gossip.js.map +1 -0
- package/dist/node-memory/idb-store.d.ts +22 -0
- package/dist/node-memory/idb-store.d.ts.map +1 -0
- package/dist/node-memory/idb-store.js +157 -0
- package/dist/node-memory/idb-store.js.map +1 -0
- package/dist/node-memory/index.d.ts +14 -0
- package/dist/node-memory/index.d.ts.map +1 -0
- package/dist/node-memory/index.js +159 -0
- package/dist/node-memory/index.js.map +1 -0
- package/dist/node-memory/sync-flush.d.ts +11 -0
- package/dist/node-memory/sync-flush.d.ts.map +1 -0
- package/dist/node-memory/sync-flush.js +37 -0
- package/dist/node-memory/sync-flush.js.map +1 -0
- package/dist/node-memory/types.d.ts +34 -0
- package/dist/node-memory/types.d.ts.map +1 -0
- package/dist/node-memory/types.js +2 -0
- package/dist/node-memory/types.js.map +1 -0
- package/dist/node-memory/xavier-store.d.ts +12 -0
- package/dist/node-memory/xavier-store.d.ts.map +1 -0
- package/dist/node-memory/xavier-store.js +75 -0
- package/dist/node-memory/xavier-store.js.map +1 -0
- package/dist/op-log/index.d.ts +49 -0
- package/dist/op-log/index.d.ts.map +1 -0
- package/dist/op-log/index.js +190 -0
- package/dist/op-log/index.js.map +1 -0
- package/dist/presence/health.d.ts +54 -0
- package/dist/presence/health.d.ts.map +1 -0
- package/dist/presence/health.js +139 -0
- package/dist/presence/health.js.map +1 -0
- package/dist/presence/index.d.ts +85 -0
- package/dist/presence/index.d.ts.map +1 -0
- package/dist/presence/index.js +255 -0
- package/dist/presence/index.js.map +1 -0
- package/dist/presence/peer-health.d.ts +40 -0
- package/dist/presence/peer-health.d.ts.map +1 -0
- package/dist/presence/peer-health.js +118 -0
- package/dist/presence/peer-health.js.map +1 -0
- package/dist/protocol/canonical.d.ts +10 -0
- package/dist/protocol/canonical.d.ts.map +1 -0
- package/dist/protocol/canonical.js +32 -0
- package/dist/protocol/canonical.js.map +1 -0
- package/dist/protocol/crypto.d.ts +299 -0
- package/dist/protocol/crypto.d.ts.map +1 -0
- package/dist/protocol/crypto.js +739 -0
- package/dist/protocol/crypto.js.map +1 -0
- package/dist/protocol/index.d.ts +30 -0
- package/dist/protocol/index.d.ts.map +1 -0
- package/dist/protocol/index.js +116 -0
- package/dist/protocol/index.js.map +1 -0
- package/dist/protocol/utils.d.ts +5 -0
- package/dist/protocol/utils.d.ts.map +1 -0
- package/dist/protocol/utils.js +27 -0
- package/dist/protocol/utils.js.map +1 -0
- package/dist/salones/manager.d.ts +100 -0
- package/dist/salones/manager.d.ts.map +1 -0
- package/dist/salones/manager.js +240 -0
- package/dist/salones/manager.js.map +1 -0
- package/dist/security/rate-limiter.d.ts +13 -0
- package/dist/security/rate-limiter.d.ts.map +1 -0
- package/dist/security/rate-limiter.js +32 -0
- package/dist/security/rate-limiter.js.map +1 -0
- package/dist/snapshot/index.d.ts +90 -0
- package/dist/snapshot/index.d.ts.map +1 -0
- package/dist/snapshot/index.js +189 -0
- package/dist/snapshot/index.js.map +1 -0
- package/dist/storage/index.d.ts +49 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +192 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/optimizer.d.ts +28 -0
- package/dist/storage/optimizer.d.ts.map +1 -0
- package/dist/storage/optimizer.js +71 -0
- package/dist/storage/optimizer.js.map +1 -0
- package/dist/storage/ydoc-persistence.d.ts +27 -0
- package/dist/storage/ydoc-persistence.d.ts.map +1 -0
- package/dist/storage/ydoc-persistence.js +128 -0
- package/dist/storage/ydoc-persistence.js.map +1 -0
- package/dist/sync/ChunkSyncManager.d.ts +41 -0
- package/dist/sync/ChunkSyncManager.d.ts.map +1 -0
- package/dist/sync/ChunkSyncManager.js +115 -0
- package/dist/sync/ChunkSyncManager.js.map +1 -0
- package/dist/sync/conflict-resolver.d.ts +33 -0
- package/dist/sync/conflict-resolver.d.ts.map +1 -0
- package/dist/sync/conflict-resolver.js +54 -0
- package/dist/sync/conflict-resolver.js.map +1 -0
- package/dist/sync/engine.d.ts +168 -0
- package/dist/sync/engine.d.ts.map +1 -0
- package/dist/sync/engine.js +315 -0
- package/dist/sync/engine.js.map +1 -0
- package/dist/sync/index.d.ts +3 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +3 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/transport/TorTransportAdapter.d.ts +70 -0
- package/dist/transport/TorTransportAdapter.d.ts.map +1 -0
- package/dist/transport/TorTransportAdapter.js +192 -0
- package/dist/transport/TorTransportAdapter.js.map +1 -0
- package/dist/transport/memory.d.ts +31 -0
- package/dist/transport/memory.d.ts.map +1 -0
- package/dist/transport/memory.js +114 -0
- package/dist/transport/memory.js.map +1 -0
- package/dist/transport/peerjs.d.ts +52 -0
- package/dist/transport/peerjs.d.ts.map +1 -0
- package/dist/transport/peerjs.js +336 -0
- package/dist/transport/peerjs.js.map +1 -0
- package/dist/transport/pqc-handshake.d.ts +72 -0
- package/dist/transport/pqc-handshake.d.ts.map +1 -0
- package/dist/transport/pqc-handshake.js +129 -0
- package/dist/transport/pqc-handshake.js.map +1 -0
- package/dist/transport/relay-config.d.ts +11 -0
- package/dist/transport/relay-config.d.ts.map +1 -0
- package/dist/transport/relay-config.js +48 -0
- package/dist/transport/relay-config.js.map +1 -0
- package/dist/transport/relay-server.d.ts +37 -0
- package/dist/transport/relay-server.d.ts.map +1 -0
- package/dist/transport/relay-server.js +246 -0
- package/dist/transport/relay-server.js.map +1 -0
- package/dist/transport/tor.d.ts +47 -0
- package/dist/transport/tor.d.ts.map +1 -0
- package/dist/transport/tor.js +158 -0
- package/dist/transport/tor.js.map +1 -0
- package/dist/transport/types.d.ts +34 -0
- package/dist/transport/types.d.ts.map +1 -0
- package/dist/transport/types.js +2 -0
- package/dist/transport/types.js.map +1 -0
- package/dist/types/index.d.ts +293 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +73 -0
- package/dist/types/index.js.map +1 -0
- package/dist/web/admission.d.ts +24 -0
- package/dist/web/admission.d.ts.map +1 -0
- package/dist/web/admission.js +41 -0
- package/dist/web/admission.js.map +1 -0
- package/dist/web/crypto.d.ts +18 -0
- package/dist/web/crypto.d.ts.map +1 -0
- package/dist/web/crypto.js +78 -0
- package/dist/web/crypto.js.map +1 -0
- package/dist/web/exchange.d.ts +23 -0
- package/dist/web/exchange.d.ts.map +1 -0
- package/dist/web/exchange.js +54 -0
- package/dist/web/exchange.js.map +1 -0
- package/dist/web/fragment.d.ts +58 -0
- package/dist/web/fragment.d.ts.map +1 -0
- package/dist/web/fragment.js +198 -0
- package/dist/web/fragment.js.map +1 -0
- package/dist/web/index.d.ts +25 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +14 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/merge/index.d.ts +104 -0
- package/dist/web/merge/index.d.ts.map +1 -0
- package/dist/web/merge/index.js +236 -0
- package/dist/web/merge/index.js.map +1 -0
- package/dist/web/oplog/hlc.d.ts +19 -0
- package/dist/web/oplog/hlc.d.ts.map +1 -0
- package/dist/web/oplog/hlc.js +39 -0
- package/dist/web/oplog/hlc.js.map +1 -0
- package/dist/web/oplog/index.d.ts +10 -0
- package/dist/web/oplog/index.d.ts.map +1 -0
- package/dist/web/oplog/index.js +6 -0
- package/dist/web/oplog/index.js.map +1 -0
- package/dist/web/oplog/log.d.ts +182 -0
- package/dist/web/oplog/log.d.ts.map +1 -0
- package/dist/web/oplog/log.js +693 -0
- package/dist/web/oplog/log.js.map +1 -0
- package/dist/web/oplog/store.d.ts +40 -0
- package/dist/web/oplog/store.d.ts.map +1 -0
- package/dist/web/oplog/store.js +85 -0
- package/dist/web/oplog/store.js.map +1 -0
- package/dist/web/oplog/sync.d.ts +54 -0
- package/dist/web/oplog/sync.d.ts.map +1 -0
- package/dist/web/oplog/sync.js +162 -0
- package/dist/web/oplog/sync.js.map +1 -0
- package/dist/web/oplog/types.d.ts +119 -0
- package/dist/web/oplog/types.d.ts.map +1 -0
- package/dist/web/oplog/types.js +2 -0
- package/dist/web/oplog/types.js.map +1 -0
- package/dist/web/pairing.d.ts +186 -0
- package/dist/web/pairing.d.ts.map +1 -0
- package/dist/web/pairing.js +395 -0
- package/dist/web/pairing.js.map +1 -0
- package/dist/web/pq.d.ts +36 -0
- package/dist/web/pq.d.ts.map +1 -0
- package/dist/web/pq.js +59 -0
- package/dist/web/pq.js.map +1 -0
- package/dist/web/provider.d.ts +188 -0
- package/dist/web/provider.d.ts.map +1 -0
- package/dist/web/provider.js +2042 -0
- package/dist/web/provider.js.map +1 -0
- package/dist/web/rooms.d.ts +20 -0
- package/dist/web/rooms.d.ts.map +1 -0
- package/dist/web/rooms.js +51 -0
- package/dist/web/rooms.js.map +1 -0
- package/dist/web/rotation.d.ts +73 -0
- package/dist/web/rotation.d.ts.map +1 -0
- package/dist/web/rotation.js +130 -0
- package/dist/web/rotation.js.map +1 -0
- package/dist/web/secstate.d.ts +213 -0
- package/dist/web/secstate.d.ts.map +1 -0
- package/dist/web/secstate.js +789 -0
- package/dist/web/secstate.js.map +1 -0
- package/dist/web/store.d.ts +9 -0
- package/dist/web/store.d.ts.map +1 -0
- package/dist/web/store.js +32 -0
- package/dist/web/store.js.map +1 -0
- package/dist/web/transports/loopback.d.ts +11 -0
- package/dist/web/transports/loopback.d.ts.map +1 -0
- package/dist/web/transports/loopback.js +97 -0
- package/dist/web/transports/loopback.js.map +1 -0
- package/dist/web/transports/qr-sdp.d.ts +27 -0
- package/dist/web/transports/qr-sdp.d.ts.map +1 -0
- package/dist/web/transports/qr-sdp.js +131 -0
- package/dist/web/transports/qr-sdp.js.map +1 -0
- package/dist/web/transports/ws.d.ts +12 -0
- package/dist/web/transports/ws.d.ts.map +1 -0
- package/dist/web/transports/ws.js +139 -0
- package/dist/web/transports/ws.js.map +1 -0
- package/dist/web/trust/canonical.d.ts +8 -0
- package/dist/web/trust/canonical.d.ts.map +1 -0
- package/dist/web/trust/canonical.js +27 -0
- package/dist/web/trust/canonical.js.map +1 -0
- package/dist/web/trust/docs.d.ts +51 -0
- package/dist/web/trust/docs.d.ts.map +1 -0
- package/dist/web/trust/docs.js +170 -0
- package/dist/web/trust/docs.js.map +1 -0
- package/dist/web/trust/index.d.ts +10 -0
- package/dist/web/trust/index.d.ts.map +1 -0
- package/dist/web/trust/index.js +7 -0
- package/dist/web/trust/index.js.map +1 -0
- package/dist/web/trust/keys.d.ts +37 -0
- package/dist/web/trust/keys.d.ts.map +1 -0
- package/dist/web/trust/keys.js +75 -0
- package/dist/web/trust/keys.js.map +1 -0
- package/dist/web/trust/store.d.ts +150 -0
- package/dist/web/trust/store.d.ts.map +1 -0
- package/dist/web/trust/store.js +587 -0
- package/dist/web/trust/store.js.map +1 -0
- package/dist/web/trust/types.d.ts +134 -0
- package/dist/web/trust/types.d.ts.map +1 -0
- package/dist/web/trust/types.js +4 -0
- package/dist/web/trust/types.js.map +1 -0
- package/dist/web/types.d.ts +115 -0
- package/dist/web/types.d.ts.map +1 -0
- package/dist/web/types.js +2 -0
- package/dist/web/types.js.map +1 -0
- package/dist/web/util.d.ts +12 -0
- package/dist/web/util.d.ts.map +1 -0
- package/dist/web/util.js +54 -0
- package/dist/web/util.js.map +1 -0
- package/dist/web/webrtc.d.ts +35 -0
- package/dist/web/webrtc.d.ts.map +1 -0
- package/dist/web/webrtc.js +304 -0
- package/dist/web/webrtc.js.map +1 -0
- package/package.json +139 -4
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data model for the medical layer — types only.
|
|
3
|
+
*
|
|
4
|
+
* This file is the code transcription of
|
|
5
|
+
* `packages/edge-mesh/docs/medico/modelo-datos.md`. Field names here are the
|
|
6
|
+
* document's names, deliberately: `autoridad`, `emitidoEn`, `vigenteHasta`,
|
|
7
|
+
* `idLicencia`, `tipo`, `objetoAval`. Do not rename them to something more
|
|
8
|
+
* descriptive; the design doc is the specification and the wire format must
|
|
9
|
+
* match it byte for byte once signatures exist.
|
|
10
|
+
*
|
|
11
|
+
* ─── WHY THIS IS NOT A "user" OBJECT ────────────────────────────────────────
|
|
12
|
+
*
|
|
13
|
+
* The most common design error in this kind of system is collapsing four layers
|
|
14
|
+
* into one. They are kept apart here because they prove different things:
|
|
15
|
+
*
|
|
16
|
+
* layer 0 `NodoId` I control a key mathematics
|
|
17
|
+
* layer 1 `CredencialMedica` this human holds a license the state
|
|
18
|
+
* layer 2 `Aval` I checked layer 1 and stand behind it a peer
|
|
19
|
+
* layer 3 `Karma` peers repeatedly endorsed me the sum
|
|
20
|
+
*
|
|
21
|
+
* Access is granted by layer 1 + layer 2, never by layer 0 (worthless as merit)
|
|
22
|
+
* and never by layer 3 (mintable by anyone willing to spend a few signatures).
|
|
23
|
+
* See `docs/medico/reglas-red.md` §1.
|
|
24
|
+
*
|
|
25
|
+
* ─── THE TWO DEFECTS THIS SHAPE EXISTS TO CLOSE ─────────────────────────────
|
|
26
|
+
*
|
|
27
|
+
* 1. `unknown` IS NOT `valid`. The OrionHealth pattern
|
|
28
|
+
* (`apps/OrionHealth/lib/features/doctor_verification/domain/services/license_verifier.dart`)
|
|
29
|
+
* returns `LicenseVerificationResult.unknown` when a country's registry is
|
|
30
|
+
* empty. In a mesh that lets a node self-attest, "unverified but proceed"
|
|
31
|
+
* makes an *unsupported country* a bypass. So `EstadoVerificacionRegistro`
|
|
32
|
+
* in `./verificador.ts` has no third state at all: `verificado` and
|
|
33
|
+
* `no_verificado` only. The ambiguity is not representable.
|
|
34
|
+
*
|
|
35
|
+
* 2. A HASH SET CANNOT EXPRESS EXPIRY. OrionHealth declares `expired` in its
|
|
36
|
+
* enum and never returns it, because list membership carries no validity
|
|
37
|
+
* window. In a mesh that runs for years, immutable hash-set membership means
|
|
38
|
+
* a licence cancelled in 2027 still verifies forever. So `vigenteHasta` is a
|
|
39
|
+
* required field, signed by the issuer, not inferred from list membership.
|
|
40
|
+
*
|
|
41
|
+
* Nothing in this file performs I/O. Verification against a real registry
|
|
42
|
+
* snapshot is Phase 3; the extension point is `VerificadorRegistroPais`.
|
|
43
|
+
*/
|
|
44
|
+
import type { NodoId } from "../types/index.js";
|
|
45
|
+
/** Wire version of the credential / record shape. Bumped only on a breaking change. */
|
|
46
|
+
export declare const VERSION_MODELO: 1;
|
|
47
|
+
/**
|
|
48
|
+
* The five fields every credential must carry, named as the design doc names
|
|
49
|
+
* them. Mapped to the plain-language description they satisfy:
|
|
50
|
+
*
|
|
51
|
+
* - source → `autoridad` ("who issued this")
|
|
52
|
+
* - published → `emitidoEn` ("when it was issued")
|
|
53
|
+
* - reviewed → `vigenteHasta` ("when it stops being current")
|
|
54
|
+
* - licence → `idLicencia` ("which licence, as a hash")
|
|
55
|
+
* - claim backed → `tipo` ("what kind of claim this is")
|
|
56
|
+
*
|
|
57
|
+
* Exported as data so a validation error can name the field that was missing
|
|
58
|
+
* instead of returning a bare boolean.
|
|
59
|
+
*/
|
|
60
|
+
export declare const CAMPOS_OBLIGATORIOS_CREDENCIAL: readonly ["autoridad", "emitidoEn", "vigenteHasta", "idLicencia", "tipo"];
|
|
61
|
+
/** What kind of claim a credential makes. Specialties are separate credentials. */
|
|
62
|
+
export declare const TIPO_CREDENCIAL: {
|
|
63
|
+
readonly LICENCIA: "licencia";
|
|
64
|
+
readonly ESPECIALIDAD: "especialidad";
|
|
65
|
+
readonly COLEGIACION: "colegiacion";
|
|
66
|
+
readonly REGISTRO_RETHUS: "registro_rethus";
|
|
67
|
+
};
|
|
68
|
+
export type TipoCredencial = (typeof TIPO_CREDENCIAL)[keyof typeof TIPO_CREDENCIAL];
|
|
69
|
+
/**
|
|
70
|
+
* How honestly the credential was obtained. This is the label peers read; it is
|
|
71
|
+
* not decoration:
|
|
72
|
+
*
|
|
73
|
+
* - `autofirmada` the node signed its own claim. A format-valid
|
|
74
|
+
* assertion by an anonymous party, **zero** evidential
|
|
75
|
+
* weight. Useful only so a peer knows what to go check.
|
|
76
|
+
* - `atestiguada_pares` N peers each verified it independently and signed an
|
|
77
|
+
* `Aval`. This is the state that opens access.
|
|
78
|
+
* - `anclada_autoridad` the state's or the college's own key signed it.
|
|
79
|
+
* Strongest, and the only state that survives peers
|
|
80
|
+
* going offline.
|
|
81
|
+
*/
|
|
82
|
+
export declare const ESTADO_EMISION: {
|
|
83
|
+
readonly AUTOFIRMADA: "autofirmada";
|
|
84
|
+
readonly ANCLADA_AUTORIDAD: "anclada_autoridad";
|
|
85
|
+
readonly ATESTIGUADA_PARES: "atestiguada_pares";
|
|
86
|
+
};
|
|
87
|
+
export type EstadoEmision = (typeof ESTADO_EMISION)[keyof typeof ESTADO_EMISION];
|
|
88
|
+
/**
|
|
89
|
+
* A verified professional credential: "this human holds licence L in country C,
|
|
90
|
+
* valid until D".
|
|
91
|
+
*
|
|
92
|
+
* This layer is **forgeable by anyone**: a signature proves authorship, never
|
|
93
|
+
* truth. `estadoEmision` is the honest label of how much that forgery is worth,
|
|
94
|
+
* and `Aval` is what actually promotes it.
|
|
95
|
+
*/
|
|
96
|
+
export interface CredencialMedica {
|
|
97
|
+
/** Stable id: `hash(idLicencia + tipo + pais)`. See `./credencial.ts`. */
|
|
98
|
+
readonly id: string;
|
|
99
|
+
readonly tipo: TipoCredencial;
|
|
100
|
+
/** ISO 3166-1 alpha-2. `CO` for Colombia — the only market at launch. */
|
|
101
|
+
readonly pais: string;
|
|
102
|
+
/** Issuing authority: `'minsalud-rethus'`, `'colomedico-cm'`. */
|
|
103
|
+
readonly autoridad: string;
|
|
104
|
+
/**
|
|
105
|
+
* `sha256(normalize(licenceNumber))` — public-safe, never the number itself.
|
|
106
|
+
*
|
|
107
|
+
* Only the hash travels. The number is PII under Ley 1581/2012 and peers do
|
|
108
|
+
* not need it. Publishing it unsalted is also the anti-Sybil primitive: ten
|
|
109
|
+
* nodes presenting the same `idLicencia` are provably one human.
|
|
110
|
+
*/
|
|
111
|
+
readonly idLicencia: string;
|
|
112
|
+
/**
|
|
113
|
+
* Real-world PII, sealed to the specific verifier with ML-KEM-768. Optional
|
|
114
|
+
* (DECISIÓN A.3). Travels sealed, never cleartext.
|
|
115
|
+
*/
|
|
116
|
+
readonly numeroLicenciaCifrado?: Uint8Array;
|
|
117
|
+
/** `'medicina_general'`, `'cardiologia'`. Separate credential, own expiry. */
|
|
118
|
+
readonly especialidad?: string;
|
|
119
|
+
/** Issue date, ms epoch. */
|
|
120
|
+
readonly emitidoEn: number;
|
|
121
|
+
/**
|
|
122
|
+
* Expiry, ms epoch. REQUIRED and signed by the issuer — a hash set cannot
|
|
123
|
+
* express "this lapsed", so without this field a revoked licence verifies
|
|
124
|
+
* forever. Omitting it is a validation failure, not a default.
|
|
125
|
+
*/
|
|
126
|
+
readonly vigenteHasta: number;
|
|
127
|
+
readonly estadoEmision: EstadoEmision;
|
|
128
|
+
/** ML-DSA-65 over the canonical bytes of every field above, except `firma`. */
|
|
129
|
+
readonly firma: Uint8Array;
|
|
130
|
+
/** Signer. `estadoEmision: 'autofirmada'` ⇒ `emisor` is the subject itself. */
|
|
131
|
+
readonly emisor: NodoId;
|
|
132
|
+
}
|
|
133
|
+
/** Specialty slug. `'medicina_general'`, `'cardiologia'`, … */
|
|
134
|
+
export type Especialidad = string;
|
|
135
|
+
/**
|
|
136
|
+
* What an `Aval` is about. The load-bearing distinction is that only the first
|
|
137
|
+
* two can promote a credential to `atestiguada_pares`.
|
|
138
|
+
*
|
|
139
|
+
* `interaccion_clinica` asserts *"a real encounter occurred"* — nothing more.
|
|
140
|
+
* No date, no diagnosis, no content. It is a boolean with a signer, and
|
|
141
|
+
* letting it count toward credential verification is exactly the hole that
|
|
142
|
+
* admits a well-liked non-doctor into a network of doctors.
|
|
143
|
+
*/
|
|
144
|
+
export declare const OBJETO_AVAL: {
|
|
145
|
+
readonly LICENCIA_VERIFICADA: "licencia_verificada";
|
|
146
|
+
readonly ESPECIALIDAD_VERIFICADA: "especialidad_verificada";
|
|
147
|
+
readonly INTERACCION_CLINICA: "interaccion_clinica";
|
|
148
|
+
readonly DOCENCIA: "docencia";
|
|
149
|
+
};
|
|
150
|
+
export type ObjetoAval = (typeof OBJETO_AVAL)[keyof typeof OBJETO_AVAL];
|
|
151
|
+
/**
|
|
152
|
+
* How the avalador actually checked it. Not decoration: two `Aval`s about the
|
|
153
|
+
* same subject with different methods deserve different weight, and a peer must
|
|
154
|
+
* be able to see *why* it is trusting someone.
|
|
155
|
+
*
|
|
156
|
+
* - `registro_por_pais` cheap, reproducible offline, but only as fresh as the
|
|
157
|
+
* snapshot. `versionRegistro` is mandatory so a stale
|
|
158
|
+
* snapshot is visible on the face of the record.
|
|
159
|
+
* - `colegio_directo` expensive, rare, out-of-band with the college, and
|
|
160
|
+
* the only method that survives the registry being
|
|
161
|
+
* wrong. What a founding cohort should hold.
|
|
162
|
+
* - `testimonio_directo` cheap and unfalsifiable. Good signal of collegiality,
|
|
163
|
+
* **weak** signal of licensure.
|
|
164
|
+
* - `supervision` time-bounded, non-symmetric (A supervises B ⇒ B's
|
|
165
|
+
* aval of A is not symmetric evidence), and the
|
|
166
|
+
* strongest peer signal because it implies sustained
|
|
167
|
+
* observation.
|
|
168
|
+
*/
|
|
169
|
+
export declare const CLASE_VERIFICACION: {
|
|
170
|
+
readonly REGISTRO_POR_PAIS: "registro_por_pais";
|
|
171
|
+
readonly COLEGIO_DIRECTO: "colegio_directo";
|
|
172
|
+
readonly TESTIMONIO_DIRECTO: "testimonio_directo";
|
|
173
|
+
readonly SUPERVISION: "supervision";
|
|
174
|
+
};
|
|
175
|
+
export type ClaseVerificacion = (typeof CLASE_VERIFICACION)[keyof typeof CLASE_VERIFICACION];
|
|
176
|
+
export type MetodoVerificacion = {
|
|
177
|
+
readonly clase: "registro_por_pais";
|
|
178
|
+
readonly pais: string;
|
|
179
|
+
readonly versionRegistro: string;
|
|
180
|
+
} | {
|
|
181
|
+
readonly clase: "colegio_directo";
|
|
182
|
+
readonly ref: string;
|
|
183
|
+
} | {
|
|
184
|
+
readonly clase: "testimonio_directo";
|
|
185
|
+
} | {
|
|
186
|
+
readonly clase: "supervision";
|
|
187
|
+
readonly desde: number;
|
|
188
|
+
readonly hasta: number;
|
|
189
|
+
};
|
|
190
|
+
/** `'anual'` must be renewed and feeds decay. */
|
|
191
|
+
export declare const ALCANCE_AVAL: {
|
|
192
|
+
readonly PERMANENTE: "permanente";
|
|
193
|
+
readonly ANUAL: "anual";
|
|
194
|
+
};
|
|
195
|
+
export type AlcanceAval = (typeof ALCANCE_AVAL)[keyof typeof ALCANCE_AVAL];
|
|
196
|
+
/**
|
|
197
|
+
* A peer endorsement: *"I checked this claim and stand behind it."*
|
|
198
|
+
*
|
|
199
|
+
* Structurally incapable of being confused with anything else. It is about a
|
|
200
|
+
* **claim** (peer → node, subject = a credential hash), never about an
|
|
201
|
+
* **encounter** (patient → node, subject = a fact of a real world event).
|
|
202
|
+
*
|
|
203
|
+
* The signature shape — `id`, `emisor`, `timestamp`, `firma` — is
|
|
204
|
+
* {@link TransaccionKarma}'s, reused verbatim rather than reinvented. See
|
|
205
|
+
* `./aval.ts#aTransaccionKarma` for the adapter that feeds an `Aval` into the
|
|
206
|
+
* existing karma path.
|
|
207
|
+
*/
|
|
208
|
+
export interface Aval {
|
|
209
|
+
/** `${avalador}:${avalado}:${timestamp}:${nonce}`. Idempotency key. */
|
|
210
|
+
readonly id: string;
|
|
211
|
+
readonly version: typeof VERSION_MODELO;
|
|
212
|
+
readonly avalador: NodoId;
|
|
213
|
+
readonly avalado: NodoId;
|
|
214
|
+
readonly objetoAval: ObjetoAval;
|
|
215
|
+
/** `id` of the `CredencialMedica` being endorsed. */
|
|
216
|
+
readonly credencialRef: string;
|
|
217
|
+
/** Binds the `Aval` to the exact credential bytes the avalador checked. */
|
|
218
|
+
readonly hashCredencial: string;
|
|
219
|
+
readonly metodoVerificacion: MetodoVerificacion;
|
|
220
|
+
/** Hash of the artefact relied upon, if any. */
|
|
221
|
+
readonly evidenciaHash: string;
|
|
222
|
+
readonly alcance: AlcanceAval;
|
|
223
|
+
readonly emitidoEn: number;
|
|
224
|
+
/** Revocable endorsements only count while current. */
|
|
225
|
+
readonly vigenteHasta: number;
|
|
226
|
+
/** Always `true`. See `docs/medico/protocolo.md` §5. */
|
|
227
|
+
readonly revocable: true;
|
|
228
|
+
/** ML-DSA-65 by `avalador` over the canonical bytes of everything above. */
|
|
229
|
+
readonly firma: Uint8Array;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Fold over live endorsements. This, not a stored fact, is what makes
|
|
233
|
+
* `atestiguada_pares` revocable.
|
|
234
|
+
*/
|
|
235
|
+
export interface ResumenAvales {
|
|
236
|
+
readonly total: number;
|
|
237
|
+
readonly porObjeto: Readonly<Record<ObjetoAval, number>>;
|
|
238
|
+
/** Distinct `avalador`s — the only counter that matters for the threshold. */
|
|
239
|
+
readonly avaladoresUnicos: number;
|
|
240
|
+
/**
|
|
241
|
+
* Endorsements that legally count toward credential promotion: distinct
|
|
242
|
+
* avaladores over `licencia_verificada` + `especialidad_verificada`.
|
|
243
|
+
*/
|
|
244
|
+
readonly verificacionesLicencia: number;
|
|
245
|
+
readonly ultimoAval?: number;
|
|
246
|
+
}
|
|
247
|
+
/** Who operates the node and under which jurisdiction. */
|
|
248
|
+
export interface DeclaracionNodo {
|
|
249
|
+
/** ISO 3166-1 alpha-2 of the operator's jurisdiction. */
|
|
250
|
+
readonly jurisdiccion: string;
|
|
251
|
+
/**
|
|
252
|
+
* Public display name, opt-in (DECISIÓN A.5 — touches the Lex Artis
|
|
253
|
+
* professional-secret rule, not just privacy). Absent ⇒ the node is unnamed
|
|
254
|
+
* in the directory.
|
|
255
|
+
*/
|
|
256
|
+
readonly nombreMostrado?: string;
|
|
257
|
+
/** Directory-level PII (contact, clinic address), sealed, opt-in. */
|
|
258
|
+
readonly contactoCifrado?: Uint8Array;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* The professional half of a node's public record.
|
|
262
|
+
*
|
|
263
|
+
* ─── DELIBERATELY SHAPED SO IT CANNOT HOLD PATIENT DATA ────────────────────
|
|
264
|
+
*
|
|
265
|
+
* There is no field here capable of holding a patient record, not "we won't
|
|
266
|
+
* populate it" — the shape does not admit it. Health data is a special category
|
|
267
|
+
* under GDPR Art. 9 and sensitive under Ley 1581/2012 Art. 5, whose
|
|
268
|
+
* household/personal exemption of Art. 2(a) is lost the moment a peer node holds
|
|
269
|
+
* it. A mesh is a replication substrate: anything written is designed to be
|
|
270
|
+
* copied and kept by several nodes, so a patient's record inside an OpLog is a
|
|
271
|
+
* breach waiting for a payload bug. Any future feature needing
|
|
272
|
+
* patient-adjacent data needs a different transport, not a field added here.
|
|
273
|
+
*
|
|
274
|
+
* Note what this type does NOT claim: `nodoId → person`. One human may
|
|
275
|
+
* legitimately run several nodes, so the per-human fact we store is
|
|
276
|
+
* `idLicencia`, and the anti-Sybil rules are built on that, not on `nodoId`.
|
|
277
|
+
*/
|
|
278
|
+
export interface RegistroProfesional {
|
|
279
|
+
readonly version: typeof VERSION_MODELO;
|
|
280
|
+
/** Binding: which key this claim rides on. */
|
|
281
|
+
readonly nodoId: NodoId;
|
|
282
|
+
readonly credenciales: readonly CredencialMedica[];
|
|
283
|
+
readonly especialidades: readonly Especialidad[];
|
|
284
|
+
readonly avalRecibido: ResumenAvales;
|
|
285
|
+
readonly declaracion: DeclaracionNodo;
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,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7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IACzD,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,qEAAqE;IACrE,QAAQ,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,cAAc,CAAC;IACxC,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACnD,QAAQ,CAAC,cAAc,EAAE,SAAS,YAAY,EAAE,CAAC;IACjD,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC;CACtC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data model for the medical layer — types only.
|
|
3
|
+
*
|
|
4
|
+
* This file is the code transcription of
|
|
5
|
+
* `packages/edge-mesh/docs/medico/modelo-datos.md`. Field names here are the
|
|
6
|
+
* document's names, deliberately: `autoridad`, `emitidoEn`, `vigenteHasta`,
|
|
7
|
+
* `idLicencia`, `tipo`, `objetoAval`. Do not rename them to something more
|
|
8
|
+
* descriptive; the design doc is the specification and the wire format must
|
|
9
|
+
* match it byte for byte once signatures exist.
|
|
10
|
+
*
|
|
11
|
+
* ─── WHY THIS IS NOT A "user" OBJECT ────────────────────────────────────────
|
|
12
|
+
*
|
|
13
|
+
* The most common design error in this kind of system is collapsing four layers
|
|
14
|
+
* into one. They are kept apart here because they prove different things:
|
|
15
|
+
*
|
|
16
|
+
* layer 0 `NodoId` I control a key mathematics
|
|
17
|
+
* layer 1 `CredencialMedica` this human holds a license the state
|
|
18
|
+
* layer 2 `Aval` I checked layer 1 and stand behind it a peer
|
|
19
|
+
* layer 3 `Karma` peers repeatedly endorsed me the sum
|
|
20
|
+
*
|
|
21
|
+
* Access is granted by layer 1 + layer 2, never by layer 0 (worthless as merit)
|
|
22
|
+
* and never by layer 3 (mintable by anyone willing to spend a few signatures).
|
|
23
|
+
* See `docs/medico/reglas-red.md` §1.
|
|
24
|
+
*
|
|
25
|
+
* ─── THE TWO DEFECTS THIS SHAPE EXISTS TO CLOSE ─────────────────────────────
|
|
26
|
+
*
|
|
27
|
+
* 1. `unknown` IS NOT `valid`. The OrionHealth pattern
|
|
28
|
+
* (`apps/OrionHealth/lib/features/doctor_verification/domain/services/license_verifier.dart`)
|
|
29
|
+
* returns `LicenseVerificationResult.unknown` when a country's registry is
|
|
30
|
+
* empty. In a mesh that lets a node self-attest, "unverified but proceed"
|
|
31
|
+
* makes an *unsupported country* a bypass. So `EstadoVerificacionRegistro`
|
|
32
|
+
* in `./verificador.ts` has no third state at all: `verificado` and
|
|
33
|
+
* `no_verificado` only. The ambiguity is not representable.
|
|
34
|
+
*
|
|
35
|
+
* 2. A HASH SET CANNOT EXPRESS EXPIRY. OrionHealth declares `expired` in its
|
|
36
|
+
* enum and never returns it, because list membership carries no validity
|
|
37
|
+
* window. In a mesh that runs for years, immutable hash-set membership means
|
|
38
|
+
* a licence cancelled in 2027 still verifies forever. So `vigenteHasta` is a
|
|
39
|
+
* required field, signed by the issuer, not inferred from list membership.
|
|
40
|
+
*
|
|
41
|
+
* Nothing in this file performs I/O. Verification against a real registry
|
|
42
|
+
* snapshot is Phase 3; the extension point is `VerificadorRegistroPais`.
|
|
43
|
+
*/
|
|
44
|
+
/** Wire version of the credential / record shape. Bumped only on a breaking change. */
|
|
45
|
+
export const VERSION_MODELO = 1;
|
|
46
|
+
/**
|
|
47
|
+
* The five fields every credential must carry, named as the design doc names
|
|
48
|
+
* them. Mapped to the plain-language description they satisfy:
|
|
49
|
+
*
|
|
50
|
+
* - source → `autoridad` ("who issued this")
|
|
51
|
+
* - published → `emitidoEn` ("when it was issued")
|
|
52
|
+
* - reviewed → `vigenteHasta` ("when it stops being current")
|
|
53
|
+
* - licence → `idLicencia` ("which licence, as a hash")
|
|
54
|
+
* - claim backed → `tipo` ("what kind of claim this is")
|
|
55
|
+
*
|
|
56
|
+
* Exported as data so a validation error can name the field that was missing
|
|
57
|
+
* instead of returning a bare boolean.
|
|
58
|
+
*/
|
|
59
|
+
export const CAMPOS_OBLIGATORIOS_CREDENCIAL = [
|
|
60
|
+
"autoridad",
|
|
61
|
+
"emitidoEn",
|
|
62
|
+
"vigenteHasta",
|
|
63
|
+
"idLicencia",
|
|
64
|
+
"tipo",
|
|
65
|
+
];
|
|
66
|
+
/** What kind of claim a credential makes. Specialties are separate credentials. */
|
|
67
|
+
export const TIPO_CREDENCIAL = {
|
|
68
|
+
LICENCIA: "licencia",
|
|
69
|
+
ESPECIALIDAD: "especialidad",
|
|
70
|
+
COLEGIACION: "colegiacion",
|
|
71
|
+
REGISTRO_RETHUS: "registro_rethus",
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* How honestly the credential was obtained. This is the label peers read; it is
|
|
75
|
+
* not decoration:
|
|
76
|
+
*
|
|
77
|
+
* - `autofirmada` the node signed its own claim. A format-valid
|
|
78
|
+
* assertion by an anonymous party, **zero** evidential
|
|
79
|
+
* weight. Useful only so a peer knows what to go check.
|
|
80
|
+
* - `atestiguada_pares` N peers each verified it independently and signed an
|
|
81
|
+
* `Aval`. This is the state that opens access.
|
|
82
|
+
* - `anclada_autoridad` the state's or the college's own key signed it.
|
|
83
|
+
* Strongest, and the only state that survives peers
|
|
84
|
+
* going offline.
|
|
85
|
+
*/
|
|
86
|
+
export const ESTADO_EMISION = {
|
|
87
|
+
AUTOFIRMADA: "autofirmada",
|
|
88
|
+
ANCLADA_AUTORIDAD: "anclada_autoridad",
|
|
89
|
+
ATESTIGUADA_PARES: "atestiguada_pares",
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* What an `Aval` is about. The load-bearing distinction is that only the first
|
|
93
|
+
* two can promote a credential to `atestiguada_pares`.
|
|
94
|
+
*
|
|
95
|
+
* `interaccion_clinica` asserts *"a real encounter occurred"* — nothing more.
|
|
96
|
+
* No date, no diagnosis, no content. It is a boolean with a signer, and
|
|
97
|
+
* letting it count toward credential verification is exactly the hole that
|
|
98
|
+
* admits a well-liked non-doctor into a network of doctors.
|
|
99
|
+
*/
|
|
100
|
+
export const OBJETO_AVAL = {
|
|
101
|
+
LICENCIA_VERIFICADA: "licencia_verificada",
|
|
102
|
+
ESPECIALIDAD_VERIFICADA: "especialidad_verificada",
|
|
103
|
+
INTERACCION_CLINICA: "interaccion_clinica",
|
|
104
|
+
DOCENCIA: "docencia",
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* How the avalador actually checked it. Not decoration: two `Aval`s about the
|
|
108
|
+
* same subject with different methods deserve different weight, and a peer must
|
|
109
|
+
* be able to see *why* it is trusting someone.
|
|
110
|
+
*
|
|
111
|
+
* - `registro_por_pais` cheap, reproducible offline, but only as fresh as the
|
|
112
|
+
* snapshot. `versionRegistro` is mandatory so a stale
|
|
113
|
+
* snapshot is visible on the face of the record.
|
|
114
|
+
* - `colegio_directo` expensive, rare, out-of-band with the college, and
|
|
115
|
+
* the only method that survives the registry being
|
|
116
|
+
* wrong. What a founding cohort should hold.
|
|
117
|
+
* - `testimonio_directo` cheap and unfalsifiable. Good signal of collegiality,
|
|
118
|
+
* **weak** signal of licensure.
|
|
119
|
+
* - `supervision` time-bounded, non-symmetric (A supervises B ⇒ B's
|
|
120
|
+
* aval of A is not symmetric evidence), and the
|
|
121
|
+
* strongest peer signal because it implies sustained
|
|
122
|
+
* observation.
|
|
123
|
+
*/
|
|
124
|
+
export const CLASE_VERIFICACION = {
|
|
125
|
+
REGISTRO_POR_PAIS: "registro_por_pais",
|
|
126
|
+
COLEGIO_DIRECTO: "colegio_directo",
|
|
127
|
+
TESTIMONIO_DIRECTO: "testimonio_directo",
|
|
128
|
+
SUPERVISION: "supervision",
|
|
129
|
+
};
|
|
130
|
+
/** `'anual'` must be renewed and feeds decay. */
|
|
131
|
+
export const ALCANCE_AVAL = {
|
|
132
|
+
PERMANENTE: "permanente",
|
|
133
|
+
ANUAL: "anual",
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/medico/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAIH,uFAAuF;AACvF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAU,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC7C,WAAW;IACX,WAAW;IACX,cAAc;IACd,YAAY;IACZ,MAAM;CACG,CAAC;AAEX,mFAAmF;AACnF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;CACzB,CAAC;AAIX;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,WAAW,EAAE,aAAa;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;CAC7B,CAAC;AAqDX;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,mBAAmB,EAAE,qBAAqB;IAC1C,uBAAuB,EAAE,yBAAyB;IAClD,mBAAmB,EAAE,qBAAqB;IAC1C,QAAQ,EAAE,UAAU;CACX,CAAC;AAGX;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,iBAAiB,EAAE,mBAAmB;IACtC,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,oBAAoB;IACxC,WAAW,EAAE,aAAa;CACjB,CAAC;AAkBX,iDAAiD;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,OAAO;CACL,CAAC"}
|