Getting started¶
The first-run flow: build, create an account, unlock it, inspect it, and send your first TRX — all from the interactive prompt.
Quickstart¶
Build, create an account, and send your first transfer — all from the interactive prompt:
# 1. Build
$ git clone https://github.com/tronprotocol/wallet-cli.git
$ cd wallet-cli/java && ./gradlew build && cd build/libs
# 2. Start the interactive wallet
$ java -jar wallet-cli.jar
# 3. In the wallet prompt: create an account (or ImportWallet), unlock, and inspect it
> RegisterWallet # prompts twice for the password, then for mnemonic length
> Login # unlock the account
> GetAddress # show your address
> GetBalance # TRX balance
# 4. Send 1 TRX (amounts are in SUN; 1 TRX = 1,000,000 SUN)
> SendCoin <toAddress> 1000000
On mainnet these commands move real funds. While learning, switch to a testnet with
SwitchNetwork(Nile or Shasta) and top up from that network's faucet.
How to create account¶
You can create accounts by transferring funds to non-existing accounts, or by initiating a transaction to create an account using the CreateAccount command. Either way the payer burns getCreateNewAccountFeeInSystemContract (1 TRX on mainnet today), plus getCreateAccountFee (0.1 TRX) only when its staked Bandwidth cannot cover the transaction — so 1 to 1.1 TRX on mainnet today. See Account commands.
See commands/account for the full CreateAccount example.
Next steps¶
- command-flow — a worked end-to-end session
- commands/wallet — create / import / back up wallets
- commands/network — switch to a testnet
- concepts/resources — bandwidth and energy