Skip to content

DevelopersHelpDesk/stellar_notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

stellar-notify πŸ””

Open-source webhook & notification engine for Stellar blockchain events.

CI License: MIT Node.js


The problem

Horizon is being deprecated. Allium and Alchemy fill the indexing gap β€” but they are paid, centralised services. There is no open-source, self-hostable tool that lets a developer say:

"Send me a webhook when wallet X receives a payment, or when contract Y emits event Z."

Ethereum has The Graph, Alchemy Notify, and dozens of open-source alternatives. Stellar has nothing community-owned. Until now.


Features

Feature Status
Stream Horizon payments per account βœ…
Stream account activity (all tx) βœ…
Stream all network transactions βœ…
Poll Soroban contract events (RPC) βœ…
Webhook delivery with HMAC-SHA256 βœ…
Email notifications (SMTP) βœ…
Telegram bot notifications βœ…
Exponential back-off retries βœ…
Cursor persistence (resume on restart) βœ…
REST API with API-key auth βœ…
Next.js dashboard βœ…
Docker + docker-compose βœ…
One-click Railway deploy πŸ”œ
Discord / Slack channels πŸ”œ
PostgreSQL support πŸ”œ

Quick start

Option 1 β€” Docker (recommended)

git clone https://github.com/stellar-notify/stellar-notify.git
cd stellar-notify
cp .env.example .env   # edit values
docker-compose up -d

The engine runs on http://localhost:3000 and the dashboard on http://localhost:3001.

Option 2 β€” Local Node.js

# Prerequisites: Node.js >= 18
npm install
cp .env.example .env   # edit values
npm run migrate        # initialise SQLite
npm start

Configuration

Copy .env.example to .env and fill in the values. Key variables:

Variable Description Default
STELLAR_NETWORK testnet or mainnet testnet
HORIZON_URL Custom Horizon endpoint network default
SOROBAN_RPC_URL Soroban RPC endpoint network default
ADMIN_PASSWORD Password to issue API keys changeme
DB_PATH SQLite file path ./data/stellar-notify.db
SMTP_* Email configuration β€”
TELEGRAM_BOT_TOKEN Telegram bot token β€”

API

Issue an API key

curl -X POST http://localhost:3000/api/auth/keys \
  -H "Content-Type: application/json" \
  -d '{"admin_password":"changeme","label":"my-app"}'
# Returns: { "key": "snk_…" }  β€” store this, shown only once

Create a subscription

curl -X POST http://localhost:3000/api/subscriptions \
  -H "Authorization: Bearer snk_…" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "payment",
    "label": "My wallet",
    "filter": {
      "account": "GABC…XYZ",
      "asset_code": "USDC",
      "min_amount": "10"
    },
    "channel": "webhook",
    "channel_config": {
      "url": "https://your-app.com/hooks/stellar",
      "secret": "optional-signing-secret"
    }
  }'

Subscription types

Type Filter fields
payment account, asset_code, min_amount
account_activity account (required)
transaction account (optional)
contract_event contract_id, topics, poll_interval_ms

Notification channels

Channel Config fields
webhook url, secret (HMAC-SHA256 optional)
email to, subject_prefix
telegram chat_id

Webhook payload example

{
  "event_type": "payment",
  "id": "…",
  "from": "GABC…",
  "to": "GXYZ…",
  "amount": "100.0000000",
  "asset_code": "USDC",
  "asset_issuer": "GA5ZS…",
  "transaction_hash": "abc123…",
  "created_at": "2025-01-01T00:00:00Z"
}

Requests include X-StellarNotify-Signature: sha256=<hmac> when a secret is configured.


Dashboard

Open http://localhost:3001. Enter your API key (issued above) to access:

  • Create / pause / delete subscriptions
  • Filter by event type and channel
  • View delivery log with retry on failure
  • Live stats (active subs, delivered, pending, failed)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   stellar-notify                     β”‚
β”‚                                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Horizon  │───▢│ StreamManager│──▢│ Delivery β”‚  β”‚
β”‚  β”‚   SSE     β”‚    β”‚  (per-sub)   β”‚   β”‚ Service  β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                            β”‚        β”‚
β”‚  β”‚ Soroban   │───▢  polling loop     β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   RPC     β”‚                       β”‚  SQLite   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                           β”‚        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚        REST API             β”‚    β”‚ Channels:  β”‚ β”‚
β”‚  β”‚  /subscriptions             β”‚    β”‚ webhook    β”‚ β”‚
β”‚  β”‚  /deliveries                β”‚    β”‚ email      β”‚ β”‚
β”‚  β”‚  /auth/keys                 β”‚    β”‚ telegram   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β–²
   Next.js Dashboard  (port 3001)

Contributing

PRs are welcome! See CONTRIBUTING.md for guidelines.

npm install
cp .env.example .env
npm start   # engine on :3000
cd dashboard && npm install && npm run dev   # dashboard on :3001

License

MIT Β© stellar-notify contributors

Releases

No releases published

Packages

 
 
 

Contributors