Checking the Stellar network passphrase before signing

A deployment moves from testnet to the public network, but the signing service and RPC client read different configuration files. Catching that mismatch before signing saves a round of failed submissions.

Compare the full passphrase

Request the network configuration from the destination RPC. Compare result.passphrase byte for byte with the passphrase configured in the signer. For public Stellar the expected string is Public Global Stellar Network ; September 2015. Preserve case, punctuation and spaces when checking it. Log the expected and observed network names so an operator can trace a configuration mix-up.

{"jsonrpc":"2.0","id":2,"method":"getNetwork"}

Bind the check to the selected endpoint

If a public-network deployment receives a test-network passphrase, stop that submission and inspect the selected RPC URL and signer profile. Changing the URL after the preflight invalidates the comparison. Run it again when switching failover endpoints. Nodes in different environments can report the same protocolVersion; matching that integer alone cannot distinguish their signing domains.

developers.stellar.org getNetwork