# Vigil public integration examples

These examples target the live public pilot at `https://vigilnotary.com`.

## Confirm the paid checkout is configured correctly

```sh
curl -O https://vigilnotary.com/docs/examples/inspect_quote.py
python3 inspect_quote.py
```

Before a developer connects a funded wallet, this diagnostic confirms that Vigil requests 0.03 USDC on
Base and sends it to the correct Vigil recipient. It checks the checkout setup only; use the purchase
example below to buy and receive a source verification.

## Discover the MCP tools

```sh
curl -O https://vigilnotary.com/docs/examples/discover_mcp.py
python3 discover_mcp.py
```

The script uses only Python's standard library and makes public read-only MCP calls.

## Complete a payment with a CDP-managed wallet

`buy_with_cdp.ts` follows Coinbase's current x402 buyer pattern and enforces a one-payment, 0.03 USDC
client-side budget on Base mainnet. It validates the server's quote before it lets the x402 client sign.
The first run creates `.vigil-purchase-state.json` with mode `0600`; that file retains the original
idempotency key and, after authorization, the opaque recovery token. Do not commit, print, or share it.

If delivery is pending, rerun the same command later. It will make only an authenticated `GET` recovery
request for the original request ID and will not create another payment authorization. If a network error
happens after the payment attempt starts but before a recovery token is received, the script stops and
preserves the state file. Do not delete it or run a replacement purchase; contact Vigil support privately
with the saved request ID.

```sh
curl -O https://vigilnotary.com/docs/examples/buy_with_cdp.ts
npm install @coinbase/cdp-sdk @x402/core @x402/evm @x402/extensions @x402/fetch

export CDP_API_KEY_ID="your-api-key-id"
export CDP_API_KEY_SECRET="your-api-key-secret"
export CDP_WALLET_SECRET="your-wallet-secret"
npx tsx buy_with_cdp.ts
```

The wallet must hold at least 0.03 USDC on Base mainnet. Keep credentials in a secret store and review the
dependencies and source before using this example in production.

Vigil checks whether one supplied public source supports one supplied claim. It does not prove that the
source is accurate or that the publisher is trustworthy. This service is a public pilot: owner-funded live
purchases have succeeded, while independent demand, a third-party security audit, and long-term availability
have not yet been established.
