Monitor Multi-Chain Wallets with FluxRail: A Developer's Guide
Learn how to monitor multi-chain wallets with FluxRail's Core API. Create subscriptions, verify signed webhooks, and manage your monitoring setup with simple curl commands—no SDK required.
Why Multi-Chain Monitoring Is a Nightmare (and How FluxRail Fixes It)
If you're building a wallet, exchange, or DeFi app that supports more than one blockchain, you know the pain: every chain has its own RPC endpoints, its own event formats, its own quirks. You need to track deposits, withdrawals, and contract events across Ethereum, Polygon, Solana, and dozens of others. Each chain requires separate infrastructure, separate webhooks, and separate error handling. It's a maintenance nightmare.
FluxRail solves this with a single API that abstracts away all chain-specific complexity. With one subscription call, you can monitor any address or contract on 31+ chains. FluxRail handles the heavy lifting: it watches the chains, filters relevant events, and delivers signed webhooks to your endpoint. You get one consistent JSON payload, regardless of the underlying blockchain.
In this guide, I'll walk you through the entire workflow: creating subscriptions, receiving webhooks, verifying signatures, and managing your monitoring setup. You'll also see how to use FluxRail's wallet helpers to generate and derive addresses statelessly. All examples use raw HTTP requests—no SDKs, just curl and your favorite HTTP client.
Getting Started: Authentication and Test Mode
Before you can monitor anything, you need an API key. FluxRail provides two types: flux_live_… for production and flux_test_… for the sandbox. The sandbox is fully simulated—you can test the entire lifecycle without real money or external calls. Always start in test mode.
All requests go to https://api.fluxrail.io/api/v1 and require the X-API-Key header. Here's a simple health check:
curl -X GET https://api.fluxrail.io/api/v1/chains \
-H "X-API-Key: flux_test_xxx"
This returns a list of supported chains. You'll notice each chain has a slug (like ethereum or solana) that you'll use in subscriptions.
Creating Subscriptions: Watch Any Address or Contract
To monitor a wallet address, you create a subscription. The endpoint is POST /api/v1/subscriptions. You specify the chain, the address, and the type of events you care about (e.g., incoming, outgoing, or all). Here's an example that watches an Ethereum address for all transactions:
curl -X POST https://api.fluxrail.io/api/v1/subscriptions \
-H "X-API-Key: flux_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"chain": "ethereum",
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"type": "all",
"webhook_url": "https://your-server.com/webhook"
}'
The response includes a subscription_id and a status. You can also watch smart contract events by passing a contract_address and an event_signature. For example, to monitor ERC-20 transfers on USDC:
curl -X POST https://api.fluxrail.io/api/v1/subscriptions \
-H "X-API-Key: flux_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"chain": "ethereum",
"contract_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"event_signature": "Transfer(address,address,uint256)",
"webhook_url": "https://your-server.com/webhook"
}'
FluxRail will parse the event and send you a structured payload with the from, to, and value fields.
Bulk Subscriptions: Onboard Users at Scale
When you're rolling out a wallet app, you often need to create hundreds of subscriptions at once. Instead of looping, use the bulk endpoint POST /api/v1/subscriptions/bulk. Pass an array of subscription objects:
curl -X POST https://api.fluxrail.io/api/v1/subscriptions/bulk \
-H "X-API-Key: flux_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"subscriptions": [
{"chain":"ethereum","address":"0x...","type":"incoming","webhook_url":"https://your-server.com/webhook"},
{"chain":"polygon","address":"0x...","type":"incoming","webhook_url":"https://your-server.com/webhook"},
{"chain":"solana","address":"...","type":"all","webhook_url":"https://your-server.com/webhook"}
]
}'
The response returns a list of created subscriptions with their IDs. This is perfect for migrating existing users.
Receiving and Verifying Webhooks
When an event occurs, FluxRail sends a POST request to your webhook URL. The payload includes details like chain, address, tx_hash, amount, and confirmations. Here's a sample payload:
{
"id": "evt_123",
"type": "transaction",
"chain": "ethereum",
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tx_hash": "0xabc...",
"amount": "12.5",
"token": "ETH",
"confirmations": 12,
"timestamp": "2025-04-01T12:00:00Z"
}
Every webhook is signed with HMAC SHA-256. The signature is in the X-FluxRail-Signature header. To verify, you need your webhook secret (found in the dashboard). Here's how to verify in Python using the requests library:
import hashlib, hmac, json
secret = b'your_webhook_secret'
payload = request.body # raw body
sig = request.headers.get('X-FluxRail-Signature')
expected = hmac.new(secret, payload, hashlib.sha256).hexdigest()
if hmac.compare_digest(expected, sig):
# process event
event = json.loads(payload)
print('Valid webhook:', event['tx_hash'])
else:
# reject
raise Exception('Invalid signature')
Always verify signatures to prevent spoofed events. Note that FluxRail includes a livemode field in the payload—check it to ensure you're not processing test events in production.
Managing Subscriptions: Toggle, Duplicate, and Delete
You'll often need to pause or disable a subscription without deleting it. Use the toggle endpoint: POST /api/v1/subscriptions/{id}/toggle. This flips the active status.
curl -X POST https://api.fluxrail.io/api/v1/subscriptions/sub_123/toggle \
-H "X-API-Key: flux_test_xxx"
If you need to create a similar subscription for another address, use duplicate:
curl -X POST https://api.fluxrail.io/api/v1/subscriptions/sub_123/duplicate \
-H "X-API-Key: flux_test_xxx"
To update or delete, use PUT/PATCH/DELETE /api/v1/subscriptions/{id}. For example, to change the webhook URL:
curl -X PATCH https://api.fluxrail.io/api/v1/subscriptions/sub_123 \
-H "X-API-Key: flux_test_xxx" \
-H "Content-Type: application/json" \
-d '{"webhook_url":"https://new-server.com/webhook"}'
Retrieving Events and Retrying Failed Deliveries
Sometimes your webhook endpoint goes down, and you miss events. FluxRail stores events for a limited time. You can query them with GET /api/v1/events. Filter by subscription ID, chain, or time range:
curl -X GET 'https://api.fluxrail.io/api/v1/events?subscription_id=sub_123&limit=10' \
-H "X-API-Key: flux_test_xxx"
If you see a failed delivery, you can retry it with POST /api/v1/events/{id}/retry. This will resend the webhook to your endpoint.
Wallet Helpers: Generate and Derive Addresses
FluxRail provides stateless wallet utilities to generate mnemonics and derive addresses. This is useful for creating wallets for your users without storing private keys on your server (though you should always handle keys securely).
Generate a new mnemonic:
curl -X POST https://api.fluxrail.io/api/v1/wallet/mnemonic \
-H "X-API-Key: flux_test_xxx" \
-H "Content-Type: application/json" \
-d '{"strength":128}' # 12 words
Derive an address from a mnemonic:
curl -X POST https://api.fluxrail.io/api/v1/wallet/derive \
-H "X-API-Key: flux_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"mnemonic": "word1 word2 ...",
"chain": "ethereum",
"index": 0
}'
You can also validate a mnemonic:
curl -X POST https://api.fluxrail.io/api/v1/wallet/validate \
-H "X-API-Key: flux_test_xxx" \
-H "Content-Type: application/json" \
-d '{"mnemonic":"word1 word2 ..."}'
Putting It All Together: A Complete Monitoring Flow
Here's a typical flow for a wallet app:
- Generate a mnemonic for a new user.
- Derive addresses for each chain you support.
- Create subscriptions for those addresses using the bulk endpoint.
- Receive webhooks and credit the user's balance when a deposit arrives.
- If a webhook fails, retry via the events API.
This entire flow is achievable with a few HTTP calls. No need to run your own nodes or manage chain-specific infrastructure.
Conclusion
FluxRail's Core product gives you a unified, reliable way to monitor multi-chain wallets. With signed webhooks, bulk subscriptions, and wallet helpers, you can focus on your product logic instead of blockchain plumbing. Start in test mode, explore the API, and when you're ready, switch to live keys.
Check out the full documentation at https://fluxrail.io/docs for more endpoints and examples.