Installation
Quick Start
Express v4 vs v5
This package is specifically for Express v4. The API differs slightly from the v5 package:| Feature | Express v4 Package | Express v5 Package |
|---|---|---|
| Package | @armory-sh/middleware-express-v4 | @armory-sh/middleware-express |
| Requirements | Uses scheme, network, asset | Uses chainId, assetId |
| Amount | String ("1000000") | BigInt (1000000n) |
Route-Aware Middleware
Configure different payment requirements for different routes:Advanced Mix-and-Match Example
For fully custom combinations, define explicit requirements and route-specific facilitator URLs:facilitatorUrl.
Migration to Express v5
When upgrading to Express v5, switch to@armory-sh/middleware-express:
chainId/assetId instead of network/asset).