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 Multi-Language Integrations Summary: Public guide for integrating TDM outside JavaScript. The current path is protocol-first: use the public TDM API at https://tdm.todealmarket.com and the shipped examples for Python, Go, Java, Rust, C, and C++. Status: Public protocol-first integration guidance Topics: - protocol-first integrations - authorize contract - Session Gas Tank - seller payout requests - Python Go Java Rust C C++ examples Packages: - tdm-sdk - tdm-agentpay Commands: - POST /authorize - POST /publisher/payouts
TDM is currently strongest through tdm-sdk, but the public stack now also supports a real protocol-first path for teams integrating from other languages.
The examples are meant to show the request contract, not pretend that fully native SDKs already exist for every stack.
POST https://tdm.todealmarket.com/authorize
Content-Type: application/json
X-TDM-Session-Token: tdm_session_... # optional session mode
X-TDM-Public-Key: secp256k1:0x... # optional signed-wallet mode
X-TDM-Signature: 0x... or base58_signature # required for signed-wallet mode
X-TDM-Nonce: 550e8400-e29b-41d4-a716-446655440000
X-TDM-Timestamp: 1712050000000
{
"requestId": "req_123",
"tokenOrUuid": "agent-or-user-id",
"operation": "premium:api",
"resourceId": "premium:api",
"priceMinor": 5
}Session Gas Tank is available to protocol-first clients too. It is still the same prepaid model: fund once, spend many times through the public payment path, and avoid a fresh chain interaction on every request.
1. register resource with billing_mode=session_gas_tank
2. pre-fund tank through POST /v1/tanks/create-sub
3. delegate a short-lived session through POST /v1/sessions/delegate
4. send X-TDM-Session-Token on paid requests
5. TDM debits the tank during POST /authorizeThe seller path is the same regardless of language: authorization debits the buyer balance, credits the seller, and payout is requested separately.
during POST /authorize:
- buyer is charged
- seller credits increase
- platform fee is tracked
later:
- seller requests payout through POST /publisher/payoutsProtocol-first integrations use the same authorize and payout contracts as the JS SDK path. Treat fee policy as deployment-level product configuration rather than something to hard-code from docs text.
Protocol-first integrations can optionally emit anonymous usage and operational metrics too. This is useful when teams want their Python, Go, Java, Rust, C, or C++ runtimes to appear in the same aggregate statistics and reporting views as the JS SDK and the built-in CLI.
POST https://tdm.todealmarket.com/telemetry
Content-Type: application/json
{
"event_id": "evt_custom_123",
"installation_id": "550e8400-e29b-41d4-a716-446655440000",
"command": "custom_authorize",
"network": "runtime",
"platform": "linux",
"node_version": "runtime",
"latency_ms": 42,
"success": true,
"error_code": null,
"metadata": {
"channel": "protocol_first",
"feature": "custom_runtime",
"direction": "authorize"
}
}
GET https://tdm.todealmarket.com/analytics/overview?days=30
GET https://tdm.todealmarket.com/analytics/export?days=90&format=csv&dataset=dailyThe intent here is aggregate product and operational visibility, not personal identity tracking.