Skip to content

docs(xchat): update Chat XDK pages to the v0.4.0 API#268

Merged
santiagomed merged 5 commits into
mainfrom
xchat-docs-xdk-0.3
Jul 20, 2026
Merged

docs(xchat): update Chat XDK pages to the v0.4.0 API#268
santiagomed merged 5 commits into
mainfrom
xchat-docs-xdk-0.3

Conversation

@santiagomed

Copy link
Copy Markdown
Collaborator

Updates every X Chat page to the Chat XDK v0.3.0 API, released in chat-xdk#119. All code snippets across the six language tabs were rewritten and verified against the released binding surfaces (docs/API.md, .pyi, index.d.ts, Go/C#/Java types) and the working example bots.

What the SDK changed (summary)

  • Message ids are SDK-generated: encrypt calls return message_id on the payload; callers no longer mint UUIDs. The send-body mapping now sources message_id from the payload.
  • Session identity: set_identity(user_id, signing_key_version) is set once; sender_id/signing_key_version disappear from per-call argument lists. import_keys takes the registered key version.
  • Optional session stores: set_signing_keys (verification keys for decrypt calls) and set_cache_keys(true) (signature-verified conversation-key cache), enabling decrypt_events(events), decrypt_event(b64), and encrypt_message(conversation_id, text) short forms. Explicit per-call arguments remain documented once as the fit for serverless/multi-instance deployments.
  • Event-based replies and reactions: encrypt_reply(conversation_id, text, reply_to_event) and encrypt_add_reaction(target_event, emoji); decrypted replies carry a reply_preview_validation outcome.

Pages

Page Change
getting-started.mdx Steps 2–6 rewritten to the new flow (version-aware import, set_identity, prepare without identity args, no id minting, store-based receive step)
xchat-xdk.mdx Quick start, lifecycle, conversation keys, decrypt, and encrypt-helpers sections updated; new prose for the session stores and reply-preview validation; 0.3.0 version stamps
media.mdx Attachment-send snippets on the new params shapes (also fixes a pre-existing wrong attachment key casing in the TypeScript tab)
groups.mdx Group prepare calls without identity args
real-time-events.mdx Live decrypt flow via the session stores; dedupe guidance distinguishes event_uuid (delivery) from the signed message_id (message)
troubleshooting.mdx Error messages re-checked against what the SDK actually raises; new entries for missing session identity and Invalid reply previews
cryptography-primer.mdx One paragraph on reply-preview validation in the signatures section

Not included: the es/, ja/, and pt/ mirrors of these pages (assumed to follow the English source through localization).

The SDK now generates message ids (returned on the send payload), takes
the sender identity once via set_identity, and offers two optional
session stores: set_signing_keys for verification keys and
set_cache_keys for signature-verified conversation keys. Replies and
reactions target the raw event being replied or reacted to, and
decrypted replies carry a reply_preview_validation outcome.

Every code snippet across all six language tabs is rewritten against
the released binding surfaces; the send-body mapping now sources
message_id from the payload; version stamps move to 0.3.0. Explicit
per-call arguments remain documented once as the alternative for
serverless and multi-instance deployments.
@mintlify

mintlify Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
x-corp 🟢 Ready View Preview Jul 17, 2026, 6:59 AM

Present set_signing_keys and set_cache_keys as an optional convenience
for long-lived single-identity processes rather than a required step,
state plainly that signing keys are the other participants' public keys
fetched from the public-keys endpoint, and keep the per-call style
visible as the equal alternative. Drop the set_key_version mention: the
registered key version is set through set_identity or the version-aware
key import.
@santiagomed

Copy link
Copy Markdown
Collaborator Author

Pushed a follow-up commit: the session stores (set_signing_keys / set_cache_keys) are now framed as an optional convenience rather than a required step, with an explicit pointer that signing keys are the participants' public keys from the public-keys endpoint. Also removed the set_key_version mention — the method is being removed from the SDK before v0.3.0 ships (chat-xdk PR in flight); the version is set via set_identity or the version-aware import.

…guments

Comments like "omitted arguments resolve from the key cache and store"
defined a call by the parameters it does not take. Say what happens
instead: the backlog is batch-decrypted with senders verified against
the stored keys, the live event decrypts under the cached conversation
key, and the send is signed as the session identity.
A reply to an edited message quotes the current (edited) text: the
sender passes the raw edit event as reply_to_edit_event and the preview
derives its text and entities from the edit, and the receiver verifies
the edit like the original and validates the quote against the edited
contents.
The release published as 0.4.0, not 0.3.0 (no v0.3.0 tag or registry
artifacts exist), so the Rust git-tag and Maven version snippets now
point at v0.4.0.
@santiagomed santiagomed changed the title docs(xchat): update Chat XDK pages to the v0.3.0 API docs(xchat): update Chat XDK pages to the v0.4.0 API Jul 20, 2026
@santiagomed
santiagomed merged commit 3c9119a into main Jul 20, 2026
2 checks passed
@mintlify

mintlify Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Docs PR opened: #270

Added a July 20, 2026 changelog entry announcing Chat XDK v0.4.0 and summarizing its user-facing API changes.

@mintlify

mintlify Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Docs PR opened: #271

Translated the seven updated X Chat XDK v0.4.0 pages into Japanese, Spanish, Portuguese, and Korean.

@mintlify

mintlify Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Docs PR opened: #272

Synced the Spanish, Japanese, and Portuguese X Chat pages to match the English Chat XDK v0.4.0 API rewrite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant