Scout is a lightweight, open-source, and self-hostable service that provides Mobile developers with a simple REST API to enable real-time push notifications for any SPL token activity on any Solana wallet in their Defi app.
Super Simple APIs to add a robust notification system for any of your DEFI app.
- /api/register
- /update-fcm-token
- /api/untrack
- /api/actvities/:wallet_address
Just register your user's wallet address once, and your user will receive push notification for any wallet activty, doesnot matter the origin, for example:
- You received 540 $XYZ
- You sent 30 $BONK
- You received $500 USDC
- Real-Time: Uses Solana's WebSockets for instant, event-driven notifications.
- Universal SPL Token Support: Detects balance changes for ANY token, including new airdrops, meme coins, or custom tokens, not just major ones.
- Simple for Mobile Developers: Abstracts away all push notification complexity for a wallet behind a dead-simple REST API. If you can call an endpoint, you can have Solana notifications.
- Self-Hostable & Control: Run it on your own infrastructure. You control the data, the keys, and the performance.
Scout is composed of three core components working in harmony:
- The API Server: A simple Express.js server that provides endpoints for developers to register and manage wallets.
- The Database: A high-performance SQLite database to store wallet-to-device mappings and log all transaction activity.
- The WebSocket Manager: The engine of Scout. It maintains a persistent connection to the Solana network, manages subscriptions, processes transactions, and triggers notifications.
- Node.js (v18+)
- A Solana RPC Provider (e.g., Helius, QuickNode, Alchemy). The public RPC is fine for testing but not for production.
- A Firebase Project with a Service Account key.
-
Clone the repository:
git clone https://github.com/Utkarsh4517/scout.git cd scout
-
Install dependencies:
npm install
-
Configure your environment:
- Copy
.env.example
to a new file named.env
. - Fill in the required values:
SOLANA_WSS_ENDPOINT
,SOLANA_RPC_ENDPOINT
, andPORT
. - Place your downloaded Firebase service account key in the project root and name it
firebase-service-account.json
. UpdateFCM_SERVICE_ACCOUNT_PATH
in.env
if you name it differently.
- Copy
-
For development (with auto-reloading):
npm run dev
-
For production:
npm run build npm run start
Your Scout service is now live and listening for API requests!
Subscribe a wallet to receive notifications.
- Endpoint:
POST /api/register
- Body:
{ "wallet_address": "YourSolanaWalletAddressHere", "fcm_token": "TheDeviceFCMTokenHere" }
- Example:
curl -X POST http://localhost:3000/api/register \ -H "Content-Type: application/json" \ -d '{"wallet_address": "9...","fcm_token": "c..."}'
Retrieve the most recent logged activities for a wallet.
- Endpoint:
GET /api/activities/:wallet_address
- Example:
curl http://localhost:3000/api/activities/YourSolanaWalletAddressHere
- Endpoint:
DELETE /api/untrack
- Body:
{ "wallet_address": "YourSolanaWalletAddressHere" }
Integrating Scout into your mobile app is incredibly simple.
- Get an FCM Token: Use the Firebase SDK in your app to get a device token.
- Call the API: When a user wants notifications, call the
/api/register
endpoint with their wallet address and the FCM token. - Handle the Payload: Configure your app to receive push notifications. The payload from Scout will look like this:
{ "notification": { "title": "Scout: USDC Received!", "body": "Amount: 100.00 USDC" }, "data": { "signature": "3...s", "mint": "EPj...t1v", "symbol": "USDC" } }
Contributions are welcome! Please feel free to submit a Pull Request or open an issue for bugs, features, or improvements.
This project is licensed under the MIT License. See the LICENSE
file for details.