Tezos-Client

This Section is about the tezos-client CLI command, this command lets you interact with the tezos RPC API and also includes a reference wallet implementation, but no graphical user interface.

The tezos-client command needs RPC access to a node, to specify the RPC Endpoint use:

tezos-client --addr <IP>:<PORT>

additionally, to use TLS (https) for this connection, use

tezos-client --tls --addr <IP>:<PORT>

All Commands supported by the client can be viewd with:

tezos-client man

Example Commands

Show All Addresses

~ $ tezos-client list known addresses
test: tz1ibHRkG3fwTfSRt9FsSpGoKpswackhqx5c (encrypted sk known)

Import Addresses:

  tezos-client import secret key <new> <uri> [-f --force]
      Add a secret key to the wallet.
      <new>: new secret_key alias
      <uri>: secret key
      -f --force: overwrite existing secret_key

Generate new Address

tezos-client gen keys <new> [-f --force] [-s --sig <ed25519|secp256k1|p256>]
 Generate a pair of keys.
 <new>: new secret_key alias
 -f --force: overwrite existing secret_key
 -s --sig <ed25519|secp256k1|p256>: use custom signature algorithm

Send Transactions:


 tezos-client transfer <qty> from <src> to <dst> [--fee <amount>] [-D --dry-run]
      [-G --gas-limit <amount>] [-S --storage-limit <amount>]
      [-C --counter <counter>] [--arg <data>] [-q --no-print-source]
    Transfer tokens / call a smart contract.
    <qty>: amount taken from source in ꜩ
    <src>: name of the source contract
    <dst>: name/literal of the destination contract
    --fee <amount>: fee in ꜩ to pay to the baker
    -D --dry-run: don't inject the operation, just display it
    -G --gas-limit <amount>: Set the gas limit of the transaction instead of letting the client decide based on a simulation
    -S --storage-limit <amount>: Set the storage limit of the transaction instead of letting the client decide based on a simulation
    -C --counter <counter>: Set the counter to be used by the transaction
    --arg <data>: argument passed to the contract's script, if needed
    -q --no-print-source: don't print the source code