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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@agirails/sdk

v2.0.4

Published

AGIRAILS SDK for the ACTP (Agent Commerce Transaction Protocol) - Unified mock + blockchain support

Readme

@agirails/sdk

TypeScript SDK for the ACTP (Agent Commerce Transaction Protocol) - enabling AI agents to transact, escrow funds, and settle payments autonomously.

Installation

npm install @agirails/sdk

Quick Start

Basic API

import { ACTPClient } from '@agirails/sdk';

const client = await ACTPClient.create({
  network: 'base-sepolia',
  privateKey: process.env.PRIVATE_KEY
});

// One-liner: pay an AI agent for a service
const result = await client.basic.pay({
  provider: '0xProviderAddress...',
  amount: '10.00',  // 10 USDC
  service: 'echo'
});

console.log('Transaction ID:', result.txId);
console.log('Status:', result.status);

Standard API

import { ACTPClient } from '@agirails/sdk';

const client = await ACTPClient.create({
  network: 'base-sepolia',
  privateKey: process.env.PRIVATE_KEY
});

// 1. Create transaction
const txId = await client.standard.createTransaction({
  provider: '0xProviderAddress...',
  amount: '10.00',
  serviceRef: 'ipfs://Qm...'
});

// 2. Link escrow (funds locked, state → COMMITTED)
await client.standard.linkEscrow(txId);

// 3. Provider delivers (after work is done)
await client.standard.transitionState(txId, 'DELIVERED');

// 4. Release payment to provider
await client.standard.releaseEscrow(txId);

Check Transaction Status

const status = await client.basic.checkStatus(txId);
console.log(status.state);     // 'COMMITTED', 'DELIVERED', 'SETTLED', etc.
console.log(status.amount);    // '10.00'
console.log(status.provider);  // '0x...'

CLI Usage

# Install globally
npm install -g @agirails/sdk

# Initialize configuration
actp init

# Create a transaction
actp create --provider 0x... --amount 10 --service "echo service"

# Check transaction status
actp status <txId>

# List your transactions
actp list

Mock Mode (Testing)

Test without blockchain - no gas fees, instant transactions:

import { ACTPClient } from '@agirails/sdk';

const client = await ACTPClient.create({
  mode: 'mock'
});

// Full ACTP flow works identically
const result = await client.basic.pay({
  provider: '0x1234...',
  amount: '5.00',
  service: 'test-service'
});

Networks

| Network | Chain ID | Status | |---------|----------|--------| | Base Sepolia | 84532 | ✅ Active (Testnet) | | Base Mainnet | 8453 | ⏳ Not Deployed |

Note: Mainnet contracts are not yet deployed. Using network: 'base-mainnet' will throw an error. Use 'base-sepolia' for development and testing.

Transaction States

INITIATED → QUOTED → COMMITTED → IN_PROGRESS → DELIVERED → SETTLED
                                      ↓
                                  DISPUTED → SETTLED

API Layers

Basic

client.basic.pay(params)         // Create, fund, and track in one call
client.basic.checkStatus(txId)   // Get human-readable status

Standard

client.standard.createTransaction(params)  // Create transaction
client.standard.linkEscrow(txId)           // Lock funds in escrow
client.standard.transitionState(txId, state)  // Change state
client.standard.releaseEscrow(txId)        // Release funds to provider
client.standard.getTransaction(txId)       // Get transaction details
client.standard.getEscrowBalance(escrowId) // Check locked amount

Advanced

client.advanced  // Direct access to BlockchainRuntime or MockRuntime

Environment Variables

# Required for blockchain mode
PRIVATE_KEY=0x...
BASE_SEPOLIA_RPC=https://...

# Optional
IPFS_GATEWAY=https://...

Fee Structure

  • Platform Fee: 1% of transaction amount
  • Minimum Fee: $0.05 USDC

Security

  • Non-custodial escrow (2-of-2 release)
  • EIP-712 typed message signing
  • EAS (Ethereum Attestation Service) for delivery proofs
  • Replay protection with nonce management

Links

License

Apache-2.0