mirror of
https://github.com/bitbaum/paykit.git
synced 2026-12-05 03:27:32 +01:00
b720ef43646f75f66ecc124399562f2f2d9732dd
Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
chore: add the fleet package template files this repo is missing (dependabot.yml, auto-merge.yml, release-notify.yml, release.yml, AGENTS.md, CLAUDE.md) (#2)
paykit
Let a website get paid. The website does not hold the money.
pnpm add @bitbaum/paykit
Part of bitbaum. The same behavior ships in OrangeCat today.
Why this exists
A shop, a clinic, or a fundraiser should be able to take a payment without building a wallet, a balance, or a support desk for missing coins. You store where the money should land. The payer uses their own app.
Use
import { classifyPaste, shownRail } from '@bitbaum/paykit';
classifyPaste('bitcoin:bc1q…'); // 'onchain'
classifyPaste('you@coinos.io'); // 'lightning'
classifyPaste('nostr+walletconnect://…'); // 'nwc'
// A code to show. Twint, Monero, anything else. Their app pays it.
shownRail('Twint', qrPayload);
classifyPaste reads the shape of a Bitcoin receive string after stripping the bitcoin: wrapper a wallet copies. It does not check the checksum. A host that moves money still validates before it saves.
A settled rail (Lightning address, Bitcoin address, xpub, wallet-connect) is one the host can ask for a payment. A shown rail is only displayed. paykit does not store keys and does not keep a balance.
Licence
MIT
Languages
TypeScript
76.2%
JavaScript
23.8%