New:Socket for Asana Is Now Available.Learn more
Get Started

@crestdeploymentsystems/trusted-fetch

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crestdeploymentsystems/trusted-fetch

x402 fetch with pre-payment trust check. Drop-in replacement for @x402/fetch that calls supership before paying.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@crestdeploymentsystems/trusted-fetch

x402 payments with pre-payment trust verification. Drop-in replacement for @x402/fetch that checks service trust before sending money.

Install

npm install @crestdeploymentsystems/trusted-fetch

Usage

import { wrapFetchWithPayment } from "@x402/fetch";
import { createTrustedFetch } from "@crestdeploymentsystems/trusted-fetch";

// Your normal x402 setup
const fetchWithPayment = wrapFetchWithPayment(fetch, client);

// Wrap it with trust verification
const trustedFetch = createTrustedFetch(fetchWithPayment, {
  threshold: 50,          // minimum trust score (0-100)
  onCheck: (url, trust) => console.log(`${url}: ${trust.score}/${trust.grade}`),
  onRefuse: (url, trust) => console.log(`Refused to pay ${url}: score too low`),
});

// Use exactly like fetchWithPayment -- but safe
const res = await trustedFetch("https://some-x402-service.com/api/data", {
  method: "GET",
});

How it works

Before every x402 payment, trustedFetch calls supership.crestsystems.ai/check to get a trust score for the service. If the score is below your threshold, the payment is refused and an error is thrown. Your money stays in your wallet.

The check is free. Skipping it is expensive.

Options

OptionDefaultDescription
threshold50Minimum trust score (0-100) to proceed with payment
checkUrlsupership.crestsystems.ai/checkTrust check endpoint
onChecknullCallback after every trust check
onRefusenullCallback when payment is refused

Why

Agents making x402 payments have no way to know if a service is trustworthy before paying. trusted-fetch adds a pre-flight trust check that protects against:

  • Scam services that take payment and return nothing
  • Services with known security issues
  • Newly deployed services with no track record
  • Services that have degraded since you last called them

Built by

Crest Deployment Systems -- deploying scalable intelligence.

Keywords

x402

FAQs

Package last updated on 19 May 2026

Related posts