Add stellar network id to return the network id.#2407
Open
Conversation
eb17dee to
f0c8ff9
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new stellar network id command that outputs the network ID (SHA-256 hash of the network passphrase), implementing issue #2390. This command addresses a common pain point where users had to manually compute the network ID using shell tools like sha256sum, which was error-prone.
Changes:
- Adds a new
stellar network idsubcommand with support for plain text and JSON output formats - Integrates the command into the network module with proper error handling
- Includes a basic integration test to verify the command works with testnet
- Updates the CLI documentation with the new command usage
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| cmd/soroban-cli/src/commands/network/mod.rs | Registers the new id subcommand in the network module enum and error handling |
| cmd/soroban-cli/src/commands/network/id.rs | Implements the network ID command with SHA-256 hashing and multiple output formats |
| cmd/crates/soroban-test/tests/it/integration/network.rs | Adds integration test to verify the network ID command works correctly |
| FULL_HELP_DOCS.md | Documents the new command including options and usage examples |
mootz12
requested changes
Feb 20, 2026
mootz12
reviewed
Feb 20, 2026
12683ef to
3bf299d
Compare
Member
Maybe this command should be |
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.
What
Why
Implement #2390.
Known limitations
N/A