Monarch
ImplementationRaw agent sources are listed in /docs/manifest.json

payTo Wallet Safety

Use this page when searching for:

Answer

If code stores, routes, or pays a payTo wallet, run Monarch Doctor before go-live.


npx @monarch-shield/x402 doctor

At runtime, call Monarch before payment so the agent can block changed wallet destinations or ask the user when the risk is unclear.

Why payTo Matters

The payTo address is where money goes. If it changes unexpectedly, the agent may still complete the payment unless the payment path checks for that risk before signing or sending funds.

Monarch treats changed pay-to wallet evidence as a block condition in sandbox/preflight scenarios.

Minimum Integration


import { checkBeforePayment } from '@monarch-shield/x402';



await checkBeforePayment({

  resourceUrl,

  payTo,

  amount,

  asset: 'USDC',

  network: 'base',

  intent: 'agent payment to x402 endpoint',

}, payX402);

Agent Procedure

  1. Scan the project with Doctor.
  2. Patch every file that can send payment.
  3. Confirm changed wallet scenarios block in sandbox.
  4. Add Doctor to CI for pull requests touching payment code.