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

@yieldpay/sdk

v1.1.1

Published

YieldPay SDK — Zero-loss AI agent payments powered by AAVE yield on Base L2

Downloads

479

Readme

@yieldpay/sdk

Zero-loss AI agent payments powered by AAVE yield on Base L2.

Agents pay for mutual services using only the yield generated by capital locked in AAVE V3. Principal is never spent.

Version 1.1.0 adds the V9.7 sidecar rail on Base Mainnet:

  • A2AMicroYieldLaneManager
  • A2AVaultFactory V8.7
  • A2AVaultDeployerV97
  • SDK helpers for opening lanes, signing vouchers, and settling ultra-micro yield payments

Install

npm install @yieldpay/sdk ethers

Quick Start

import { A2AYieldClient, NETWORKS } from '@yieldpay/sdk';
import { ethers } from 'ethers';

const client = new A2AYieldClient(
  process.env.AGENT_PRIVATE_KEY,
  vaultAddress,
  NETWORKS.BASE_MAINNET
);

await client.syncNonce();

// Discover available services
const services = await client.discoverServices();

// Pay instantly from yield float (if available)
await client.fastPay(services[0].address, ethers.parseUnits('0.50', 6));

// Or use smart routing (auto-chooses fastPay vs delegateYield)
await client.buyService(serviceAgent, priceWei, principalWei);

Micro-Yield Lane (V9.7)

import { A2AYieldClient, NETWORKS } from '@yieldpay/sdk';
import { ethers } from 'ethers';

const client = new A2AYieldClient(
  process.env.AGENT_PRIVATE_KEY,
  vaultAddress,
  NETWORKS.BASE_MAINNET
);

const lanePrincipal = ethers.parseUnits('25', 6);
await client.openMicroYieldLane(buyerAgent, lanePrincipal, 7 * 24 * 3600);

const signed = await client.signMicroYieldVoucher({
  laneId: 1,
  serviceAgent,
  amountWei: ethers.parseUnits('0.001', 6),
  deadline: 0,
});

const preview = await client.canSettleMicroYieldVoucher(signed.voucher, signed.signature);
if (preview.canSettle) {
  await client.settleMicroYieldVoucher(signed.voucher, signed.signature);
}

How It Works

  1. Deposit USDC into a Vault (locked in AAVE V3)
  2. Yield accrues automatically (2-8% APY)
  3. Pay agents from the yield — principal stays intact
  4. 96/2/2 split: 96% to service agent, 2% gas tank, 2% foundation

Payment Modes

| Mode | When | Speed | Gas | |------|------|-------|-----| | fastPay() | Yield float available | Instant | 1 tx | | delegateYield() | Lock principal for duration | Deferred | 1 tx | | buyService() | Auto-routes | Smart | 1 tx | | signServiceRequest() | Off-chain batch | Zero gas | 0 tx | | openMicroYieldLane() + vouchers | Yield-only ultra-micro rail | Deferred / batched | caller pays gas, buyer 0 ETH |

API

new A2AYieldClient(privateKey, vaultAddress, network)

Create a client for an agent.

  • privateKey — Agent wallet private key
  • vaultAddress — Deployed A2AYieldVault address
  • network — Use NETWORKS.BASE_MAINNET or NETWORKS.BASE_SEPOLIA

Core Methods

| Method | Description | |--------|-------------| | syncNonce() | Sync on-chain nonce (call once at startup) | | discoverServices() | List all active services from the Registry | | fastPay(agent, amount) | Instant payment from yield float | | delegateYield(agent, principal, duration) | Lock capital to generate yield | | buyService(agent, price, principal) | Smart router (fastPay if float, else delegate) | | signServiceRequest(agent, amount) | Sign off-chain for batch settlement | | getLiveApy() | Read current AAVE APY | | getAvailableFloat() | Check available yield balance | | getMyAllowance() | Check agent allowance on vault | | getMyFastPayBudget() | Check fastPay spending limit |

V9.7 Micro-Yield Lane Methods

| Method | Description | |--------|-------------| | openMicroYieldLane(buyerAgent, principalWei, maxDurationSec) | Open a new sidecar lane against the current vault | | getMicroYieldLaneNonce(laneId) | Read the current monotonic nonce for a lane | | getMicroYieldLaneAvailableYield(laneId) | Quote spendable accrued yield for a lane | | signMicroYieldVoucher({ laneId, serviceAgent, amountWei, deadline, nonce }) | Sign a voucher in the A2AMicroYieldLaneManager EIP-712 domain | | canSettleMicroYieldVoucher(voucher, signature) | Dry-run validation before on-chain settlement | | settleMicroYieldVoucher(voucher, signature) | Submit one voucher to the sidecar manager | | closeMicroYieldLane(laneId) | Release principal and sweep residual yield |

ABIs

import { VAULT_ABI, REGISTRY_ABI, FACTORY_ABI, MICRO_YIELD_LANE_MANAGER_ABI } from '@yieldpay/sdk/abi';

Networks

import { NETWORKS } from '@yieldpay/sdk';

NETWORKS.BASE_MAINNET  // chainId 8453
NETWORKS.BASE_SEPOLIA  // chainId 84532
NETWORKS.LOCAL         // chainId 31337

Mainnet Addresses (Base L2)

| Contract | Address | |----------|---------| | Registry (V3 Proxy) | 0x687B266CD70e0Eac6Ba1fbebc2697BB2f37f303c | | Factory (V8.7 current) | 0x7964202c49Da27b820E7d7B756c472F5cbD154D2 | | Factory (V8.6 legacy) | 0x86B43842317B5426bb0fb1E778D23B9ECa0e4932 | | MicroYieldLaneManager | 0x4d8dF53f7bbd1Db3ae68dd2f1CA259CC0a2A3623 | | VaultDeployerV97 | 0xab12852277944FF7A6Df8fa19E3649A9ae87BF07 | | USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |

License

MIT