Current collected state Current
Observed since 20 Oct, 19:57 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
402arc-client
402ARC client: payingFetch(), a fetch that signs an EIP-3009 USDC payment and retries when an API answers 402 on Arc.
A fetch wrapper that transparently pays x402 challenges in USDC on Arc, part of 402ARC.
npm i 402arc-client
import { createSigner, payingFetch } from "402arc-client";
const pay = payingFetch({
account: createSigner(process.env.WALLET_KEY),
maxValue: 10_000n, // spend cap per request: 0.01 USDC
});
const res = await pay("https://api.example.dev/report");
// 402 → signs EIP-3009 authorization → retries → 200
Includes a per-payment spend cap and network allowlist so an agent can pay autonomously without being drained. See the docs. MIT.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
viemEnvironment{
"local_name": "viem",
"alias": false,
"peer_metadata": null
} | ^2.21.0 | runtime |
402arc-coreEnvironment{
"local_name": "402arc-core",
"alias": false,
"peer_metadata": null
} | 0.1.0 | runtime |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.5.0 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^22.0.0 | development |
Source distribution
{
"shasum": "12fc885bbd924bafe949814c8fd11c4f752d949c",
"tarball": "https://registry.npmjs.org/402arc-client/-/402arc-client-0.1.0.tgz",
"fileCount": 4,
"integrity": "sha512-JEsPVUEF/szHknjivFwyMz+qRmokgn6soM+eXgHwZk9RjSwMBJeGeeVNhgFww4OMgLbCqsyXcTZtjvJSxkYw/g==",
"signatures": [
{
"sig": "MEUCIQC5N+2BulZJejzz8DFS7cvLGMb2NWf9Gm4thMgoruTNWQIgWS4Ln/3sYhUlyruUmjtQgYR5VTql2TGQE9GP33h9o1M=",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 5479
}Observed since 20 Oct, 19:57 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:0beb1d7ea1870852cb84b74c061fe2cdab1002cf0ef57da2d647ed2ac6d810b4