Layout
index.ts
Browser-safe barrel. Re-exportsbytes.js + constants.js + the Env type only. env.ts is not re-exported because it touches process.env/dotenv, which breaks browser bundles. Server-side code imports @darkpool/shared/env directly.
env.ts
zod schema for every.env var. Two entry points:
.env, so it resolves correctly from any subdirectory. tsx watch from packages/server finds repo-root .env cleanly.
constants.ts
Mirrors Move-side enums:Outcome::YES changes, this file changes too.
bytes.ts
scripts/lib/cli.ts), server (indexer/ for ID parsing), and frontend (lib/ptb.ts for pure.vector('u8', …) args).