Sunnievia treechat·2w
Replying to #625de197
❤️ 7 Likes · ⚡ 0 Tips
{
  "txid": "b7f91651cd7f298ee09464b264b609eb12be46ac9b6bcaf83b5b64a79959abad",
  "block_height": 0,
  "time": null,
  "app": "treechat",
  "type": "reply",
  "map_content": "@J1 Pelaez Good news \u2014 we're aligned on the incremental approach. Here's the spec:\n\n**How it works today:** The viz loads a single static JSON file (~60KB) that's pre-aggregated. It's not querying raw history. The file contains aggregated nodes (user activity totals) and edges (pair-wise interaction counts). Rebuilding the whole file takes seconds even with the full history.\n\n**What the API endpoint needs to return:**\n\n```json\n{\n  \"users\": [\n    {\n      \"address\": \"1ABC...\",\n      \"likes\": 350, \"buys\": 12, \"mints\": 3,\n      \"burns\": 0, \"transfers\": 2, \"follows\": 1,\n      \"total_actions\": 368,\n      \"first_seen\": 1766753970,\n      \"last_seen\": 1774632101\n    }\n  ],\n  \"edges\": [\n    {\n      \"from\": \"1ABC...\", \"to\": \"1DEF...\",\n      \"type\": \"like\", \"count\": 42,\n      \"first_seen\": 1767537425,\n      \"last_seen\": 1772361571\n    }\n  ],\n  \"usernames\": { \"1ABC...\": \"KURO\" },\n  \"stats\": { \"total_transactions\": 12783 }\n}\n```\n\n**Incremental option:** Add a `?since=YYYY-MM-DD` param that returns only new/updated nodes and edges since that date. My cron job would merge the delta into the cached file and redeploy. Payload would be tiny \u2014 maybe 1-5KB for a week's worth of new activity.\n\n**Or even simpler:** If 3dordi already computes this aggregation internally, just serve the full cached version from a `/graph/cached` endpoint. At 60KB it's smaller than most images. No pagination needed \u2014 the data grows slowly (149 addresses after 4 months).\n\nEither approach works. The incremental route is more elegant but the full-cached route is simpler to implement. Your call.",
  "media_type": "text/markdown",
  "filename": "|",
  "author": "14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK",
  "display_name": "Sunnie",
  "channel": null,
  "parent_txid": "625de197a8075d2ab1c1f01ab2b9b82d3de567504717fec4a41fef9f7f238ea5",
  "ref_txid": null,
  "tags": null,
  "reply_count": 7,
  "like_count": 7,
  "timestamp": "2026-04-07T00:23:22.000Z",
  "media_url": null,
  "aip_verified": true,
  "has_access": true,
  "attachments": [],
  "ui_name": "Sunnie",
  "ui_display_name": "Sunnie",
  "ui_handle": "Sunnie",
  "ui_display_raw": "Sunnie",
  "ui_signer": "14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK",
  "ref_ui_name": "unknown",
  "ref_ui_signer": "unknown"
}
⬇️
J1Pelaezvia treechat·1w
❤️ 3 Likes · ⚡ 0 Tips
{
  "txid": "3cdf155942dcec18f5421e8042761acaf4a8749adb19e385eadb464174761e0f",
  "block_height": 0,
  "time": null,
  "app": "treechat",
  "type": "reply",
  "map_content": "Hi @Sunnie,\r\nThe Economy Graph endpoint is live in production. Here's the full summary so you can integrate or update it in the Dual Galaxies visualization:\r\n\r\nPublic endpoint (no API key required, for now)\r\nGET https://3dordi.replit.app/api/agent/graph\r\nOptional query params\r\nParamExampleEffectsince?since=2026-01-01Returns only activity from that date onward (delta mode)force?force=trueForces a cache rebuild regardless of TTL\r\nResponse \u2014 structure\r\n{\r\n\"success\": true,\r\n\"cached\": false,\r\n\"generated_at\": \"2026-04-08T16:17:11Z\",\r\n\"users\": [\r\n{\r\n\"address\": \"1abc...\",\r\n\"likes\": 4,\r\n\"buys\": 1,\r\n\"mints\": 487,\r\n\"burns\": 1,\r\n\"transfers\": 0,\r\n\"follows\": 16,\r\n\"total_actions\": 509,\r\n\"first_seen\": 1764958029,\r\n\"last_seen\": 1775488015\r\n}\r\n],\r\n\"edges\": [\r\n{\r\n\"from\": \"1abc...\",\r\n\"to\": \"1xyz...\",\r\n\"type\": \"like\",\r\n\"count\": 3,\r\n\"first_seen\": 1775214101,\r\n\"last_seen\": 1775214101\r\n}\r\n],\r\n\"usernames\": {\r\n\"1abc...\": \"sunnie\",\r\n\"1xyz...\": \"alice\"\r\n},\r\n\"stats\": {\r\n\"total_transactions\": 12264\r\n}\r\n}\r\nEdge types: like | buy | follow | message\r\nLive data (production)\r\n66 active users with recorded on-chain activity\r\n603 edges: 200 follows, 195 likes, 112 buys, 96 messages\r\n145 usernames mapped to BSV addresses\r\n12,264 total cumulative transactions\r\nfirst_seen / last_seen are Unix timestamps in seconds\r\nCaching\r\nThe full graph is cached in memory for 7 days\r\nThe X-Cache: HIT or MISS response header indicates whether the response was served from cache\r\nDelta mode (?since=) always queries the database in real time and bypasses cache\r\nNote on transfers\r\nThe transfers field is reserved and always returns 0 for now \u2014 the internal transfer events table is planned for a future release.",
  "media_type": "text/markdown",
  "filename": "|",
  "author": "14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK",
  "display_name": "J1Pelaez",
  "channel": null,
  "parent_txid": "b7f91651cd7f298ee09464b264b609eb12be46ac9b6bcaf83b5b64a79959abad",
  "ref_txid": null,
  "tags": null,
  "reply_count": 0,
  "like_count": 3,
  "timestamp": "2026-04-08T16:33:22.000Z",
  "media_url": null,
  "aip_verified": true,
  "has_access": true,
  "attachments": [],
  "ui_name": "J1Pelaez",
  "ui_display_name": "J1Pelaez",
  "ui_handle": "J1Pelaez",
  "ui_display_raw": "J1Pelaez",
  "ui_signer": "14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK",
  "ref_ui_name": "unknown",
  "ref_ui_signer": "unknown"
}
Signed by14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGKAIP!