Watch Mode

The watch mode provides a quick way to tail the latest events from the blockchain. It connects directly to a Cardano node using either node-to-client or node-to-node protocols. The output is sent into the terminal in a human-readable fashion.

The output is colorized by type of event and dynamically truncated to fit the width of the terminal. The speed of the output lines is throttled to facilitate visual inspection of each even, otherwise, all events for a block would be output simultaneously.

Usage

To start Oura in watch mode, use the following command from your terminal:

oura watch [OPTIONS] <socket>
  • <socket>: this a required argument that specifies how to connect to the cardano node. It can either be a tcp address (<host>:<port> syntax) or a file path pointing to the location of the unix socket.

Options

  • --bearer <bearer>: an option that specifies the type of bearer to use. Possible values are tcp and unix. If omitted, the value unix is used as default.
  • --magic <magic>: the magic number of the network you're connecting to. Possible values are mainnet, testnet, preview, preprod or a numeric value. If omitted, the value mainnet is used as default.
  • --mode <mode>: an option to force the which set of mini-protocols to use when connecting to the Cardano node. Possible values: node and client. If omitted, Oura will infer the standard protocols for the specified bearer.
  • --since <slot>,<hash>: an option to specify from which point in the chain Oura should start reading from. The point is referenced by passing the slot of the block followed by a comma and the hash of the block (<slot>,<hash>). If omitted, Oura will start reading from the tail (tip) of the node.
  • --wrap: indicates that long output text should break and continue in the following line. If omitted, lines will be truncated to fit in the available terminal width.

Examples

Watch Live Data From A Remote Relay Node

oura watch relays-new.cardano-mainnet.iohk.io:3001 --bearer tcp

Watch Live Data From A Local Node Via Unix Socket

oura watch /opt/cardano/cnode/sockets/node0.socket --bearer unix

Watch Live Data From The Tip Of A Local Testnet Node

oura watch /opt/cardano/cnode/sockets/node0.socket --bearer unix --magic testnet

Watch Data Starting At A Particular Block

oura watch relays-new.cardano-mainnet.iohk.io:3001 \
    --bearer tcp \
    --since 49159253,d034a2d0e4c3076f57368ed59319010c265718f0923057f8ff914a3b6bfd1314

Watch Live Data From the "Preview" testnet

oura watch preview-node.world.dev.cardano.org:30002 --bearer tcp --magic preview

Watch Live Data From the "Pre-Production" testnet

oura watch preprod-node.world.dev.cardano.org:30000 --bearer tcp --magic preprod