Repository navigation
Add Java examples to the archival, conventions, conversions, events, and RPC guides - #3131
Merged
Merged
Conversation
This was referenced Nov 13, 2026
ElliotFriend
force-pushed
the
docs-agent/1770-java-b
branch
from
November 13, 2026 19:01
51521f6 to
c18db19
Compare
Contributor
Author
|
🤖 Automated message from the Stellar Triage Bot. Reviewing my own PR before hand-off. Thanks for the rebase, @ElliotFriend. Verified against java-stellar-sdk 6.0.0, and the checks pass at What I checked
|
ElliotFriend
approved these changes
Nov 13, 2026
ElliotFriend
left a comment
Contributor
There was a problem hiding this comment.
All the Java blocks compile against stellar-sdk 6.0.0, and every page ran on testnet. The restore fee fix is right too. Thanks!
ElliotFriend
force-pushed
the
docs-agent/1770-java-b
branch
from
November 13, 2026 19:26
91cf1a0 to
13818b4
Compare
TransactionBuilder.build() adds the restore preamble's resource fee, so the Java restore-data tab no longer adds minResourceFee by hand. The Java ingest tab no longer points at the Prisma model or SQLAlchemy from other tabs.
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
ElliotFriend
force-pushed
the
docs-agent/1770-java-b
branch
from
November 13, 2026 19:29
13818b4 to
edb1cfd
Compare
This branch was successfully deployed
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.
🤖 Automated message from the Stellar Triage Bot.
Refs #1770
Working this because @ElliotFriend approved the stacked language plan on #1770 and asked me to keep building it. This is Java B: Java tabs on the 14 other
build/guidespages. Base: #3127 (docs-agent/1770-java-a). @ElliotFriend rebased this branch onto9e877629on 2026-11-13. Next: Java C (learn/) and Java D.Merge order: #3126, then #3127, then this PR.
Why this matters
A reader who follows the guides in Java has no Java code on these 14 pages today.
Pages
archival/:create-restoration-footprint,extend-persistent-entry,restore-contract,restore-dataconventions/:deploy-sac-with-code,extending-wasm-ttlconversions/:address-conversions,bytes-conversions,scval-conversions,string-conversionsevents/:consume,ingestrpc/:generate-ledger-keys,retrieve-contract-codeChoices for review
org.xerial:sqlite-jdbc3.54.1.0 (the newest on Maven Central), not an ORM. The page says so. JDBC has no event listeners, so the "Streaming events" tab wraps inserts in aninsertEventmethod, like the Go tab's GORM hook.restore-dataandrestore-contractadd methods to theSubmitTxclass from the submitTx guide.extend-persistent-entrydefines oneExtendTtlclass and anextendFootprintTTLhelper, like the Go tab.restore-data): the JavaTransactionconstructor is package-private, so the tab rebuilds the transaction withTransactionBuilderfrom anAccountat the old sequence number, then callsSorobanServer.assembleTransaction.getSorobanInclusionFee().getP90(). Onrestore-data,TransactionBuilder.build()adds the restore preamble's resource fee, so the tab does not addminResourceFeeitself (as in the Go tab).create-restoration-footprintkeeps the caller'sfeeparameter, like the other tabs.Sweep
address-conversions(how to check the address kind),deploy-sac-with-code(description and prerequisites),restore-contract,extend-persistent-entry,create-restoration-footprint,ingest.Verified
Against java-stellar-sdk 6.0.0, the newest release (also the newest on Maven Central). The issue cites no version.
Address(String)throwsIllegalArgumentException;getAddressType(),toSCVal(),toSCAddress(),fromAccount,fromContract,fromSCVal:Address.java.Scv.toSymbol,toInt32,toBytes,toString,fromBytes,fromString,fromSymbol,fromInt32,toLedgerKeyContractInstance:scval/Scv.java.LedgerKey.LedgerKeyContractData/LedgerKeyContractCodebuilders,ContractExecutable.getWasm_hash(),CONTRACT_EXECUTABLE_WASM,SCVal.fromXdrBase64,XdrElement.toXdrByteArray/toXdrBase64:xdr/.SorobanDataBuilder(zeroed resources by default,setReadOnly,setReadWrite),TransactionBuilder.setSorobanData(String),TransactionBuilder.build()adds the Soroban data's resource fee (TransactionBuilder.java:196-198),ExtendFootprintTTLOperation,RestoreFootprintOperation,createStellarAssetContractOperationBuilder.SorobanServer.prepareTransaction(tx, sim),assembleTransaction,simulateTransaction,getLedgerEntries,getEvents,getHealth;RestorePreamble.getTransactionData()is a base64 string;GetEventsRequest.EventFilter.topicsisCollection<Collection<String>>.entriesas an empty list, never null (get_ledger_entries.go:94).pnpm format:mdxandpnpm checkpassed at the first head. Thechecksjob passed atc18db192.Not verified
javacandmvnneed approval in this lane. A maintainer runs the Java blocks before merge.// OUTPUT:lines onretrieve-contract-codecome from the other tabs, not from a Java run.Found in existing code (not changed here)
#3119 holds these defects but carries
bot:hands-off, so I list them here:docs/build/guides/archival/restore-data.mdx, JavaScript and Python tabs: the restore transaction addsminResourceFeeby hand, and the builder adds the same resource fee again (js-stellar-sdk 17.4.0src/base/transaction_builder.ts:1136-1140, py-stellar-base 17.0.1transaction_builder.py:149-151). The JavaScript retry also addssim.minResourceFeebeforebuild()adds the resource fee. The Go tab is correct.docs/build/guides/events/ingest.mdx:143and:185, Go tab: the text points at the Prisma model and at SQLAlchemy from other tabs.Overlaps
Stacked on #3127, so it overlaps #3124 (Go B) and #3127 on the same pages by design. The old pre-Mintlify sweeps #723 and #2231 also touch
events/consume,events/ingest, andcreate-restoration-footprint.