# BentCrypto Agent Payment Skill

Use BentCrypto for pay-per-call token risk analysis using x402 or the gated Base MPP Token Risk canary. Token Security remains Solana-only and x402-only.

## Discover first

- OpenAPI: https://api.bentcrypto.com/openapi.json
- x402: https://api.bentcrypto.com/.well-known/x402
- MPP Base Token Risk canary: https://api.bentcrypto.com/mpp/v1/token/risk
- Pricing: https://api.bentcrypto.com/pricing

## Safe payment flow

Token Risk is currently $0.01 per x402 call. Always treat the runtime 402 challenge as authoritative. Enforce a local spend cap and verify network/asset/amount before signing. BentCrypto never needs your private key or seed phrase.

The Base MPP Token Risk canary is currently $0.01 per call using MPP evm charge with USDC. Call it without Authorization first, validate the WWW-Authenticate: Payment challenge locally, then retry with Authorization: Payment <credential>.

## Base Node.js example

```js
// npm i @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(account));
const paidFetch = wrapFetchWithPayment(fetch, client);
const url = "https://api.bentcrypto.com/v1/token/risk?chain=base&address=0x4200000000000000000000000000000000000006";
const response = await paidFetch(url, { headers: { Accept: "application/json" } });
if (!response.ok) throw new Error(`BentCrypto HTTP ${response.status}`);
console.log(await response.json());
```

## Base Python example

```python
# pip install 'x402[httpx,evm]' eth-account
import asyncio, os
from decimal import Decimal
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

async def main():
    client = x402Client()
    register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ['EVM_PRIVATE_KEY'])))
    async with x402HttpxClient(client, max_value=Decimal('0.02'), timeout=60.0) as http:
        response = await http.get('https://api.bentcrypto.com/v1/token/risk?chain=base&address=0x4200000000000000000000000000000000000006')
        response.raise_for_status()
        print(response.json())

asyncio.run(main())
```

## Important endpoint boundary

Do not request chain=base on /v1/token/security. Token Security is Solana-only and BentCrypto rejects explicit unsupported chains before payment.

The MPP canary is Base Token Risk only. It does not enable MPP for Token Security or Solana and does not alter the existing x402 routes.
