octez-client
Interact with the Tezos blockchain
TLDR
Configure the client with a connection to a Tezos RPC node such as
Create an account and assign a local alias to it
Get the balance of an account by alias or address
Transfer tez to a different account
Originate (deploy) a smart contract, assign it a local alias, and set its initial storage as a Michelson-encoded value
Call a smart contract by its alias or address and pass a Michelson-encoded parameter
Display help
SYNOPSIS
octez-client [global options] <command> [command options] [arguments]
Examples:
octez-client get balance for
octez-client transfer
octez-client originate contract
PARAMETERS
--base-dir
Specifies the directory where client data (e.g., wallet, client configuration) is stored. Default is ~/.tezos-client.
--endpoint
Specifies the RPC endpoint of the Tezos node to connect to (e.g., http://localhost:8732).
--block
Specifies the block to use for queries (e.g., head, genesis, a specific hash or level).
--chain
Specifies the chain ID to interact with (e.g., main, test).
--force, --no-confirm
Skips confirmation prompts for critical operations, proceeding without user intervention.
--dry-run
Simulates an operation without sending it to the Tezos network, showing potential outcomes and fees.
--fee
Specifies the transaction fee in mutez to include with the operation.
--burn-cap
Specifies the maximum amount of tez to burn for contract storage or gas.
--verbose-signing
Displays the byte stream being signed for an operation, useful for verification.
DESCRIPTION
The octez-client is the primary command-line interface for interacting with the Tezos blockchain. It allows users to perform a wide range of operations, including managing Tezos accounts (generating keys, importing/exporting private keys, setting aliases), sending tez (the native cryptocurrency), deploying and interacting with smart contracts written in Michelson or high-level languages like SmartPy or Ligo, and querying the blockchain state such as account balances, block information, and contract storage.
The client connects to a running Octez node, which synchronizes with the Tezos network. It supports various network configurations, allowing connection to mainnet, testnets, or local development networks. octez-client is an essential tool for developers, bakers, and users who prefer command-line interaction over graphical user interfaces to manage their Tezos assets and participate in the ecosystem. It abstracts away the complexities of the underlying RPC calls, providing a user-friendly interface for common blockchain operations.
CAVEATS
Node Dependency: octez-client requires a running Octez node to connect to, either locally or remotely. Without a synchronized node, it cannot perform network operations.
Complexity: While powerful, the command-line interface can be complex for new users due to the wide array of commands, options, and Tezos-specific concepts (e.g., mutez, delegates, smart contract storage).
Key Security: Private keys stored locally in the client's base directory are susceptible to local security breaches. Users must ensure their systems are secure and consider hardware wallets for significant funds.
Network Latency: Operations involving the network are subject to network latency and node synchronization status, which can affect response times and transaction confirmation.
KEY MANAGEMENT
octez-client provides robust capabilities for managing cryptographic keys, including generating new key pairs, importing existing ones, setting aliases for addresses, and interacting with hardware security modules (HSMs) or remote signers. This is crucial for securing assets and signing operations on the Tezos network.
RPC INTERACTION
Under the hood, octez-client translates user commands into RPC (Remote Procedure Call) requests that are sent to a connected Octez node. This abstraction layer simplifies blockchain interactions, allowing users to perform complex operations without needing to understand the intricacies of the Tezos RPC API directly.
HISTORY
The octez-client command is part of the Octez software suite, which constitutes the reference implementation of the Tezos protocol. It evolved from its predecessor, tezos-client, as part of the broader rebranding of the Tezos node and associated tools to Octez. This change reflects the project's continuous development, modularity, and focus on providing a robust and extensible blockchain platform. Its functionality has expanded significantly with each Tezos protocol upgrade, introducing new features for smart contracts, governance, and economic models.
SEE ALSO
octez-node(1), octez-baker(1), octez-signer(1), curl(1)