Summary
The legacy CLI wallet under tools/cli-wallet appears to generate RustChain addresses in an older/incompatible Base58 format, while current wallet code and docs say signed-transfer addresses must be RTC + 40 hex characters.
Evidence
tools/cli-wallet/src/main.rs:105-109 hashes the secp256k1 public key and formats the address as RTC + base58(hash[0..20]).
tools/cli-wallet/src/main.rs:148-155 validates addresses by Base58-decoding the part after RTC and only requiring length >= 25.
- Current native wallet code derives addresses as
RTC + sha256(ed25519_public_key_bytes)[:40] in rustchain-wallet/src/keys.rs:75-80.
docs/API_WALKTHROUGH.md:211 says signed transfers require 43-character addresses: RTC + 40 hex.
Why this is confusing
A newcomer following the CLI wallet README can generate an address that starts with RTC, but the suffix is Base58 and the length is not the documented 40-hex format. That address can then fail in newer validation paths such as bridge/faucet/signed-transfer checks that expect ^RTC[0-9a-fA-F]{40}$.
Expected behavior
All wallet generators and validators should agree on one public format. If the modern format is canonical, tools/cli-wallet should derive RTC + first 40 hex chars of SHA-256 over the public key and validate with the same 43-character hex rule.
Actual behavior
tools/cli-wallet still uses Base58 address derivation/validation and secp256k1 key material, while the newer wallet uses Ed25519 and 40-hex RTC addresses.
Suggested fix
Either deprecate/remove the older tools/cli-wallet README/tool from onboarding paths, or update it to match rustchain-wallet address derivation and validation.
Summary
The legacy CLI wallet under
tools/cli-walletappears to generate RustChain addresses in an older/incompatible Base58 format, while current wallet code and docs say signed-transfer addresses must beRTC+ 40 hex characters.Evidence
tools/cli-wallet/src/main.rs:105-109hashes the secp256k1 public key and formats the address asRTC+base58(hash[0..20]).tools/cli-wallet/src/main.rs:148-155validates addresses by Base58-decoding the part afterRTCand only requiring length >= 25.RTC+sha256(ed25519_public_key_bytes)[:40]inrustchain-wallet/src/keys.rs:75-80.docs/API_WALKTHROUGH.md:211says signed transfers require 43-character addresses:RTC+ 40 hex.Why this is confusing
A newcomer following the CLI wallet README can generate an address that starts with
RTC, but the suffix is Base58 and the length is not the documented 40-hex format. That address can then fail in newer validation paths such as bridge/faucet/signed-transfer checks that expect^RTC[0-9a-fA-F]{40}$.Expected behavior
All wallet generators and validators should agree on one public format. If the modern format is canonical,
tools/cli-walletshould deriveRTC+ first 40 hex chars of SHA-256 over the public key and validate with the same 43-character hex rule.Actual behavior
tools/cli-walletstill uses Base58 address derivation/validation and secp256k1 key material, while the newer wallet uses Ed25519 and 40-hex RTC addresses.Suggested fix
Either deprecate/remove the older
tools/cli-walletREADME/tool from onboarding paths, or update it to matchrustchain-walletaddress derivation and validation.