Skip to content

Latest commit

 

History

History
106 lines (56 loc) · 3.26 KB

README.md

File metadata and controls

106 lines (56 loc) · 3.26 KB

Webhooks

Webhooks allow teams to be notified about specific events happening on the blockchain.

We support 4 main webhook types today.

We still maintain mined and dropped webhooks created before Aug 2024 (disallowing their creation).

Middleware

We built a set of Hono middlewares to help you validate webhook signatures and payloads.

validateSignature

  • Validates webhook signature parsing the X-Alchemy-Signature header and a user provided signing secret.

  • You can also pass a map of webhook ids to secrets to validate multiple webhook signatures.

validatePayload

  • Validates webhook payload against schemas defined in utils/schemas.

  • Main advantage is that you'll get access to a typed payload object in your handler. 🪄

  • ⚠️ Test payloads will fail validation. They differ slightly from production payloads - we're working on a fix. In meantime, we would recommend testing with production payloads.

Utils

events

schemas

Schemas to validate all Alchemy webhook payloads and check for required fields to transform Custom into Address Activity or NFT Activity webhook payloads.

Examples

You'll find more than 20 examples to get you started. If you can't find what you're looking for, feel free to create an issue.

  • Track ALL ETH transfers (external)

  • Track ALL ETH transfers FOR specific users

  • Track ALL internal transactions

  • Track ALL ERC20 events (Transfer, Approval)

  • Track ALL ERC20 Transfer events

  • Track ERC20 Transfer events FOR specific tokens (e.g. USDC)

  • Track ERC20 Transfer events FOR specific addresses

  • Track ERC20 Transfer events FOR specific tokens AND FOR specific addresses

  • Track ALL NFT events (ERC721, ERC1155, CryptoKitties, CryptoPunks)

  • Track ALL NFT Transfer events (ERC721, ERC1155, CryptoKitties, CryptoPunks)

  • Track ALL ERC721 events (Transfer, Approval, ApprovalForAll)

  • Track ALL ERC721 Transfer events

  • Track ERC721 Transfer events FOR specific tokens (e.g. Bored Ape Yacht Club)

  • Track ERC721 Transfer events FOR specific addresses

  • Track ERC721 Transfer events FOR specific tokens AND FOR specific addresses

  • Track ALL ERC1155 events (Transfer, Approval, ApprovalForAll)

  • Track ALL ERC1155 Transfer events

  • Track ERC1155 Transfer events FOR specific tokens (e.g. Axie Infinity)

  • Track ERC1155 Transfer events FOR specific addresses

  • Track ERC1155 Transfer events FOR specific tokens AND FOR specific addresses

  • Track ALL user operations

  • Track user operations FOR specific users (i.e. sent by specific smart contract wallets)