Skip to content

Latest commit

 

History

History
105 lines (73 loc) · 4.19 KB

File metadata and controls

105 lines (73 loc) · 4.19 KB

wallet-cli current

Show the current (active) account.

Synopsis

wallet-cli current [options]

Options

Option Description
--qr Also render the receive address for the selected network as a scannable QR code in the terminal, with the full address printed below it for manual verification; text output only

Plus the global options (--account overrides which account is shown).

An account carries one address per chain family, and the text output lists every address it has. --network selects which one --qr encodes; it does not filter the listing, and no node is contacted.

Examples

wallet-cli current
Active account: main
  TRON address  TE9kPMtaMjfZN95CuPRsCHUQGWwx9EcJW8
  EVM address   0x7B28FE10FBccE88c3967ff0Fd64f1ffB46b46C9C

The header follows data.active, not the flag: it reads Selected account: when --account names an account other than the active one, and stays Active account: otherwise — including when --account happens to name the active account.

Add --qr to also render the active account's address as a scannable receive QR code, drawn with block characters after the address list and followed by a Receive address line carrying the full value. Purely local — the address comes from local keystore metadata, no node access:

wallet-cli current --qr
Active account: main
  TRON address  TE9kPMtaMjfZN95CuPRsCHUQGWwx9EcJW8
  EVM address   0x7B28FE10FBccE88c3967ff0Fd64f1ffB46b46C9C

[ scannable QR code of the TRON address, drawn in the terminal ]
Receive address  TE9kPMtaMjfZN95CuPRsCHUQGWwx9EcJW8

The QR encodes one address — the receive address for the selected network. Pass --network to choose which:

wallet-cli current --qr --network eip155:11155111

The QR is a terminal rendering only and scans from a real terminal (where the block characters line up). In JSON mode no QR pixels are rendered; --qr validates that the selected account has an address for the selected network and adds that value as data.receiveAddress. If the text terminal is non-interactive or too narrow to fit the QR, it degrades to printing the addresses with a warning:

warning: terminal is non-interactive or too narrow for a complete QR code; showing the full address only
wallet-cli current -o json
{"schema":"wallet-cli.result.v1","success":true,"command":"current","data":{"accountId":"wlt_z259a1hq.0","label":"main","type":"seed","index":0,"active":true,"addresses":{"tron":"TE9kPMtaMjfZN95CuPRsCHUQGWwx9EcJW8","evm":"0x7B28FE10FBccE88c3967ff0Fd64f1ffB46b46C9C"},"seedId":"wlt_z259a1hq","derivationPath":null},"meta":{"durationMs":14,"warnings":[]},"chain":{"family":"tron","network":"tron:728126428","chainId":"728126428"}}

With no active account yet, it fails with missing_wallet_address (exit 1):

wallet-cli current
error [missing_wallet_address]: no active account; import one first

Output

data is one account entry, in the same shape list returns.

Field Type Meaning
accountId string Account id
label string Account label
type string seed / privateKey / watch / ledger
index number | null HD derivation index; null for non-HD accounts
active boolean true for the active account; false when --account selected a different one
addresses object One entry per family the account can produce: tron (base58) and/or evm (0x, EIP-55 checksummed)
derivationPath null Always null; current does not unlock the seed or provide derivation information
seedId string Owning seed wallet id (seed accounts only)
family string Chain family this account is bound to — single-family accounts (watch, ledger) only
receiveAddress string Present in JSON only when --qr was requested; address selected by --network

The chain block echoes the network selected for display; the command contacts no node.

Exit status

0 success · 1 execution failure · 2 usage error. See machine-interface.

See also

use · list