Skip to content

Default simulation and authorizeInvocation to CAP-71 v2 address credentials - #1653

Merged
Ryang-21 merged 8 commits into
mainfrom
feat/default-cap71-v2-credentials
Aug 17, 2026
Merged

Default simulation and authorizeInvocation to CAP-71 v2 address credentials#1653
Ryang-21 merged 8 commits into
mainfrom
feat/default-cap71-v2-credentials

Conversation

@Ryang-21

Copy link
Copy Markdown
Contributor

What

CAP-71 SOROBAN_CREDENTIALS_ADDRESS_V2 credentials become the default on both ends of the Soroban auth flow, now that the network runs protocol 27. rpc.Server.simulateTransaction's useUpgradedAuth and authorizeInvocation's authV2 both default to true, so simulation asks RPC to record v2 entries and authorizeInvocation builds them. Pass false to either one for the legacy SOROBAN_CREDENTIALS_ADDRESS format. Both flags stay transitional and become no-ops when v2 is mandatory in protocol 28.

simulateTransaction also now always sends useUpgradedAuth in the JSON-RPC request, where it previously omitted the field when the flag was unset. The useUpgradedAuth default reaches everything built on simulation, including contract.AssembledTransaction.simulate() and the useUpgradedAuth method option.

Two things break for callers. Code that reads the credential arm by hand has to handle addressV2 and not just address, or switch to inspectAuthEntry, which normalizes the arms. And a hand-rolled signer that hardcodes the legacy ENVELOPE_TYPE_SOROBAN_AUTHORIZATION preimage now produces signatures the network rejects, so it should use buildAuthorizationEntryPreimage or authorizeEntry, both of which pick the address-bound payload off the entry itself. SDK-driven signing (contract.Client, authorizeEntry, signAuthEntries) needs no change: it signs whichever credential the entry carries.

Tests cover both defaults and both opt-outs. The simulation fixture in simulate_transaction.test.ts pins authV2: false, since it rebuilds and asserts on the legacy arm. The changelog entry goes under a new ## Unreleased heading rather than the published v17.0.0-rc.1 section, and the migration guide, the Protocol 27 auth guide, and the contract-auth guide are updated to describe v2 as the default instead of opt-in.

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Aug 14, 2026
@Ryang-21
Ryang-21 requested a review from quietbits August 14, 2026 21:26
@Ryang-21
Ryang-21 merged commit 623bed0 into main Aug 17, 2026
16 checks passed
@Ryang-21
Ryang-21 deleted the feat/default-cap71-v2-credentials branch August 17, 2026 17:55
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Aug 17, 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.

2 participants