Adder
Adder is a tool for tailing the Cardano blockchain and emitting events for each
block and transaction that it sees.
How it works
Input can be a local or remote Cardano full node, using either NtC (local UNIX
socket, TCP over socat) or NtN to remote nodes.
Events are created with a simple schema.
{
"type": "event type",
"timestamp": "wall clock timestamp of event",
"context": "metadata about the event",
"payload": "the full event specific payload"
}
The chainsync input produces four event types: input.block, input.rollback,
input.transaction, and input.governance. Each type has a unique payload.
input.block:
{
"context": {
"blockNumber": 123,
"slotNumber": 1234567
},
"payload": {
"blockBodySize": 123,
"issuerVkey": "a712f81ab2eac...",
"blockHash": "abcd123...",
"blockCbor": "85828a1a000995c21..."
}
}
input.rollback:
{
"payload": {
"blockHash": "abcd123...",
"slotNumber": 1234567
}
}
input.transaction:
{
"context": {
"blockNumber": 123,
"slotNumber": 1234567,
"transactionHash": "0deadbeef123...",
"transactionIdx": 0,
},
"payload": {
"blockHash": "abcd123...",
"transactionCbor": "a500828258200a1ad..."
"inputs": [
"abcdef123...#0",
"abcdef123...#1",
],
"outputs": [
{
"address": "addr1qwerty123...",
"amount": 12345687,
"assets": [
{
"name": "Foo",
"nameHex": "abcd123...",
"amount": 123,
"fingerprint": "asset1abcd...",
"policyId": "54321..."
}
]
}
],
"metadata": {
"674": {
"msg": [
"Test message"
]
}
},
"fee": 1234567,
"ttl": 123
}
}
input.governance:
{
"context": {
"transactionHash": "1234abcd1234abcd...",
"blockNumber": 123,
"slotNumber": 1234567,
"transactionIdx": 0,
"networkMagic": 1
},
"payload": {
"blockHash": "abcd123...",
"transactionCbor": "a500828258200a1ad...",
"proposalProcedures": [
{
"index": 0,
"deposit": 1000000000,
"rewardAccount": "stake1u9abcd...",
"actionType": "ParameterChange",
"actionData": {
"parameterChange": {
"prevActionId": {
"transactionId": "prev_tx_hash...",
"govActionIdx": 0
},
"policyHash": "abcd1234...",
"paramUpdate": {
"minFeeA": 44,
"maxTxSize": 16384
}
}
},
"anchor": {
"url": "https://example.com/proposal.json",
"dataHash": "abcd1234..."
}
}
],
"votingProcedures": [
{
"voterType": "DRep",
"voterHash": "81f156d98e1f02123abccdef5439a89d71fa9d8b76c8db028c7df0e1",
"voterId": "drep1abcd...",
"govActionTxId": "action_tx_hash...",
"govActionIndex": 0,
"vote": "Yes",
"anchor": {
"url": "https://example.com/vote-rationale.json",
"dataHash": "81f156d98e1f02123abccdef5439a89d71fa9d8b76c8db028c7df0e1..."
}
}
]
}
}
For detailed information about the governance schemas, supported actions, and fields, see the Governance Event Documentation.
Each event is output individually. The log output supports two formats:
-
text (default) — human-readable, one line per event:
2026-02-07 09:18:40 BLOCK slot=12345678 block=9876543 hash=abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234 era=Conway txs=5 size=1234
2026-02-07 09:18:41 TX slot=12345678 block=9876543 tx=deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef fee=180000 inputs=2 outputs=3
2026-02-07 09:18:42 ROLLBACK slot=12345678 hash=aabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd
2026-02-07 09:18:43 GOVERNANCE slot=12345678 block=9876543 tx=1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd proposals=1 votes=2 certs=1
-
json — newline-delimited JSON, one JSON object per event (suitable for
piping to jq or other tooling):
{
"type": "input.block",
"timestamp": "2026-02-07T09:18:40Z",
"context": { "blockNumber": 9876543, "slotNumber": 12345678 },
"payload": { "blockHash": "abc12345..." }
}
Select the format with --output-log-format:
adder --output-log-format json
Event data is written to stdout and application logs are written to
stderr. This means you can capture only event output:
# Save events to a file, see app logs in terminal
adder > events.txt
# Pipe events to jq, suppress app logs
adder --output-log-format json 2>/dev/null | jq .
# See only app logs, discard event data
adder > /dev/null
Target-aware notification stream
Desktop integrations can reuse the same target-aware rules as adder-tray
without linking a GUI toolkit. The notify-json output reserves stdout for
versioned newline-delimited status and notification records and writes runtime
logs to stderr:
adder \
--input chainsync \
--input-chainsync-network preview \
--output notify-json \
--output-notify-json-config ~/.config/adder/omarchy.json \
--api-address 127.0.0.1 \
--api-port 0
The Chainsync network must match network.name in the notification JSON. When
using a custom node, pass the same host:port with
--input-chainsync-address; Adder rejects mismatches before starting.
Validate the configuration before starting or restarting a frontend:
adder notifications validate \
--config ~/.config/adder/omarchy.json \
--json
The JSON configuration has schemaVersion: 1 and describes the Cardano
network, monitored wallets/DReps/pools/assets/policies, alert categories, rate
limit, and connection-staleness threshold. An empty target set is rejected
unless monitor.everything is explicitly enabled.
Configuration
Adder supports multiple configuration methods for versatility: commandline
arguments, YAML config file, and environment variables (in that order).
You can get a list of all available commandline arguments by using the
--help flag.
$ ./adder --help
Usage:
adder [flags]
Flags:
--config string path to config file to load
--input string input plugin to use, 'list' to show available (default "chainsync")
--input-chainsync-address string
specifies the TCP address of the node to connect to
...
--output string output plugin to use, 'list' to show available (default "log")
--output-log-format string output format: "text" or "json" (default "text")
--output-log-level string specifies the log level to use (default "info")
-h, --help help for adder
Each commandline argument (other than -config) has a corresponding environment
variable. For example, the -input option has the INPUT environment variable,
the -input-chainsync-address option has the INPUT_CHAINSYNC_ADDRESS
environment variable, and -output has OUTPUT.
Environment Variables
Core configuration options can be set using environment variables:
INPUT - Input plugin to use (default: "chainsync")
OUTPUT - Output plugin to use (default: "log")
KUPO_URL - URL for Kupo service integration
LOGGING_LEVEL - Log level (default: "info")
API_ADDRESS - API server listen address (default: "0.0.0.0")
API_PORT - API server port (default: 8080)
DEBUG_ADDRESS - Debug server address (default: "localhost")
DEBUG_PORT - Debug server port (default: 0)
Genesis configuration can also be controlled via environment variables:
Network Transition:
SHELLEY_TRANS_EPOCH - Epoch number when Shelley era begins (default: 208 for mainnet)
Byron Genesis:
BYRON_GENESIS_END_SLOT - End slot for Byron era
BYRON_GENESIS_EPOCH_LENGTH - Slot length of Byron epochs (default: 21600)
BYRON_GENESIS_BYRON_SLOTS_PER_EPOCH - Byron slots per epoch
Shelley Genesis:
SHELLEY_GENESIS_EPOCH_LENGTH - Slot length of Shelley epochs (default: 432000)
You can also specify each option in the config file.
input: chainsync
output: log
Plugin arguments can be specified under a special top-level key in the config
file.
plugins:
input:
chainsync:
network: preview
output:
log:
level: info
format: text
Filtering
Adder supports filtering events before they are output using multiple criteria.
An event must match all configured filters to be emitted. Each filter supports
specifying multiple possible values separated by commas. When specifying
multiple values for a filter, only one of the values specified must match an
event.
Adder Tray applies target-oriented notification semantics rather than the
generic pipeline rules described below. See
Adder Tray Filtering and Notification Semantics
for simple target matching, advanced rule groups, DRep and pool behavior, and
the current ChainSync notification inventory.
You can get a list of all available filter options by using the -h/-help
flag.
$ ./adder -h
Usage of adder:
...
-filter-address string
specifies address to filter on
-filter-asset string
specifies the asset fingerprint (asset1xxx) to filter on
-filter-policy string
specifies asset policy ID to filter on
-filter-type string
specifies event type to filter on
...
Multiple filter options can be used together, and only events matching all
filters will be output.
Using Adder as a Library
Adder can be used as a Go library to build custom blockchain indexers and applications.
The examples directory contains starter code demonstrating various use cases:
Each example includes complete source code, documentation, and instructions for getting started.
Visit the examples directory for detailed tutorials and ready-to-run code.
Example usage
Native using remote node
export INPUT_CHAINSYNC_NETWORK=preview
./adder
Alternatively using equivalent commandline options:
./adder \
-input-chainsync-network preview
In Docker using local node
First, follow the instructions for
Running a Cardano Node
in Docker.
docker run --rm -ti \
-v node-ipc:/node-ipc \
ghcr.io/blinklabs-io/adder:main
Filtering
Filtering on event type
Only output input.transaction event types
adder -filter-type input.transaction
Only output input.transaction and input.block event types
adder -filter-type input.transaction,input.block
Filtering on asset policy
Only output transactions involving an asset with a particular policy ID
adder -filter-type input.transaction \
-filter-policy 13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f
Filtering on asset fingerprint
Only output transactions involving a particular asset
adder -filter-type input.transaction \
-filter-asset asset108xu02ckwrfc8qs9d97mgyh4kn8gdu9w8f5sxk
Filtering on a policy ID and asset fingerprint
Only output transactions involving both a particular policy ID and a particular
asset (which do not need to be related)
adder -filter-type input.transaction \
-filter-asset asset108xu02ckwrfc8qs9d97mgyh4kn8gdu9w8f5sxk \
-filter-policy 13aa2accf2e1561723aa26871e071fdf32c867cff7e7d50ad470d62f
Filtering on an address
Only output transactions with outputs matching a particular address
adder -filter-type input.transaction \
-filter-address addr1qyht4ja0zcn45qvyx477qlyp6j5ftu5ng0prt9608dxp6l2j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq4jxtdy
Filtering on a stake address
Only output transactions with outputs matching a particular stake address
adder -filter-type input.transaction \
-filter-address stake1u9f9v0z5zzlldgx58n8tklphu8mf7h4jvp2j2gddluemnssjfnkzz
Push notifications
The example shows how push notification output can be used with filtering
options. In this example, push notifications will be sent for the block events.
Push notifications will be sent to the FCM project_id specified in the
serviceAccount.json file. Please refer to the
adder-mobile README for more
details on how to send push notifications to mobile.
adder -filter-type input.block \
-output push \
-output-push-serviceAccountFilePath /path/to/serviceAccount.json