Skip to content

SPIKE: Protocol 28 (CAP-0084)#981

Draft
sisuresh wants to merge 4 commits into
stellar:masterfrom
sisuresh:p28-cap-0084
Draft

SPIKE: Protocol 28 (CAP-0084)#981
sisuresh wants to merge 4 commits into
stellar:masterfrom
sisuresh:p28-cap-0084

Conversation

@sisuresh

@sisuresh sisuresh commented Jul 3, 2026

Copy link
Copy Markdown

Regenerates JS XDR for CAP-0084 (Muxed Contract Addresses), gated to the next channel.

Changes

  • Pinned curr+next XDR to stellar-xdr#307 head 787382ef2099cca168ca1cb282730d6b7b9e2f16; XDR_FEATURES_NEXT += CAP_0084_MUXED_CONTRACT (CAP-0084 gated to next only).
  • Regenerated next-channel bindings for the SC_ADDRESS_TYPE_MUXED_CONTRACT arm; curr unchanged.
  • Address gains muxedContract(contractId, id), contractId()/muxedId() accessors, fromScAddress/toScAddress support, and display-only <C-strkey>:<id> toString().
  • Updated types/index.d.ts, types/next.d.ts, types/test.ts; added codec-gated address_test.js cases; CHANGELOG entry.

Deferred

Upstream

Downstream

sisuresh added 4 commits June 26, 2026 23:28
Bump XDR pin to stellar-xdr#306 (7b56181) and regen for CAP-0084
muxed contract addresses. Add Address-level encode/decode for the
SC_ADDRESS_TYPE_MUXED_CONTRACT arm (muxedContract factory,
contractId()/muxedId(), <C-strkey>:<id> display). Canonical strkey
deferred — no upstream version byte yet.
The SC_ADDRESS_TYPE_MUXED_CONTRACT arm was leaking into the released
`curr` codec. Per the feature-flag contract a gated CAP def must be
`next`-only until the protocol is enabled.

- Makefile: split XDR_FEATURES into XDR_FEATURES_CURR (CAP_0083) and
  XDR_FEATURES_NEXT (CAP_0083,CAP_0084_MUXED_CONTRACT); regen curr.
- curr_generated.js + types/curr.d.ts: drop the muxed-contract arm.
- address.js: guard the fromScAddress case label with optional chaining
  so the curr-bound Address codec no longer throws when the arm is
  absent (the write path stays dormant until the arm lands in curr).
- address_test.js: codec round-trip cases run only when the active codec
  defines the arm; Address-level assertions stay codec-agnostic.
@sisuresh

sisuresh commented Jul 3, 2026

Copy link
Copy Markdown
Author

sisuresh added a commit to sisuresh/js-stellar-sdk that referenced this pull request Jul 3, 2026
The Makefile pinned 68fa1ac5, which predates the CAP-0084 XDR commit,
and left XDR_FEATURES undefined, so `make generate` could not reproduce
the committed generated codec. Pin XDR_BASE_URL_{CURR,NEXT} to
stellar-xdr@787382ef (CAP-0084 muxed-contract arm) and split into
XDR_FEATURES_CURR=CAP_0083 / XDR_FEATURES_NEXT=CAP_0083,CAP_0084_MUXED_CONTRACT
so curr excludes and next includes the muxed-contract arm, mirroring
stellar/js-stellar-base#981. Drop `docker run -it` for non-TTY/CI regen
and wire the xdrgen#152 const-inlining post-process (scripts/post-process-generated.py)
for curr and next.

Regen deferred: Docker is unavailable in this environment, so
`make generate` was not re-run. The Makefile is now reproducible against
787382ef and the const post-process is wired but not yet executed; the
committed src/base/generated/* (correct CAP-0084 arm content, CI green)
are unchanged.
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