The app has eleven runtime dependencies and one dev dependency, all pure JavaScript. They are declared in package.json and locked in bun.lock. The app is outside the pnpm workspace, so bun install --frozen-lockfile in the app directory is the only install step, see Setting up a machine.
Runtime dependencies
Package | Declared | Locked | Used for | Imported in |
|---|---|---|---|---|
|
|
| Ed25519 keys and signatures | |
|
|
| SHA-256, SHA-512, HMAC, HKDF | |
|
|
| XChaCha20-Poly1305 for vault encryption | |
|
|
| Mnemonic generation, validation and the English word list | |
|
|
| Base64 codecs for the Keychain key map | |
|
|
| CIDs, multihash digests, base58btc and base64 | blob.ts L1-L2, primitives.ts L8-L9, |
|
|
| DAG-CBOR encoding of signed blobs | Vendored, see below |
|
|
| The CBOR encoder behind the client codec | Vendored, see below |
|
|
| Pure gzip for the vault state | Vendored, see below |
|
|
| Wire format of the Seed site API | Tests only: client.test.ts L2 |
|
|
| No import found in | none |
Everything cryptographic funnels through src/crypto, see Crypto: primitives and key derivation. src/identity reaches crypto only through crypto-impl.ts.
Dev dependency
Package | Locked | Used for | Where |
|---|---|---|---|
|
| Drives Chromium through the real vault's web UI | .tests/real-vault/web.ts L8, installed by CI and by |
Bun's test runner (bun:test) and TypeScript come with Bun and Exact. There is no linter or formatter dependency in the app.
Why superjson is decoded by hand
The Seed site API answers with a superjson envelope {json, meta}. The package cannot run on device: "Exact rejects superjson's is-what dependency (dynamic Function constructor)" (superjson.ts L1-L3). So the app has its own decoder that handles the wire types the API uses, keeps decimal precision and byte arrays, refuses annotation paths through __proto__, constructor or prototype, and fails closed on unknown types. The real package stays in package.json so the test can serialize fixtures with it and compare. Details are in Read: API client and superjson decoder.
Why the codecs are vendored
Runtime code never imports @ipld/dag-cbor, cborg or fflate. It imports src/crypto/cbor.ts, which re-exports from the committed bundle src/crypto/vendor/codecs.js. That bundle is produced by tools/crypto-vectors/vendor.ts from codec-entry.ts with Bun's bundler for the browser target. It replaces globalThis.process and globalThis.Buffer with undefined and Date.now() with 0: "Only optional Node fast paths and implicit clocks are removed, not codec algorithms." Two tests hold this in place:
vendor.test.ts rebuilds the bundle from the lockfile and requires byte identity with the committed file.
review.test.ts L111-L117 fails if agents runtime code imports @ipld/dag-cbor or cborg directly, or if package.json patches cborg.
The full story is in Crypto: vendored CBOR and gzip codecs.
Packages used only to generate vectors
tools/crypto-vectors/generate.ts builds a scratch workspace in the OS temp directory and installs the original client's dependencies there (bip39 3.1.0, @exodus/slip10 2.2.2, @noble/ed25519 2.3.0, hash-wasm, core-js and others) to run the original sources. None of these are dependencies of the app. The script copies sources from frontend/packages/client and from frontend/apps/mobile/src (L36-L39). The second directory no longer exists on main, so regenerating the fixture needs the archived client (inferred from the tree), see Parity vectors and History.
Rules for adding a dependency
A new package must be pure JavaScript with no Node built-ins, DOM, WASM or dynamic code, see The data module runtime. Exact refuses offenders by name at build time. Pin it in bun.lock and run the tests on iOS, not only on the web.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime