SPIKE: Protocol 28 (CAP-0084)#979
Closed
sisuresh wants to merge 1 commit into
Closed
Conversation
- Bump XDR rev pin (curr+next) to stellar/stellar-xdr@2769fed (PR stellar#305 head) carrying the CAP_0084 #ifdef gate; add CAP_0084 to XDR_FEATURES and the `stellar-xdr xfile preprocess --features` step on the .x fetch rules. - New XDR: SCAddressType.SC_ADDRESS_TYPE_MUXED_CONTRACT=5, struct MuxedContract { uint64 id; ContractID contractId; }, SCAddress muxedContract arm. curr/next regenerated byte-identical. - Make generated-JS const inlining reproducible and terser-safe: scripts/post-process-generated.py inlines bare const use sites (xdr.string(SCSYMBOL_LIMIT) -> xdr.string(32)) so terser cannot DCE an unbound identifier; wired as a post-xdrgen Makefile step for curr and next. - Regenerate types/{curr,next}.d.ts with MuxedContract; patch the dts Makefile recipes (node:lts-alpine + apk add yarn, drop -it). - Address now decodes/encodes the muxed-contract arm: Address.muxedContract(), fromScAddress/toScAddress round-trip (uint64 preserved as xdr.Uint64), contractId()/muxedId() accessors, <C-strkey>:<id> display, toBuffer() throws. Public typings (types/index.d.ts, types/test.ts) and unit tests added. Deferred: a canonical muxed-contract *strkey* (so the display string isn't constructor-parsable) — pending upstream standardization; mirrors go-stellar-sdk#1, which has the same residual gap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SPIKE: bump
js-stellar-basefor Protocol 28 / CAP-0084 (muxed contract addresses).Changes
stellar-xdr@2769fed(PR WIP: feat(typescript): add XDR typings #305 head) with theCAP_0084feature gate; newSC_ADDRESS_TYPE_MUXED_CONTRACTarm +MuxedContract { uint64 id; ContractID contractId; }.AddressgainsmuxedContract(contractId, id),fromScAddress/toScAddressround-trip,contractId()/muxedId()accessors,<C-strkey>:<id>display.toBuffer()throws for this arm.types/{curr,next}.d.ts+ publicAddresstypings; new muxed-contract unit tests + CHANGELOG.Deferred
Addressctor) — pending upstream standardization; mirrors go-stellar-sdk.Links
2769fed)js-stellar-sdkSPIKE →stellar-laboratory