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

@alvarochaval/mdp-sdk

v0.1.0

Published

Mesa de Pagos SDK — módulo auth para Persona y Borderless (BYOK)

Readme

@mdp/sdk

SDK de Mesa de Pagos — módulo auth (v0.1.0).

Conecta con los proveedores externos Persona y Borderless usando credenciales BYOK en .env. El token de Borderless se cachea en memoria; no hace falta pasarlo en cada petición.

Instalación (local, monorepo)

cd api-mdp/packages/mdp-sdk
npm install
npm run build

Desde otro proyecto en el monorepo:

{
  "dependencies": {
    "@mdp/sdk": "file:../api-mdp/packages/mdp-sdk"
  }
}

Variables de entorno

| Variable | Requerida | Descripción | |----------|-----------|-------------| | PERSONA_API_KEY | Sí | API key de Persona | | PERSONA_API_URL | No | Default: https://api.withpersona.com/api/v1/ | | BORDERLESS_API_URL | Sí | Base URL de Borderless | | BORDERLESS_CLIENT_ID | Sí | Client ID M2M | | BORDERLESS_CLIENT_SECRET | Sí | Client secret M2M |

Uso

import { createMdpSdk } from '@mdp/sdk'

const sdk = createMdpSdk()

// Headers Persona (API key estática)
const personaHeaders = sdk.auth.getPersonaHeaders()

// Token Borderless M2M (cache + refresh automático)
const borderlessToken = await sdk.auth.getBorderlessAccessToken()

// HTTP autenticado a proveedores
const inquiry = await sdk.auth.http.get('persona', '/inquiries/inq_xxx')
const identity = await sdk.auth.http.post('borderless', '/v1/identities', payload)

Overrides (tests)

const sdk = createMdpSdk({
  persona: { apiKey: 'test', baseUrl: 'https://api.withpersona.com/api/v1' },
  borderless: {
    apiUrl: 'https://sandbox-api.borderless.xyz',
    clientId: 'id',
    clientSecret: 'secret'
  }
})

Scripts

  • npm run build — compila a dist/
  • npm test — tests unitarios

Publicación npm (cuando corresponda)

npm publish --access public

Requiere org @mdp en npm y versión bump en package.json.

Alcance v0.1

Incluye solo auth hacia Persona y Borderless. Onboarding, webhooks y otros módulos vendrán en versiones posteriores.