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

@vertex-agents/sentinel-sdk

v1.0.0

Published

SDK for the Vertex Sentinel Layer - Verifiable risk-management for AI agents

Readme

@vertex-agents/sentinel-sdk

The official SDK for the Vertex Sentinel Layer — the verifiable risk-management layer for autonomous AI trading agents.

Installation

npm install @vertex-agents/sentinel-sdk

Features

  • EIP-712 Signing: Securely sign trade intents for on-chain verification.
  • Fail-Closed Enforcement: Built-in security that halts execution on risk violations.
  • On-Chain Connectivity: Direct interaction with the RiskRouter on Sepolia and Mainnet.
  • Lightweight: Zero-dependency on agent runtimes (no ccxt, genkit, etc).

Quick Start

import { SentinelClient } from '@vertex-agents/sentinel-sdk';

const sentinel = new SentinelClient({
  network: 'sepolia',
  routerAddress: '0xd6A6952545FF6E6E6681c2d15C59f9EB8F40FdBC',
  privateKey: process.env.AGENT_PRIVATE_KEY,
  agentId: 1
});

// Verifiable Trade Authorization
const auth = await sentinel.authorize({
  agentId: 1n,
  agentWallet: '0x...',
  pair: 'BTC/USD',
  action: 'BUY',
  amountUsdScaled: 100000n, // $1000.00
  maxSlippageBps: 100,
  nonce: 1n,
  deadline: BigInt(Math.floor(Date.now() / 1000) + 3600),
});

if (auth.isAllowed) {
  console.log('Sentinel Authorized:', auth.reason);
  // Proceed with execution using auth.signature
} else {
  console.error('Sentinel Rejected:', auth.reason);
}

API Reference

  • SentinelClient(options)

    • network: 'sepolia' | 'mainnet' | custom
    • routerAddress: string (RiskRouter address)
    • privateKey: string (agent signing key)
    • agentId: number
  • authorize(intent): Promise<{ isAllowed: boolean; reason?: string; signature?: string }>

    • intent: TradeIntent (EIP-712 structured object)
    • Returns isAllowed=false when any validation fails; may throw in exceptional conditions.
  • getNonce(agentId): Promise

    • Helper to fetch on-chain nonce for an agent.

Error Types

The SDK surfaces domain-specific errors to help developers handle common failure modes programmatically:

  • InsufficientCollateralError — raised when the agent's collateral is insufficient for the requested intent.
  • StalePriceError — raised when the on-chain or oracle price is stale.
  • FailClosedException — indicates the system entered fail-closed mode and manual intervention may be required.
  • InsufficientQuotaError — when AI or other dependent service quotas are exhausted.

Import these from @vertex-agents/sentinel-sdk/src/errors in examples.

Best Practices

  • Nonces: always fetch and increment the on-chain nonce immediately before signing an intent to avoid "Invalid Nonce" rejections.
  • Retries: adopt an exponential backoff for transient failures. Treat isAllowed:false as business logic (do not blindly retry without investigating reason).
  • Key management: keep private keys in a secure HSM or vault; avoid embedding in source or CI logs.
  • Graceful degradation: implement a conservative execution fallback when Sentinel rejects an intent (paper trading or reduced size).

Examples

See packages/sentinel-sdk/examples/trading_bot.ts for a minimal reference implementation demonstrating authorization, error handling, and best practices.

Troubleshooting

  • "Invalid Signature": ensure the signing key matches the agent wallet registered on-chain.
  • "Intent Expired": confirm clock sync and use deadlines with reasonable leeway.
  • "Price feed stale": verify Chainlink price feed addresses and oracle update cadence.

Contributing & Tests

  • Run unit tests: npm test from repo root.
  • Build SDK: npm run build inside packages/sentinel-sdk.

License

MIT