Extract a standalone Rust transaction builder crate from the CLI
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- backend-api-design, cli
Research direction
Start by reading tx/builder/transaction.rs and the surrounding tx/builder helpers, then compare assembled.rs and signer/ with the CLI-coupled code under commands/tx/new/. Define the standalone crate boundaries and API against the listed SDK prior art; done means the crate provides the proposed building, signing, assembly, and operation helpers without CLI concerns and the CLI can consume it incrementally.
Written by the indexing model from the issue text.
Description
Summary
Every Stellar SDK (Python, JS, Java, Go) provides a high-level TransactionBuilder for constructing, signing, and submitting transactions. Rust has no equivalent — developers must work directly with stellar-xdr types, which is low-level and error-prone.
The CLI already contains transaction-building logic (builder traits, operation construction, signing, simulation/assembly), but it's tightly coupled to CLI concerns (clap, config, printing). Extracting this into a standalone crate would fill the gap and give Rust developers a first-class transaction building experience.
What exists today in the CLI
TxExttrait for building transactions (tx/builder/transaction.rs) — already has no CLI dependenciesAmountandAssethelpers (tx/builder/)Assembledstruct for post-simulation transactions (assembled.rs) — depends only onstellar-xdr+soroban-rpcSignerabstraction with local key, Ledger, Lab, and secure store backends (signer/)- 23 operation builders (
commands/tx/new/) — currently coupled to clap/config - Soroban authorization signing — mostly pure crypto
Proposed scope
A new workspace crate (e.g. cmd/crates/stellar-transaction-builder/) providing:
TransactionBuilderwith a fluent API matching other SDKs: source account, fee, sequence number, operations, memo, preconditions,build()- Operation helper functions for all 23 operation types (pure functions: XDR types in,
OperationBodyout) TransactionSignertrait decoupled from CLI printing/configAssembledtransaction wrapper and simulation support (feature-gated behindrpc)- Soroban auth signing utilities
What stays in the CLI
sim_sign_and_send_txorchestrator (caching, printing, explorer URLs)- clap argument parsing and config/address resolution
- User interaction (prompts, confirmations)
Prior art
- Python:
stellar_sdk.TransactionBuilder— fluent method chaining, 60+ operation append methods - JS:
StellarSdk.TransactionBuilder— constructor with options,addOperation(),build() - Java:
org.stellar.sdk.TransactionBuilder— builder pattern with method chaining - Go:
txnbuild.NewTransaction(TransactionParams{...})— struct-based params with operation array
All follow the same separation: building (pure) → simulation (async) → signing (crypto) → submission (async).
Suggested approach
- Create the new crate alongside existing code (no breaking changes to CLI)
- Migrate CLI to consume the new crate incrementally
stellar-ledgeralready demonstrates this extraction pattern successfully
- Dominant language
- Rust
- Stars
- 123
- Forks
- 141
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stellar/stellar-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-cli#2384 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
stellar/stellar-cli#2347 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
stellar/stellar-cli#2723 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
stellar/stellar-cli#2722 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
stellar/stellar-cli#2703 ·
All issues in stellar/stellar-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100