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

@bufinance/ramps

v0.2.0

Published

Composable on/off-ramp + FX provider abstraction for BU.FI. Ships the canonical four-interface RampProvider contract (Customer, DestinationPreparer, Payout, Webhook) + ProviderRegistry dispatcher. v0.2.0 ships real Alfred Pay (LATAM send + on/off ramp) an

Readme

@bufinance/ramps

Composable on/off-ramp + FX provider abstraction for the BU.FI ecosystem.

Ships a canonical four-interface contract (RampCustomerProvider, RampDestinationPreparer, RampPayoutProvider, RampWebhookProvider) and a ProviderRegistry dispatcher that picks providers by corridor + country + fiat. Designed to be consumed from both Node.js services (desk-v1's apps/shiva) and Cloudflare Workers (fx-pasillo).

What's in v0.2.0

| Subpath | Status | Notes | | ----------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | @bufinance/ramps/core | ✅ | Interfaces, registry, in-memory stores, errors, intent-hash | | @bufinance/ramps/alfred | ✅ | Real provider: LATAM send-money (USD↔MXN/BRL/COP/ARS), on/off-ramp (MX/BR/CO/AR/US/HK), KYC/KYB scaffolds. Web Crypto webhook verification. Dependency-injection factory — host provides AlfredApiClient, AlfredKycClient, AlfredKybClient, AlfredQuoteClient, AlfredSendMoneyClient, CircleTransferClient. | | @bufinance/ramps/bridge | ✅ | Real provider: USD/EUR/GBP/MXN/BRL off-ramp (ACH, Wire, SEPA, Faster Payments, SPEI, PIX). Web Crypto HMAC-SHA256 webhook verification. DI factory — host provides BridgeApiClient, BridgeExternalAccountClient, BridgeCustomerClient. On-ramp arrives in v0.3.0. | | @bufinance/ramps/stablefx | ⏳ stub | Mock + real-mode lands once Circle StableFX integration extracts from fx-pasillo. | | @bufinance/ramps/kyc | ⏳ stub | PersonaKycBridge skeleton. | | @bufinance/ramps/compliance | ⏳ stub | OFAC / sanctions / travel-rule helpers — out of v1 scope. |

Install

npm install @bufinance/ramps
# or
bun add @bufinance/ramps

Quick start — register the Alfred provider

import { ProviderRegistry } from '@bufinance/ramps/core';
import { createAlfredProvider } from '@bufinance/ramps/alfred';

const registry = new ProviderRegistry({
  priority: ['stablefx', 'alfred', 'bridge'],
});

registry.register(
  createAlfredProvider({
    api, // your AlfredApiClient implementation
    kyc, // your AlfredKycClient implementation
    kyb, // your AlfredKybClient implementation
    quote, // your AlfredQuoteClient implementation
    sendMoney, // your AlfredSendMoneyClient implementation
    circle, // your CircleTransferClient implementation
    promoterId: process.env.ALFRED_PROMOTER_ID!,
    webhookSecret: process.env.ALFRED_WEBHOOK_SECRET,
  })
);

const provider = registry.getPayoutProvider('alfred');
const quote = await provider.getQuote({
  kind: 'send',
  source: { currency: 'USD', country: 'US' },
  destination: { currency: 'MXN', country: 'MX' },
  amount: 100_000_00n, // bigint, minor units
});

Design

  • Money is always BigInt minor units. Decimal strings are converted at the provider boundary. See currencyMinorMultiplier / minorToDecimalString / decimalStringToMinor in alfred/.
  • Errors are typed. Every provider boundary throws a RampError subclass — RampValidationError, RampRetryableError, RampPermanentError, RampUnsupportedError, RampQuoteExpiredError, RampComplianceError, RampKycIntentMismatchError, RampDuplicateIntentError, RampFailoverError, RampInfraError. Use isRampError() to guard.
  • Webhooks are content-addressed. RampWebhookProvider.verifyAndParseWebhook returns a canonical RampWebhookEvent or null. Never throw on bad signatures — fail closed and 200 the request.
  • Dependency injection at boot. Adapters never import service classes directly. Hosts (apps/shiva for desk-v1, fx-pasillo for the Worker side) build clients and pass them as structural dep bags. Keeps the module graph one-way: apps depend on packages, never the reverse.

Versioning

0.x — pre-1.0, every minor bump is potentially breaking. Pin to "@bufinance/ramps": "0.1.x" until 1.0.

Tag prefix is ramps-v (set in .npmrc) so future npm version bumps inside this package don't collide with desk-v1's app-level tags.

Workspace consumers

desk-v1 consumes this package via workspace:*. The dist/ build runs on prepublishOnly and is the published artifact, but local dev still points at compiled output — run bun run build in packages/ramps/ after edits, or rely on turbo run build --filter=@bufinance/ramps from the repo root.

License

MIT — see LICENSE.