Interactive Bash script for creating, signing, and submitting a Cardano SPO governance vote with cardano-cli.
This repository is intended for SPO environments running Cardano infrastructure on Linux.
- prompts for a governance action
TxRefintxhash#indexformat - optionally uses a configured payment address
- shows spendable UTXOs in ADA for easier selection
- creates and signs the vote transaction before submission confirmation
- supports installation into standard system paths
The script expects these commands to be available on PATH:
gumjqcardano-cli
It also expects access to:
- a cold verification key
- a cold signing key
- a payment signing key
You can verify command dependencies with:
./install.sh checkOptional helper for installing gum:
./scripts/install-gum.shThis helper supports:
- Linux
x86_64 - Linux
arm64
It is only for gum. You still need to install jq and cardano-cli yourself.
One-line install from GitHub:
curl -fsSL https://raw.githubusercontent.com/lacepool/spo_vote/main/install.sh | bashThis installer:
- installs
spo_voteto/usr/local/bin/spo_vote - installs a default config to
/etc/spo_vote.confif one does not already exist - creates
/var/lib/spo-vote/keys,/var/lib/spo-vote/tx, and/tmp/spo-vote - leaves dependency installation to you
Common local installation from a checked-out repo:
sudo ./install.sh installThis installs:
- executable:
/usr/local/bin/spo_vote - config:
/etc/spo_vote.conf
The default config layout assumes:
- persistent data:
/var/lib/spo-vote - temporary files:
/tmp/spo-vote
For staged installs or packaging:
DESTDIR=/tmp/package-root ./install.sh installTo remove the installed script and config:
sudo ./install.sh uninstallCopy and adjust the example config:
sudo cp spo_vote.conf.example /etc/spo_vote.conf
sudo editor /etc/spo_vote.confThe script loads config from the first available location:
SPO_VOTE_CONFIGspo_vote.confnext to the script/etc/spo_vote.conf
Typical config values:
NETWORKWORKDIRTMP_DIRKEYS_DIRTX_DIRCOLD_VKEYCOLD_SKEYPAYMENT_SKEYPAYMENT_ADDRESS
Set NETWORK to mainnet, preprod, or preview.
If PAYMENT_ADDRESS is set, the script will not prompt for it.
You can verify the installed config exists with:
./install.sh check-configRun:
spo_voteThe script will:
- ask for the governance action
TxRefastxhash#index - use the configured payment address or prompt for one
- ask for the vote choice:
yes,no, orabstain - query UTXOs for the payment address
- let you choose a UTXO, displayed as
ADA | txhash#index - build and sign the transaction
- show a final confirmation prompt before submission
- the script requires an interactive TTY because it uses
gum - generated transaction files are written under the configured
TX_DIR - temporary files such as the vote file and queried UTXOs are written under the configured
TMP_DIR - the script performs runtime checks for required commands and key files before doing any work
Useful commands:
bash -n spo_vote.sh
bash -n install.sh
./install.sh check
DESTDIR=/tmp/package-root ./install.sh install