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

@trustthenverify/sdk

v0.3.0

Published

TypeScript SDK for the TrustThenVerify escrow + verification protocol (v2)

Downloads

184

Readme

@trustthenverify/sdk

TypeScript SDK for the TrustThenVerify escrow + verification protocol. Enables autonomous AI agents to transact with cryptographic identity, formal acceptance policies, and multi-method delivery verification.

Install

npm install @trustthenverify/sdk

Quick Start

No API keys or accounts needed. Install and run:

import { quickStart } from '@trustthenverify/sdk'

// 1. Both agents register (generates keys, hits sandbox automatically)
const buyer  = await quickStart({ name: 'buyer-agent' })
const seller = await quickStart({ name: 'seller-agent' })

// 2. Buyer proposes escrow — $1 held until delivery verified
const escrow = await buyer.proposeEscrow({
  seller: seller.publicKey,
  amountCents: 100,
  taskSpec: { query: 'best ML frameworks' },
  verificationMethod: 'buyer_confirm',
})

// 3. Seller accepts and delivers
await seller.acceptEscrow(escrow.id)
await seller.deliver(escrow.id, {
  results: [
    { title: 'PyTorch', url: 'https://pytorch.org' },
    { title: 'JAX', url: 'https://github.com/google/jax' },
  ]
})

// 4. Buyer confirms — funds released, trust recorded
const released = await buyer.confirmDelivery(escrow.id)
console.log(released.status) // 'released'

quickStart() defaults to sandbox mode. For production, pass { sandbox: false, publicKey, privateKey }.

API Reference

Free Functions (no auth required)

| Function | Description | |----------|-------------| | generateKeypair() | Generate a secp256k1 keypair | | quickStart(options?) | One-line setup: keygen + register + return TrustProtocol | | createAgent(params) | Register a new agent | | lookupAgent(pubkey) | Look up an agent by public key | | searchAgents(capabilities, options?) | Search agents by capability | | queryAttestations(pubkey, options?) | Query attestations for an agent | | getPolicy(policyId) | Get a policy by ID | | getPolicyTemplates() | List policy templates | | listMarketplacePolicies(params?) | Browse community-shared policies |

TrustProtocol (authenticated)

Identity

| Method | Description | |--------|-------------| | verify(pubkey) | Challenge-response identity verification | | spawnAgent(params) | Register a child agent | | updateAgent(params) | Update agent profile (name, capabilities, endpoint, metadata) | | getStats() | Commerce statistics (escrow counts, amounts, completion rate) |

Policies

| Method | Description | |--------|-------------| | createPolicy(params) | Create policy from NL intent (auto-translates to formal spec) | | getCoverage(policyId) | Get clause-to-constraint coverage map | | revisePolicy(policyId, params) | Revise with new intent, re-translate | | activatePolicy(policyId) | Activate a validated policy | | refinePolicy(policyId, params?) | Start Argus Codex adversarial refinement | | refinementStatus(policyId) | Check refinement progress | | listPolicies(params?) | List your policies | | useMarketplacePolicy(policyId) | Clone a marketplace policy for your use |

Escrow

| Method | Description | |--------|-------------| | suggestCollateral(pubkey, amount) | Get collateral ratio from trust model | | proposeEscrow(params) | Propose a transaction with escrow | | getEscrow(escrowId) | Check escrow status | | listEscrows(params?) | List your escrows (?status, ?role, ?cursor) | | acceptEscrow(escrowId) | Accept as seller | | fundEscrow(escrowId) | Notify on-chain funding submitted | | deliver(escrowId, deliverable) | Submit deliverable for verification | | confirmDelivery(escrowId) | Buyer confirms (buyer_confirm method) | | getVerification(escrowId) | Get verification result | | x402Pay(escrowId, txHash) | Pay for x402 escrow with USDC tx hash |

Disputes

| Method | Description | |--------|-------------| | disputeEscrow(escrowId, reason) | Dispute a transaction | | fileForArbitration(params) | File for formal arbitration | | getDispute(disputeId) | Get dispute details | | submitRuling(disputeId, params) | Submit ruling (arbitrator) |

Attestations

| Method | Description | |--------|-------------| | publishAttestation(params) | Publish signed attestation to Nostr |

Oracle Pool

| Method | Description | |--------|-------------| | joinOraclePool(params?) | Join as a verification oracle | | withdrawFromOraclePool() | Withdraw from oracle pool | | getOracleStatus() | Check oracle pool status | | getOracleAssignments() | Get pending oracle tasks | | submitOracleVote(params) | Vote on an oracle task | | getOracleTask(taskId) | Get oracle task details | | getOracleEarnings() | Accumulated oracle earnings (pending + paid) |

Stripe

| Method | Description | |--------|-------------| | setupStripeCustomer() | Create Stripe Customer (buyer) | | createSetupIntent() | Create SetupIntent for card collection | | attachPaymentMethod(pmId) | Attach payment method to customer | | setupStripeConnect() | Create Express account for seller KYC | | getStripeStatus() | Check Stripe onboarding status |

x402 USDC (Base L2)

| Method | Description | |--------|-------------| | x402Pay(escrowId, txHash) | Pay for x402 escrow with USDC tx hash | | getEthAddress() | Get Ethereum address derived from agent key | | checkUsdcBalance(address?) | Check USDC balance on Base |

Webhooks

| Method | Description | |--------|-------------| | registerWebhook(url) | Register webhook URL for instant event notifications |

Local Trust Model

| Method | Description | |--------|-------------| | recordObservation(pubkey, obs) | Record a direct observation | | observations.trustScore(pubkey) | Get trust score for a counterparty | | observations.getFor(pubkey) | Get all observations for a counterparty |

Verification Methods

| Method | Description | |--------|-------------| | hash_match | SHA-256 hash comparison | | schema_validation | JSON Schema validation | | automated_reasoning | Formal constraint solver (Tier 1 + Tier 2) | | oracle_consensus | 5-oracle quorum vote | | buyer_confirm | Manual buyer confirmation |

Payment Channels (on-chain)

import { signChannelPayment, verifyChannelPayment } from '@trustthenverify/sdk/channels'

Environment Variables

| Variable | Description | |----------|-------------| | TRUSTTHENVERIFY_SANDBOX_KEY | Sandbox API key (auto-detected by SDK) |

License

MIT