Watch
The watch mode provides a quick way to tail the latest events from blockchain networks. It supports Cardano, Bitcoin, Ethereum, and Substrate blockchains, each with their own subcommands and connection methods.
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 event, otherwise, all events for a block would be output simultaneously.
Usage
The watch command now includes subcommands for different blockchain networks:
Cardano
To watch Cardano blockchain events:
oura watch cardano [OPTIONS] <socket><socket>: 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.
Cardano Options
--bearer <bearer>: an option that specifies the type of bearer to use. Possible values aretcpandunix. If omitted, the valuetcpis used as default.--magic <magic>: the magic number of the network you’re connecting to. Possible values aremainnet,testnet,preview,preprodor a numeric value. If omitted, the valuemainnetis used as default.--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.--throttle: milliseconds to wait between output lines (for easier reading).--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.
Bitcoin
To watch Bitcoin blockchain events:
oura watch bitcoin [OPTIONS] <rpc_host><rpc_host>: the Bitcoin RPC server URL to connect to.
Bitcoin Options
--interval <seconds>: polling interval in seconds for checking new blocks.--user <username>: RPC server username for authentication.--password <password>: RPC server password for authentication.--throttle: milliseconds to wait between output lines (for easier reading).--wrap: indicates that long output text should break and continue in the following line.
Ethereum
To watch Ethereum blockchain events:
oura watch ethereum [OPTIONS] <url><url>: the Ethereum WebSocket RPC URL to connect to.
Ethereum Options
--throttle: milliseconds to wait between output lines (for easier reading).--wrap: indicates that long output text should break and continue in the following line.
Substrate
To watch Substrate blockchain events:
oura watch substrate [OPTIONS] <url><url>: the Substrate WebSocket RPC URL to connect to.
Substrate Options
--throttle: milliseconds to wait between output lines (for easier reading).--wrap: indicates that long output text should break and continue in the following line.
Examples
Cardano Examples
Watch Live Data From A Remote Relay Node
oura watch cardano relays-new.cardano-mainnet.iohk.io:3001 --bearer tcpWatch Live Data From A Local Node Via Unix Socket
oura watch cardano /opt/cardano/cnode/sockets/node0.socket --bearer unixWatch Live Data From The Tip Of A Local Testnet Node
oura watch cardano /opt/cardano/cnode/sockets/node0.socket --bearer unix --magic testnetWatch Data Starting At A Particular Block
oura watch cardano relays-new.cardano-mainnet.iohk.io:3001 \ --bearer tcp \ --since 49159253,d034a2d0e4c3076f57368ed59319010c265718f0923057f8ff914a3b6bfd1314Watch Live Data From the “Preview” testnet
oura watch cardano preview-node.world.dev.cardano.org:30002 --bearer tcp --magic previewWatch Live Data From the “Pre-Production” testnet
oura watch cardano preprod-node.world.dev.cardano.org:30000 --bearer tcp --magic preprodBitcoin Examples
Watch Live Data From A Local Bitcoin Node
oura watch bitcoin http://localhost:8332 --user myuser --password mypasswordWatch Bitcoin With Custom Polling Interval
oura watch bitcoin http://localhost:8332 --interval 60 --user myuser --password mypasswordWatch Bitcoin With Output Throttling
oura watch bitcoin http://localhost:8332 --throttle 1000 --wrapEthereum Examples
Watch Live Data From A Local Ethereum Node
oura watch ethereum ws://localhost:8546Watch Ethereum Mainnet via PublicNode
oura watch ethereum wss://ethereum-rpc.publicnode.comWatch Ethereum With Output Throttling
oura watch ethereum ws://localhost:8546 --throttle 1000 --wrapWatch Ethereum Sepolia Testnet
oura watch ethereum wss://ethereum-sepolia-rpc.publicnode.comSubstrate Examples
Watch Live Data From A Local Polkadot Node
oura watch substrate ws://localhost:9944Watch Polkadot Mainnet via OnFinality
oura watch substrate wss://polkadot.api.onfinality.io/public-wsWatch Substrate With Output Throttling
oura watch substrate ws://localhost:9944 --throttle 1000 --wrapWatch Kusama Network
oura watch substrate wss://kusama-rpc.polkadot.ioWatch Westend Testnet
oura watch substrate wss://westend-rpc.polkadot.io