npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

outcome-sdk

v0.6.0

Published

Pay agents for verified results, not attempts. Reads the receipt instead of trusting the status byte: on-chain idempotency, escrow, and execution diagnosis for agent payments.

Readme

outcome-sdk

Pay agents for verified results, not attempts.

x402 releases funds when a facilitator returns success, and the buyer is expected to trust it. Nothing checks that value actually moved.

status: 0x1 only means the EVM did not revert. A transaction can mine, emit no logs, transfer nothing, and still be recorded as a payment by every rail that reads the status byte. This package reads the receipt instead.

npm i outcome-sdk

Verify a payment

import { OutcomeClient } from "outcome-sdk";

const outcome = new OutcomeClient({
  provider: "https://ethereum-sepolia-rpc.publicnode.com",
  escrow: "0x0ED9d1235cB9FD080D687FD978a38d972a34dC3B",
  token: "0x49C86277a91002c4943837bf20F6ED41976Db09F",
});

const { proven, reason, observed, proof } = await outcome.verify({
  transactionHash,
  recipient,
  minAmount: 1_000_000n,
});

proven is false unless a real ERC-20 Transfer of at least minAmount reached recipient. Unreadable evidence resolves to not proven, never proven — a false negative costs a retry, a false positive pays for nothing.

Don't do the same job twice

The intent id is derived from the work, so two agents independently told to do the same job produce the same id and collide on chain instead of both paying. This is the half of an idempotency key a header cannot provide: a header can be rotated, a mapping cannot.

const id = outcome.intentId("deliver 1 tUSDC to treasury", agentAddress);
if (await outcome.isClaimed(id)) return; // someone is already on it

Don't get stuck

const d = outcome.diagnose({ reason: "timeout waiting for confirmation" });
// { cause: "in_flight", retryable: false, worthRescuing: false, correction: … }

An unknown outcome is classified as in-flight and is never worth resending — the first attempt may still land, and resending pays twice.

Four entry points

| Import | Runs in | Holds | |---|---|---| | outcome-sdk | anywhere | read and verify. No node: builtins, no React, no credential. | | outcome-sdk/react | React 18+ | OutcomeProvider, useIntents, useIntent, useEscrowed, useVerify | | outcome-sdk/x402 | anywhere | the x402 wire format, plus the settlement check the protocol lacks | | outcome-sdk/node | Node | settlement through KeeperHub, the worker agent, the audit trail |

The split is a position, not packaging convenience. The party being asked to trust a payment is the one who most needs to check it, so checking must not require a server or a key — verification runs in a browser against any ethers provider, including a wallet's. A build step walks the emitted modules and fails if node: or React ever reaches the main entry.

x402

x402 ends at "the facilitator reported success" — a field produced by the one party with an incentive to say yes, next to a transaction hash nobody follows. A settlement that mined with status: 0x1, emitted no Transfer, and moved nothing satisfies every check the protocol performs.

import { verifySettlement } from "outcome-sdk/x402";

// after the facilitator returns, before you serve the resource
const verdict = await verifySettlement(outcome, {
  requirements,   // the PaymentRequirements you quoted
  settlement,     // the SettlementResponse it handed back
});

if (!verdict.proven) return respond402(verdict.reason);
return serve(resource);

A facilitator reporting failure is taken at its word — claiming failure is against its interest and there is nothing to check. A facilitator reporting success is not.

Also exports the wire format with the specification's exact field names: paymentRequired, encodePaymentHeader, decodePaymentHeader, encodeSettlementHeader, decodeSettlementHeader, and the PaymentRequirements / PaymentPayload / SettlementResponse types.

React

import { OutcomeProvider, useIntents, useVerify } from "outcome-sdk/react";

function Ledger() {
  const { data: intents, loading } = useIntents();
  // every intent the escrow has seen, assembled from events, newest first
}

Settling

Settlement moves money, so it lives behind /node and needs a KeeperHub key. Release and refund execute through KeeperHub's execute API: simulated before sending, idempotent per attempt, gas sponsored.

import { createTools, KeeperHubClient } from "outcome-sdk/node";

outcome_settle takes a transaction hash, never a verdict. An agent that could assert "the work is done" and have money move on its word would be exactly what this replaces.

Links

MIT