Repository Analysis

x402-foundation/x402

A payments protocol for the internet. Built on HTTP.

12.2 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of x402-foundation/x402, a TypeScript project with 6,316 GitHub stars. SynthScan v2.0 examined 550,696 lines of code across 2579 source files, recording 4708 pattern matches distributed across 22 syntactic categories. The overall adjusted score of 12.2 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

12.2
Adjusted Score
12.2
Raw Score
100%
Time Factor
2026-07-14
Last Push
6.3K
Stars
TypeScript
Language
550.7K
Lines of Code
2.6K
Files
4.7K
Pattern Hits
2026-07-14
Scan Date
0.05
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 8HIGH 122MEDIUM 615LOW 3963

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 4708 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers1993 hits · 2074 pts
SeverityFileLineSnippetContext
LOWpython/legacy/tests/test_exact.py53def test_prepare_payment_header(account, payment_requirements):CODE
LOWpython/legacy/tests/test_exact.py107def test_sign_payment_header_no_account(payment_requirements):CODE
LOWpython/legacy/tests/test_paywall.py13 def test_browser_request_with_html_accept_and_mozilla(self):CODE
LOWpython/legacy/tests/test_paywall.py20 def test_browser_request_case_insensitive(self):CODE
LOWpython/legacy/tests/test_paywall.py38 def test_html_accept_but_no_mozilla(self):CODE
LOWpython/legacy/tests/test_paywall.py45 def test_mozilla_user_agent_but_no_html(self):CODE
LOWpython/legacy/tests/test_paywall.py56 def test_create_config_with_payment_requirements(self):CODE
LOWpython/legacy/tests/test_paywall.py80 def test_create_config_with_mainnet(self):CODE
LOWpython/legacy/tests/test_paywall.py98 def test_create_config_with_paywall_config(self):CODE
LOWpython/legacy/tests/test_paywall.py121 def test_create_config_empty_requirements(self):CODE
LOWpython/legacy/tests/test_paywall.py133 def test_inject_payment_data_basic(self):CODE
LOWpython/legacy/tests/test_paywall.py164 def test_inject_payment_data_mainnet_no_console_log(self):STRING
LOWpython/legacy/tests/test_paywall.py194 def test_inject_preserves_html_structure(self):STRING
LOWpython/legacy/tests/test_paywall.py260 def test_script_close_tag_in_resource_url_is_escaped(self):CODE
LOWpython/legacy/tests/test_paywall.py274 def test_lt_gt_amp_escaped_inside_script_block(self):CODE
LOWpython/legacy/tests/test_paywall.py282 def test_escaped_json_still_round_trips(self):CODE
LOWpython/legacy/tests/test_paywall.py295 def test_get_paywall_html_integration(self):CODE
LOWpython/legacy/tests/test_common.py49def test_process_price_to_atomic_amount_money():CODE
LOWpython/legacy/tests/test_common.py69def test_process_price_to_atomic_amount_token():CODE
LOWpython/legacy/tests/test_common.py90def test_process_price_to_atomic_amount_invalid():CODE
LOWpython/legacy/tests/test_common.py110def test_find_matching_payment_requirements():CODE
LOWpython/legacy/tests/test_encoding.py53def test_encode_decode_roundtrip():CODE
LOWpython/legacy/tests/test_types.py13def test_payment_requirements_serde():CODE
LOWpython/legacy/tests/test_types.py91def test_exact_payment_payload_serde():CODE
LOWpython/legacy/tests/test_types.py106def test_verify_response_serde():CODE
LOWpython/legacy/tests/test_types.py113def test_settle_response_serde():CODE
LOWpython/legacy/tests/test_types.py132def test_payment_payload_serde():CODE
LOWpython/legacy/tests/clients/test_requests.py79def test_adapter_send_success(adapter):CODE
LOWpython/legacy/tests/clients/test_requests.py132def test_adapter_payment_flow(adapter, payment_requirements):CODE
LOWpython/legacy/tests/clients/test_requests.py209def test_adapter_payment_error(adapter, payment_requirements):CODE
LOWpython/legacy/tests/clients/test_requests.py237def test_adapter_general_error(adapter):CODE
LOWpython/legacy/tests/clients/test_httpx.py67async def test_on_response_missing_request(hooks):CODE
LOWpython/legacy/tests/clients/test_httpx.py78async def test_on_response_payment_flow(hooks, payment_requirements):CODE
LOWpython/legacy/tests/clients/test_httpx.py141async def test_on_response_payment_error(hooks, payment_requirements):CODE
LOWpython/legacy/tests/clients/test_httpx.py163async def test_on_response_general_error(hooks):CODE
LOWpython/legacy/tests/clients/test_base.py45def test_decode_x_payment_response():CODE
LOWpython/legacy/tests/clients/test_base.py72def test_client_initialization(account):CODE
LOWpython/legacy/tests/clients/test_base.py108def test_select_payment_requirements(client, payment_requirements):CODE
LOWpython/legacy/tests/clients/test_base.py132def test_select_payment_requirements_amount_exceeded(client, payment_requirements):CODE
LOWpython/legacy/tests/clients/test_base.py140def test_create_payment_header(client, payment_requirements):CODE
LOWpython/legacy/tests/clients/test_base.py157def test_payment_requirements_sorting(client):CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py5def create_app_with_middleware(configs):CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py22def test_payment_required_for_protected_route():CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py58def test_invalid_payment_header():CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py76def test_path_pattern_matching():CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py106def test_multiple_middleware_configs():CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py136def test_payment_details_in_g():CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py155def test_browser_request_returns_html():CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py185def test_api_client_request_returns_json():CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py213def test_paywall_config_injection():CODE
LOWpython/legacy/tests/flask_tests/test_middleware.py290def test_mainnet_vs_testnet_config():STRING
LOWpython/legacy/tests/flask_tests/test_middleware.py335def test_payment_amount_conversion():CODE
LOWpython/legacy/tests/fastapi_tests/test_middleware.py11def test_middleware_invalid_payment():CODE
LOWpython/legacy/tests/fastapi_tests/test_middleware.py31def test_app_middleware_path_matching():CODE
LOWpython/legacy/tests/fastapi_tests/test_middleware.py58def test_middleware_path_list_matching():CODE
LOWpython/legacy/tests/fastapi_tests/test_middleware.py320def test_browser_request_returns_html():CODE
LOWpython/legacy/tests/fastapi_tests/test_middleware.py350def test_api_client_request_returns_json():CODE
LOWpython/legacy/tests/fastapi_tests/test_middleware.py378def test_paywall_config_injection():CODE
LOWpython/legacy/tests/fastapi_tests/test_middleware.py458def test_mainnet_vs_testnet_config():STRING
LOWpython/legacy/tests/fastapi_tests/test_middleware.py505def test_payment_amount_conversion():CODE
1933 more matches not shown…
Decorative Section Separators534 hits · 1858 pts
SeverityFileLineSnippetContext
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go18// ─── Mock facilitator signer ────────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go97// ─── Test addresses (valid 40-hex-char Ethereum addresses) ──────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go172// ─── VerifyUptoPermit2 — asset contract validation ───────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go200// ─── VerifyUptoPermit2 — input validation tests ──────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go443// ─── SettleUptoPermit2 tests ─────────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go598// ─── BuildUptoPermit2SettleArgs tests ────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go671// ─── validateEip2612PermitForPayment tests ───────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go726// ─── splitEip2612Signature tests ─────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go765// ─── parseUptoPermit2Error tests ─────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go796// ─── UptoEvmScheme wrapper tests ─────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go929// ─── Helpers ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/batch-settlement/errors.go13 // ── Facilitator-emitted reason shared with the client ─────────────────COMMENT
MEDIUMgo/mechanisms/evm/batch-settlement/errors.go23 // ── Resource-server-emitted reasons ───────────────────────────────────COMMENT
MEDIUMpython/x402/interfaces.py44# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py46# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py84# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py86# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py159# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py161# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py350# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py352# ============================================================================COMMENT
MEDIUMpython/x402/server.py57# ============================================================================COMMENT
MEDIUMpython/x402/server.py59# ============================================================================COMMENT
MEDIUMpython/x402/server.py440 # ========================================================================COMMENT
MEDIUMpython/x402/server.py442 # ========================================================================COMMENT
MEDIUMpython/x402/server.py113 # ========================================================================COMMENT
MEDIUMpython/x402/server.py115 # ========================================================================COMMENT
MEDIUMpython/x402/server.py171 # ========================================================================COMMENT
MEDIUMpython/x402/server.py173 # ========================================================================COMMENT
MEDIUMpython/x402/server.py227 # ========================================================================COMMENT
MEDIUMpython/x402/server.py229 # ========================================================================COMMENT
MEDIUMpython/x402/server.py327# ============================================================================COMMENT
MEDIUMpython/x402/server.py329# ============================================================================COMMENT
MEDIUMpython/x402/server.py401 # ========================================================================COMMENT
MEDIUMpython/x402/server.py403 # ========================================================================COMMENT
MEDIUMpython/x402/server.py496 # ========================================================================COMMENT
MEDIUMpython/x402/server.py498 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py390 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py392 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py460 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py462 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py875 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py877 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py137# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py139# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py190# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py192# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py239# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py241# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py290 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py292 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py945 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py947 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py1092 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py1094 # ========================================================================COMMENT
MEDIUMpython/x402/facilitator_base.py42# ============================================================================COMMENT
MEDIUMpython/x402/facilitator_base.py44# ============================================================================COMMENT
MEDIUMpython/x402/facilitator_base.py76# ============================================================================COMMENT
MEDIUMpython/x402/facilitator_base.py78# ============================================================================COMMENT
MEDIUMpython/x402/facilitator_base.py90# ============================================================================COMMENT
474 more matches not shown…
Unused Imports1159 hits · 864 pts
SeverityFileLineSnippetContext
LOWpython/legacy/src/x402/types.py1CODE
LOWpython/legacy/src/x402/clients/__init__.py1CODE
LOWpython/legacy/src/x402/clients/__init__.py1CODE
LOWpython/legacy/src/x402/clients/__init__.py2CODE
LOWpython/legacy/src/x402/clients/__init__.py2CODE
LOWpython/legacy/src/x402/clients/__init__.py6CODE
LOWpython/legacy/src/x402/clients/__init__.py6CODE
LOWpython/legacy/src/x402/clients/__init__.py6CODE
LOWpython/x402/interfaces.py9CODE
LOWpython/x402/server.py8CODE
LOWpython/x402/server.py15CODE
LOWpython/x402/server_base.py6CODE
LOWpython/x402/facilitator_base.py6CODE
LOWpython/x402/client.py7CODE
LOWpython/x402/client.py15CODE
LOWpython/x402/client.py15CODE
LOWpython/x402/client.py15CODE
LOWpython/x402/client.py15CODE
LOWpython/x402/client.py15CODE
LOWpython/x402/hook_policy.py3CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py65CODE
LOWpython/x402/__init__.py65CODE
LOWpython/x402/__init__.py68CODE
LOWpython/x402/__init__.py68CODE
LOWpython/x402/__init__.py68CODE
LOWpython/x402/__init__.py68CODE
LOWpython/x402/__init__.py68CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
LOWpython/x402/__init__.py77CODE
1099 more matches not shown…
Docstring Block Structure58 hits · 290 pts
SeverityFileLineSnippetContext
HIGHpython/legacy/src/x402/common.py35Process a Price into atomic amount, asset address, and EIP-712 domain info Args: price: Either Money (USD sSTRING
HIGHpython/legacy/src/x402/clients/base.py92Select payment requirements from the list of accepted requirements. Args: accepts: List of acceptedSTRING
HIGHpython/legacy/src/x402/clients/base.py138Select payment requirements using the configured selector. Args: accepts: List of accepted payment STRING
HIGHpython/x402/server.py185Verify a payment via facilitator. Args: payload: Payment payload to verify. requirementSTRING
HIGHpython/x402/server.py241Settle a payment via facilitator. Args: payload: Payment payload to settle. requirementSTRING
HIGHpython/x402/server.py454Verify a payment via facilitator. Args: payload: Payment payload to verify. requirementSTRING
HIGHpython/x402/server.py510Settle a payment via facilitator. Args: payload: Payment payload to settle. requirementSTRING
HIGHpython/x402/facilitator_base.py384Core verify logic as generator. Yields (phase, hook, context) tuples for hook execution. The caller driSTRING
HIGHpython/x402/facilitator_base.py491Core settle logic as generator. Yields (phase, hook, context) tuples for hook execution. The caller driSTRING
HIGHpython/x402/client.py171Create a payment payload for the given 402 response. Args: payment_required: The 402 response from STRING
HIGHpython/x402/client.py357Create a payment payload for the given 402 response. Args: payment_required: The 402 response from STRING
HIGHpython/x402/facilitator.py126Verify a payment. Routes to V1 or V2 verification based on payload version. Args: payload:STRING
HIGHpython/x402/facilitator.py163Settle a payment. Routes to V1 or V2 settlement based on payload version. Args: payload: PSTRING
HIGHpython/x402/facilitator.py280Verify a payment. Routes to V1 or V2 verification based on payload version. Args: payload:STRING
HIGHpython/x402/facilitator.py317Settle a payment. Routes to V1 or V2 settlement based on payload version. Args: payload: PSTRING
HIGHpython/x402/mechanisms/svm/signers.py171Sign a partially-signed transaction. Supports both legacy and versioned (v0) transactions: - Legacy traSTRING
HIGHpython/x402/mechanisms/svm/signers.py288Send a transaction. Args: tx_base64: Base64 encoded signed transaction. network: CAIP-2STRING
HIGHpython/x402/mechanisms/svm/utils.py35Normalize network identifier to CAIP-2 format. Handles both V1 names (solana, solana-devnet) and V2 CAIP-2 format. STRING
HIGHpython/x402/mechanisms/svm/utils.py63Get configuration for a network. Args: network: Network identifier (CAIP-2 or V1 format). Returns: STRING
HIGHpython/x402/mechanisms/svm/utils.py94Get the default USDC mint address for a network. Args: network: Network identifier (CAIP-2 or V1 format). STRING
HIGHpython/x402/mechanisms/svm/utils.py118Get asset info for a network. Args: network: Network identifier. asset_address: Optional specific aSTRING
HIGHpython/x402/mechanisms/svm/utils.py140Convert a decimal amount to token smallest units. Args: decimal_amount: The decimal amount (e.g., "0.10"). STRING
HIGHpython/x402/mechanisms/svm/utils.py233Decode a base64 encoded transaction from an SVM payload. Args: payload: The SVM payload containing a base64STRING
HIGHpython/x402/mechanisms/svm/signer.py74Sign a partially-signed transaction with the signer matching fee_payer. Transaction is decoded, signed, and re-STRING
HIGHpython/x402/mechanisms/svm/signer.py104Send a signed transaction to the network. Args: tx_base64: Base64 encoded signed transaction. STRING
HIGHpython/x402/mechanisms/svm/exact/server.py49Parse price into asset amount. If price is already AssetAmount, returns it directly. If price is Money STRING
HIGHpython/x402/mechanisms/svm/exact/client.py90Create signed SPL TransferChecked inner payload. Args: requirements: Payment requirements from servSTRING
HIGHpython/x402/mechanisms/svm/exact/v1/client.py94Create signed SPL TransferChecked inner payload (V1 format). Args: requirements: V1 payment requireSTRING
HIGHpython/x402/mechanisms/evm/erc6492.py31Parse ERC-6492 wrapped signature. ERC-6492 Format: abi.encode((address factory, bytes factoryCalldata, byteSTRING
HIGHpython/x402/mechanisms/evm/utils.py22Extract chain ID from a CAIP-2 network identifier (eip155:CHAIN_ID). Args: network: Network identifier in CSTRING
HIGHpython/x402/mechanisms/evm/utils.py43Get configuration for a CAIP-2 network identifier (eip155:CHAIN_ID). Returns a full config for known networks, or aSTRING
HIGHpython/x402/mechanisms/evm/utils.py71Get asset info by address. Returns the full default asset info if the address matches the network's default asset. STRING
HIGHpython/x402/mechanisms/evm/utils.py134Normalize Ethereum address to checksummed format. Uses EIP-55 checksum algorithm. Args: address: EtherSTRING
HIGHpython/x402/mechanisms/evm/verify.py24Verify ECDSA signature from EOA. Uses secp256k1 public key recovery. Handles Ethereum v value adjustment (27/28STRING
HIGHpython/x402/mechanisms/evm/v1/utils.py8Extract chain ID from a v1 legacy network name. Args: network: V1 network name (e.g., "base-sepolia", "polySTRING
HIGHpython/x402/mechanisms/evm/v1/utils.py26Get asset info for a v1 network by legacy network name. Args: network: V1 legacy network name (e.g., "base"STRING
HIGHpython/x402/mechanisms/evm/exact/server.py54Parse price into asset amount. If price is already AssetAmount, returns it directly. If price is Money STRING
HIGHpython/x402/mechanisms/evm/exact/server.py163Convert decimal amount to network's default stablecoin AssetAmount. Args: amount: Decimal amount (eSTRING
HIGHpython/x402/mechanisms/evm/exact/client.py242Sign EIP-3009 authorization using EIP-712. Requires requirements.extra to contain 'name' and 'version' STRING
HIGHpython/x402/mcp/client_async.py149Call a tool with automatic payment handling. Args: name: Tool name args: Tool argumentsSTRING
HIGHpython/x402/schemas/helpers.py12Extract x402Version from JSON bytes or dict. Args: data: JSON bytes or parsed dict. Returns: PSTRING
HIGHpython/x402/schemas/helpers.py42Extract scheme and network from payment payload. Args: version: Protocol version (1 or 2). payload:STRING
HIGHpython/x402/schemas/helpers.py166Parse payment requirements based on protocol version. Unlike parse_payment_payload which auto-detects version from STRING
HIGHpython/x402/schemas/helpers.py197Check if network matches a pattern (supports wildcards). Args: network: Specific network (e.g., "eip155:845STRING
HIGHpython/x402/schemas/helpers.py220Derive common pattern from list of networks. If all networks share same namespace, returns wildcard pattern. OtSTRING
HIGHpython/x402/extensions/builder_code/server.py37Declare the builder-code extension for inclusion in PaymentRequired.extensions. Args: app_code: The serviceSTRING
HIGHpython/x402/extensions/bazaar/facilitator_client.py205List x402 discovery resources from the bazaar. Args: params: Optional filtering and pagination paraSTRING
HIGHpython/x402/extensions/bazaar/facilitator_client.py275Search x402 discovery resources from the bazaar using a natural-language query. Pagination is optional: facilitSTRING
HIGHpython/x402/extensions/bazaar/facilitator.py693Extract discovery info from a v2 extension directly. This is a lower-level function for when you already have the eSTRING
HIGHpython/x402/extensions/payment_identifier/client.py15Append a payment identifier to the extensions object if the server declared support. This function reads the serverSTRING
HIGHpython/x402/http/facilitator_client.py189Verify a payment with the facilitator (async). Args: payload: Payment payload to verify. STRING
HIGHpython/x402/http/facilitator_client.py213Settle a payment with the facilitator (async). Args: payload: Payment payload to settle. STRING
HIGHpython/x402/http/facilitator_client.py411Verify a payment with the facilitator. Args: payload: Payment payload to verify. requirSTRING
HIGHpython/x402/http/facilitator_client.py435Settle a payment with the facilitator. Args: payload: Payment payload to settle. requirSTRING
HIGHpython/x402/http/utils.py83Detect the x402 protocol version from HTTP response headers and body. Prioritizes V2 header, then V1 body. ArgSTRING
HIGHpython/x402/http/x402_http_client_base.py126Extract payment required from HTTP response. Handles both V1 (body) and V2 (header) formats. Args: STRING
HIGHpython/x402/http/x402_http_client_base.py158Extract settlement response from HTTP headers. Args: get_header: Function to get header by name. STRING
HIGHpython/x402/http/clients/requests.py96Send request with automatic 402 payment handling. Args: request: The prepared request. STRING
Cross-File Repetition51 hits · 255 pts
SeverityFileLineSnippetContext
HIGHpython/x402/server.py0execute hook synchronously. raises if async hook detected.STRING
HIGHpython/x402/client.py0execute hook synchronously. raises if async hook detected.STRING
HIGHpython/x402/facilitator.py0execute hook synchronously. raises if async hook detected.STRING
HIGHpython/x402/facilitator_base.py0get supported payment kinds and extensions. returns: supportedresponse with kinds, extensions, and signers.STRING
HIGHexamples/python/facilitator/advanced/bazaar.py0get supported payment kinds and extensions. returns: supportedresponse with kinds, extensions, and signers.STRING
HIGHexamples/python/facilitator/advanced/all_networks.py0get supported payment kinds and extensions. returns: supportedresponse with kinds, extensions, and signers.STRING
HIGHexamples/python/facilitator/basic/main.py0get supported payment kinds and extensions. returns: supportedresponse with kinds, extensions, and signers.STRING
HIGHe2e/facilitators/python/main.py0get supported payment kinds and extensions. returns: supportedresponse with kinds, extensions, and signers.STRING
HIGHpython/x402/mechanisms/svm/signers.py0get or create rpc client for network. args: network: network identifier. returns: solana rpc client.STRING
HIGHpython/x402/mechanisms/svm/exact/client.py0get or create rpc client for network. args: network: network identifier. returns: solana rpc client.STRING
HIGHpython/x402/mechanisms/svm/exact/v1/client.py0get or create rpc client for network. args: network: network identifier. returns: solana rpc client.STRING
HIGHpython/x402/mechanisms/svm/exact/v1/facilitator.py0get facilitator wallet addresses. args: network: network identifier. returns: list of facilitator addresses.STRING
HIGHpython/x402/mechanisms/evm/exact/facilitator.py0get facilitator wallet addresses. args: network: network identifier. returns: list of facilitator addresses.STRING
HIGHpython/x402/mechanisms/evm/exact/v1/facilitator.py0get facilitator wallet addresses. args: network: network identifier. returns: list of facilitator addresses.STRING
HIGHpython/x402/tests/unit/mechanisms/svm/test_types.py0should preserve data through serialization round-trip.STRING
HIGHpython/x402/tests/unit/mechanisms/evm/test_types.py0should preserve data through serialization round-trip.STRING
HIGHpython/x402/tests/unit/mechanisms/tvm/test_types.py0should preserve data through serialization round-trip.STRING
HIGHpython/x402/tests/unit/http/test_x402_http_client.py0test that 402 response triggers payment creation and retry.STRING
HIGHpython/x402/tests/unit/http/clients/test_requests.py0test that 402 response triggers payment creation and retry.STRING
HIGHpython/x402/tests/unit/http/clients/test_httpx.py0test that 402 response triggers payment creation and retry.STRING
HIGHexamples/python/clients/advanced/all_networks.py0all networks server example. demonstrates how to create a server that supports all available networks with optional chaiSTRING
HIGHexamples/python/facilitator/advanced/all_networks.py0all networks server example. demonstrates how to create a server that supports all available networks with optional chaiSTRING
HIGHexamples/python/servers/advanced/all_networks.py0all networks server example. demonstrates how to create a server that supports all available networks with optional chaiSTRING
HIGHexamples/python/clients/advanced/all_networks.py0validate required environment variables. returns: tuple of (evm_private_key, svm_private_key, base_url, endpoint_path). STRING
HIGHexamples/python/clients/requests/main.py0validate required environment variables. returns: tuple of (evm_private_key, svm_private_key, base_url, endpoint_path). STRING
HIGHexamples/python/clients/httpx/main.py0validate required environment variables. returns: tuple of (evm_private_key, svm_private_key, base_url, endpoint_path). STRING
HIGHexamples/python/clients/custom/main.py0validate required environment variables. returns: tuple of (evm_private_key, svm_private_key, base_url, endpoint_path). STRING
HIGHexamples/python/clients/mcp/advanced.py0connect - already connected via session context manager.STRING
HIGHexamples/python/clients/mcp/simple.py0connect - already connected via session context manager.STRING
HIGHexamples/python/clients/mcp-chatbot/main.py0connect - already connected via session context manager.STRING
HIGHexamples/python/facilitator/advanced/bazaar.py0settle a payment on-chain. args: request: payment payload and requirements to settle. returns: settleresponse with succeSTRING
HIGHexamples/python/facilitator/advanced/all_networks.py0settle a payment on-chain. args: request: payment payload and requirements to settle. returns: settleresponse with succeSTRING
HIGHexamples/python/facilitator/basic/main.py0settle a payment on-chain. args: request: payment payload and requirements to settle. returns: settleresponse with succeSTRING
HIGHexamples/python/servers/mcp/advanced.py0get current weather for a city. requires payment of $0.001.STRING
HIGHexamples/python/servers/mcp/existing_server.py0get current weather for a city. requires payment of $0.001.STRING
HIGHexamples/python/servers/mcp/simple.py0get current weather for a city. requires payment of $0.001.STRING
HIGHscripts/prepare-typescript-release.py0query($owner: string!, $name: string!, $number: int!, $after: string) { repository(owner: $owner, name: $name) { pullreqSTRING
HIGHscripts/prepare-go-release.py0query($owner: string!, $name: string!, $number: int!, $after: string) { repository(owner: $owner, name: $name) { pullreqSTRING
HIGHscripts/prepare-python-release.py0query($owner: string!, $name: string!, $number: int!, $after: string) { repository(owner: $owner, name: $name) { pullreqSTRING
HIGHscripts/prepare-typescript-release.py0raised when the release-prep inputs or files are invalid.STRING
HIGHscripts/prepare-go-release.py0raised when the release-prep inputs or files are invalid.STRING
HIGHscripts/prepare-python-release.py0raised when the release-prep inputs or files are invalid.STRING
HIGHscripts/tag-python-release.py0raised when the release-tag inputs or git state are invalid.STRING
HIGHscripts/tag-go-release.py0raised when the release-tag inputs or git state are invalid.STRING
HIGHscripts/tag-typescript-release.py0raised when the release-tag inputs or git state are invalid.STRING
HIGHscripts/tag-python-release.py0reduce a git remote url to its ``owner/repo`` form.STRING
HIGHscripts/tag-go-release.py0reduce a git remote url to its ``owner/repo`` form.STRING
HIGHscripts/tag-typescript-release.py0reduce a git remote url to its ``owner/repo`` form.STRING
HIGHscripts/tag-python-release.py0refuse to tag unless head is exactly the release remote's main head. tags point at the currently checked-out commit, so STRING
HIGHscripts/tag-go-release.py0refuse to tag unless head is exactly the release remote's main head. tags point at the currently checked-out commit, so STRING
HIGHscripts/tag-typescript-release.py0refuse to tag unless head is exactly the release remote's main head. tags point at the currently checked-out commit, so STRING
Structural Annotation Overuse131 hits · 232 pts
SeverityFileLineSnippetContext
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go86 // Step 1: Validate Payment RequirementsCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go138 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go155 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go170 // Step 4: Verify Transfer InstructionCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go175 // Step 5: Verify optional instructions (if present)COMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go221 // Step 6: Sign and Simulate TransactionCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go85 // Step 1: Validate Payment RequirementsCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go128 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go145 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go173 // Step 4: Verify Transfer InstructionCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go178 // Step 5: Verify optional instructions (if present)COMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go224 // Step 6: Sign and Simulate TransactionCOMMENT
LOWgo/mechanisms/evm/verify_universal.go48 // Step 1: Parse ERC-6492 wrapper if presentCOMMENT
LOWgo/mechanisms/evm/verify_universal.go54 // Step 2: Always fetch code first. Routing is determined by whether the addressCOMMENT
LOWgo/mechanisms/evm/verify_universal.go67 // Step 5: Handle undeployed addressCOMMENT
LOWgo/mechanisms/evm/verify_universal.go93 // Step 6: Deployed smart contract - use EIP-1271 verificationCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py151 # Step 1: Validate Payment RequirementsCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py170 # Step 2: Parse and Validate Transaction StructureCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py188 # Step 3: Verify Compute Budget InstructionsCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py235 # Step 4: Verify Transfer InstructionCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py248 # Step 5: Verify optional instructions (if present)COMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py338 # Step 5: Sign and Simulate TransactionCOMMENT
LOWspecs/CONTRIBUTING.md64### Step 1: Open a DiscussionCOMMENT
LOWspecs/CONTRIBUTING.md72### Step 2: Write the SpecCOMMENT
LOWspecs/CONTRIBUTING.md82### Step 3: Submit PRCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts227 // Step 4: Extract and validate contract invocation detailsCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts235 // Step 5: Validate contract address and function nameCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts385 // Step 3: Extract operationCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts388 // Step 4: Rebuild transaction with facilitator as source and facilitator-chosen feeCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts177 // Step 1: Validate protocol version, scheme, and networkCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts196 // Step 2: Parse and decode transactionCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts210 // Step 3: Validate transaction structureCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts251 // Step 6: Extract and validate transfer argumentsCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts269 // Step 7: Re-simulate to ensure transaction will succeedCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts280 // Step 8: Validate if the resource fees are within acceptable boundsCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts297 // Step 9: Validate simulation events for expected transfer only.COMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts316 // Step 10: Validate auth entries (structure, credential type, expiration, facilitator safety, and signature statuCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts353 // Step 1: Verify payment before settlementCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts368 // Step 2: Parse transaction envelope once to extract both transaction and Soroban dataCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts422 // Step 5: Sign inner transaction with the selected signer's keyCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts437 // Step 6: Optionally wrap in a fee bump transactionCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts474 // Step 7: Submit transaction to networkCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts487 // Step 8: Poll for transaction confirmationCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts502 // Step 9: Return successCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts78 // Step 2: Verify x402Version is 2COMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts87 // Step 3: Verify the network matchesCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts101 // Step 4: Deserialize the BCS-encoded transaction and verify the signatureCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts210 // Step 5: Verify the transaction has not expiredCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts221 // Step 6: Verify the transaction contains a fungible asset transfer operationCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts276 // Step 7: Verify the transfer is for the correct assetCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts286 // Step 8: Verify the transfer amount matchesCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts296 // Step 9: Verify the transfer recipient matchesCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts306 // Step 10: Verify the sender has sufficient balanceCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts325 // Step 11: Simulate the transactionCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts109 // Step 1: Validate Payment RequirementsCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts144 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts174 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts196 // Step 4: Verify Transfer InstructionCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts285 // Step 5: Verify optional instructions (if present)COMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts335 // Step 6: Sign and Simulate TransactionCOMMENT
71 more matches not shown…
Excessive Try-Catch Wrapping227 hits · 230 pts
SeverityFileLineSnippetContext
LOWpython/legacy/src/x402/exact.py106 except Exception:CODE
LOWpython/legacy/src/x402/flask/middleware.py162 except Exception as e:CODE
LOWpython/legacy/src/x402/flask/middleware.py253 except Exception as e:CODE
LOWpython/legacy/src/x402/flask/middleware.py322 except Exception as e:CODE
LOWpython/legacy/src/x402/clients/httpx.py74 except Exception as e:CODE
LOWpython/legacy/src/x402/clients/requests.py82 except Exception as e:CODE
LOWpython/legacy/src/x402/fastapi/middleware.py86 except Exception as e:CODE
LOWpython/legacy/src/x402/fastapi/middleware.py171 except Exception as e:CODE
LOWpython/legacy/src/x402/fastapi/middleware.py218 except Exception:CODE
LOWpython/x402/server.py312 except Exception as error:CODE
LOWpython/x402/server.py582 except Exception as error:CODE
LOWpython/x402/server_base.py578 except Exception as hook_error:CODE
LOWpython/x402/server_base.py616 except Exception as hook_error:CODE
LOWpython/x402/server_base.py678 except Exception as hook_error:CODE
LOWpython/x402/server_base.py716 except Exception as hook_error:CODE
LOWpython/x402/server_base.py755 except Exception as hook_error:CODE
LOWpython/x402/server_base.py776 except Exception as hook_error:CODE
LOWpython/x402/server_base.py815 except Exception as hook_error:CODE
LOWpython/x402/server_base.py836 except Exception as hook_error:CODE
LOWpython/x402/server_base.py1218 except Exception as e:CODE
LOWpython/x402/server_base.py1435 except Exception as e:CODE
LOWpython/x402/facilitator_base.py468 except Exception as e:CODE
LOWpython/x402/facilitator_base.py575 except Exception as e:CODE
LOWpython/x402/client.py233 except Exception as hook_error:CODE
LOWpython/x402/client.py416 except Exception as hook_error:CODE
LOWpython/x402/client_base.py529 except Exception as e:CODE
LOWpython/x402/client_base.py617 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/utils.py154 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/utils.py247 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py173 except Exception:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py348 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py431 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/v1/facilitator.py159 except Exception:CODE
LOWpython/x402/mechanisms/svm/exact/v1/facilitator.py330 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/v1/facilitator.py408 except Exception as e:CODE
LOWpython/x402/mechanisms/evm/multicall.py107 except Exception as exc:CODE
LOWpython/x402/mechanisms/evm/multicall.py134 except Exception:CODE
LOWpython/x402/mechanisms/evm/multicall.py140 except Exception:CODE
LOWpython/x402/mechanisms/evm/signers.py464 except Exception:CODE
LOWpython/x402/mechanisms/evm/signers.py469 except Exception as e:CODE
LOWpython/x402/mechanisms/evm/erc6492.py76 except Exception as e:CODE
LOWpython/x402/mechanisms/evm/verify.py65 except Exception:CODE
LOWpython/x402/mechanisms/evm/verify.py105 except Exception:CODE
LOWpython/x402/mechanisms/evm/verify.py266 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/client.py130 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/client.py184 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py111 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py127 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py141 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py157 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py204 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py235 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py258 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py297 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py337 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py354 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py445 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py662 except Exception as e:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py732 except Exception as e:CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py787 except Exception as e:CODE
167 more matches not shown…
Verbosity Indicators128 hits · 226 pts
SeverityFileLineSnippetContext
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go86 // Step 1: Validate Payment RequirementsCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go138 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go155 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go170 // Step 4: Verify Transfer InstructionCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go175 // Step 5: Verify optional instructions (if present)COMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go221 // Step 6: Sign and Simulate TransactionCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go85 // Step 1: Validate Payment RequirementsCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go128 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go145 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go173 // Step 4: Verify Transfer InstructionCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go178 // Step 5: Verify optional instructions (if present)COMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go224 // Step 6: Sign and Simulate TransactionCOMMENT
LOWgo/mechanisms/evm/verify_universal.go48 // Step 1: Parse ERC-6492 wrapper if presentCOMMENT
LOWgo/mechanisms/evm/verify_universal.go54 // Step 2: Always fetch code first. Routing is determined by whether the addressCOMMENT
LOWgo/mechanisms/evm/verify_universal.go67 // Step 5: Handle undeployed addressCOMMENT
LOWgo/mechanisms/evm/verify_universal.go93 // Step 6: Deployed smart contract - use EIP-1271 verificationCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py151 # Step 1: Validate Payment RequirementsCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py170 # Step 2: Parse and Validate Transaction StructureCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py188 # Step 3: Verify Compute Budget InstructionsCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py235 # Step 4: Verify Transfer InstructionCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py248 # Step 5: Verify optional instructions (if present)COMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py338 # Step 5: Sign and Simulate TransactionCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts227 // Step 4: Extract and validate contract invocation detailsCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts235 // Step 5: Validate contract address and function nameCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts385 // Step 3: Extract operationCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts388 // Step 4: Rebuild transaction with facilitator as source and facilitator-chosen feeCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts177 // Step 1: Validate protocol version, scheme, and networkCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts196 // Step 2: Parse and decode transactionCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts210 // Step 3: Validate transaction structureCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts251 // Step 6: Extract and validate transfer argumentsCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts269 // Step 7: Re-simulate to ensure transaction will succeedCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts280 // Step 8: Validate if the resource fees are within acceptable boundsCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts297 // Step 9: Validate simulation events for expected transfer only.COMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts316 // Step 10: Validate auth entries (structure, credential type, expiration, facilitator safety, and signature statuCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts353 // Step 1: Verify payment before settlementCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts368 // Step 2: Parse transaction envelope once to extract both transaction and Soroban dataCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts422 // Step 5: Sign inner transaction with the selected signer's keyCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts437 // Step 6: Optionally wrap in a fee bump transactionCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts474 // Step 7: Submit transaction to networkCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts487 // Step 8: Poll for transaction confirmationCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts502 // Step 9: Return successCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts78 // Step 2: Verify x402Version is 2COMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts87 // Step 3: Verify the network matchesCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts101 // Step 4: Deserialize the BCS-encoded transaction and verify the signatureCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts210 // Step 5: Verify the transaction has not expiredCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts221 // Step 6: Verify the transaction contains a fungible asset transfer operationCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts276 // Step 7: Verify the transfer is for the correct assetCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts286 // Step 8: Verify the transfer amount matchesCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts296 // Step 9: Verify the transfer recipient matchesCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts306 // Step 10: Verify the sender has sufficient balanceCOMMENT
LOW…kages/mechanisms/aptos/src/exact/facilitator/scheme.ts325 // Step 11: Simulate the transactionCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts109 // Step 1: Validate Payment RequirementsCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts144 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts174 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts196 // Step 4: Verify Transfer InstructionCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts285 // Step 5: Verify optional instructions (if present)COMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts335 // Step 6: Sign and Simulate TransactionCOMMENT
LOW…ackages/mechanisms/svm/src/exact/facilitator/scheme.ts398 // Step 1: Validate Payment RequirementsCOMMENT
LOW…ackages/mechanisms/svm/src/exact/facilitator/scheme.ts437 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOW…ackages/mechanisms/svm/src/exact/facilitator/scheme.ts573 // Step 3: Verify Compute Budget InstructionsCOMMENT
68 more matches not shown…
Self-Referential Comments56 hits · 170 pts
SeverityFileLineSnippetContext
MEDIUMpython/legacy/tests/test_common.py71 # Create a test TokenAmountCOMMENT
MEDIUMpython/legacy/tests/clients/test_requests.py85 # Create a prepared requestCOMMENT
MEDIUMpython/legacy/tests/clients/test_requests.py101 # Create a prepared requestCOMMENT
MEDIUMpython/legacy/tests/clients/test_requests.py117 # Create a prepared requestCOMMENT
MEDIUMpython/legacy/tests/clients/test_requests.py163 # Create a prepared requestCOMMENT
MEDIUMpython/legacy/tests/clients/test_requests.py225 # Create a prepared requestCOMMENT
MEDIUMpython/legacy/tests/clients/test_requests.py243 # Create a prepared requestCOMMENT
MEDIUMpython/legacy/src/x402/paywall.py80 # Create the window.x402 configuration objectCOMMENT
MEDIUMpython/legacy/src/x402/paywall.py106 # Create the configuration scriptCOMMENT
MEDIUMpython/x402/mechanisms/svm/exact/client.py189 # Create a partially-signed transactionCOMMENT
MEDIUMpython/x402/mechanisms/svm/exact/v1/client.py193 # Create a partially-signed transactionCOMMENT
MEDIUMpython/x402/tests/unit/extensions/test_exports.py55 # Create a new namespaceCOMMENT
MEDIUMpython/x402/tests/integrations/test_core.py387 # Create a valid client to make payloadCOMMENT
MEDIUMpython/x402/tests/integrations/test_evm.py616 # Create a simple typed data messageCOMMENT
MEDIUMpython/x402/tests/integrations/test_svm.py400 # Create a mock facilitator for the serverCOMMENT
MEDIUMpython/x402/mcp/tests/test_server_async.py29 # Create an AsyncMock that wraps the real method so we can track callsCOMMENT
MEDIUMpython/x402/mcp/tests/test_server.py28 # Create a Mock that wraps the real method so we can track callsCOMMENT
MEDIUMpython/x402/mcp/tests/test_client.py37 # Create a mock result object with attributes (not dict) since _convert_mcp_result uses getattrCOMMENT
MEDIUMpython/x402/mcp/tests/test_client.py250 # Create a mock result object with payment responseCOMMENT
MEDIUMpython/x402/http/clients/requests.py153 # Create a copy of the request for retry (don't modify original)COMMENT
MEDIUMexamples/python/servers/mcp/simple.py97 # Create the paid tool bridge (SDK handles _meta extraction + CallToolResult conversion)COMMENT
MEDIUMe2e/clients/mcp-python/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/clients/mcp-typescript/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/clients/mcp-typescript/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/clients/requests/main.py114 # Create a session with x402 payment handlingCOMMENT
MEDIUMe2e/clients/fetch/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/clients/fetch/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/clients/axios/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/clients/axios/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/requests/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/requests/main.py27 # Create a session and mount the x402 adapterCOMMENT
MEDIUMe2e/legacy/clients/fetch/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/fetch/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/httpx/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/axios/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/axios/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/flask/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/next/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/next/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/express/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/express/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/hono/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/hono/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/fastapi/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/facilitators/typescript/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/facilitators/typescript/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/mcp-python/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/next/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/express/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/express/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/mcp-typescript/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/mcp-typescript/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/hono/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/hono/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/fastify/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/fastify/build.sh3# This file is intentionally emptyCOMMENT
Over-Commented Block144 hits · 144 pts
SeverityFileLineSnippetContext
LOWgo/facilitator_hooks.go81COMMENT
LOWgo/facilitator_hooks.go101// If it returns a result with Abort=true, settlement will be abortedCOMMENT
LOWgo/server.go321 networkClients, ok := s.facilitatorClients[network]COMMENT
LOWgo/server_hooks.go161COMMENT
LOWgo/server_hooks.go181// and an error will be returned with the provided reasonCOMMENT
LOWgo/server_hooks.go241 }COMMENT
LOWgo/server_hooks.go301type OnVerifiedPaymentCanceledHookProvider interface {COMMENT
LOWgo/server_hooks.go321// before merging.COMMENT
LOWgo/server_hooks.go341// extension key is present in the request's `declaredExtensions` map. ThisCOMMENT
LOWgo/interfaces.go1package x402COMMENT
LOWgo/interfaces.go41 // Examples:COMMENT
LOWgo/interfaces.go61 // which addresses might sign/pay for transactions.COMMENT
LOWgo/interfaces.go101// PaymentResponseContext is passed to PaymentResponseHandler implementations afterCOMMENT
LOWgo/interfaces.go121// the scheme has resynced its session state.COMMENT
LOWgo/interfaces.go241COMMENT
LOWgo/interfaces.go261 GetExtra(network Network) map[string]interface{}COMMENT
LOWgo/.golangci.yml41 # Report unused function parametersCOMMENT
LOWgo/client_hooks.go61COMMENT
LOWgo/errors.go101COMMENT
LOWgo/mechanisms/svm/exact/server/scheme.go41//COMMENT
LOWgo/mechanisms/svm/exact/server/scheme.go61 return sCOMMENT
LOWgo/mechanisms/evm/eip712_test.go1package evmCOMMENT
LOWgo/mechanisms/evm/verify_1271.go21// This is bytes4(keccak256("isValidSignature(bytes32,bytes)"))COMMENT
LOWgo/mechanisms/evm/verify_universal.go1package evmCOMMENT
LOWgo/mechanisms/evm/verify_universal.go21// 3. If undeployed + has deployment info + allowUndeployed: classify as counterfactual,COMMENT
LOWgo/mechanisms/evm/utils.go161 }COMMENT
LOWgo/mechanisms/evm/erc6492.go21//COMMENT
LOWgo/mechanisms/evm/erc6492.go41//COMMENT
LOWgo/mechanisms/evm/verify_eoa.go1package evmCOMMENT
LOWgo/mechanisms/evm/eip712.go101 digest := crypto.Keccak256(rawData)COMMENT
LOWgo/mechanisms/evm/eip712.go261// HashPermit2Authorization hashes a PermitWitnessTransferFrom message for Permit2.COMMENT
LOWgo/mechanisms/evm/batch-settlement/errors.go1// Package batched holds shared batch-settlement error constants used acrossCOMMENT
LOWgo/mechanisms/evm/batch-settlement/errors.go21 ErrCumulativeBelowClaimed = "invalid_batch_settlement_evm_cumulative_below_claimed"COMMENT
LOWgo/mechanisms/evm/batch-settlement/errors.go41COMMENT
LOWgo/mechanisms/evm/batch-settlement/server/hooks.go21COMMENT
LOWgo/mechanisms/evm/batch-settlement/server/hooks.go201// verifyVoucherLocally returns a successful VerifyResponse when the voucher canCOMMENT
LOWgo/mechanisms/evm/batch-settlement/server/hooks.go821 enrichment["refundAuthorizerSignature"] = evm.BytesToHex(authSig)COMMENT
LOWgo/mechanisms/evm/batch-settlement/server/storage.go61 // chargedCumulativeAmount matches expectedCharged. Returns true if theCOMMENT
LOW…hanisms/evm/batch-settlement/server/channel_manager.go41// claiming on each pass. Returning a subset of `channels` is the supported wayCOMMENT
LOW…mechanisms/evm/batch-settlement/facilitator/deposit.go761}COMMENT
LOW…anisms/evm/batch-settlement/facilitator/errors_test.go1package facilitatorCOMMENT
LOW…anisms/evm/batch-settlement/facilitator/errors_test.go141// expect for the Permit2 / EIP-2612 / ERC-20 approval families. cdp-facilitatorCOMMENT
LOWgo/mechanisms/evm/batch-settlement/facilitator/utils.go281// Server-side `AfterVerifyHook` reads these fields directly off `extra` (e.g.COMMENT
LOW…/mechanisms/evm/batch-settlement/facilitator/refund.go301 // channel's available balance after preceding claims; in that caseCOMMENT
LOW…ms/evm/batch-settlement/facilitator/deposit_permit2.go21 permit2BranchStandard permit2DepositBranchKind = "standard"COMMENT
LOWgo/mechanisms/evm/batch-settlement/client/extensions.go21// extension-aware path when the server's 402 advertises gas-sponsoring keys.COMMENT
LOWgo/mechanisms/evm/batch-settlement/client/scheme.go41COMMENT
LOWgo/mechanisms/evm/batch-settlement/client/scheme.go61type BatchSettlementEvmSchemeOptions struct {COMMENT
LOWgo/mechanisms/evm/batch-settlement/client/refund.go41// RefundContext is the narrow view of the client scheme that the refund flow needs.COMMENT
LOWgo/mechanisms/evm/exact/server/scheme.go41}COMMENT
LOWgo/mechanisms/evm/exact/server/scheme.go61// if amount > 100 {COMMENT
LOWgo/mechanisms/evm/exact/facilitator/scheme.go21 // SimulateInSettle reruns transfer simulation during settle. Verify always simulates.COMMENT
LOWgo/types/extensions.go1package typesCOMMENT
LOWgo/test/integration/evm_batch_settlement_test.go1// Package integration_test contains integration tests for the x402 Go SDK.COMMENT
LOWgo/test/integration/mcp_evm_test.go1//go:build mcpCOMMENT
LOWgo/test/integration/evm_wallet_matrix_test.go1// Package integration_test exercises the wallet compatibility matrixCOMMENT
LOWgo/.changes/v2.17.0.md1## v2.17.0 - 2026-06-26COMMENT
LOWgo/.changes/2.4.1.md1## 2.4.1 - 2026-02-25COMMENT
LOWgo/.changes/1.0.0.md1## 1.0.0 - 2025-09-12COMMENT
LOWgo/.changes/v2.10.0.md1## v2.10.0 - 2026-04-27COMMENT
84 more matches not shown…
Modern Structural Boilerplate85 hits · 87 pts
SeverityFileLineSnippetContext
LOWpython/legacy/src/x402/clients/__init__.py12__all__ = [CODE
LOWpython/legacy/src/x402/fastapi/middleware.py29logger = logging.getLogger(__name__)CODE
LOWpython/x402/server.py48__all__ = [CODE
LOWpython/x402/client.py49__all__ = [CODE
LOWpython/x402/__init__.py151__all__ = [CODE
LOWpython/x402/mechanisms/svm/__init__.py92__all__ = [CODE
LOWpython/x402/mechanisms/svm/exact/__init__.py15__all__ = [CODE
LOWpython/x402/mechanisms/svm/exact/v1/__init__.py9__all__ = [CODE
LOWpython/x402/mechanisms/evm/__init__.py123__all__ = [CODE
LOWpython/x402/mechanisms/evm/upto/__init__.py14__all__ = [CODE
LOWpython/x402/mechanisms/evm/batch_settlement/encoding.py104__all__ = [CODE
LOWpython/x402/mechanisms/evm/batch_settlement/__init__.py59__all__ = [CODE
LOWpython/x402/mechanisms/evm/batch_settlement/utils.py104__all__ = [CODE
LOWpython/x402/mechanisms/evm/batch_settlement/abi.py224__all__ = [CODE
LOW…/x402/mechanisms/evm/batch_settlement/storage_utils.py51__all__ = ["read_json_file", "write_json_atomic", "delete_file"]CODE
LOW…2/mechanisms/evm/batch_settlement/authorizer_signer.py122__all__ = [CODE
LOW…/evm/batch_settlement/server/channel_manager_common.py238__all__ = [CODE
LOW…/x402/mechanisms/evm/batch_settlement/server/settle.py375__all__ = [CODE
LOW…402/mechanisms/evm/batch_settlement/server/__init__.py34__all__ = [CODE
LOW…ms/evm/batch_settlement/server/channel_manager_sync.py327 def _update_claimed_sessions(self, claims: list) -> None:CODE
LOW…ms/evm/batch_settlement/server/channel_manager_sync.py356__all__ = ["BatchSettlementChannelManagerSync", "ChannelManagerConfigSync"]CODE
LOW…n/x402/mechanisms/evm/batch_settlement/server/utils.py92__all__ = [CODE
LOW…mechanisms/evm/batch_settlement/server/file_storage.py121__all__ = ["FileChannelStorage", "FileChannelStorageOptions"]CODE
LOW…x402/mechanisms/evm/batch_settlement/server/storage.py181__all__ = [CODE
LOW…/x402/mechanisms/evm/batch_settlement/server/verify.py409__all__ = [CODE
LOW…hanisms/evm/batch_settlement/server/channel_manager.py337 def _update_claimed_sessions(self, claims: list[VoucherClaim]) -> None:CODE
LOW…hanisms/evm/batch_settlement/server/channel_manager.py372__all__ = [CODE
LOW…/x402/mechanisms/evm/batch_settlement/server/scheme.py436__all__ = [CODE
LOW…mechanisms/evm/batch_settlement/facilitator/deposit.py598__all__ = ["verify_deposit", "settle_deposit"]CODE
LOW…/mechanisms/evm/batch_settlement/facilitator/settle.py166__all__ = ["execute_settle"]CODE
LOW…echanisms/evm/batch_settlement/facilitator/__init__.py5__all__ = ["BatchSettlementEvmFacilitator", "BatchSettlementEvmFacilitatorConfig"]CODE
LOW…2/mechanisms/evm/batch_settlement/facilitator/claim.py125__all__ = ["build_voucher_claim_args", "execute_claim_with_signature"]CODE
LOW…2/mechanisms/evm/batch_settlement/facilitator/utils.py229__all__ = [CODE
LOW…ms/evm/batch_settlement/facilitator/deposit_permit2.py333__all__ = [CODE
LOW…mechanisms/evm/batch_settlement/facilitator/voucher.py102__all__ = ["verify_voucher"]CODE
LOW…ms/evm/batch_settlement/facilitator/deposit_eip3009.py186__all__ = [CODE
LOW…/mechanisms/evm/batch_settlement/facilitator/scheme.py196__all__ = ["BatchSettlementEvmFacilitator"]CODE
LOW…/mechanisms/evm/batch_settlement/facilitator/refund.py304__all__ = ["execute_refund_with_signature"]CODE
LOW…n/x402/mechanisms/evm/batch_settlement/client/hooks.py65__all__ = [CODE
LOW…/x402/mechanisms/evm/batch_settlement/client/config.py156__all__ = [CODE
LOW…402/mechanisms/evm/batch_settlement/client/recovery.py156__all__ = [CODE
LOW…x402/mechanisms/evm/batch_settlement/client/channel.py194__all__ = [CODE
LOW…402/mechanisms/evm/batch_settlement/client/__init__.py46__all__ = [CODE
LOW…x402/mechanisms/evm/batch_settlement/client/eip3009.py100__all__ = ["create_batch_settlement_eip3009_deposit_payload"]CODE
LOW…mechanisms/evm/batch_settlement/client/file_storage.py45__all__ = ["FileChannelStorageOptions", "FileClientChannelStorage"]CODE
LOW…x402/mechanisms/evm/batch_settlement/client/permit2.py99__all__ = ["create_batch_settlement_permit2_deposit_payload"]CODE
LOW…x402/mechanisms/evm/batch_settlement/client/storage.py100__all__ = [CODE
LOW…x402/mechanisms/evm/batch_settlement/client/voucher.py44__all__ = ["sign_voucher"]CODE
LOW…/x402/mechanisms/evm/batch_settlement/client/scheme.py387__all__ = ["BatchSettlementEvmScheme"]CODE
LOW…/x402/mechanisms/evm/batch_settlement/client/refund.py293__all__ = ["RefundOptions", "refund_channel"]CODE
LOWpython/x402/mechanisms/evm/exact/__init__.py16__all__ = [CODE
LOWpython/x402/mechanisms/evm/exact/facilitator.py56logger = logging.getLogger(__name__)CODE
LOWpython/x402/mechanisms/evm/exact/v1/__init__.py10__all__ = [CODE
LOWpython/x402/mechanisms/tvm/provider.py42logger = logging.getLogger(__name__)CODE
LOWpython/x402/mechanisms/tvm/__init__.py116__all__ = [CODE
LOWpython/x402/mechanisms/tvm/utils.py43__all__ = [CODE
LOWpython/x402/mechanisms/tvm/codecs/__init__.py39__all__ = [CODE
LOWpython/x402/mechanisms/tvm/exact/__init__.py9__all__ = [CODE
LOWpython/x402/mcp/server.py44logger = logging.getLogger(__name__)CODE
LOWpython/x402/mcp/server.py46__all__ = ["create_payment_wrapper"]CODE
25 more matches not shown…
Hallucination Indicators8 hits · 80 pts
SeverityFileLineSnippetContext
CRITICAL…/packages/mechanisms/evm/test/unit/upto/client.test.ts69 expect(result.payload.permit2Authorization.witness.to.toLowerCase()).toBe(CODE
CRITICAL…/packages/mechanisms/evm/test/unit/upto/client.test.ts77 expect(result.payload.permit2Authorization.witness.facilitator.toLowerCase()).toBe(CODE
CRITICAL…/packages/mechanisms/evm/test/unit/upto/client.test.ts298 expect(result.payload.permit2Authorization.witness.facilitator.toLowerCase()).toBe(CODE
CRITICAL…packages/mechanisms/evm/test/unit/exact/client.test.ts330 expect(result.payload.permit2Authorization.witness.to.toLowerCase()).toBe(CODE
CRITICAL…a/src/test/java/org/x402/server/PaymentFilterTest.java418 org.junit.jupiter.api.Assertions.assertTrue(jsonString.contains("\"payer\":\"" + payerAddress + "\""),CODE
CRITICAL…a/src/test/java/org/x402/server/PaymentFilterTest.java420 org.junit.jupiter.api.Assertions.assertTrue(jsonString.contains("\"success\":true"),CODE
CRITICAL…a/src/test/java/org/x402/server/PaymentFilterTest.java466 org.junit.jupiter.api.Assertions.assertTrue(jsonString.contains("\"payer\":null"),CODE
CRITICAL…a/src/test/java/org/x402/server/PaymentFilterTest.java515 org.junit.jupiter.api.Assertions.assertTrue(jsonString.contains("\"payer\":null"),CODE
Cross-Language Confusion12 hits · 60 pts
SeverityFileLineSnippetContext
HIGHpython/legacy/src/x402/svm_paywall_template.py2SVM_PAYWALL_TEMPLATE = '<!DOCTYPE html><html lang="en"><head>\n <meta charset="UTF-8">\n <meta name="viewpCODE
HIGHpython/legacy/src/x402/svm_paywall_template.py2SVM_PAYWALL_TEMPLATE = '<!DOCTYPE html><html lang="en"><head>\n <meta charset="UTF-8">\n <meta name="viewpCODE
HIGHpython/legacy/src/x402/svm_paywall_template.py2SVM_PAYWALL_TEMPLATE = '<!DOCTYPE html><html lang="en"><head>\n <meta charset="UTF-8">\n <meta name="viewpCODE
HIGHpython/x402/mechanisms/evm/verify.py178 Mirrors the on-chain keccak256(\\x19\\x01 || domainSeparator || hashStruct(message))STRING
HIGHpython/x402/mcp/utils.py68 # as explicit nulls (e.g. resource.mimeType: null); strict facilitators — and proxies thatCOMMENT
HIGHexamples/python/clients/batch-settlement/main.py9 uv sync && uv run python main.pySTRING
HIGHexamples/python/facilitator/batch-settlement/main.py8 uv sync && uv run uvicorn main:app --port 4022STRING
HIGHexamples/python/servers/batch-settlement/main.py10 uv sync && uv run python main.pySTRING
HIGHscripts/prepare-typescript-release.py559 "pnpm is required to preview version bumps. Install pnpm and run: cd typescript && pnpm install"CODE
HIGHscripts/prepare-typescript-release.py838 "pnpm is required to version packages. Install pnpm and run: cd typescript && pnpm install"CODE
HIGHscripts/prepare-go-release.py476 "go is required to locate changie. Install Go and run: cd go && make deps-dev"CODE
HIGHscripts/prepare-go-release.py495 "changie is required to build the changelog. Install it with: cd go && make deps-dev"CODE
Deep Nesting61 hits · 53 pts
SeverityFileLineSnippetContext
LOWpython/legacy/tests/fastapi_tests/test_middleware.py145CODE
LOWpython/legacy/src/x402/flask/middleware.py147CODE
LOWpython/legacy/src/x402/flask/middleware.py167CODE
LOWpython/legacy/src/x402/clients/base.py86CODE
LOWpython/x402/server.py175CODE
LOWpython/x402/server.py231CODE
LOWpython/x402/server.py444CODE
LOWpython/x402/server.py500CODE
LOWpython/x402/server_base.py348CODE
LOWpython/x402/server_base.py1096CODE
LOWpython/x402/server_base.py1281CODE
LOWpython/x402/facilitator_base.py196CODE
LOWpython/x402/facilitator_base.py377CODE
LOWpython/x402/facilitator_base.py484CODE
LOWpython/x402/mechanisms/svm/utils.py283CODE
LOWpython/x402/mechanisms/evm/multicall.py180CODE
LOWpython/x402/mechanisms/evm/eip712.py54CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py366CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py849CODE
LOW…ms/evm/batch_settlement/server/channel_manager_sync.py161CODE
LOW…ms/evm/batch_settlement/server/channel_manager_sync.py183CODE
LOW…x402/mechanisms/evm/batch_settlement/server/storage.py148CODE
LOW…hanisms/evm/batch_settlement/server/channel_manager.py191CODE
LOW…/mechanisms/evm/batch_settlement/facilitator/refund.py139CODE
LOW…/x402/mechanisms/evm/batch_settlement/client/refund.py67CODE
LOWpython/x402/mechanisms/evm/exact/permit2_utils.py327CODE
LOWpython/x402/mechanisms/evm/exact/permit2_utils.py661CODE
LOWpython/x402/mechanisms/tvm/provider.py448CODE
LOWpython/x402/mechanisms/tvm/provider.py533CODE
LOWpython/x402/mechanisms/tvm/provider.py594CODE
LOWpython/x402/mechanisms/tvm/provider.py597CODE
LOWpython/x402/mechanisms/tvm/signers.py574CODE
LOWpython/x402/mechanisms/tvm/streaming.py324CODE
LOWpython/x402/mechanisms/tvm/streaming.py372CODE
LOWpython/x402/mechanisms/tvm/exact/settlement_batcher.py110CODE
LOWpython/x402/tests/conftest.py24CODE
LOWpython/x402/mcp/server.py49CODE
LOWpython/x402/mcp/server.py98CODE
LOWpython/x402/mcp/server.py113CODE
LOWpython/x402/mcp/utils.py136CODE
LOWpython/x402/extensions/sign_in_with_x/hooks.py66CODE
LOWpython/x402/extensions/sign_in_with_x/hooks.py77CODE
LOWpython/x402/extensions/builder_code/cbor.py124CODE
LOWpython/x402/extensions/bazaar/server.py136CODE
LOWpython/x402/extensions/bazaar/facilitator.py537CODE
LOWpython/x402/http/x402_http_server.py82CODE
LOWpython/x402/http/x402_http_server.py448CODE
LOWpython/x402/http/facilitator_client.py97CODE
LOWpython/x402/http/x402_http_server_base.py136CODE
LOWpython/x402/http/middleware/fastapi.py166CODE
LOWpython/x402/http/middleware/fastapi.py232CODE
LOWpython/x402/http/middleware/flask.py314CODE
LOWpython/x402/http/middleware/__init__.py31CODE
LOWpython/x402/http/middleware/_bazaar_utils.py15CODE
LOWexamples/python/clients/mcp-chatbot/main.py128CODE
LOWexamples/python/servers/payment-identifier/main.py137CODE
LOWscripts/prepare-typescript-release.py228CODE
LOWscripts/prepare-go-release.py245CODE
LOWscripts/prepare-python-release.py226CODE
LOWe2e/clients/mcp-python/main.py35CODE
1 more matches not shown…
Redundant / Tautological Comments33 hits · 50 pts
SeverityFileLineSnippetContext
LOWpython/legacy/src/x402/flask/middleware.py292 # Check if response is successful (2xx status code)COMMENT
LOWpython/x402/server.py389 # Check if verify/settle methods are coroutine functions (async)COMMENT
LOWpython/x402/server_base.py376 # Check if any facilitator supports this network/scheme via wildcard patternCOMMENT
LOWpython/x402/server_base.py382 # Check if the kind's network is a wildcard that matchesCOMMENT
LOWpython/x402/server_base.py1171 # Check if verification failedCOMMENT
LOWpython/x402/server_base.py1376 # Check if settlement failedCOMMENT
LOWpython/x402/facilitator_base.py279 # Check if network matchesCOMMENT
LOWpython/x402/facilitator_base.py299 # Check if network matchesCOMMENT
LOWpython/x402/facilitator_base.py429 # Check if verification failedCOMMENT
LOWpython/x402/facilitator_base.py536 # Check if settlement failedCOMMENT
LOWpython/x402/mechanisms/svm/utils.py271 # Check if this is a token program instructionCOMMENT
LOWpython/x402/mechanisms/svm/utils.py308 # Check if this is a token program instructionCOMMENT
LOWpython/x402/mcp/client_async.py166 # Check if this is a payment required responseCOMMENT
LOWpython/x402/mcp/client_async.py206 # Check if payment is approvedCOMMENT
LOWpython/x402/mcp/utils.py317 # Check if this is a 402 payment required errorCOMMENT
LOWpython/x402/extensions/bazaar/v1/facilitator.py162 # Check if outputSchema exists and has the expected structureCOMMENT
LOWpython/x402/extensions/bazaar/v1/facilitator.py168 # Check if the endpoint is marked as discoverableCOMMENT
LOWpython/x402/http/x402_http_server.py367 # Check if the result is a coroutine or future (async)COMMENT
LOWpython/x402/http/x402_http_server.py595 # Check if the result is a coroutine (async) - not supportedCOMMENT
LOWpython/x402/http/x402_http_server_base.py144 # Check if it's a single route config dict (has "accepts" key)COMMENT
LOWpython/x402/http/clients/httpx.py123 # Check if already a retry (via request extensions)COMMENT
LOWpython/x402/http/clients/requests.py108 # Check if this is already a retry (per-request state via header)COMMENT
LOWpython/x402/http/middleware/fastapi.py249 # Check if route requires payment (before initialization)COMMENT
LOWpython/x402/http/middleware/flask.py340 # Check if route requires paymentCOMMENT
LOWpython/x402/http/middleware/flask.py422 # Check if successful responseCOMMENT
LOWexamples/python/facilitator/advanced/bazaar.py279 # Check if this was an abort from hookCOMMENT
LOWexamples/python/facilitator/advanced/all_networks.py214 # Check if this was an abort from hookCOMMENT
LOWexamples/python/facilitator/basic/main.py180 # Check if this was an abort from hookCOMMENT
LOW.github/workflows/publish_npm_scoped_x402_mcp.yml50 # Check if version is a prerelease (contains -alpha, -beta, -rc, etc.)COMMENT
LOWe2e/setup.sh134 # Check if component has install.sh or build.shCOMMENT
LOWe2e/clients/httpx/main.py132 # Set timeout to 30 seconds to handle busy servers during test runsCOMMENT
LOWe2e/legacy/clients/httpx/main.py29 # Set timeout to 30 seconds to handle busy servers during test runsCOMMENT
LOWe2e/facilitators/python/main.py397 # Check if this was an abort from hookCOMMENT
AI Slop Vocabulary6 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUMpython/legacy/src/x402/svm_paywall_template.py2SVM_PAYWALL_TEMPLATE = '<!DOCTYPE html><html lang="en"><head>\n <meta charset="UTF-8">\n <meta name="viewpCODE
MEDIUMpython/legacy/src/x402/svm_paywall_template.py2SVM_PAYWALL_TEMPLATE = '<!DOCTYPE html><html lang="en"><head>\n <meta charset="UTF-8">\n <meta name="viewpCODE
LOWpython/legacy/src/x402/clients/httpx.py25 # If this is not a 402, just return the responseCOMMENT
LOWpython/legacy/src/x402/clients/httpx.py29 # If this is a retry response, just return itCOMMENT
MEDIUM…sts/integrations/test_evm_batch_settlement_extended.py305# HTTP server harness (Flask + WSGI in a thread)COMMENT
LOWexamples/python/servers/mcp/simple.py106 # Paid tool - just call the bridge with args + contextCOMMENT
Slop Phrases4 hits · 10 pts
SeverityFileLineSnippetContext
LOWpython/legacy/src/x402/svm_paywall_template.py2SVM_PAYWALL_TEMPLATE = '<!DOCTYPE html><html lang="en"><head>\n <meta charset="UTF-8">\n <meta name="viewpCODE
MEDIUM…typescript/servers/advanced/custom-money-definition.ts42 // NOTE: Wrapped XDAI is not an EIP-3009 complaint token, and would fail the current ExactEvm implementation. ThCOMMENT
MEDIUM…ples/typescript/servers/offer-receipt/eip712-signer.ts13 * This is a simple implementation for demonstration purposes.COMMENT
MEDIUMexamples/typescript/servers/offer-receipt/jws-signer.ts13 * This is a simple implementation for demonstration purposes.COMMENT
Modern AI Meta-Vocabulary4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md85Curated third-party SDKs, extensions, and facilitators are listed in the [Developer Tools docs](https://docs.x402.org/deCODE
MEDIUMspecs/transports-v2/a2a.md304- [A2A x402 Extension Specification](https://github.com/google-agentic-commerce/a2a-x402/blob/main/spec/v0.1/spec.md)CODE
MEDIUMspecs/transports-v1/a2a.md288- [A2A x402 Extension Specification](https://github.com/google-agentic-commerce/a2a-x402/blob/main/spec/v0.1/spec.md)CODE
MEDIUMdocs/dev-tools/facilitators.md30| [Polygon Facilitator](https://docs.polygon.technology/payment-services/agentic-payments/x402/intro/) | Production-gradCODE
AI Structural Patterns9 hits · 7 pts
SeverityFileLineSnippetContext
LOWpython/legacy/src/x402/flask/middleware.py80CODE
LOWpython/legacy/src/x402/clients/base.py36CODE
LOWpython/legacy/src/x402/fastapi/middleware.py33CODE
LOWpython/x402/tests/unit/mechanisms/evm/test_permit2.py43CODE
LOW…hon/x402/tests/unit/mechanisms/evm/test_facilitator.py186CODE
LOW…402/tests/unit/mechanisms/evm/test_upto_facilitator.py43CODE
LOW…402/tests/unit/mechanisms/evm/test_upto_facilitator.py129CODE
LOWpython/x402/tests/unit/mechanisms/tvm/test_codec.py57CODE
LOWpython/x402/tests/unit/mechanisms/tvm/fakes.py55CODE
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGH.agents/skills/contributing/SKILL.md37Follow the repository AI-assisted contribution policy in [CONTRIBUTING.md](../../CONTRIBUTING.md#ai-assisted-contributioCODE
Fake / Example Data3 hits · 4 pts
SeverityFileLineSnippetContext
LOWpython/legacy/src/x402/svm_paywall_template.py2SVM_PAYWALL_TEMPLATE = '<!DOCTYPE html><html lang="en"><head>\n <meta charset="UTF-8">\n <meta name="viewpCODE
LOW…/concordium/test/integrations/exact-concordium.test.ts1272 url: "https://example.com/premium-fake-token",CODE
LOWtypescript/packages/extensions/src/bazaar/README.md113 name: "John Doe",CODE
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippetContext
LOWpython/x402/tests/unit/http/clients/test_httpx.py196 async def handle_request(req):CODE