Beta Environment Notice
TDM is currently in Beta. Exercise caution when handling assets. Use at your own risk.
Fast Export
Switch the current page to Markdown for fast agent reading, or download it as a .md file.
TDM is currently in Beta. Exercise caution when handling assets. Use at your own risk.
Fast Export
Switch the current page to Markdown for fast agent reading, or download it as a .md file.
# TDM SDK Reference Summary: Reference page for the current TDM SDK surface. This page covers payable wrappers, framework-mode helpers, smart CLI flows, Session Gas Tank billing, and protocol-first examples. Status: Beta - All Features Active Topics: - TDM SDK documentation - tdm-sdk reference - makePayable - framework-mode - createFetchHookClient - Session Gas Tank - protocol-first integrations - Local402Circuit - LocalVault - runtime synchronization Packages: - tdm-sdk Commands: - tdm connect - tdm doctor - tdm where - tdm status - tdm workspace status - tdm agent status - tdm storage add media ./seller-storage --use - tdm workspace create seller-lab --storage media --use - tdm storage publish ./catalog --mode tunnel - tdm fuel - tdm make payable - tdm sweep - tdm sweep status - tdm cashout - tdm agent - tdm stats
tdm-sdk is the main developer surface for TDM. It includes both the SDK APIs and the built-in tdm CLI.
npm i tdm-sdk is the same command in short form.
You can also use npm i -g tdm-sdk.
These are the core components of tdm-sdk that are fully operational in the current Beta.
The SDK now also ships a lighter integration layer for teams that want a friendlier API over the current live gateway contract without switching to a fake monolithic runtime.
If you want Solana browser wallets to keep signing while your SDK runtime broadcasts through a faster RPC, pass an explicit rpcUrl or set TDM_SOLANA_RPC_URL / SOLANA_RPC_URL.
If you want provider keys or custom RPC URLs to survive terminal restarts and npm upgrades, use tdm env instead of relying on a one-off shell export. Project scope writes.env.local in the current repo. Session scope prints a ready-to-run command for your current shell.
Beyond wrapping plain functions with makePayable(...), the SDK now exposes framework-mode helpers so developers can charge directly at the route layer in the style of Next.js, Hono, Elysia, Express, or Deno handlers.
The CLI now auto-detects whether you passed a local file or a public URL. Local files default to serve. Public URLs default to url. Serve mode stays local-only; use --public-url when the resource should sync to the gateway.
Use the SDK function inside code when you want to wrap a route handler, tool function, or framework endpoint directly in your application code.
Use the CLI when the faster path is resource registration: a public URL, a hosted API, a file, or a paid unlock flow that should go live without adding new wrapper code first.
TDM supports two charging modes: normal account balance and prepaid session_gas_tank. In both cases the request stays streamlined, and seller credits accumulate duringPOST /authorize for later payout requests.
Re-running tdm payout wallets set replaces the saved wallet for the chain you pass. During one-time onboarding,tdm connect also attempts a safe default sync for the connected wallet when that chain slot is still empty. If a wallet is already saved for the requested chain, --to becomes optional on tdm payout request.
The public CLI now includes a dedicated tdm security surface. The default profile is already active for new accounts, and advanced users can review or change that profile deliberately when they need a wider operating envelope.
See the current limits, payout hold rules, and whether the account is still using the default profile or an advanced one.
Enroll an authenticator app so higher-risk changes and payout actions can be approved with an extra code.
Use a short-lived challenge when changing important account settings or confirming a more sensitive payout flow.
Raise or lower limits deliberately when your workflow needs it, without removing the public safety model entirely.
Keep public proof separate from local policy. Verify a domain or GitHub target first, then decide whether that host belongs in the local allowlist used by guarded agents and runtime routes.
Use tdm allowlist check on a concrete URL before you let an agent or guarded runtime depend on it. That keeps route policy explicit and fast to review.
tdm stats gives developers a quick view of local usage and payment status. For teams that use structured reporting, tdm analytics export remains part of the public CLI surface.
For stacks that do not have a native SDK yet, TDM now ships a protocol-first HTTP contract plus minimal examples for multiple languages.
The local vault now supports a root vault plus agent sub-vaults. Agent vaults are created locally, kept in the OS keyring, and booted into short-lived session tokens instead of exposing private keys to runtimes.
Hard cap per agent vault. Ideal for bounded tasks.
Monthly cap funded by the root vault when the agent depletes.
Recovery flows are part of the public CLI path. The audited SDK reference documents the operator-facing commands and runtime expectations without turning internal recovery adapters into a required public integration surface.
tdm sweep is strictly for conversion (memecoins → USDC → destination wallet or local target agent). Returning stablecoin leftovers to an external wallet is handled by tdm cashout.