@blockrun/clawrouter 0.12.270 → 0.12.272

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -444,11 +444,22 @@ Surf is BlockRun's unified crypto data API — **84 endpoints across 13 domains*
444
444
 
445
445
  ClawRouter ships Surf as a **skill, not as typed wrappers**. The proxy whitelists `/v1/surf/*` so any call through the local proxy is paid x402 from the same wallet; the agent reads `skills/surf/SKILL.md` for the endpoint catalog and crafts the HTTP call. No `blockrun_surf_*` tool definitions to maintain; a new Surf endpoint requires zero ClawRouter release.
446
446
 
447
- | Tier | Cost | Examples |
448
- | ---- | ---------: | ------------------------------------------------------------- |
449
- | 1 | **$0.001** | prices, rankings, lists, news |
450
- | 2 | **$0.005** | orderbooks, candles, search, wallet details, social mindshare |
451
- | 3 | **$0.020** | on-chain SQL / query / schema, chat completions |
447
+ **Flat per-call pricing** — every Surf endpoint costs the same. The old
448
+ $0.001/$0.005/$0.020 tiers no longer apply; upstream prices all three tiers
449
+ identically, and the tier now describes only endpoint weight.
450
+
451
+ | Rail | Price per call |
452
+ | --------------------------- | ---------------------------------- |
453
+ | API key (`api.blockrun.ai`) | **$0.0075** (base rate, no tx fee) |
454
+ | Wallet — Solana | **$0.0075** |
455
+ | Wallet — Base | **$0.0085** |
456
+
457
+ Measured 2026-09-05: the API-key rate from the account ledger, the wallet rates
458
+ from the x402 challenge, which quotes the price before anything is signed. That
459
+ quote is authoritative for the rail that issued it — the key rail issues no 402,
460
+ and the wallet quote includes a transaction fee account credit does not pay, so
461
+ the two are not interchangeable. Solana being cheaper than Base is deliberate
462
+ (the $0.001 is Base's transaction fee), not drift.
452
463
 
453
464
  **Usage (HTTP):**
454
465
 
@@ -652,11 +663,36 @@ npx @blockrun/clawrouter
652
663
  **3. Check it, and switch back whenever**
653
664
 
654
665
  ```bash
655
- clawrouter status # names the mode, the gateway, and the masked key
666
+ clawrouter status # names the mode, the gateway, the masked key and your credit
656
667
  clawrouter doctor # verifies the key against the gateway (401 = revoked or mistyped)
668
+ clawrouter reconcile # diff your local usage journal against BlockRun's billing ledger
657
669
  clawrouter logout # delete the key and go back to paying from the wallet
658
670
  ```
659
671
 
672
+ **Checking your bill without opening a dashboard.** `clawrouter reconcile`
673
+ compares what ClawRouter recorded locally against `GET /v1/usage` — BlockRun's
674
+ authoritative ledger — joined on the gateway's own request id:
675
+
676
+ ```
677
+ BlockRun reconciliation — last 7 days
678
+
679
+ Gateway charged: $12.41 (438 settled calls)
680
+ Journal recorded: $12.41
681
+ Matched: 438, of which 0 disagree on amount
682
+ ```
683
+
684
+ Three outcomes are worth acting on. **Amount mismatches** mean the local price
685
+ table has drifted from the gateway's. **Charged but not in this machine's
686
+ journal** is the one to look at hardest: money left the account for a call this
687
+ machine did not make — expected if the same key is used on another machine or by
688
+ another BlockRun product, and worth investigating if not. Exit code `2` in that
689
+ case, so a scheduled check can alert on it. Rows still **pending pricing** are
690
+ excluded from the totals rather than counted as $0.
691
+
692
+ Your per-call sum will always be less than your card statement by exactly the
693
+ top-up fees, which are charged at purchase and never appear as ledger rows. That
694
+ gap is arithmetic, not a discrepancy.
695
+
660
696
  **Using it directly, without ClawRouter.** The same key works against
661
697
  `api.blockrun.ai` from any OpenAI or Anthropic SDK — `Authorization: Bearer` for
662
698
  OpenAI clients, `x-api-key` for Anthropic ones:
@@ -729,7 +765,7 @@ For basic usage, no configuration needed. For advanced options:
729
765
  | `BLOCKRUN_PROXY_PORT` | `8402` | Local proxy port |
730
766
  | `CLAWROUTER_DISABLED` | `false` | Disable smart routing |
731
767
  | `CLAWROUTER_DEBUG_HEADERS` | `on` | Set to `off` to suppress `x-clawrouter-*` debug response headers |
732
- | `CLAWROUTER_SOLANA_RPC_URL` | `https://api.mainnet-beta.solana.com` | Solana RPC endpoint |
768
+ | `CLAWROUTER_SOLANA_RPC_URL` | `https://api.mainnet-beta.solana.com` | Solana RPC endpoint — balance checks and payment signing |
733
769
 
734
770
  **Full reference:** [docs/configuration.md](docs/configuration.md)
735
771