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

@ar-agents/treasury

v0.3.0

Published

Treasury + fiscal rail for an Argentine Sociedad Automatizada: pure-logic core (balances, tax buffer, just-in-time crypto->ARS conversion policy, Ganancias cedular accounting) plus an OffRampAdapter to a registered PSAV (Manteca / Ripio B2B) for USDC->ARS

Readme

@ar-agents/treasury

The treasury + fiscal rail for an Argentine Sociedad Automatizada: the moat half of the crypto/fiat bridge. An autonomous society earns in crypto (USDC on Base) but must pay AFIP/ARCA in pesos. This package closes that loop.

What it does

  • Balances + tax buffer — track USDC + ARS; size the peso buffer for upcoming AFIP obligations (requiredArsBuffer, nextObligation).
  • Just-in-time conversion — convert only enough USDC to ARS to cover the buffer, net of spread, never over-converting (planConversion, fundTaxBuffer).
  • Ganancias cedular accounting — tax on the gain of each disposal: 5% (ARS) or 15% (foreign); crypto is IVA-exempt; holding + own-wallet transfers are not taxable (cedularTax).
  • Monotributo — the verified 2026 category table (A–K, eff. 2026-02-01) + monotributoCuota / categoryForAnnualIncome.
  • Honest settlement modelsettlementPlan describes how an obligation actually gets paid. In jun-2026 there is no fully-autonomous official channel, so canAutoExecute is always false: débito automático is passive (one-time human enrolment, then it runs and the agent only keeps the CVU funded); VEP / Mercado Pago need a human each time. The rail funds + instructs; it does not pay.
  • MantecaOffRampAdapter — the real USDC→ARS payout to a CVU, done by a registered PSAV (Manteca). We integrate one; we do not become one (CNV RG 1058/2025). An InMemoryOffRampAdapter ships for tests/dev.
  • AI SDK tools@ar-agents/treasury/tools exports treasuryTools(): 8 Vercel AI SDK 6 tools (5 pure + 3 PSAV-backed) that drop into an Experimental_Agent.

Entry points

  • @ar-agents/treasury — pure core + MantecaOffRampAdapter + AFIP fiscal logic. No ai/zod deps.
  • @ar-agents/treasury/tools — the AI SDK tool wrappers (needs the ai + zod peers).

Design

Pure, deterministic functions (clock + fx injected, never read) so the brain is fully unit-tested. Irreversible moves (convert, payments) MUST be gated by the agent's requireConfirmation (RFC-001) and written to the signed audit log by the caller. We orchestrate on top of a registered PSAV; we never custody the conversion ourselves.

Going live with Manteca

MantecaOffRampAdapter is a thin client over Manteca's documented v2 API. The request contract is pinned exactly (paths, md-api-key header, the ramp-off body) and unit-tested against mocked HTTP. Manteca onboarding is sales-gated (no self-serve keys), so it is not yet integration-tested live. To go to production, confirm three config items against a sandbox account, then run for real:

  1. baseUrl — defaults to https://api.manteca.dev (the public docs host is developers.manteca.dev; the live API host ships with your credentials).
  2. ticker — defaults to USDC_ARS.
  3. The price-response JSON shape and the synthetic status enum — both are parsed defensively + normalized here; verify against a sandbox call.

Ripio B2B (a registered PSAV with a documented sandbox) is the planned second adapter behind the same OffRampAdapter interface.

Status

0.2.0 — core + Manteca off-ramp adapter + AFIP fiscal layer (monotributo + settlement) + 8 AI SDK tools, 52 tests. Wired into the generated society (select the treasury pieza). Live PSAV integration is pending a Manteca business account; the Ripio adapter is the next increment. Full design + sourcing: ../../TREASURY-FISCAL-RAIL.md.