镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.84 KB

File metadata and controls

40 lines (27 loc) · 1.84 KB

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 covers an on-chain account-creation fee — the sum of the chain parameters getCreateAccountFee and getCreateNewAccountFeeInSystemContract, about 1.1 TRX on mainnet today. See Account commands.

See commands/account for the full CreateAccount example.

Next steps