Repository navigation
Description
Note
Automated notice: Stellar Raven filed this issue from its automated evaluation pipeline. The issue includes evidence and a public source record. Please verify the live surface before you act.
Finding
The fee-payer signing example calls removed XDR getter methods with the current JavaScript SDK.
It throws TypeError: txEnvelope.v1 is not a function while extracting Soroban data.
The failure occurs before the fee-payer account read, simulation, assembly, or signing.
The example imports @stellar/stellar-sdk without identifying an older supported version.
The example already calls assembleTransaction(...).build() correctly.
The x402 quickstart repeats the same failing XDR access chain.
Evidence
The live Signing Contract Invocations guide contains this fee-payer extraction:
const txEnvelope = xdr.TransactionEnvelope.fromXDR(transactionXdr, "base64");
const sorobanData = txEnvelope.v1()?.tx()?.ext()?.sorobanData();The source snapshot contains the same code.
Both fresh reads succeeded on 2026-10-09.
This observed docs commit does not establish the first commit with the stale access chain.
The SDK 17.0.0 release introduced the XDR API rewrite.
It replaces getter methods with properties and discriminated union values.
The migration guide explains the changed access pattern.
The current envelope source exposes type, v1, and value as properties.
The callable fromXDR alias still works in the tested version.
The first runtime failure is the call to v1, not the parser.
Install the tested SDK in an empty directory:
npm install --ignore-scripts @stellar/[email protected]Run this minimal reproduction with node --input-type=module:
import { Account, Keypair, Networks, Operation, SorobanDataBuilder,
TransactionBuilder, xdr } from "@stellar/stellar-sdk";
const signer = Keypair.random();
const tx = new TransactionBuilder(new Account(signer.publicKey(), "0"), {
fee: "100", networkPassphrase: Networks.TESTNET,
}).setTimeout(30).setSorobanData(new SorobanDataBuilder().build())
.addOperation(Operation.invokeContractFunction({
contract: "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC",
function: "symbol", args: [],
})).build();
const transactionXdr = tx.toXDR();
const txEnvelope = xdr.TransactionEnvelope.fromXDR(transactionXdr, "base64");
const sorobanData = txEnvelope.v1()?.tx()?.ext()?.sorobanData();SDK 17.2.1 reports TypeError: txEnvelope.v1 is not a function.
The reproduction makes no network request.
Additional local checks execute the complete Step 2 snippet with local RPC responses.
They replace the placeholder secret with a newly generated local keypair.
They confirm the failure before any RPC call.
They check the corrected complete flow and the missing-data branch.
The corrected flow rebuilds, simulates, assembles, signs, and submits to the local fixture.
The missing-data branch rejects before any RPC fixture call.
These checks prove SDK mechanics, not live network execution or authorization policy.
A scan of 919 current docs source files found two copies of this specific access chain.
The x402 quickstart source uses tx.toEnvelope().v1()?.tx()?.ext()?.sorobanData().
That guide installs @stellar/stellar-sdk without a version pin.
Its isolated SDK section throws TypeError: tx.toEnvelope(...).v1 is not a function with the same fixture.
The corrected section preserves Soroban data and adjusts the fee to "1".
The check does not execute the full payment client or make a payment.
Additional recorded evidence:
- 2026-10-09 live signing guide and source at 2efd1d5;
const txEnvelope = xdr.TransactionEnvelope.fromXDR(transactionXdr, "base64"); - 2026-10-09 @stellar/stellar-sdk 17.2.1 local execution: the current fee-payer example throws TypeError: txEnvelope.v1 is not a function before any RPC call.
- 2026-10-09 SDK 17.0.0 release and XDR migration guide; https://github.com/stellar/js-stellar-sdk/releases/tag/v17.0.0; https://github.com/stellar/js-stellar-sdk/blob/v17.0.0/docs/migration/xdr-migration.md
- 2026-10-09 adjacent x402 source and local SDK section check;
const sorobanData = tx.toEnvelope().v1()?.tx()?.ext()?.sorobanData();
Recommendation
Replace the getter chain with the supported SDK 17 property access pattern.
Check the envelope and extension variants before reading Soroban data:
const txEnvelope = xdr.TransactionEnvelope.fromXdr(transactionXdr, "base64");
if (txEnvelope.type !== "envelopeTypeTx") {
throw new Error("Expected a v1 transaction envelope");
}
const txExt = txEnvelope.value.tx.ext;
if (txExt.type !== "sorobanData") {
throw new Error("Missing Soroban data");
}
const sorobanData = txExt.value;Apply the same checked extraction to the x402 quickstart's envelope.
Retain the existing .build() before signing.
State the tested SDK version and link the XDR migration guide.
Execute both examples against that version with local service fixtures.
Source Record
Raven recorded this finding as sd-058 (stellar-docs, discovered 2026-10-09).
Public source record: improvements/stellar-docs/sd-058-fee-payer-sdk17-xdr-access.md
Immutable source snapshot: 6f2ddd72b3a2
Resolution Handoff
When you deploy a fix, link the resolving issue or pull request to the source record.
Then notify Raven through:
Include the finding ID and the resolving issue or pull request.
Include the deployed version or timestamp. Include the smallest live recheck.
Raven verifies the live surface before it sets the finding to fixed-upstream.
An issue closure or merged pull request does not prove the fix.
A separate reviewer repeats the live check before Raven retires the active finding.
Raven keeps a commit-pinned snapshot when one is available.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
stellar-doxie commentedon Oct 30, 2026
🤖 Automated message from the Stellar Triage Bot.
Working this because Raven filed it (label
raven).Open PR #2932 already fixes this. It says "Closes #2909". I will not open a second PR.
main. It needs a merge ofmainbefore it can land./triagecomment or thebot:takelabel.stellar-doxie commentedon Nov 9, 2026
🤖 Automated message from the Stellar Triage Bot.
Following up because #2932 merged and closed this issue.
v1()call is gone.kalepail commentedon Nov 9, 2026
Raven independently rechecked sd-058 on 2026-11-09 and confirmed the original trigger is resolved live.
Live recheck: 2026-11-09: https://developers.stellar.org/docs/build/guides/transactions/signing-soroban-invocations.md and https://developers.stellar.org/docs/build/agentic-payments/x402/quickstart-guide.md use SDK 17 type/value access and contain no
.v1()chain. The served extraction and rebuild blocks ran against @stellar/stellar-sdk 17.4.0 on unsigned local transactions: Soroban data is extracted byte-identically, the missing-data control throws, and the x402 rebuild keeps the Soroban data with fee 1. Nothing was signed or submitted.The active finding is being retired under the ephemeral improvements lifecycle. Immutable source snapshot: https://github.com/stellar-experimental/stellar-raven/blob/ac3adf30192b2e9039576ea2ed065a594d526fb6/improvements/stellar-docs/sd-058-fee-payer-sdk17-xdr-access.md
Use SDK 17 XDR fields in the fee-payer and x402 examples (stellar#2932)