This is the documentation for Aslan Engine, an Modus API for the Aslan Health AI Agent.
Aslan can create verifiable credentials for patients, verify credentials and generate health summaries, suggestions, and predictive insights in a agentic way that is secure for patients. The agent is connected to a dGraph database to store patient data and verifiable credentials, and use the Llama Health Insights model to analyze patient data as a GraphRAG system.
In ./circuits
, run circom health_credential.circom --wasm --json
.
Use snark.js in Modus to compute a witness and generate a proof before validating the proof using the DID's Verifiable Credential for health data like high blood pressure, low blood sugar, etc.
Since AssemblyScript does not directly support all JavaScript features or types, we need to create type declaration files for the npm packages we want to use. These are located in assembly/lib/
:
-
Package Declaration Files:
did-jwt-vc.ts
: Types for Verifiable Credentialsdid-resolver.ts
: Types for DID resolutionsnarkjs.ts
: Types for ZK-SNARK operationsfs.ts
andpath.ts
: Node.js file system types
-
Configuration: The
asconfig.json
includes these declarations:{ "options": { "lib": ["assembly/lib"] } }
-
Dependencies: Required packages are listed in
package.json
:{ "dependencies": { "did-jwt-vc": "^4.0.4", "did-resolver": "^4.1.0", "snarkjs": "^0.7.5" } }
-
Usage:
import { createVerifiableCredentialJwt } from 'did-jwt-vc' import { Resolver } from 'did-resolver' import { groth16 } from 'snarkjs'
These declarations should now allow the imports in index.ts to work properly. The declarations are compatible with AssemblyScript and provide type information for the Node.js built-in modules we're using.
# Run Modus Locally as a Development Environment
modus dev
# Build AssemblyScript for Modus
pnpm run build