@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
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)
Links