CLI Overview

Torsten provides torsten-cli, a cardano-cli compatible command-line interface for interacting with a running Torsten node and managing keys, transactions, and governance.

Binary

torsten-cli [COMMAND] [OPTIONS]

Command Groups

CommandDescription
addressAddress generation and manipulation
keyPayment and stake key generation
transactionTransaction building, signing, and submission
queryNode queries (tip, UTxO, protocol parameters, etc.)
stake-addressStake address registration, delegation, and vote delegation
stake-poolStake pool operations (retirement certificates)
governanceConway governance (DRep, voting, proposals)
nodeNode key operations (cold keys, KES, VRF, operational certificates)

Common Patterns

Socket Path

Most commands that interact with a running node require --socket-path to specify the Unix domain socket:

torsten-cli query tip --socket-path ./node.sock

The default socket path is node.sock in the current directory.

Testnet Magic

When querying a node on a testnet, pass the --testnet-magic flag:

torsten-cli query tip --socket-path ./node.sock --testnet-magic 2

For mainnet, --testnet-magic is not needed (defaults to mainnet magic 764824073).

Text Envelope Format

Keys, certificates, and transactions are stored in the cardano-node "text envelope" JSON format:

{
  "type": "PaymentSigningKeyShelley_ed25519",
  "description": "Payment Signing Key",
  "cborHex": "5820..."
}

This format is interchangeable with files produced by cardano-cli.

Output Files

Commands that produce artifacts use --out-file:

torsten-cli transaction build ... --out-file tx.body
torsten-cli transaction sign ... --out-file tx.signed

Help

Every command supports --help:

torsten-cli --help
torsten-cli transaction --help
torsten-cli transaction build --help