Ratio1 SDK for TypeScript: Your bridge to Edge Nodes
For Developers
Education
The Ratio1 ecosystem just crossed an important threshold: our core edge primitives now speak TypeScript natively. With the release of edge-sdk-ts and cstore-auth-ts, Node.js and frontend teams can connect directly to CStore (our redis-like state fabric) and R1FS (our IPFS-inspired file system) without leaving their comfort zone. The two packages combine into a practical toolkit for building decentralized apps, partner integrations, and customer-facing experiences on top of Ratio1 in days instead of weeks.
Why this release matters
Ratio1 exists to make decentralized AI infrastructure accessible to every builder, not just Python specialists or infrastructure veterans. This release delivers on that promise in two complementary ways:
edge-sdk-tsfinally gives JavaScript teams a type-safe, batteries-included doorway into CStore and R1FS, so they can call Ratio1 services without reverse-engineering edge-node APIs or maintaining custom fetch wrappers.cstore-auth-tslayers a plug-and-play authentication system on top of CStore, letting teams persist users, passwords, and metadata entirely on Ratio1 without rolling an external database.
Together, the TypeScript community can now build on Ratio1 primitives with the ergonomics they expect while inheriting the decentralization, security, and observability baked into every edge node.
Introducing @ratio1/edge-sdk-ts
@ratio1/edge-sdk-ts gives you a fully typed gateway into the services exposed by Ratio1 edge nodes. It ships with dual entry points: createEdgeSdk for Node.js runtimes and createEdgeSdkBrowserClient for browser and SSR frameworks, so you can share business logic across environments.
The SDK is engineered to fit wherever your JavaScript runs: it embraces traditional Node.js services, Next.js App Router handlers, and the containers that execute workloads on Ratio1 edge nodes. And the full suite of endpoints exposed by the APIs is faithfully reproduced in the library, so you have full access to all the capabilities of CStore and R1FS.
Because the client reads its configuration from the standard Ratio1 environment variables (EE_CHAINSTORE_API_URL and EE_R1FS_API_URL inside containers), it drops straight into existing node deployments. You can also pass URLs explicitly when running locally or inside partner infrastructure.
Need a local sandbox while you build? Pair the SDK with r1-plugins-sandbox to emulate edge-node APIs on your laptop, perfect for rapid tests before you hit a real node (check out Go Developers, Meet the New Ratio1 SDK and Sandbox for more details).
Here is how straightforward it feels to interact with CStore and R1FS:
Meet @ratio1/cstore-auth-ts
Sitting on top of edge-sdk-ts is @ratio1/cstore-auth-ts, a plug-and-play authentication layer that keeps user credentials and metadata inside CStore hashes. It bootstraps an admin account via environment variables, enforces password hashing, and gives you strict username validation out of the box.
Initialization is intentionally frictionless: one call to auth.simple.init() will check for the admin account and, if necessary, create it using the bootstrap password defined in EE_CSTORE_AUTH_BOOTSTRAP_ADMIN_PW. Every credential is stored in a structured, versioned format: usernames are canonicalized, password hashes are salted and peppered, and metadata travels alongside the credential record so you can stash profile details, feature flags, or tenant descriptors without leaking sensitive material. Because the library stays headless, it slips comfortably into API routes, CLI automation, or partner integrations while keeping its responsibilities limited to storage, hashing, and validation.
And when you layer authentication into the picture, it stays just as clean:
Build a full-stack Ratio1 app in an afternoon
Bringing the two libraries together gives teams a reproducible blueprint:
Install the packages:
npm install @ratio1/edge-sdk-ts @ratio1/cstore-auth-ts.Expose credentials: point the SDKs to your edge node with
EE_CHAINSTORE_API_URL,EE_R1FS_API_URL,EE_CSTORE_AUTH_HKEY,EE_CSTORE_AUTH_SECRET, andEE_CSTORE_AUTH_BOOTSTRAP_ADMIN_PW.Bootstrap auth: run a tiny script (or a setup endpoint) that calls
auth.simple.init()once.Publish APIs: wire authentication, profile storage, and file workflows into Express, Fastify or Next.js API routes.
Ship a UI: hydrate React components or partner portals with CID-backed file listings and metadata-driven access control.
The toolkit scales from simple username/password flows to multi-tenant dashboards. Because everything lives on top of Ratio1 edge nodes, your application inherits the same decentralization guarantees: sharded storage, cryptographic addressing, cross-node replication, and watchdog oracles that keep services honest.
Momentum for partners and the community
Opening Ratio1's primitives to TypeScript does more than simplify developer onboarding. It unlocks partner integrations - billing portals, observability dashboards, industry-specific orchestration layers - that can now plug into CStore and R1FS using familiar idioms. It lets CSPs and partners onboard clients faster, knowing authentication is a reusable module. And it gives product teams permission to target web, mobile, and desktop simultaneously without rewriting core logic.
Start building today
Explore the source:
@ratio1/edge-sdk-tsand@ratio1/cstore-auth-ts.npm installboth packages and connect them to your edge node or partner deployment.Share what you build in Discord: templates, plugins, and workflows help the ecosystem grow sharper together.
The Ratio1 edge is now open territory for TypeScript developers. We cannot wait to see what you deploy next.
Alessandro De Franceschi
Nov 12, 2025

