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

prueba-sdk

v1.0.0

Published

Servidor HTTP local para probar [`@mdpsdk/mdp-sdk`](https://www.npmjs.com/package/@mdpsdk/mdp-sdk) desde Postman.

Downloads

227

Readme

prueba-sdk

Servidor HTTP local para probar @mdpsdk/mdp-sdk desde Postman.

Solo desarrollo: no hay autenticación en las rutas. No exponer a internet.

Arranque

cp .env.example .env   # credenciales de verificación básica y cumplimiento en el servidor
npm install
npm run dev

Deja la terminal abierta: verás prueba-sdk escuchando en http://localhost:3000 y el proceso no debe volver al prompt hasta Ctrl+C. Si vuelve al instante, prueba npm run start:prod tras npm run build, u otro puerto (PORT=3001 en .env).

Base URL por defecto: http://localhost:3000 (variable PORT opcional).

Documentación interactiva del contrato integrador:

cd ../docs
npm install
npm run docs:onboarding

Abrir http://localhost:4400/scalar/ (OpenAPI 0.4.1).

Debug submit-eu-us

En .env activa:

PRUEBA_SDK_DEBUG=true
MDP_SDK_DEBUG=true

Reinicia npm run dev. En la terminal del servidor verás el paso y el body enviado al proveedor de cumplimiento. En Postman, el JSON de error puede incluir details.responseData.

Smoke test auth sin HTTP:

npm run cli

Rutas — Health y auth debug

| Método | Ruta | Descripción | |--------|------|-------------| | GET | /health | Estado del servidor |

Requests de comprobación de credenciales están en la colección Postman (carpeta Auth) — no forman parte del contrato OpenAPI integrador.

Rutas — Onboarding

Contrato alineado con docs/openapi/mdp-onboarding-sdk.yaml (SDK 0.4.1).

| Método | Ruta | Body | Query | |--------|------|------|-------| | POST | /onboarding/start | type, externalCustomerId, email o profile.email, profile? | — | | POST | /onboarding/verification-url | externalCustomerId | — | | GET | /onboarding/:externalCustomerId/status | — | type obligatorio (personal | business) | | POST | /onboarding/:externalCustomerId/submit-eu-us | target (+ ownerId / ownerInquiryId KYB) | — | | GET | /onboarding/:externalCustomerId/terms | — | type?, ownerId? | | POST | /onboarding/:externalCustomerId/compliance/activate | walletAddress, asset?, accountName? | — | | POST | /onboarding/compliance/activate | externalCustomerId, walletAddress, … | — (legacy) | | GET | /onboarding/:externalCustomerId/owners | — | mapas KYB en query según colección Postman | | POST | /onboarding/:externalCustomerId/owners/:ownerId/verification-url | ownerInquiryId | — | | GET | /onboarding/:externalCustomerId/owners/:ownerId | — | ownerInquiryId | | POST | /onboarding/owners/occupation | email, name, occupationCode | — | | POST | /onboarding/owners/sync-status | inquiryId | debug |

Flujo mínimo (Postman)

  1. POST /onboarding/start — guardar externalCustomerId; enviar verificationUrl al usuario.
  2. Usuario completa verificación básica.
  3. GET /onboarding/{externalCustomerId}/status?type=personal
  4. POST /onboarding/{externalCustomerId}/submit-eu-us con { "target": "person" } cuando basicVerification.status = approved.
  5. Enviar termsOfServiceUrl al usuario (respuesta submit o GET .../terms).
  6. Usuario acepta términos (fuera del SDK).
  7. POST /onboarding/{externalCustomerId}/compliance/activate con { "walletAddress": "0x..." }.
  8. GET .../status hasta euUsVerification.status = compliance_approved o account_ready.

accountCreated: false en activate no es error: la cuenta ya existía y solo se reactivó cumplimiento (reintentos idempotentes).

KYB: tras aprobar empresa, GET /onboarding/{id}/owners y seguir rutas de socios (mapas ownerInquiryIds / ownerIdentityIds en tu BD).

Si falta email en verificación básica, envía personalProfile.email en submit — el SDK lo sincroniza antes de EU/US.

Colección Postman

Importar postman/mdp-sdk-prueba.postman_collection.json.

Variables de colección: baseUrl, externalCustomerId, ownerId (opcional legacy: inquiryId, identityId).

Ejemplo — start KYB Chile

POST {{baseUrl}}/onboarding/start
Content-Type: application/json

{
  "type": "business",
  "externalCustomerId": "emp_postman_001",
  "profile": {
    "email": "[email protected]",
    "legalName": "ACME SA",
    "taxId": "123",
    "address": {
      "street1": "Av. Test 1",
      "city": "Santiago",
      "state": "RM",
      "postalCode": "8320000",
      "country": "CL"
    }
  }
}