Skip to content

Update RPC and Horizon types for Protocol 30 server releases - #1836

Merged
Ryang-21 merged 3 commits into
mainfrom
p30-rpc-horizon-types
Oct 21, 2026
Merged

Ryang-21 merged 3 commits into
mainfrom
p30-rpc-horizon-types

Conversation

@Ryang-21

Copy link
Copy Markdown
Contributor

What

  • inSuccessfulContractCall on rpc.Api.EventResponse and rpc.Api.RawEventResponse is now optional and marked @deprecated. A new test checks that a getEvents event without the field parses.
  • ContractCredited (Horizon contract_credited effect) gains optional contract_muxed and contract_muxed_id string fields.
  • Changelog entries for both, and regenerated RPC reference docs (line numbers only).

Why

The RPC release that ships with Protocol 30 no longer returns inSuccessfulContractCall from getEvents (stellar-rpc#1050). The parser never read the field, so nothing fails at runtime, but the type said it was always a boolean. Making it optional makes the type match what new servers send. Older servers still send it, so the field stays for now and goes away in the next major. Under strict, code that uses it as a boolean may now fail to compile; the changelog calls this out.

Horizon adds the two fields when a Stellar Asset Contract transfer or mint sends to a CAP-84 muxed contract (W…) address (stellar-horizon#237). This change is additive.

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Oct 20, 2026
@Ryang-21
Ryang-21 requested review from quietbits and a balanced review from Copilot October 20, 2026 23:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The localized type updates preserve runtime behavior, include regression coverage, and have no unresolved findings.

No open issues 🎉

What changed in this PR

Aligns SDK response types with Protocol 30 RPC and Horizon server updates.

Changes:

  • Makes inSuccessfulContractCall optional and deprecated, with a regression test for its absence.
  • Adds optional muxed-contract fields to Horizon credit effects.
  • Updates the changelog and generated RPC reference documentation.
File Description
test/​unit/​server/​soroban/​get_events.test.ts Tests events without the deprecated field.
src/​rpc/​api.ts Updates the shared event response type.
src/​horizon/​types/​effects.ts Adds muxed-contract address and ID fields.
docs/​reference/​network-rpc.md Reflects optionality, deprecation, and source-line changes.
CHANGELOG.md Documents additions and TypeScript compatibility impact.

Review effort: Balanced

@Ryang-21
Ryang-21 merged commit 5371a5c into main Oct 21, 2026
17 checks passed
@Ryang-21
Ryang-21 deleted the p30-rpc-horizon-types branch October 21, 2026 18:00
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants