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

@trust-os-sdk/trust-os-sdk

v1.1.0

Published

JavaScript SDK for the Trust OS decision verification API

Readme

Trust OS SDK

JavaScript SDK for the Trust OS decision verification API.


What is Trust OS?

Trust OS verifies high-impact decisions before execution.

Most systems execute first and explain later.
Trust OS flips that model:
Verify before execution.


Installation

npm install trust-os-sdk

Quick Start

const { TrustOSClient } = require("trust-os-sdk");

const client = new TrustOSClient({
  apiKey: process.env.TRUST_OS_API_KEY
});

const result = await client.verifyDecision({
  transaction_id: "txn_001",
  action: "transfer",
  amount: 50000,
  currency: "USDC",
  destination: "wallet_0xabcdef",
  timestamp: new Date().toISOString()
});

console.log(result);
// { decision_id: "dec_xxx", recommendation: "APPROVE", risk_level: "LOW", ... }

Production API

https://trustos-core-gateway-v2-7jm9owrs.an.gateway.dev

This is the default endpoint. No configuration required unless you are using a private deployment.


Authentication

All requests require an API key passed via the x-api-key header.

const client = new TrustOSClient({
  apiKey: process.env.TRUST_OS_API_KEY
});

API keys are provisioned during onboarding. Request early access at trust-os.io.


SDK Usage

verifyDecision(payload)

Submit a decision payload for verification. Returns a recommendation and risk assessment.

const result = await client.verifyDecision({
  transaction_id: "txn_001",
  action: "transfer",
  amount: 50000,
  currency: "USDC",
  destination: "wallet_0xabcdef",
  timestamp: new Date().toISOString()
});

verify(payload)

Alias for verifyDecision().

const result = await client.verify(payload);

REST API Example

curl -X POST https://trustos-core-gateway-v2-7jm9owrs.an.gateway.dev/v1/decision/verify \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "transaction_id": "txn_001",
    "action": "transfer",
    "amount": 50000,
    "currency": "USDC",
    "destination": "wallet_0xabcdef",
    "timestamp": "2024-01-01T00:00:00.000Z"
  }'

Response Example

{
  "decision_id": "dec_a1b2c3d4",
  "recommendation": "APPROVE",
  "risk_level": "LOW",
  "verified": true,
  "latency_ms": 142,
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Possible recommendation values: APPROVE, REVIEW, BLOCK, ESCALATE


Error Handling

try {
  const result = await client.verifyDecision(payload);
} catch (err) {
  console.error(err.message); // "HTTP 401: Unauthorized"
  console.error(err.status);  // 401
  console.error(err.body);    // parsed response body (if available)
}

Errors include:

  • err.message — description with HTTP status
  • err.status — HTTP status code
  • err.body — parsed response body (when available)

Requests time out after 10 seconds by default. Configure with timeout:

const client = new TrustOSClient({
  apiKey: process.env.TRUST_OS_API_KEY,
  timeout: 5000
});

Use Cases

Stablecoin payment verification

Verify cross-border stablecoin transfers against compliance and risk policy before on-chain execution.

AI agent action verification

Gate high-impact agent tool use — database writes, API calls, code execution — with a pre-execution decision check.

DAO treasury verification

Validate governance parameters (quorum, timelock, multisig) before treasury disbursements.

Compliance workflow approval

Route decisions through policy evaluation for regulated industries: finance, healthcare, legal.


Examples

Run an example:

TRUST_OS_API_KEY=your_key node examples/basic.js

Early Access

Trust OS is in private beta. API keys are provisioned by invitation.

Contact: [email protected]


Links