{"id":"XE-16989","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"700","source_url":"https://github.com/xeprotocol/xe/issues/700","reporter_id":2920,"title":"[Low] SDK structs silently drop server fields: GetProviders, GetPending, GetChain, ChatChallenge","area":"sdk-docs-web","claimed_tier":null,"assessed_tier":null,"verdict":null,"duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":null,"status":"triaging","closed_reason":null,"github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-17T08:13:52.136320+00:00","updated_at":"2026-11-22T23:26:19.336064+00:00","source_created_at":"2026-11-17T08:12:39+00:00","told_at":"2026-11-22T23:26:19.377040+00:00","status_changed_at":"2026-11-22T23:26:05.253376+00:00","url":"https://bounty.xe.network/XE-16989","body":"## Summary\n\nFour SDK structs silently drop fields the server sends, so SDK/CLI users cannot see data the API already provides: provider lease-count caps and ad staleness, pending-send timestamps, chain block finality, and chat-challenge expiry.\n\n## Root Cause (one finding, 4 instances)\n\n1. **`max_concurrent_leases` + `timestamp`:** server `node.ProviderInfo` (`node/node.go:1092`, 11 fields) vs SDK `client.ProviderInfo` (`client/client.go:178`, 9 fields). SDK/CLI provider selection cannot see the lease-count cap or ad staleness.\n2. **`Timestamp`:** server `pendingEntry` (`api/handler.go:579`) enriches every pending send with the send block's timestamp; SDK decodes into `core.PendingSend` (`core/types.go`), which has no Timestamp field.\n3. **`finalized`:** server wraps chain blocks in `blockView` (`api/handler.go:509`, embeds `*core.Block` + `Finalized`); SDK decodes into plain `[]*core.Block`, so callers cannot tell finalized from unfinalized blocks.\n4. **`expires_at`:** server `handleChatChallenge` (`api/chat_auth.go:134`) returns `challenge` + `expires_at` (120s TTL); SDK `ChatChallenge` (`client/chat.go:45`) reads only `challenge`, so callers cannot know when the proof expires.\n\n## Verification\n\nExecuted PoC against the real `api.Handler` (httptest + fake backend):\n\n```\nraw /providers body contains \"max_concurrent_leases\":5,...,\"timestamp\":1700000000000000000\n  — client.ProviderInfo has MaxConcurrentLeases/Timestamp fields: false (struct has 9 fields, server sends 11)\nraw /pending/... body contains \"Timestamp\":1700000000000000000 — core.PendingSend has Timestamp field: false\nraw chain block has \"finalized\":true (SDK decodes into plain []*core.Block)\nraw challenge has expires_at (SDK reads only challenge; TTL invisible to caller)\n```\n\n## Note on related reports\n\nSearched `GetProviders timestamp max_concurrent_leases`, `pending Timestamp client`, `finalized GetChain client drops`, `client SDK drops fields` — no hits. #277 is docs-only (notes the server Timestamp exists; does not cover the SDK struct gap). #567 (conflict 10-cap) is unrelated.\n\n## Suggested fix\n\nAdd the missing fields to the SDK structs (`ProviderInfo`, `PendingSend`, chain block view, `ChatChallenge` response).\n","patch_refs":[],"thread":[{"id":18921,"source":"desk","source_ref":"reply:16598","author":"Joseph Denne","team":true,"body":"Thanks for the report. It is being handled.","created_at":"2026-11-22T23:26:19.336064+00:00"}]}