A one-shot monitor for the vector-marketplace box: checks each wallet in wallets.json against a threshold (default 10 APEX) via Ogmios (ReadOnlyOgmiosProvider) and posts a combined Slack message when any wallet is below it. Re-reminds every 6h while a wallet stays low and posts a recovery message when it climbs back above, deduped through a persisted state file. Runs hourly under host cron via `docker compose run --rm` — no long-running server, no ports/healthcheck. Reuses the buyer/supplier tsx Docker pattern and the existing balance-query client; addresses come from a static, gitignored wallets.json so the monitor never reads a private key. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
20 lines
869 B
Plaintext
20 lines
869 B
Plaintext
# wallet-monitor/.env — copy to wallet-monitor/.env and fill in.
|
|
# (.env is gitignored; only this .env.example template is committed.)
|
|
|
|
# REQUIRED — Slack Incoming Webhook URL alerts are POSTed to.
|
|
# Create one at https://api.slack.com/messaging/webhooks
|
|
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/XXXX/YYYY/ZZZZ
|
|
|
|
# OPTIONAL — Ogmios HTTP endpoint used to read balances.
|
|
# Defaults to the mainnet public endpoint (also pinned in the compose file).
|
|
# OGMIOS_URL=https://ogmios.vector.mainnet.apexfusion.org
|
|
|
|
# OPTIONAL — override the wallets.json default threshold / reminder cadence
|
|
# without editing the mounted wallets file.
|
|
# DEFAULT_MIN_AP3X=10
|
|
# REMINDER_HOURS=6
|
|
|
|
# OPTIONAL — paths inside the container (defaults shown; bind-mounted by compose).
|
|
# WALLETS_PATH=/repo/wallet-monitor/wallets.json
|
|
# STATE_PATH=/repo/wallet-monitor/data/state.json
|