
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
@kevinejohn/express-paymail
Advanced tools
This package intents to be a full implementation of BSV paymail specification easy to plug in any expressjs app.
This is a minimal example of an express app using this package:
import { buildRouter } from '@moneybutton/express-paymail'
import express from 'express'
const BASE_URL = 'example.tls' // The library needs to know
// the actual url where the app is going to work
const paymailRouter = buildRouter(BASE_URL, {
basePath: '/api/bsvalias',
getIdentityKey: async (name, domain) => {
// A paymail has the form `name@domain`. You can find the appropiate
// key using paymail data.
return '0335e5e7b86c12a4b5df082acb43ca7805382b58c805172bdef20ced310df845aa' // Some public key
},
getPaymentDestination: async (name, domain, body, helpers) => {
// This method have to return a valid bitcoin outputs. The third parameter is the
// body of the request and the fourth parameter is a js object containing handful
// methods to create outputs.
return helpers.p2pkhFromAddress('1FJJkRqyxTKAVX3dGFpddERt9XRbiSRZkL')
},
verifyPublicKeyOwner: async (name, domain, publicKeyToCheck) => {
// Returns true if the public key belongs to the user owning `name@domain`, false in
// any other case.
return '0335e5e7b86c12a4b5df082acb43ca7805382b58c805172bdef20ced310df845aa' === publicKeyToCheck
}
})
const app = express()
app.use(paymailRouter)
app.listen('3000', () => {
logger.info(`Listening on port ${API_REST_PORT}.`)
})
This generates an app with the following endpoints:
endpoint | description |
---|---|
/.well-known/bsvalias | Api descriptor. Generated automatically. |
/api/bsvalias/id/{alias}@{domain.tld} | Returns public key for a given paymail. |
/api/bsvalias/address/{alias}@{domain.tld} | Returns an output to send money to a given paymail owner. |
/verifypubkey/{alias}@{domain.tld}/{pubkey} | Checks if a given pubkey belongs to given paymail. |
FAQs
Paymail Express implementation
The npm package @kevinejohn/express-paymail receives a total of 3 weekly downloads. As such, @kevinejohn/express-paymail popularity was classified as not popular.
We found that @kevinejohn/express-paymail demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.