AI Slop Code RIsk Monitor

x402-foundation/x402

A payments protocol for the internet. Built on HTTP.

10.3 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for x402-foundation/x402, a TypeScript project with 6,703 GitHub stars. SynthScan examined 780,153 lines of code across 3056 source files, recording 5740 pattern matches distributed across 23 syntactic categories. The legacy adjusted pattern signal is 10.3 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

10.3
Adjusted Signal
10.3
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
6.7K
Stars
TypeScript
Language
780.2K
Lines of Code
3.1K
Files
5.7K
Pattern Hits
2026-10-12
Scan Date
0.07
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 22.7/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 3410 finding(s).

Hallucinated Dependency & Supply Chain Risk 6.7/100 · LOW

Are imports declared and package/API names verified? 1292 finding(s).

Agent Over-Engineering Ratio 30.8/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 3787 finding(s).

PR Review Velocity Impact 40.4/100 · MEDIUM

Which changes need focused human review? 5740 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 8HIGH 201MEDIUM 622LOW 4909

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 5740 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers2740 hits · 2799 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
2680 more matches not shown…
Decorative Section Separators559 hits · 1950 pts
SeverityFileLineSnippetContext
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go19// ─── Mock facilitator signer ────────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go102// ─── Test addresses (valid 40-hex-char Ethereum addresses) ──────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go177// ─── VerifyUptoPermit2 — asset contract validation ───────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go211// ─── VerifyUptoPermit2 — input validation tests ──────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go454// ─── SettleUptoPermit2 tests ─────────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go578// ─── SettleUptoPermit2 — PendingSettlementStore fast path ───────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go845// ─── BuildUptoPermit2SettleArgs tests ────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go918// ─── validateEip2612PermitForPayment tests ───────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go973// ─── splitEip2612Signature tests ─────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go1012// ─── parseUptoPermit2Error tests ─────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go1043// ─── UptoEvmScheme wrapper tests ─────────────────────────────────────────────COMMENT
MEDIUMgo/mechanisms/evm/upto/facilitator/permit2_test.go1176// ─── 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.py170# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py172# ============================================================================COMMENT
MEDIUM⚡python/x402/interfaces.py261# ============================================================================COMMENT
MEDIUM⚡python/x402/interfaces.py263# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py410# ============================================================================COMMENT
MEDIUMpython/x402/interfaces.py412# ============================================================================COMMENT
MEDIUM⚡python/x402/server.py61# ============================================================================COMMENT
MEDIUM⚡python/x402/server.py63# ============================================================================COMMENT
MEDIUM⚡python/x402/server.py243 # ========================================================================COMMENT
MEDIUM⚡python/x402/server.py245 # ========================================================================COMMENT
MEDIUM⚡python/x402/server.py495 # ========================================================================COMMENT
MEDIUM⚡python/x402/server.py497 # ========================================================================COMMENT
MEDIUM⚡python/x402/server.py563 # ========================================================================COMMENT
MEDIUM⚡python/x402/server.py565 # ========================================================================COMMENT
MEDIUMpython/x402/server.py117 # ========================================================================COMMENT
MEDIUMpython/x402/server.py119 # ========================================================================COMMENT
MEDIUMpython/x402/server.py175 # ========================================================================COMMENT
MEDIUMpython/x402/server.py177 # ========================================================================COMMENT
MEDIUMpython/x402/server.py382# ============================================================================COMMENT
MEDIUMpython/x402/server.py384# ============================================================================COMMENT
MEDIUMpython/x402/server.py456 # ========================================================================COMMENT
MEDIUMpython/x402/server.py458 # ========================================================================COMMENT
MEDIUM⚡python/x402/server_base.py593 # ========================================================================COMMENT
MEDIUM⚡python/x402/server_base.py595 # ========================================================================COMMENT
MEDIUM⚡python/x402/server_base.py670 # ========================================================================COMMENT
MEDIUM⚡python/x402/server_base.py672 # ========================================================================COMMENT
MEDIUM⚡python/x402/server_base.py1088 # ========================================================================COMMENT
MEDIUM⚡python/x402/server_base.py1090 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py276# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py278# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py329# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py331# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py389# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py391# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py438# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py440# ============================================================================COMMENT
MEDIUMpython/x402/server_base.py489 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py491 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py1193 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py1195 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py1349 # ========================================================================COMMENT
MEDIUMpython/x402/server_base.py1351 # ========================================================================COMMENT
499 more matches not shown…
Unused Imports1269 hits · 938 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/pending_settlement_store.py31CODE
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/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__.py55CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py55CODE
LOWpython/x402/__init__.py68CODE
LOWpython/x402/__init__.py68CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py71CODE
LOWpython/x402/__init__.py83CODE
LOWpython/x402/__init__.py83CODE
LOWpython/x402/__init__.py83CODE
LOWpython/x402/__init__.py83CODE
LOWpython/x402/__init__.py83CODE
LOWpython/x402/__init__.py83CODE
LOWpython/x402/__init__.py93CODE
LOWpython/x402/__init__.py93CODE
LOWpython/x402/__init__.py93CODE
LOWpython/x402/__init__.py93CODE
LOWpython/x402/__init__.py101CODE
LOWpython/x402/__init__.py101CODE
LOWpython/x402/__init__.py101CODE
1209 more matches not shown…
Cross-File Repetition65 hits · 325 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/default_assets.py0look up a default asset by network and optional ticker. args: network: caip-2 network. symbol: ticker; omit for the netwSTRING
HIGHpython/x402/mechanisms/evm/default_assets.py0look up a default asset by network and optional ticker. args: network: caip-2 network. symbol: ticker; omit for the netwSTRING
HIGHpython/x402/mechanisms/tvm/default_assets.py0look up a default asset by network and optional ticker. args: network: caip-2 network. symbol: ticker; omit for the netwSTRING
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
HIGH…hon/x402/tests/unit/mechanisms/svm/test_facilitator.py0signer whose broadcast never confirms in time (settlement_pending).STRING
HIGHpython/x402/tests/unit/mechanisms/evm/test_permit2.py0signer whose broadcast never confirms in time (settlement_pending).STRING
HIGH…hon/x402/tests/unit/mechanisms/evm/test_facilitator.py0signer whose broadcast never confirms in time (settlement_pending).STRING
HIGH…402/tests/unit/mechanisms/evm/test_upto_facilitator.py0signer whose broadcast never confirms in time (settlement_pending).STRING
HIGH…hon/x402/tests/unit/mechanisms/svm/test_facilitator.py0a caller-supplied pendingsettlementstore must be the instance actually used, not merely accepted and ignored in favor ofSTRING
HIGH…hon/x402/tests/unit/mechanisms/evm/test_facilitator.py0a caller-supplied pendingsettlementstore must be the instance actually used, not merely accepted and ignored in favor ofSTRING
HIGH…402/tests/unit/mechanisms/evm/test_upto_facilitator.py0a caller-supplied pendingsettlementstore must be the instance actually used, not merely accepted and ignored in favor ofSTRING
HIGH…anisms/evm/batch_settlement/facilitator/test_scheme.py0a caller-supplied pendingsettlementstore must be the instance actually used, not merely accepted and ignored in favor ofSTRING
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
5 more matches not shown…
Empty Error Handlers63 hits · 315 pts
SeverityFileLineSnippetContext
HIGHpython/legacy/src/x402/chains.py16except ValueError:CODE
HIGHpython/x402/mechanisms/svm/utils.py45except ParseHashError:CODE
HIGHpython/x402/mechanisms/svm/exact/facilitator.py550except Exception:CODE
HIGHpython/x402/mechanisms/evm/multicall.py134except Exception:CODE
HIGHpython/x402/mechanisms/evm/multicall.py140except Exception:CODE
HIGHpython/x402/mechanisms/evm/settle_receipt.py97except Exception:CODE
HIGHpython/x402/mechanisms/evm/upto/client.py44except ImportError:CODE
HIGHpython/x402/mechanisms/evm/upto/client.py132except Exception:CODE
HIGHpython/x402/mechanisms/evm/upto/client.py186except Exception:CODE
HIGH…/x402/mechanisms/evm/batch_settlement/storage_utils.py60except FileNotFoundError:CODE
HIGH…/x402/mechanisms/evm/batch_settlement/storage_utils.py51except OSError:CODE
HIGH…mechanisms/evm/batch_settlement/server/file_storage.py120except FileNotFoundError:CODE
HIGH…mechanisms/evm/batch_settlement/server/file_storage.py115except OSError:CODE
HIGH…mechanisms/evm/batch_settlement/server/file_storage.py80except FileNotFoundError:CODE
HIGH…hanisms/evm/batch_settlement/server/channel_manager.py135except asyncio.CancelledError:CODE
HIGH…/x402/mechanisms/evm/batch_settlement/client/scheme.py61except ImportError:CODE
HIGH…/x402/mechanisms/evm/batch_settlement/client/scheme.py318except Exception:CODE
HIGH…/x402/mechanisms/evm/batch_settlement/client/scheme.py374except Exception:CODE
HIGHpython/x402/mechanisms/evm/exact/client.py36except ImportError:CODE
HIGHpython/x402/mechanisms/evm/exact/client.py172except Exception:CODE
HIGHpython/x402/mechanisms/evm/exact/client.py228except Exception:CODE
HIGHpython/x402/mechanisms/evm/exact/eip3009_utils.py290except (TypeError, ValueError):CODE
HIGHpython/x402/mechanisms/evm/exact/v1/client.py117except ValueError:CODE
HIGHpython/x402/mechanisms/tvm/provider.py713except Exception:CODE
HIGHpython/x402/mechanisms/tvm/provider.py546except Exception:CODE
HIGHpython/x402/mechanisms/tvm/provider.py588except Exception:CODE
HIGHpython/x402/mechanisms/tvm/provider.py511except ValueError:CODE
HIGHpython/x402/mechanisms/tvm/signers.py83except ValueError:CODE
HIGHpython/x402/mechanisms/tvm/signers.py299except Exception:CODE
HIGHpython/x402/mechanisms/tvm/signers.py305except Exception:CODE
HIGHpython/x402/mechanisms/tvm/signers.py431except Exception:CODE
HIGHpython/x402/mechanisms/tvm/trace_utils.py46except ValueError:CODE
HIGHpython/x402/mechanisms/tvm/streaming.py107except Exception:CODE
HIGHpython/x402/mechanisms/tvm/streaming.py112except Exception:CODE
HIGHpython/x402/tests/integrations/test_mcp_evm.py262except Exception:CODE
HIGHpython/x402/tests/integrations/test_mcp_evm.py385except Exception:CODE
HIGHpython/x402/mcp/server.py399except (ValueError, AttributeError):CODE
HIGHpython/x402/mcp/server.py290except Exception:CODE
HIGHpython/x402/mcp/server.py335except Exception:CODE
HIGHpython/x402/mcp/client.py391except (json.JSONDecodeError, TypeError):CODE
HIGHpython/x402/mcp/client.py401except (json.JSONDecodeError, TypeError):CODE
HIGHpython/x402/mcp/utils.py243except (json.JSONDecodeError, TypeError):CODE
HIGHpython/x402/mcp/server_sync.py312except Exception:CODE
HIGHpython/x402/mcp/server_sync.py426except Exception:CODE
HIGHpython/x402/mcp/server_sync.py388except Exception:CODE
HIGHpython/x402/mcp/server_async.py459except Exception:CODE
HIGHpython/x402/mcp/server_async.py583except Exception:CODE
HIGHpython/x402/mcp/server_async.py539except Exception:CODE
HIGH…402/extensions/erc20_approval_gas_sponsoring/client.py66except Exception:CODE
HIGHpython/x402/extensions/bazaar/facilitator.py305except ValueError:CODE
HIGHpython/x402/http/utils.py111except (json.JSONDecodeError, UnicodeDecodeError):CODE
HIGHpython/x402/http/x402_http_client_base.py216except ValueError:CODE
HIGHpython/x402/http/x402_http_client_base.py202except json.JSONDecodeError:CODE
HIGHpython/x402/http/x402_http_client_base.py226except ValueError:CODE
HIGHpython/x402/http/x402_http_server_base.py1435except (ValueError, TypeError):CODE
HIGHpython/x402/http/clients/httpx.py142except json.JSONDecodeError:CODE
HIGHpython/x402/http/clients/requests.py134except (json.JSONDecodeError, UnicodeDecodeError):CODE
HIGHpython/x402/http/middleware/_bazaar_utils.py85except ImportError:CODE
HIGHpython/x402/http/middleware/_bazaar_utils.py153except Exception:CODE
HIGHpython/x402/http/paywall/__init__.py121except (ValueError, TypeError):CODE
3 more matches not shown…
Docstring Block Structure60 hits · 300 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.py189Verify a payment via facilitator. Args: payload: Payment payload to verify. requirementSTRING
HIGHpython/x402/server.py258Settle a payment via facilitator. Args: payload: Payment payload to settle. requirementSTRING
HIGHpython/x402/server.py509Verify a payment via facilitator. Args: payload: Payment payload to verify. requirementSTRING
HIGHpython/x402/server.py578Settle 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.py179Create a payment payload for the given 402 response. Args: payment_required: The 402 response from STRING
HIGHpython/x402/client.py367Create 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/default_assets.py124Look up a default asset by network and optional ticker. Args: network: CAIP-2 or v1 network. symbolSTRING
HIGHpython/x402/mechanisms/svm/signers.py167Sign a partially-signed transaction. Supports both legacy and versioned (v0) transactions: - Legacy traSTRING
HIGHpython/x402/mechanisms/svm/signers.py284Send a transaction. Args: tx_base64: Base64 encoded signed transaction. network: CAIP-2STRING
HIGHpython/x402/mechanisms/svm/utils.py52Normalize network identifier to CAIP-2 format. Handles both V1 names (solana, solana-devnet) and V2 CAIP-2 format. STRING
HIGHpython/x402/mechanisms/svm/utils.py101Get the default USDC mint address for a network. Args: network: Network identifier (CAIP-2 or V1 format). STRING
HIGHpython/x402/mechanisms/svm/utils.py125Get asset info for a network. Args: network: Network identifier. asset_address: Optional specific aSTRING
HIGHpython/x402/mechanisms/svm/utils.py202Decode 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.py77Parse price into asset amount. If price is already AssetAmount, returns it directly. If price is Money STRING
HIGHpython/x402/mechanisms/svm/exact/client.py88Create signed SPL TransferChecked inner payload. Args: requirements: Payment requirements from servSTRING
HIGHpython/x402/mechanisms/svm/exact/v1/client.py92Create signed SPL TransferChecked inner payload (V1 format). Args: requirements: V1 payment requireSTRING
HIGHpython/x402/mechanisms/evm/default_assets.py330Look up a default asset by network and optional ticker. Args: network: CAIP-2 or v1 network. symbolSTRING
HIGHpython/x402/mechanisms/evm/signers.py574Wait for a transaction to be mined. Bounded by `confirmation_timeout_seconds` from the constructor. ArSTRING
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.py58Get asset info by address. Returns the full default asset info if the address matches a registered default. ArSTRING
HIGHpython/x402/mechanisms/evm/utils.py119Normalize 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.py10Extract chain ID from a v1 legacy network name. Args: network: V1 network name (e.g., "base-sepolia", "polySTRING
HIGHpython/x402/mechanisms/evm/v1/utils.py28Get 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.py63Parse price into asset amount. If price is already AssetAmount, returns it directly. If price is Money STRING
HIGHpython/x402/mechanisms/evm/exact/server.py168Convert decimal amount to network's default stablecoin AssetAmount. Args: amount: Decimal amount asSTRING
HIGHpython/x402/mechanisms/evm/exact/client.py244Sign EIP-3009 authorization using EIP-712. Requires requirements.extra to contain 'name' and 'version' STRING
HIGHpython/x402/mechanisms/tvm/default_assets.py39Look up a default asset by network and optional ticker. Args: network: CAIP-2 network. symbol: TickSTRING
HIGHpython/x402/mcp/client_async.py155Call a tool with automatic payment handling. Args: name: Tool name args: Tool argumentsSTRING
HIGHpython/x402/schemas/helpers.py14Extract x402Version from JSON bytes or dict. Args: data: JSON bytes or parsed dict. Returns: PSTRING
HIGHpython/x402/schemas/helpers.py44Extract scheme and network from payment payload. Args: version: Protocol version (1 or 2). payload:STRING
HIGHpython/x402/schemas/helpers.py168Parse payment requirements based on protocol version. Unlike parse_payment_payload which auto-detects version from STRING
HIGHpython/x402/schemas/helpers.py199Check if network matches a pattern (supports wildcards). Args: network: Specific network (e.g., "eip155:845STRING
HIGHpython/x402/schemas/helpers.py222Derive common pattern from list of networks. If all networks share same namespace, returns wildcard pattern. OtSTRING
HIGHpython/x402/extensions/builder_code/server.py45Declare the builder-code extension for inclusion in PaymentRequired.extensions. Args: app_code: The serviceSTRING
HIGHpython/x402/extensions/builder_code/cbor.py200Build a complete ERC-8021 Schema 2 data suffix from builder code data. Format: ``[cbor_data][suffix_data_length (2 STRING
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.py774Extract 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.py160Verify a payment with the facilitator (async). Args: payload: Payment payload to verify. STRING
HIGHpython/x402/http/facilitator_client.py184Settle a payment with the facilitator (async). Args: payload: Payment payload to settle. STRING
HIGHpython/x402/http/facilitator_client.py380Verify a payment with the facilitator. Args: payload: Payment payload to verify. requirSTRING
HIGHpython/x402/http/facilitator_client.py404Settle a payment with the facilitator. Args: payload: Payment payload to settle. requirSTRING
HIGHpython/x402/http/utils.py84Detect 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
Excessive Try-Catch Wrapping262 hits · 263 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
LOW⚡python/x402/server.py236 except Exception as e:CODE
LOW⚡python/x402/server.py556 except Exception as e:CODE
LOWpython/x402/server.py335 except Exception as error:CODE
LOWpython/x402/server.py361 except Exception as error:CODE
LOWpython/x402/server.py656 except Exception as error:CODE
LOWpython/x402/server.py686 except Exception as error:CODE
LOWpython/x402/server_base.py791 except Exception as hook_error:CODE
LOWpython/x402/server_base.py829 except Exception as hook_error:CODE
LOWpython/x402/server_base.py891 except Exception as hook_error:CODE
LOWpython/x402/server_base.py929 except Exception as hook_error:CODE
LOWpython/x402/server_base.py968 except Exception as hook_error:CODE
LOWpython/x402/server_base.py989 except Exception as hook_error:CODE
LOWpython/x402/server_base.py1028 except Exception as hook_error:CODE
LOWpython/x402/server_base.py1049 except Exception as hook_error:CODE
LOWpython/x402/server_base.py1483 except Exception as e:CODE
LOWpython/x402/server_base.py1734 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.py241 except Exception as hook_error:CODE
LOWpython/x402/client.py426 except Exception as hook_error:CODE
LOWpython/x402/client_base.py865 except Exception as e:CODE
LOWpython/x402/client_base.py953 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/utils.py216 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/server.py159 except Exception:CODE
LOW⚡python/x402/mechanisms/svm/exact/facilitator.py183 except Exception:CODE
LOW⚡python/x402/mechanisms/svm/exact/facilitator.py358 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py397 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py425 except Exception:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py459 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py473 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py521 except Exception as e:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py524 except Exception as store_error:CODE
LOWpython/x402/mechanisms/svm/exact/facilitator.py550 except Exception: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/asset_cache.py131 except Exception as exc:CODE
LOWpython/x402/mechanisms/evm/signers.py492 except Exception:CODE
LOWpython/x402/mechanisms/evm/signers.py497 except Exception as e:CODE
LOWpython/x402/mechanisms/evm/settle_receipt.py82 except Exception as e:CODE
LOWpython/x402/mechanisms/evm/settle_receipt.py97 except Exception:CODE
LOWpython/x402/mechanisms/evm/settle_receipt.py106 except Exception as e:CODE
LOWpython/x402/mechanisms/evm/settle_receipt.py143 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.py267 except Exception:CODE
LOWpython/x402/mechanisms/evm/upto/client.py132 except Exception:CODE
202 more matches not shown…
Structural Annotation Overuse137 hits · 244 pts
SeverityFileLineSnippetContext
LOWgo/client.go363 // Step 1: Filter to supported (use wildcard matching helper)COMMENT
LOWgo/client.go382 // Step 2: Drop unrecognized paymentFlow valuesCOMMENT
LOW⚡go/client.go403 // Step 3: Apply spend controlsCOMMENT
LOW⚡go/client.go409 // Step 4: Apply policiesCOMMENT
LOWgo/client.go420 // Step 5: Prefer authorization when both post- and pre-handler flows remainCOMMENT
LOWgo/client.go436 // Step 6: Select final and convert backCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go87 // Step 1: Validate Payment RequirementsCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go139 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go164 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOW⚡go/mechanisms/svm/exact/v1/facilitator/scheme.go179 // Step 4: Verify Transfer InstructionCOMMENT
LOW⚡go/mechanisms/svm/exact/v1/facilitator/scheme.go184 // Step 5: Verify optional instructions (if present)COMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go240 // Step 6: Simulate TransactionCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go169 // Step 1: Validate Payment RequirementsCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go212 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go366 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOW⚡go/mechanisms/svm/exact/facilitator/scheme.go394 // Step 4: Verify Transfer InstructionCOMMENT
LOW⚡go/mechanisms/svm/exact/facilitator/scheme.go399 // Step 5: Verify optional instructions (if present)COMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go456 // Step 6: Simulate TransactionCOMMENT
LOW⚡go/mechanisms/evm/verify_universal.go48 // Step 1: Parse ERC-6492 wrapper if presentCOMMENT
LOW⚡go/mechanisms/evm/verify_universal.go54 // Step 2: Always fetch code first. Routing is determined by whether the addressCOMMENT
LOWgo/mechanisms/evm/verify_universal.go68 // Step 5: Handle undeployed addressCOMMENT
LOWgo/mechanisms/evm/verify_universal.go94 // Step 6: Deployed smart contract - use EIP-1271 verificationCOMMENT
LOW⚡python/x402/mechanisms/svm/exact/facilitator.py180 # Step 2: Parse and Validate Transaction StructureCOMMENT
LOW⚡python/x402/mechanisms/svm/exact/facilitator.py348 # Step 5: Sign and Simulate TransactionCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py161 # Step 1: Validate Payment RequirementsCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py198 # Step 3: Verify Compute Budget InstructionsCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py245 # Step 4: Verify Transfer InstructionCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py258 # Step 5: Verify optional instructions (if present)COMMENT
LOW⚡specs/CONTRIBUTING.md71### Step 1: Open a DiscussionCOMMENT
LOW⚡specs/CONTRIBUTING.md79### Step 2: Write the SpecCOMMENT
LOW⚡specs/CONTRIBUTING.md89### Step 3: Submit PRCOMMENT
LOWspecs/schemes/auth-capture/scheme_auth_capture_evm.md765#### Step 1: the operator as a signature wrapperCOMMENT
LOWspecs/schemes/auth-capture/scheme_auth_capture_evm.md795#### Step 2: read-only policy hooksCOMMENT
LOWspecs/schemes/auth-capture/scheme_auth_capture_evm.md820#### Step 3: an example policyCOMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts250 // Step 2: Parse transaction envelope to extract the operationCOMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts255 // Step 3: Extract operationCOMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts258 // Step 4: Rebuild transaction with facilitator as source and simulation-derived feeCOMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts455 // Step 4: Extract and validate contract invocation detailsCOMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts463 // Step 5: Validate contract address and function nameCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts225 // Step 1: Verify payment before settlementCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts290 // Step 5: Sign inner transaction with the selected signer's keyCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts305 // Step 6: Optionally wrap in a fee bump transactionCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts343 // Step 7: Submit transaction to networkCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts356 // Step 8: Poll for transaction confirmationCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts371 // Step 9: Return successCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts403 // Step 1: Validate protocol version, scheme, and networkCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts422 // Step 2: Parse and decode transactionCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts436 // Step 3: Validate transaction structureCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts481 // Step 6: Extract and validate transfer argumentsCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts511 // Step 7: Re-simulate to ensure transaction will succeedCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts524 // Step 8: Validate the simulation-derived settlement fee against the safety ceilingCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts537 // Step 9: Validate simulation events for expected transfer only.COMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts556 // Step 10: Validate auth entries (structure, credential type, expiration, facilitator safety, and signature statuCOMMENT
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
77 more matches not shown…
Verbosity Indicators131 hits · 233 pts
SeverityFileLineSnippetContext
LOWgo/client.go363 // Step 1: Filter to supported (use wildcard matching helper)COMMENT
LOWgo/client.go382 // Step 2: Drop unrecognized paymentFlow valuesCOMMENT
LOW⚡go/client.go403 // Step 3: Apply spend controlsCOMMENT
LOW⚡go/client.go409 // Step 4: Apply policiesCOMMENT
LOWgo/client.go420 // Step 5: Prefer authorization when both post- and pre-handler flows remainCOMMENT
LOWgo/client.go436 // Step 6: Select final and convert backCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go87 // Step 1: Validate Payment RequirementsCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go139 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go164 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOW⚡go/mechanisms/svm/exact/v1/facilitator/scheme.go179 // Step 4: Verify Transfer InstructionCOMMENT
LOW⚡go/mechanisms/svm/exact/v1/facilitator/scheme.go184 // Step 5: Verify optional instructions (if present)COMMENT
LOWgo/mechanisms/svm/exact/v1/facilitator/scheme.go240 // Step 6: Simulate TransactionCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go169 // Step 1: Validate Payment RequirementsCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go212 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go366 // Step 3: Verify Compute Budget InstructionsCOMMENT
LOW⚡go/mechanisms/svm/exact/facilitator/scheme.go394 // Step 4: Verify Transfer InstructionCOMMENT
LOW⚡go/mechanisms/svm/exact/facilitator/scheme.go399 // Step 5: Verify optional instructions (if present)COMMENT
LOWgo/mechanisms/svm/exact/facilitator/scheme.go456 // Step 6: Simulate TransactionCOMMENT
LOW⚡go/mechanisms/evm/verify_universal.go48 // Step 1: Parse ERC-6492 wrapper if presentCOMMENT
LOW⚡go/mechanisms/evm/verify_universal.go54 // Step 2: Always fetch code first. Routing is determined by whether the addressCOMMENT
LOWgo/mechanisms/evm/verify_universal.go68 // Step 5: Handle undeployed addressCOMMENT
LOWgo/mechanisms/evm/verify_universal.go94 // Step 6: Deployed smart contract - use EIP-1271 verificationCOMMENT
LOW⚡python/x402/mechanisms/svm/exact/facilitator.py180 # Step 2: Parse and Validate Transaction StructureCOMMENT
LOW⚡python/x402/mechanisms/svm/exact/facilitator.py348 # Step 5: Sign and Simulate TransactionCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py161 # Step 1: Validate Payment RequirementsCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py198 # Step 3: Verify Compute Budget InstructionsCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py245 # Step 4: Verify Transfer InstructionCOMMENT
LOWpython/x402/mechanisms/svm/exact/facilitator.py258 # Step 5: Verify optional instructions (if present)COMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts250 // Step 2: Parse transaction envelope to extract the operationCOMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts255 // Step 3: Extract operationCOMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts258 // Step 4: Rebuild transaction with facilitator as source and simulation-derived feeCOMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts455 // Step 4: Extract and validate contract invocation detailsCOMMENT
LOW⚡…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts463 // Step 5: Validate contract address and function nameCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts225 // Step 1: Verify payment before settlementCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts290 // Step 5: Sign inner transaction with the selected signer's keyCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts305 // Step 6: Optionally wrap in a fee bump transactionCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts343 // Step 7: Submit transaction to networkCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts356 // Step 8: Poll for transaction confirmationCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts371 // Step 9: Return successCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts403 // Step 1: Validate protocol version, scheme, and networkCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts422 // Step 2: Parse and decode transactionCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts436 // Step 3: Validate transaction structureCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts481 // Step 6: Extract and validate transfer argumentsCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts511 // Step 7: Re-simulate to ensure transaction will succeedCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts524 // Step 8: Validate the simulation-derived settlement fee against the safety ceilingCOMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts537 // Step 9: Validate simulation events for expected transfer only.COMMENT
LOW…ges/mechanisms/stellar/src/exact/facilitator/scheme.ts556 // Step 10: Validate auth entries (structure, credential type, expiration, facilitator safety, and signature statuCOMMENT
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.ts114 // Step 1: Validate Payment RequirementsCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts149 // Step 2: Parse and Validate Transaction StructureCOMMENT
LOW…ages/mechanisms/svm/src/exact/v1/facilitator/scheme.ts213 // Step 3: Verify Compute Budget InstructionsCOMMENT
71 more matches not shown…
Over-Commented Block182 hits · 180 pts
SeverityFileLineSnippetContext
LOWgo/facilitator_hooks.go81COMMENT
LOWgo/facilitator_hooks.go101// If it returns a result with Abort=true, settlement will be abortedCOMMENT
LOWgo/server.go341 if !ok {COMMENT
LOWgo/server.go621// CreatePaymentCancellationDispatcherWithExtensions returns a dispatcherCOMMENT
LOWgo/server.go1101// field past the sum of every party's own reservation and later crowd out aCOMMENT
LOWgo/server.go1341COMMENT
LOWgo/server.go1401func (s *x402ResourceServer) SettlePayment(ctx context.Context, payload types.PaymentPayload, requirements types.PaymentCOMMENT
LOWgo/server_hooks.go41// SkipHandlerDirective is an optional acknowledgement body returned to the callerCOMMENT
LOWgo/server_hooks.go261type SettleFailureHookResult struct {COMMENT
LOWgo/server_hooks.go281// handler and perform settlement inline (e.g. cooperative refund).COMMENT
LOWgo/server_hooks.go361}COMMENT
LOWgo/server_hooks.go421// needs to enrich settlement payload (pre-facilitator) or settlementCOMMENT
LOWgo/server_hooks.go441// for nested maps) before deep-merging.COMMENT
LOWgo/interfaces.go1package x402COMMENT
LOWgo/interfaces.go41 // Examples:COMMENT
LOWgo/interfaces.go61 // which addresses might sign/pay for transactions.COMMENT
LOWgo/interfaces.go121COMMENT
LOWgo/interfaces.go141// automatically — user code does not need to update local channel state manually.COMMENT
LOWgo/interfaces.go301type SchemeNetworkFacilitator interface {COMMENT
LOWgo/interfaces.go321 // Returns:COMMENT
LOWgo/pending_settlement_store.go21// the same payload (typically the resource server's single automatic retry —COMMENT
LOWgo/.golangci.yml41 # Report unused function parametersCOMMENT
LOWgo/client_hooks.go61type BeforePaymentCreationHook func(PaymentCreationContext) (*BeforePaymentCreationHookResult, error)COMMENT
LOWgo/errors.go81 }COMMENT
LOWgo/errors.go121}COMMENT
LOWgo/mechanisms/svm/types.go41 // ChannelId is the channel PDA (base58).COMMENT
LOWgo/mechanisms/svm/types.go201}COMMENT
LOWgo/mechanisms/svm/pending_settlement.go1package svmCOMMENT
LOWgo/mechanisms/svm/upto/facilitator/rent_cleanup.go181 // cleanup transactions. Unset defaults to paymentchannels.DefaultSettleComputeUnitLimitCOMMENT
LOWgo/mechanisms/svm/upto/facilitator/scheme.go41 // OnStorageError is called when reverting a failed open fails. The settleCOMMENT
LOWgo/mechanisms/svm/upto/facilitator/scheme.go61 MaxRequiredSignatures *intCOMMENT
LOWgo/mechanisms/svm/upto/facilitator/scheme.go81 // Advertised as /supported extra.receiverAuthorizer and used to sign claimCOMMENT
LOWgo/mechanisms/svm/upto/facilitator/scheme.go121 Payload types.PaymentPayloadCOMMENT
LOWgo/mechanisms/svm/upto/facilitator/errors.go41 // ErrOpenTransaction is returned when the open transaction fails the acceptance policy.COMMENT
LOWgo/mechanisms/svm/upto/facilitator/errors.go61 // identity is missing, unresolved, or not the deposit-time binding.COMMENT
LOWgo/mechanisms/svm/upto/facilitator/errors.go81 // simulation fails, so the deposit is never escrowed.COMMENT
LOWgo/mechanisms/svm/exact/server/scheme.go61 return map[string]x402.PaymentFlowConfig{COMMENT
LOWgo/mechanisms/svm/exact/server/scheme.go81// The server instance for chainingCOMMENT
LOWgo/mechanisms/svm/exact/server/scheme.go101// ParsePrice parses a price and converts it to an asset amount (V2)COMMENT
LOWgo/mechanisms/svm/exact/facilitator/errors.go61 ErrSmartWalletMultipleMatchingTransfers = "invalid_exact_solana_smart_wallet_multiple_matching_transfers"COMMENT
LOWgo/mechanisms/svm/paymentchannels/onchain.go41 // plus the nonce and binding memos can exceed 110,000 CU; 200,000 leavesCOMMENT
LOWgo/mechanisms/svm/paymentchannels/storage.go21 Network stringCOMMENT
LOWgo/mechanisms/svm/paymentchannels/storage.go41}COMMENT
LOWgo/mechanisms/svm/paymentchannels/storage.go61 // differs from the requested non-empty value, RecordOpen MUST leave theCOMMENT
LOWgo/mechanisms/svm/paymentchannels/facilitator.go21COMMENT
LOWgo/mechanisms/evm/eip712_test.go1package evmCOMMENT
LOWgo/mechanisms/evm/types.go261 SendTransaction(ctx context.Context, to string, data []byte) (string, error)COMMENT
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.go101// WaitForSettleReceiptWithPendingStore wraps WaitForSettleReceipt with theCOMMENT
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/auth-capture/server/scheme.go21// when Config.CaptureDeadline is zero.COMMENT
LOWgo/mechanisms/evm/auth-capture/facilitator/scheme.go21// OperatorAllowlistEntry admits a contract operator, or every one with OperatorAddressWildcard,COMMENT
LOWgo/mechanisms/evm/auth-capture/facilitator/scheme.go41 // FeeRecipient, MinFeeBps and MaxFeeBps are the fee terms advertised in /supported; omit for no fee.COMMENT
LOWgo/mechanisms/evm/auth-capture/facilitator/scheme.go61COMMENT
122 more matches not shown…
Self-Referential Comments37 hits · 112 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.py185 # Create a partially-signed transactionCOMMENT
MEDIUMpython/x402/mechanisms/svm/exact/v1/client.py191 # Create a partially-signed transactionCOMMENT
MEDIUMpython/x402/tests/unit/extensions/test_exports.py55 # Create a new namespaceCOMMENT
MEDIUMpython/x402/tests/integrations/test_core.py395 # Create a valid client to make payloadCOMMENT
MEDIUMpython/x402/tests/integrations/test_evm.py622 # Create a simple typed data messageCOMMENT
MEDIUMpython/x402/tests/integrations/test_svm.py406 # 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.py34 # 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.py270 # Create a mock result object with payment responseCOMMENT
MEDIUMpython/x402/http/clients/requests.py155 # Create a copy of the request for retry (don't modify original)COMMENT
MEDIUM⚡examples/python/servers/mcp/simple.py97 # Create the paid tool bridge (SDK handles _meta extraction + CallToolResult conversion)COMMENT
MEDIUMe2e/legacy/clients/python/http/requests/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/python/http/requests/main.py25 # Create a session and mount the x402 adapterCOMMENT
MEDIUMe2e/legacy/clients/python/http/httpx/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/typescript/http/fetch/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/typescript/http/fetch/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/typescript/http/axios/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/clients/typescript/http/axios/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/python/http/flask/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/python/http/fastapi/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/typescript/http/next/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/typescript/http/next/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/typescript/http/express/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/typescript/http/express/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/typescript/http/hono/install.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/legacy/servers/typescript/http/hono/build.sh3# This file is intentionally emptyCOMMENT
MEDIUMe2e/servers/typescript/http/next/install.sh3# This file is intentionally emptyCOMMENT
Modern Structural Boilerplate89 hits · 90 pts
SeverityFileLineSnippetContext
LOWpython/legacy/src/x402/clients/__init__.py12__all__ = [CODE
LOWpython/legacy/src/x402/fastapi/middleware.py29logger = logging.getLogger(__name__)CODE
LOW⚡python/x402/server.py52__all__ = [CODE
LOWpython/x402/pending_settlement_store.py134__all__ = [CODE
LOWpython/x402/client.py52__all__ = [CODE
LOWpython/x402/__init__.py178__all__ = [CODE
LOWpython/x402/mechanisms/svm/__init__.py95__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__.py124__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.py144__all__ = [CODE
LOWpython/x402/mechanisms/evm/batch_settlement/abi.py224__all__ = [CODE
LOW…/x402/mechanisms/evm/batch_settlement/storage_utils.py64__all__ = ["resolve_within_dir", "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__.py35__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.py124__all__ = ["FileChannelStorage", "FileChannelStorageOptions"]CODE
LOW…x402/mechanisms/evm/batch_settlement/server/storage.py185__all__ = [CODE
LOW…/x402/mechanisms/evm/batch_settlement/server/verify.py486__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.py490__all__ = [CODE
LOW…mechanisms/evm/batch_settlement/facilitator/deposit.py848__all__ = ["verify_deposit", "settle_deposit"]CODE
LOW…/mechanisms/evm/batch_settlement/facilitator/settle.py163__all__ = ["execute_settle"]CODE
LOW…echanisms/evm/batch_settlement/facilitator/__init__.py5__all__ = ["BatchSettlementEvmFacilitator", "BatchSettlementEvmFacilitatorConfig"]CODE
LOW…2/mechanisms/evm/batch_settlement/facilitator/claim.py119__all__ = ["build_voucher_claim_args", "execute_claim_with_signature"]CODE
LOW…2/mechanisms/evm/batch_settlement/facilitator/utils.py241__all__ = [CODE
LOW…ms/evm/batch_settlement/facilitator/deposit_permit2.py333__all__ = [CODE
LOW…mechanisms/evm/batch_settlement/facilitator/voucher.py117__all__ = ["verify_voucher"]CODE
LOW…ms/evm/batch_settlement/facilitator/deposit_eip3009.py186__all__ = [CODE
LOW…/mechanisms/evm/batch_settlement/facilitator/scheme.py208__all__ = ["BatchSettlementEvmFacilitator"]CODE
LOW…/mechanisms/evm/batch_settlement/facilitator/refund.py309__all__ = ["execute_refund_with_signature"]CODE
LOW…n/x402/mechanisms/evm/batch_settlement/client/hooks.py79__all__ = [CODE
LOW…/x402/mechanisms/evm/batch_settlement/client/config.py211__all__ = [CODE
LOW…402/mechanisms/evm/batch_settlement/client/recovery.py156__all__ = [CODE
LOW…x402/mechanisms/evm/batch_settlement/client/channel.py285__all__ = [CODE
LOW…402/mechanisms/evm/batch_settlement/client/__init__.py48__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.py48__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.py107__all__ = [CODE
LOW…x402/mechanisms/evm/batch_settlement/client/voucher.py44__all__ = ["sign_voucher"]CODE
LOW…/x402/mechanisms/evm/batch_settlement/client/scheme.py390__all__ = ["BatchSettlementEvmScheme"]CODE
LOW…/x402/mechanisms/evm/batch_settlement/client/refund.py298__all__ = ["RefundOptions", "refund_channel"]CODE
LOWpython/x402/mechanisms/evm/exact/__init__.py16__all__ = [CODE
LOWpython/x402/mechanisms/evm/exact/facilitator.py67logger = 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__.py118__all__ = [CODE
LOWpython/x402/mechanisms/tvm/utils.py42__all__ = [CODE
LOWpython/x402/mechanisms/tvm/codecs/__init__.py38__all__ = [CODE
LOWpython/x402/mechanisms/tvm/exact/__init__.py9__all__ = [CODE
LOW…m/batch_settlement/facilitator/test_charge_baseline.py77 def set_state(balance: int, total_claimed: int) -> None:CODE
29 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.ts324 expect(result.payload.permit2Authorization.witness.facilitator.toLowerCase()).toBe(CODE
CRITICAL…packages/mechanisms/evm/test/unit/exact/client.test.ts360 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
HIGH⚡python/legacy/src/x402/svm_paywall_template.py2SVM_PAYWALL_TEMPLATE = '<!DOCTYPE html><html lang="en"><head>\n <meta charset="UTF-8">\n <meta name="viewpCODE
HIGH⚡python/legacy/src/x402/svm_paywall_template.py2SVM_PAYWALL_TEMPLATE = '<!DOCTYPE html><html lang="en"><head>\n <meta charset="UTF-8">\n <meta name="viewpCODE
HIGH⚡python/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.py179 Mirrors the on-chain keccak256(\\x19\\x01 || domainSeparator || hashStruct(message))STRING
HIGHpython/x402/mcp/utils.py149 # 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.py561 "pnpm is required to preview version bumps. Install pnpm and run: cd typescript && pnpm install"CODE
HIGHscripts/prepare-typescript-release.py840 "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 Nesting65 hits · 54 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.py179CODE
LOWpython/x402/server.py247CODE
LOWpython/x402/server.py499CODE
LOWpython/x402/server.py567CODE
LOWpython/x402/server_base.py551CODE
LOWpython/x402/server_base.py1353CODE
LOWpython/x402/server_base.py1574CODE
LOWpython/x402/facilitator_base.py196CODE
LOWpython/x402/facilitator_base.py377CODE
LOWpython/x402/facilitator_base.py484CODE
LOWpython/x402/client_base.py123CODE
LOWpython/x402/client_base.py545CODE
LOWpython/x402/mechanisms/svm/utils.py252CODE
LOWpython/x402/mechanisms/evm/multicall.py180CODE
LOWpython/x402/mechanisms/evm/eip712.py54CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py374CODE
LOWpython/x402/mechanisms/evm/upto/permit2_utils.py874CODE
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.py150CODE
LOW…hanisms/evm/batch_settlement/server/channel_manager.py191CODE
LOW…mechanisms/evm/batch_settlement/facilitator/deposit.py306CODE
LOW…/mechanisms/evm/batch_settlement/facilitator/refund.py142CODE
LOWpython/x402/mechanisms/evm/exact/permit2_utils.py335CODE
LOWpython/x402/mechanisms/evm/exact/permit2_utils.py762CODE
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.py53CODE
LOWpython/x402/mcp/server.py106CODE
LOWpython/x402/mcp/server.py121CODE
LOWpython/x402/mcp/utils.py217CODE
LOWpython/x402/mcp/server_sync.py345CODE
LOWpython/x402/mcp/server_async.py494CODE
LOWpython/x402/extensions/sign_in_with_x/hooks.py100CODE
LOWpython/x402/extensions/sign_in_with_x/hooks.py112CODE
LOWpython/x402/extensions/builder_code/cbor.py266CODE
LOWpython/x402/extensions/bazaar/server.py136CODE
LOWpython/x402/extensions/bazaar/facilitator.py367CODE
LOWpython/x402/extensions/bazaar/facilitator.py618CODE
LOWpython/x402/http/x402_http_server.py84CODE
LOWpython/x402/http/x402_http_server.py486CODE
LOWpython/x402/http/x402_http_server_base.py188CODE
LOWpython/x402/http/x402_http_server_base.py1105CODE
LOWpython/x402/http/middleware/fastapi.py183CODE
LOWpython/x402/http/middleware/fastapi.py259CODE
LOWpython/x402/http/middleware/flask.py348CODE
LOWpython/x402/http/middleware/__init__.py31CODE
LOWpython/x402/http/middleware/_bazaar_utils.py44CODE
LOWexamples/python/clients/mcp-chatbot/main.py128CODE
5 more matches not shown…
Redundant / Tautological Comments31 hits · 44 pts
SeverityFileLineSnippetContext
LOWpython/legacy/src/x402/flask/middleware.py292 # Check if response is successful (2xx status code)COMMENT
LOWpython/x402/server.py444 # Check if verify/settle methods are coroutine functions (async)COMMENT
LOW⚡python/x402/server_base.py579 # Check if any facilitator supports this network/scheme via wildcard patternCOMMENT
LOW⚡python/x402/server_base.py585 # Check if the kind's network is a wildcard that matchesCOMMENT
LOWpython/x402/server_base.py1436 # Check if verification failedCOMMENT
LOWpython/x402/server_base.py1672 # 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.py240 # Check if this is a token program instructionCOMMENT
LOWpython/x402/mechanisms/svm/utils.py277 # Check if this is a token program instructionCOMMENT
LOWpython/x402/mcp/client_async.py176 # Check if this is a payment required responseCOMMENT
LOWpython/x402/mcp/client_async.py216 # Check if payment is approvedCOMMENT
LOWpython/x402/mcp/utils.py398 # 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
LOW⚡python/x402/http/x402_http_server.py405 # Check if the result is a coroutine or future (async)COMMENT
LOWpython/x402/http/x402_http_server.py644 # Check if the result is a coroutine (async) - not supportedCOMMENT
LOWpython/x402/http/x402_http_server_base.py196 # Check if it's a single route config dict (has "accepts" key)COMMENT
LOWpython/x402/http/clients/httpx.py127 # 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.py280 # Check if route requires payment (before initialization)COMMENT
LOWpython/x402/http/middleware/flask.py377 # Check if route requires paymentCOMMENT
LOWpython/x402/http/middleware/flask.py488 # 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.yml54 # Check if version is a prerelease (contains -alpha, -beta, -rc, etc.)COMMENT
LOWe2e/legacy/clients/python/http/httpx/main.py27 # Set timeout to 30 seconds to handle busy servers during test runsCOMMENT
LOWe2e/facilitators/python/main.py424 # Check if this was an abort from hookCOMMENT
AI Slop Vocabulary7 hits · 19 pts
SeverityFileLineSnippetContext
MEDIUM⚡python/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⚡python/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.py316# HTTP server harness (Flask + WSGI in a thread)COMMENT
LOW⚡examples/python/servers/mcp/simple.py106 # Paid tool - just call the bridge with args + contextCOMMENT
MEDIUMe2e/facilitators/python/main.py115# Network configuration — harness-injected `${ID}_NETWORK` or catalog testnetCOMMENT
Slop Phrases4 hits · 10 pts
SeverityFileLineSnippetContext
LOW⚡python/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.ts43 // 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.md89Curated 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.md34| [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.py47CODE
LOW…hon/x402/tests/unit/mechanisms/evm/test_facilitator.py189CODE
LOW…402/tests/unit/mechanisms/evm/test_upto_facilitator.py46CODE
LOW…402/tests/unit/mechanisms/evm/test_upto_facilitator.py132CODE
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-contribuCODE
Fake / Example Data3 hits · 4 pts
SeverityFileLineSnippetContext
LOW⚡python/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.ts1273 url: "https://example.com/premium-fake-token",CODE
LOWtypescript/packages/extensions/src/bazaar/README.md113 name: "John Doe",CODE
Overly Generic Function Names2 hits · 1 pts
SeverityFileLineSnippetContext
LOWpython/x402/tests/unit/http/clients/test_httpx.py172 async def handle_request(request):CODE
LOWpython/x402/tests/unit/http/clients/test_httpx.py234 async def handle_request(req):CODE