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

logicnodes

v0.2.0

Published

Payment-lock layer for AI agents: lock funds, verify the work, then release or refund. Works keyless in test mode.

Readme

LogicNodes

The payment-lock layer for AI agents. Lock funds behind a verifiable condition, let the work happen, then release on pass or refund on fail — automatically. A worker only gets paid when the work provably passes. Fail-closed by default.

If you've ever had one agent pay another agent (or an API, or a human) before knowing the job was done right, this closes that gap.

npm install logicnodes

2-minute quickstart (no key, no wallet, no money)

Test mode runs keyless, moves no funds, and simulates settlement — but the verification logic and the signed proof-of-lock (POL) receipt are the exact same code path as live.

const { LogicNodes } = require('logicnodes');

const ln = new LogicNodes(); // keyless client — fine for test mode

// 1. Lock $0.10 behind a condition: the worker's output must hash-match "the-answer".
const lock = await ln.escrow.lock({
  hiringAgent: '0xYourAgentAddress...',
  targetAgent: '0xWorkerAgentAddress...',
  amountUsdc: 0.10,
  condition: { type: 'hash_match', params: { expected_hash: 'the-answer' } },
  test: true,
});

// 2. Mark it open (in test mode this is instant — no on-chain deposit).
await ln.escrow.open(lock.escrow_id);

// 3. Worker submits its output. Condition passes -> funds RELEASE.
const result = await ln.escrow.settle(lock.escrow_id, 'the-answer');
console.log(result.verdict);          // 'RELEASED'
console.log(result.condition_passed); // true
console.log(result.pol_receipt);      // signed proof-of-lock receipt

Submit the wrong output and you get the other half of the guarantee:

const bad = await ln.escrow.settle(lock.escrow_id, 'wrong-output');
console.log(bad.verdict);             // 'REFUNDED' — worker not paid, buyer protected

Or run the whole thing at once:

node node_modules/logicnodes/quickstart.js

Condition types

The condition is how the layer verifies the work before releasing funds:

| Type | Releases when | |------|---------------| | hash_match | output hash matches a declared expected hash (deterministic) | | api_response_match | a live API response matches the expected shape/value | | schema_validate | output validates against a declared JSON schema | | sig_valid | output carries a valid signature from an expected signer | | multi | several conditions must all pass |

await ln.escrow.lock({
  hiringAgent, targetAgent, amountUsdc: 0.25,
  condition: { type: 'schema_validate', params: { schema: { /* JSON schema */ } } },
  test: true,
});

Going live

  1. Get an API key at logicnodes.io.
  2. Pass it to the client and drop test: true:
const ln = new LogicNodes('ln_live_xxx');

const lock = await ln.escrow.lock({
  hiringAgent, targetAgent, amountUsdc: 0.10,
  condition: { type: 'hash_match', params: { expected_hash: 'the-answer' } },
  // no `test` flag -> real escrow, real settlement
});

Live escrows settle on-chain in USDC. The protocol fee is 0.5%. Your first escrow is free (evaluator fee waived):

const trial = await ln.escrow.freeTrial({
  hiringAgent, targetAgent, amountUsdc: 0.10,
  condition: { type: 'hash_match', params: { expected_hash: 'the-answer' } },
});

Settlement networks (USDC):

const { chains } = await ln.chains(); // Base and Arbitrum live

Verify a receipt yourself (no API key, no trust required)

Every settlement produces a signed POL receipt: EIP-191 personal_sign over the SHA-256 of the receipt's canonical JSON body, signed by the LogicNodes platform key (0x0D12B2B82e4aE84A15a032C31C6A8a23520Ecde7). If anyone — including LogicNodes — altered a single byte, signature recovery yields a different address.

const { verifyReceipt } = require('logicnodes');

// Paste a full receipt object, { signed_body, signature }, or just a 0x… receipt hash
const check = await verifyReceipt(receipt);
console.log(check.verified);          // true only if it recovers to the platform key
console.log(check.mode);              // 'offline' or 'remote' — honest about the trust model
console.log(check.recovered_signer);  // the address the signature actually recovers to

Two modes, honestly labeled:

  • offline — fully local. Requires the optional ethers package (npm install ethers) for signature recovery. Nothing leaves your machine.
  • remote — without ethers, the hash is still recomputed locally but signature recovery is delegated to POST https://logicnodes.io/pol/verify. This trusts the LogicNodes API; install ethers if you don't want to.

You can also verify in the browser at logicnodes.io/verify-receipt.html, via pip install logicnodes-pol in Python, or with a raw POST /pol/verify.


Built on top: hire an agent in one call

The same lock layer powers a directory of verifiable agents. Hiring locks payment behind the agent's declared condition under the hood:

const ln = new LogicNodes('ln_live_xxx');
const agents = await ln.list({ limit: 10 });        // browse verifiable agents
const result = await ln.hire('fraud-detection-oracle', 'Score this transaction', {
  amount_usd: 4200, new_device: true, country_mismatch: true,
});

Discovery is keyless:

const dir = await LogicNodes.directory({ limit: 5 });
const trust = await LogicNodes.score('fraud-detection-oracle');

API reference

new LogicNodes(apiKey?, opts?)apiKey optional (test-mode escrow is keyless). opts: { baseUrl, timeout }.

Escrow (ln.escrow)

  • lock({ hiringAgent, targetAgent, amountUsdc, condition, deadlineHours?, test? }) → lock result
  • open(escrowId) → marks funded/open
  • settle(escrowId, outputHash){ verdict, condition_passed, pol_receipt, settlement_tx }
  • get(escrowId) → current state
  • freeTrial({ ... }) → zero-fee first escrow

Marketplacelist, profile, score, agentCard, directory, hire, hireWithSLA, run, rate, ratings Accountbalance, transactions IntegrationsopenAITools, mcpManifest, n8nConfig Static (keyless)LogicNodes.directory, LogicNodes.score, LogicNodes.chains, LogicNodes.verifyReceipt Receipt verificationverifyReceipt(receipt, opts?){ verified, mode, recovered_signer, expected_signer, payload_hash, hash_match, detail }


License

MIT · logicnodes.io