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

S
Description
No description provided
Readme MIT
257 KiB
0 Stars 2 Watchers 0 Forks
Languages
TypeScript 76.2%
JavaScript 23.8%