Auth-first TypeScript modules for Orb login, Lens session refresh, media primitives, uploads, and optional backend transport.
The package surface is intentionally small:
- root export:
createSDK - happy-path login entrypoint:
auth - lower-level plugin entrypoints:
auth/qr,auth/lens,media,upload/grove,transport/backend - no UI framework state in the core package
- browser-direct Orb login by default
npm install @orbclub/modulesimport{createOrbLogin}from"@orbclub/modules/auth";constorb=createOrbLogin();constqrImage=document.querySelector<HTMLImageElement>("#orb-qr");constorbLink=document.querySelector<HTMLAnchorElement>("#orb-link");constsession=awaitorb.connectWithQr({onInit: ({ qrCode, deepLink })=>{if(qrImage)qrImage.src=qrCode;if(orbLink&&deepLink)orbLink.href=deepLink;},});createOrbLogin() uses browser-direct defaults for Orb QR sign-in and Lens
session refresh. No app auth proxy routes are required for the default flow.
Session persistence is an app-level security decision; the package does not read
or write browser storage.
| Import | Purpose | Runtime |
|---|---|---|
@orbclub/modules/auth | Browser-direct Orb login plus session helpers | Browser or server |
@orbclub/modules/auth/qr | Lower-level QR auth helpers | Browser client |
@orbclub/modules/auth/lens | Lens GraphQL refresh helpers layered onto sdk.auth | Browser or server |
@orbclub/modules/media | Media URL parsing and gateway-aware resolution | Browser or server |
@orbclub/modules/upload/grove | Browser-side Grove upload plugin with progress tracking | Browser only |
@orbclub/modules/transport/backend | Minimal JSON backend caller with header injection | Trusted browser/server runtime |
createOrbLogin()uses direct Orb QR and Lens GraphQL defaults.createSDKis available for custom plugin composition. Import only what you need.- The package does not read environment variables directly. Resolve config in your app and pass it into plugin factories.
- Media parsing resolves
ipfs://,ar://,lens://, embedded storage URIs, and existingthumbnailDimension...proxy URLs before optional image or audio gateway wrapping. - Bare media paths without a recognized URI scheme are returned as-is.
upload/groverequires browser upload APIs such asFile,FormData, andXMLHttpRequest.transport/backendis intended for trusted app infrastructure or explicit proxy routes.- Framework adapters and UI state are not part of the v1 core package surface.
- docs/getting-started.md
- docs/auth.md
- docs/configuration.md
- docs/media.md
- docs/upload-grove.md
- docs/transport-backend.md
- docs/errors.md
llms.txtfor agent-oriented navigation
bun install
bun run check
bun run test
bun run lintCI runs typechecking, runtime tests, type tests, linting, build, and package dry-run checks. Update README.md, llms.txt, and the relevant files under docs/ whenever the public API or examples change.