lndhub.go-stats/README.md
2025-05-02 16:51:42 +04:00

1.0 KiB

lndhub.go stats

A collection of Deno scripts for exporting anonymized statistics from lndhub.go databases.

Requirements

Configuration

Copy .env.example to .env and edit the values. Or use system environment variables instead.

  • BATCH_SIZE controls how many parallel connections to your database are established
  • MAX_INVOICES will skip users with extreme amounts of transactions (above this threshold)

Generate anonymization key

Generate a random key so you can use it as ANONYMIZATION_KEY:

Usage

deno run generate-key.ts

Generate daily stats per user

This will generate daily statistics per user, exported to daily-stats.csv:

  • Anonymized user ID
  • Date
  • Balance Start of Day
  • Balance End of Day
  • Balance Max Day
  • Balance Min Day
  • Total Flow Out
  • Total Flow In

Usage

deno run -A generate-stats.ts

Contact

E-Mail, Chat, Social: raucao@kosmos.org