n8n-nodes-evmstream
v0.2.3
Published
n8n community node for real-time EVM blockchain event streaming via Moralis Streams and Alchemy Webhooks
Downloads
176
Maintainers
Readme
n8n-nodes-evmstream
This is the only open-source n8n node package for real-time EVM blockchain event streaming. Never run security-critical blockchain tools from closed-source packages you cannot audit. If you can't read the code, you can lose your data. Audit this package yourself.
n8n community node package for real-time EVM blockchain event streaming via webhooks. Supports Moralis Streams and Alchemy Webhooks, giving you two independent providers for redundancy and flexibility.
First real-time blockchain event streaming nodes for n8n.
2 trigger nodes | 14+ chains | Multiple event types | Webhook signature verification | E2E tested
Table of Contents
- Supported Providers
- Installation
- Credentials Setup
- Node: Moralis Streams Trigger
- Node: Alchemy Webhooks Trigger
- Supported Chains
- Development
- Design Decisions
- Links & References
- License
Supported Providers
| Provider | Free Tier | Signature | Chains | Best For | |----------|-----------|-----------|--------|----------| | Moralis Streams | ~80K-120K events/mo (40K CU/day) | Keccak-256 | 14 EVM chains | Contract logs, decoded transfers, ABI filtering | | Alchemy Webhooks | ~750K events/mo (30M CU/mo, shared with RPC) | HMAC-SHA256 | 10 EVM networks | Address activity, NFT monitoring, GraphQL custom queries |
Both providers auto-manage webhook lifecycle: stream/webhook is created when the workflow activates and deleted when it deactivates.
Installation
n8n Community Nodes (Recommended)
- Go to Settings > Community Nodes in your n8n instance
- Enter
n8n-nodes-evmstream - Click Install
See the n8n community nodes installation guide for details.
Manual Installation
cd ~/.n8n/custom
npm install n8n-nodes-evmstreamRestart n8n after installation. See manual install docs.
Credentials Setup
Moralis Streams API Key
| Field | Required | Description | |-------|----------|-------------| | API Key | Yes | Your Moralis Web3 API Key |
How to get your Moralis API Key:
- Go to admin.moralis.io
- Sign up or log in (free account available)
- Navigate to Settings > Secrets (or the API Keys section)
- Copy your Web3 API Key
- In n8n, create a new Moralis Streams API credential and paste the key
The same API key works for all Moralis services (Streams, Web3 Data API, etc.). Free plan: 40,000 Compute Units/day (~80K-120K webhook events/month at 10-15 CU per event).
Alchemy Webhooks Auth Token
| Field | Required | Description | |-------|----------|-------------| | Auth Token | Yes | Your Alchemy Notify Auth Token |
How to get your Alchemy Auth Token:
- Go to dashboard.alchemy.com
- Sign up or log in (free account available, no credit card required)
- Navigate to the Webhooks section in the left sidebar (under Notify)
- At the top of the webhooks page, find your Auth Token (click to reveal/copy)
- In n8n, create a new Alchemy Webhooks API credential and paste the token
The Auth Token is account-wide (not per-app). Free plan: 30M Compute Units/month (~750K webhook events), 5 webhooks max, 25 RPS. Webhook events cost ~40 CU each (bandwidth-based at 0.04 CU/byte).
Node: Moralis Streams Trigger
Receives real-time EVM blockchain events via Moralis Streams webhooks. Automatically creates a stream when the workflow is activated and deletes it when deactivated.
Parameters
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | Chains | Multi-select | Yes | EVM chains to monitor (select one or more) | | Contract Addresses | String | Yes | Comma-separated list of contract addresses to monitor | | Monitor Type | Select | No | What to monitor (default: Contract Logs) | | ABI | JSON | No | Contract ABI (JSON array) — only event entries are used | | Topic0 Filter | String | No | Event signature hash to filter specific events |
Monitor Types
| Type | Value | Description |
|------|-------|-------------|
| Contract Logs | contractLogs | Monitor emitted event logs (default) |
| Native Transactions | nativeTxs | Monitor native token transfers (ETH, MATIC, etc.) |
| Internal Transactions | internalTxs | Monitor internal contract calls |
| All Events | all | Monitor all event types |
Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| Stream Description | String | n8n workflow stream | Description for the Moralis stream |
| Include All Transaction Logs | Boolean | false | Include all logs for matching transactions |
| Only Confirmed | Boolean | false | Only emit confirmed (not pending) events |
| Verify Signature | Boolean | true | Verify the Moralis webhook signature (Keccak-256) |
Output Format
{
"eventType": "erc20Transfers",
"chainId": "0x1",
"confirmed": true,
"block": { "number": "18500000", "hash": "0xabc123...", "timestamp": "1698700800" },
"data": {
"transactionHash": "0xdef456...",
"from": "0xa1b2c3d4...",
"to": "0xf6e5d4c3...",
"value": "2000000"
}
}Event types: logs, erc20Transfers, nftTransfers, txs, txsInternal.
Node: Alchemy Webhooks Trigger
Receives real-time blockchain events via Alchemy Notify webhooks. Automatically creates a webhook when the workflow is activated and deletes it when deactivated.
Parameters
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | Webhook Type | Select | Yes | Type of events to monitor | | Network | Select | Yes | Alchemy network to monitor | | Addresses | String | Yes* | Comma-separated addresses (Address Activity only) | | NFT Contract Address | String | Yes | NFT contract to monitor (NFT Activity only) | | NFT Token IDs | String | No | Comma-separated token IDs to filter (NFT Activity) | | GraphQL Query | String | Yes | Custom event filter (*Custom/GraphQL only) |
Webhook Types
| Type | Value | Description |
|------|-------|-------------|
| Address Activity | ADDRESS_ACTIVITY | Monitor addresses for ETH/ERC-20/ERC-721/ERC-1155 transfers |
| NFT Activity | NFT_ACTIVITY | Monitor NFT contracts for transfer events |
| Custom (GraphQL) | GRAPHQL | Arbitrary event filtering via GraphQL queries |
Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| Webhook Name | String | (empty) | Name/description for the Alchemy webhook |
| Verify Signature | Boolean | true | Verify the Alchemy webhook HMAC-SHA256 signature |
Output Format
{
"eventType": "addressActivity",
"network": "ETH_MAINNET",
"category": "token",
"webhookId": "wh_abc123",
"data": {
"fromAddress": "0xa1b2c3d4...",
"toAddress": "0xf6e5d4c3...",
"value": 1.5,
"asset": "ETH",
"category": "external"
}
}Supported Chains
Moralis Streams (14 chains)
| Chain | Hex Chain ID | Network |
|-------|:------------:|---------|
| Ethereum | 0x1 | Mainnet |
| Polygon | 0x89 | Mainnet |
| BSC | 0x38 | Mainnet |
| Avalanche | 0xa86a | Mainnet |
| Arbitrum | 0xa4b1 | Mainnet |
| Optimism | 0xa | Mainnet |
| Base | 0x2105 | Mainnet |
| Fantom | 0xfa | Mainnet |
| Cronos | 0x19 | Mainnet |
| Ronin | 0x7e4 | Mainnet |
| Sepolia | 0xaa36a7 | Testnet |
| Mumbai (Amoy) | 0x13882 | Testnet |
| BSC Testnet | 0x61 | Testnet |
| Base Sepolia | 0x14a34 | Testnet |
Alchemy Webhooks (10 networks)
| Chain | Network ID | Network |
|-------|-----------|---------|
| Ethereum | ETH_MAINNET | Mainnet |
| Polygon | MATIC_MAINNET | Mainnet |
| Arbitrum | ARB_MAINNET | Mainnet |
| Optimism | OPT_MAINNET | Mainnet |
| Base | BASE_MAINNET | Mainnet |
| Ethereum Sepolia | ETH_SEPOLIA | Testnet |
| Polygon Amoy | MATIC_AMOY | Testnet |
| Arbitrum Sepolia | ARB_SEPOLIA | Testnet |
| Optimism Sepolia | OPT_SEPOLIA | Testnet |
| Base Sepolia | BASE_SEPOLIA | Testnet |
Development
Prerequisites
- Node.js 22+
- npm
Setup
git clone https://github.com/pvdyck/n8n-nodes-evmstream
cd n8n-nodes-evmstream
cp .env.example .env
npm installEnvironment Variables
MORALIS_API_KEY=your-moralis-api-key
ALCHEMY_AUTH_TOKEN=your-alchemy-auth-tokenScripts
| Command | Description |
|---------|-------------|
| npm run build | Compile TypeScript + copy icons |
| npm test | Run unit tests |
| npm run test:coverage | Run with coverage report |
| npm run test:e2e | Moralis E2E tests (spawns n8n on port 5679) |
| npm run test:e2e:alchemy:tunnel | Alchemy E2E tests with localhost.run tunnel |
| npm run lint | ESLint check |
| npm run lint:fix | ESLint auto-fix |
E2E Tests
Moralis Streams (4 tests)
| Test | What it validates | |------|---| | Stream Lifecycle | Create stream on activate, delete on deactivate | | Webhook Data Processing | POST webhook payload -> normalized event items | | Signature Rejection | Invalid signature -> rejected with 401 | | Test Webhook Handling | Moralis test payload (empty arrays) -> acknowledged, not triggered |
Alchemy Webhooks (4 tests)
| Test | What it validates | |------|---| | Webhook Lifecycle | Create webhook on activate, delete on deactivate | | Webhook Data Processing | POST webhook payload -> normalized activity items | | Signature Rejection | Invalid HMAC signature -> rejected | | Custom GraphQL Webhook | GraphQL webhook type -> event passthrough |
Design Decisions
For detailed architecture diagrams, webhook lifecycle flows, and source file maps, see IMPLEMENTATION.md.
Pure TypeScript Keccak-256
Moralis verifies webhook authenticity using Keccak-256 (the Ethereum hashing standard). Node.js crypto only provides SHA-3-256 which uses different padding (0x06 vs 0x01). This package includes a pure TypeScript BigInt-based Keccak-256 implementation — zero external dependencies.
Dual Signature Verification
- Moralis: Keccak-256 hash of
JSON.stringify(body) + apiKey, compared againstx-signatureheader - Alchemy: HMAC-SHA256 of the raw request body using a per-webhook signing key, compared against
x-alchemy-signatureheader
Webhook Trigger Pattern
Both nodes register a webhook URL with the provider. Events arrive in real-time as they happen on-chain. The webhook is automatically managed: created when the workflow activates, deleted when it deactivates.
Event Normalization
Both providers send structured payloads that are normalized into consistent n8n items with eventType, network/chain metadata, and data fields, making downstream processing straightforward.
Links & References
Moralis
| Resource | URL | |----------|-----| | Moralis Streams Documentation | docs.moralis.io/streams-api | | Moralis Admin Panel (API Keys) | admin.moralis.io | | Moralis Pricing | moralis.com/pricing |
Alchemy
| Resource | URL | |----------|-----| | Alchemy Webhooks Documentation | docs.alchemy.com/reference/notify-api-quickstart | | Alchemy Dashboard (Auth Token) | dashboard.alchemy.com | | Alchemy Pricing | alchemy.com/pricing |
n8n
| Resource | URL | |----------|-----| | Community Nodes Install (GUI) | docs.n8n.io/integrations/community-nodes/installation/gui-install | | Community Nodes Install (Manual) | docs.n8n.io/integrations/community-nodes/installation/manual-install |
GitHub
| Repository | URL | |------------|-----| | This Package | github.com/pvdyck/n8n-nodes-evmstream |
