kimlikdao-js is a repository containing JavaScript modules essential to KimlikDAO projects.
🪁 kastro
: Our compile-time focused web-framework
- React-like .jsx components at zero runtime cost
- Import css, fonts or images using es6 imports and receive a component
⚙️ kdjs
: KimlikDAO JavaScript compiler
- Fully typed, extending the google closure compiler's type system
- Type information is used for aggressive optimizations which are not possible otherwise
🗝️ crypto
: Cryptographic functions and libraries
-
arfCurve
: An efficient Arf Curve ($y^2 = x^3 + b$ ) class factory -
wesolowski
: Our Wesolowski VDF implementation
🪪 did
: Definitions of DID and KPass by KimlikDAO
🔌 api
: Definitions of standard protocols (e.g., jsonrpc, oauth2)
🧬 crosschain
: Definitions and structures valid across all blockchains
💎 ethereum
: Tools for interacting with Ethereum nodes
🪶 mina
: Tools for working with Mina dApps and nodes.
📡 node
: Utilities for communicating with KimlikDAO protocol nodes
🧪 testing
: Testing utils and runners
🧰 util
: Conversion tools and external definitions
git clone https://github.com/KimlikDAO/kimlikdao-js
cd kimlikdao-js
bun i
These commands will clone the repository into your local development environment and download the packages necessary for the repository to function. If you don't already have bun installed, you can install it by following the official guide.
The tests can be run in two different modes:
- Uncompiled:
We use
bun
's test runner, which has a jest-like interface.bun test
- Compiled (using
kdjs
): We also run the same tests after compiling them withkdjs
first:Note thatbun run test
kdjs
makes aggressive optimizations using the provided type information. Running tests in compiled mode is crucial, as incorrect type annotations can lead to functionally incorrect output.
To run tests in a specific directory, say crypto
, you can also do
bun test crypto # uncompiled
bun run test crypto # compiled
You can run a benchmark either directly as a regular es6 module
bun run crypto/bench/arfCurve.bench.js
or compile all of them and benchmark the compiled modules:
bun bench
When run, output will look like this: