fizzl-langchain 0.3.0 → 0.4.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
@@ -12,6 +12,7 @@ Five LangChain tools you pass to `createAgent`, `createReactAgent` or `model.bin
12
12
  | `check_xrpl_transaction` | an **XRP Ledger** transaction before signing it: account takeover (SetRegularKey, SignerListSet, master key off), AccountDelete, fake RLUSD (red); partial payments, destinations that refuse or need a tag, risky issuers, DEX orders far below the order book or AMM price (orange) | presign-guard | $0.01 |
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
+ | `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 |
15
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
17
  | `check_wallet_approvals` | every open approval of a wallet and which to revoke | presign-guard | $0.02 |
17
18
  | `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 |
@@ -35,7 +36,7 @@ console.log(await checkToken.invoke({ chain: "base", address: "0x833589fCD6eDb6E
35
36
  // {"verdict":"green","grade":"SAFE","free":true,"note":"Free quick check: the verdict only, a few per hour. ..."}
36
37
  ```
37
38
 
38
- With no paying fetch and no credit keys, `check_token`, `check_before_signing`, `check_solana_transaction`, `check_message` and `check_endpoint_before_paying` fall back to the free quick checks: the verdict only (green / orange / red, or go / caution / no_go with the problems found), a few per hour, marked `free: true` with a note on what the full check costs. `check_wallet_approvals` and `check_xrpl_transaction` have no free version. Pass `free: false` to get `payment_required` instead.
39
+ With no paying fetch and no credit keys, `check_token`, `check_before_signing`, `check_solana_transaction`, `check_algorand_transaction`, `check_message` and `check_endpoint_before_paying` fall back to the free quick checks: the verdict only (green / orange / red, or go / caution / no_go with the problems found), a few per hour, marked `free: true` with a note on what the full check costs. `check_wallet_approvals` and `check_xrpl_transaction` have no free version. Pass `free: false` to get `payment_required` instead.
39
40
 
40
41
  ## Use in an agent
41
42
 
@@ -76,7 +77,7 @@ fizzlTools({ creditKeys: { presign: process.env.PRESIGN_CREDIT_KEY, doctor: proc
76
77
  |---|---|---|
77
78
  | `fetch` | global `fetch` | An x402-paying fetch (`wrapFetchWithPayment` from `@x402/fetch`), or plain fetch with credit keys |
78
79
  | `creditKeys` | none | `{ presign, doctor }`, sent as `x-credit-key` |
79
- | `only` | all seven | Tool names to include |
80
+ | `only` | all eight | Tool names to include |
80
81
  | `free` | `true` | Fall back to the free quick check (verdict only) when a check can't be paid |
81
82
  | `timeoutMs` | 30000 | Per check |
82
83
  | `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_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" | "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 seven). */
15
+ /** The tools to include (default: all eight). */
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
@@ -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.3.0";
12
+ export const VERSION = "0.4.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 seven)
25
+ * @param {string[]} [options.only] the tool names to include (default: all eight)
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.3.0",
3
+ "version": "0.4.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.5.0"
28
+ "presign-guard-ai-sdk": "^0.6.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@langchain/core": ">=0.3.58 <2.0.0",