Issue a Sigil
A principal callsissueSigil to create an on-chain credential for an agent keypair. The principal’s wallet signs and pays for rent.
Spend amounts are in micro-USDC (6 decimal places).
1_000_000 = 1 USDC.Gate an API endpoint
Add the middleware to your server. It verifies the agent’s signature, checks the on-chain Sigil, and records the spend — returning402 if anything fails.
- Express
- Next.js App Router
Call the protected endpoint from an agent
The agent signs each request usingbuildSigilHeaders and attaches the result as HTTP headers.
402 Payment Required: