feat(wallet-monitor): Slack alerts for low operator wallet balances

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>
This commit is contained in:
david
2026-06-16 11:00:30 +02:00
parent b2866506fc
commit 3f2a37c157
13 changed files with 617 additions and 1 deletions

10
pnpm-lock.yaml generated
View File

@@ -290,6 +290,16 @@ importers:
specifier: ^5.7.2
version: 5.9.3
wallet-monitor:
dependencies:
'@marketplace/shared':
specifier: workspace:*
version: link:../packages/shared
devDependencies:
typescript:
specifier: ^5.7.2
version: 5.9.3
packages:
'@adobe/css-tools@4.4.4':