PayStage Auth Watch

v0.2.0
xyz.paystage/auth-watch Checked 3 hours ago Published 21 days ago

Read-only MCP tools to list and flag outstanding ERC-20, Permit2, and EIP-3009 auths

Scan and evaluate outstanding token authorizations (ERC-20 allowances, Permit2 allowances, and EIP-3009 nonces) for a wallet against a Paystage policy. Both accept wallet, optional network, tokens, spenders, policy_path or inline policy, eip3009_nonces, and rpc_url. This is the package that legitimately touches the network, so the flags matter more here and deserve a plain answer:

Summary extracted from the README.

@paystage/auth-watch

Scan and evaluate outstanding token authorizations (ERC-20 allowances, Permit2 allowances, and EIP-3009 nonces) for a wallet against a Paystage policy.

Install

pnpm add @paystage/auth-watch

Library usage

import {
  createRpcClient,
  resolveRpcUrl,
  listOutstandingAuths,
  evaluateOutstandingAuths,
} from "@paystage/auth-watch";
import { loadPolicy } from "@paystage/policy";

const network = "eip155:8453";
const rpc = createRpcClient(resolveRpcUrl(network));
const policy = await loadPolicy("./paystage.policy.json");

const items = await listOutstandingAuths({
  wallet: "0x...",
  network,
  tokens: ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],
  spenders: policy.allowed_spenders ?? policy.allowed_pay_to,
  rpc,
});

const results = evaluateOutstandingAuths(items, policy);

MCP server

node dist/cli.js

Tools:

  • list_outstanding_auths — list outstanding authorizations.
  • evaluate_outstanding_auths — list and evaluate against a policy.

Both accept wallet, optional network, tokens, spenders, policy_path or inline policy, eip3009_nonces, and rpc_url.

Environment

  • PAYSTAGE_RPC_URL — overrides the default RPC URL for the network.

Supply chain and access

This is the package that legitimately touches the network, so the flags matter more here and deserve a plain answer:

Flag Why it is there
Network access JSON-RPC eth_call reads against Base (https://mainnet.base.org by default, or PAYSTAGE_RPC_URL, or an rpc_url argument). Read-only.
URL strings The known public RPC endpoints above.
Environment variable access PAYSTAGE_RPC_URL, so an operator can pin their own node.

It holds no keys and signs nothing — it reads allowance and nonce state. No shell, no eval, no telemetry. Full table: SECURITY.md.

Networks

  • eip155:8453 — Base mainnet (https://mainnet.base.org)
  • eip155:84532 — Base Sepolia (https://sepolia.base.org)