Skip to content

feat(ts): implement TypeScript wallet CLI#941

Open
gummy789j wants to merge 2 commits into
release_v4.9.7from
feat/ts-version
Open

feat(ts): implement TypeScript wallet CLI#941
gummy789j wants to merge 2 commits into
release_v4.9.7from
feat/ts-version

Conversation

@gummy789j

Copy link
Copy Markdown
Collaborator

Summary

Introduce a TypeScript implementation of the TRON wallet CLI with a hexagonal architecture, secure local wallet management, interactive TTY workflows, and software/Ledger signing.

Highlights

  • Add TRON account, wallet, token, transaction, staking, contract, block, network, and configuration commands.
  • Support TRON Mainnet, Nile, and Shasta.
  • Add encrypted local keystore and secure stdin/TTY secret handling.
  • Add interactive wallet creation, import, backup, deletion, and Ledger account selection.
  • Support software and Ledger transaction signing.
  • Add transaction dry-run, confirmation waiting, and structured transaction output.
  • Provide stable wallet-cli.result.v1 JSON envelopes and deterministic exit codes.
  • Redact addresses belonging to disabled chain families.
  • Organize the implementation using domain, application, inbound adapter, outbound adapter, and bootstrap layers.
  • Enforce architectural boundaries with dependency-cruiser.
  • Add unit, integration, golden-output, help-parity, and Nile live-test tooling.
  • Add architecture and development documentation.
  • Use npm for dependency and package management.

Architecture

The implementation follows a hexagonal architecture:

  • domain: wallet and TRON value objects and domain rules
  • application: use cases, services, contracts, and ports
  • adapters/inbound: CLI parsing, prompting, rendering, and output
  • adapters/outbound: TRON RPC, keystore, Ledger, persistence, pricing, and configuration
  • bootstrap: dependency composition and family registration

TRON-specific behavior is registered through family definitions without introducing a universal-chain abstraction.

CLI Guarantees

  • Stable wallet-cli.result.v1 JSON output
  • Deterministic 0, 1, and 2 exit codes
  • Exactly one terminal stdout frame in JSON mode
  • No secrets passed through argv or environment variables
  • Encrypted wallet storage
  • Software and Ledger signing support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant