Protocol / SDK / Packages
shippedLayer 1 · Protocol

Packages

The js-sdk package layout — platform-agnostic core, service implementations, node and web SDKs, the Rust→WASM bridge, VFS, and CLI — and how they compose.

Packages

The TinyCloud js-sdk is a monorepo of layered packages: a platform-agnostic core, service implementations, platform SDKs for Node and the browser, a Rust→WASM crypto bridge, plus a VFS and a CLI. Together they are how an application speaks the protocol — building sign-in, capabilities, and data access without hand-rolling crypto.

Members

  • @tinycloud/sdk-core — the TinyCloud class + platform-agnostic model: identity, spaces, manifests, delegations, capabilities.
  • @tinycloud/sdk-services — the service clients: kv, sql, duckdb, hooks, vault, secrets, encryption.
  • @tinycloud/node-sdkTinyCloudNode, NodeUserAuthorization, PrivateKeySigner (server/Node runtime).
  • @tinycloud/web-sdkTinyCloudWeb, which wraps a TinyCloudNode for the browser (wallet signer, session storage).
  • @tinycloud/sdk-rs — the Rust source compiled to WASM (web-sdk-wasm, node-sdk-wasm): the session manager, SIWE/ReCap prep, delegation signing, vault crypto.
  • vfs — a virtual filesystem abstraction over kv.
  • cli — the tc command-line interface.

Mechanics

web-sdk and node-sdk are thin platform adapters over the shared sdk-core + sdk-services; the heavy cryptographic operations cross into sdk-rs (WASM). So an app targets web-sdk or node-sdk, gets the same TinyCloud API, and the WASM boundary handles signing/session management identically on both.

Relationships

Implements client access to all services; drives sign-in-flow; exposes data-apis and the delegation-api; the WASM layer mints the session keys and SIWE/UCAN tokens validated by cacao-chain-validation.

Status & drift

Shipped. Note architecture.md references a legacy web-core package not present in the current workspace; the layout above reflects current packages/.

Sources

  • js-sdk: architecture.md, packages/ (sdk-core, sdk-services, node-sdk, web-sdk, sdk-rs, vfs, cli)