fizzl-langchain 0.4.0 → 0.5.0

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
@@ -4,7 +4,7 @@ Safety checks for [LangChain.js](https://js.langchain.com) and [LangGraph.js](ht
4
4
 
5
5
  Docs: [fizzl.eu/agents/langchain-js](https://fizzl.eu/agents/langchain-js/)
6
6
 
7
- Five LangChain tools you pass to `createAgent`, `createReactAgent` or `model.bindTools`:
7
+ Nine LangChain tools you pass to `createAgent`, `createReactAgent` or `model.bindTools`:
8
8
 
9
9
  | Tool | What the agent checks | Service | Price |
10
10
  |---|---|---|---|
@@ -13,8 +13,9 @@ Five LangChain tools you pass to `createAgent`, `createReactAgent` or `model.bin
13
13
  | `check_solana_transaction` | a **Solana** transaction before signing it: every instruction is read and the transaction simulated. Token account takeover (SetAuthority), System Assign (red); unlimited delegates, durable nonces, closing to someone else, hidden owner or delegate changes, a failing transaction (orange) | presign-guard | $0.01 |
14
14
  | `check_message` | a plain message before `personal_sign` / `eth_sign`: eth_sign, a Sign-In with Ethereum message for another site (red); unreadable bytes, a sign-in for another URI, address or chain (orange) | presign-guard | $0.01 |
15
15
  | `check_algorand_transaction` | an **Algorand** transaction or atomic group before signing it: every transaction your account sends is read and the group simulated. Rekey to another key, closing the account or an asset holding to someone else, fake USDC (red); clawbacks, risky opt-ins, app update/delete/clear-state, a partial group, a group that would fail (orange) | presign-guard | $0.01 |
16
- | `check_token` | a token **before buying or accepting it**: honeypot, rug-pull signs, look-alikes (Solana, EVM, and XRPL tokens as `CURRENCY.rIssuer`: clawback, freeze, transfer fee, fake RLUSD) | presign-guard | $0.01 |
16
+ | `check_token` | a token **before buying or accepting it**: honeypot, rug-pull signs, look-alikes (Solana, EVM, XRPL tokens as `CURRENCY.rIssuer`: clawback, freeze, transfer fee, fake RLUSD, and Algorand assets by id: fake USDC, clawback, default-frozen) | presign-guard | $0.01 |
17
17
  | `check_wallet_approvals` | every open approval of a wallet and which to revoke | presign-guard | $0.02 |
18
+ | `screen_wallet` | a wallet address **before paying it or accepting money from it**: any chain's address (EVM, Solana, Tron, Bitcoin, XRPL, Algorand) against the OFAC SDN sanctions list, synced from the US Treasury, plus theft and phishing reports for EVM (red names the SDN entry) | presign-guard | $0.01 |
18
19
  | `check_endpoint_before_paying` | an x402 or MPP paid API **before paying it**: go / caution / no_go, the cheapest option that settles, budget, track record, bait signs (fake brands, airdrop lures, output that doesn't match) | [x402 Doctor](https://x402-doctor.fizzl.eu) | $0.001 |
19
20
 
20
21
  The tools only check. They never sign, pay or move anything themselves. A failed check comes back to the model as `{ "error", "message" }`, so the agent can tell the user instead of crashing. Each tool returns its answer as a JSON string.
@@ -77,7 +78,7 @@ fizzlTools({ creditKeys: { presign: process.env.PRESIGN_CREDIT_KEY, doctor: proc
77
78
  |---|---|---|
78
79
  | `fetch` | global `fetch` | An x402-paying fetch (`wrapFetchWithPayment` from `@x402/fetch`), or plain fetch with credit keys |
79
80
  | `creditKeys` | none | `{ presign, doctor }`, sent as `x-credit-key` |
80
- | `only` | all eight | Tool names to include |
81
+ | `only` | all nine | Tool names to include |
81
82
  | `free` | `true` | Fall back to the free quick check (verdict only) when a check can't be paid |
82
83
  | `timeoutMs` | 30000 | Per check |
83
84
  | `presignUrl`, `doctorUrl` | the fizzl.eu services | For tests or self-hosting |
package/index.d.ts CHANGED
@@ -5,14 +5,14 @@ export declare const PRESIGN_URL: string;
5
5
  export declare const DOCTOR_URL: string;
6
6
  export declare const PRICES: Record<FizzlToolName, string>;
7
7
 
8
- export type FizzlToolName = "check_before_signing" | "check_xrpl_transaction" | "check_solana_transaction" | "check_algorand_transaction" | "check_message" | "check_token" | "check_wallet_approvals" | "check_endpoint_before_paying";
8
+ export type FizzlToolName = "check_before_signing" | "check_xrpl_transaction" | "check_solana_transaction" | "check_algorand_transaction" | "check_message" | "check_token" | "check_wallet_approvals" | "screen_wallet" | "check_endpoint_before_paying";
9
9
 
10
10
  export interface FizzlToolsOptions {
11
11
  /** fetch that pays x402 (wrapFetchWithPayment from @x402/fetch); plain fetch works with credit keys. */
12
12
  fetch?: typeof fetch;
13
13
  /** Prepaid credit keys (sent as x-credit-key), per service. */
14
14
  creditKeys?: { presign?: string; doctor?: string };
15
- /** The tools to include (default: all eight). */
15
+ /** The tools to include (default: all nine). */
16
16
  only?: FizzlToolName[];
17
17
  /** Fall back to the free quick check (verdict only, a few per hour) when a check can't be paid. Default true. */
18
18
  free?: boolean;
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Fizzl safety checks as LangChain.js tools, for LangChain and LangGraph agents: check a transaction or
2
- // signature before signing, a token before buying, a wallet's open approvals, and an x402 endpoint before
3
- // paying it. Each tool calls a paid Fizzl API (presign-guard or x402 Doctor) through the fetch you pass: an
2
+ // signature before signing, a token before buying, a wallet's open approvals, a wallet against the OFAC
3
+ // sanctions list, and an x402 endpoint before paying it. Each tool calls a paid Fizzl API (presign-guard or x402 Doctor) through the fetch you pass: an
4
4
  // x402-paying fetch (@x402/fetch) or prepaid credit keys. Without either, the free quick check answers
5
5
  // (the verdict only, a few per hour).
6
6
  //
@@ -9,7 +9,7 @@
9
9
  import { tool } from "@langchain/core/tools";
10
10
  import { fizzlTools as checks, PRICES, PRESIGN_URL, DOCTOR_URL } from "presign-guard-ai-sdk";
11
11
 
12
- export const VERSION = "0.4.0";
12
+ export const VERSION = "0.5.0";
13
13
  export { PRICES, PRESIGN_URL, DOCTOR_URL };
14
14
 
15
15
  // The same checks as presign-guard-ai-sdk; only the user agent says where the call came from.
@@ -22,7 +22,7 @@ function withUserAgent(fetchImpl) {
22
22
  * @param {object} [options]
23
23
  * @param {typeof fetch} [options.fetch] fetch that pays x402 (wrapFetchWithPayment from @x402/fetch); plain fetch works with credit keys
24
24
  * @param {{ presign?: string, doctor?: string }} [options.creditKeys] prepaid credit keys (x-credit-key) per service
25
- * @param {string[]} [options.only] the tool names to include (default: all eight)
25
+ * @param {string[]} [options.only] the tool names to include (default: all nine)
26
26
  * @param {boolean} [options.free] fall back to the free quick checks when a check can't be paid (default true)
27
27
  * @param {string} [options.presignUrl] @param {string} [options.doctorUrl] @param {number} [options.timeoutMs]
28
28
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fizzl-langchain",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Safety checks for LangChain.js and LangGraph.js agents that pay: tools to check a transaction or signature before signing, a token before buying, a wallet's open approvals, and an x402 endpoint before paying it (presign-guard and x402 Doctor, paid per call over x402, with a free quick check to try them).",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,7 +25,7 @@
25
25
  "example": "node example/agent.mjs"
26
26
  },
27
27
  "dependencies": {
28
- "presign-guard-ai-sdk": "^0.6.0"
28
+ "presign-guard-ai-sdk": "^0.7.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@langchain/core": ">=0.3.58 <2.0.0",