算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
bitcoin-uri-schemes【设计与创意】Bitcoin payment URI scheme (BIP21), Lightning URIs, BIP70/72 (mostly deprecated), PayJoin URI extension (BIP78), unified URIs combining on-chain + Lightning. USE WHEN: parsing/generating bitcoin: URIs, building QR codes, designing wallet payment requests.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
bitcoin:<address>?<params>
Parameters (all optional):
amount= — in BTC (yes, not sats).label= — recipient name.message= — note for the payer.r= — BIP70 payment request URL (deprecated).Examples:
bitcoin:bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
bitcoin:bc1qxy2...?amount=0.001&label=Coffee%20Shop
bitcoin:bc1qxy2...?amount=0.0005&message=Order%20%23123
Unknown params with req- prefix MUST cause the parser to reject the
URI (forward-compat hard requirement). Other unknown params can be
ignored.
r=https://example.com/pay/123 pointed to a server-served payment
request with X.509 cert. Discontinued in modern wallets due to:
Bitcoin Core removed BIP70 in 2021.
Extends BIP21:
bitcoin:bc1q...?amount=0.001&pj=https://payjoin.example.com/endpoint
pj= is the PayJoin endpoint. Wallet sees this and offers a PayJoin
flow: instead of sending a normal tx, the wallet posts the unsigned
tx to the endpoint, which adds receiver inputs/outputs and returns
a modified PSBT to sign.
PayJoin v2 (async):
&pjos=0&pjes=... # additional params for v2 relay handshake
Lightning has its own URI:
lightning:lnbc100u1p... (BOLT11 invoice)
lightning:lnbc1... (BOLT12 offer; same prefix, different format)
lightning:lnurl... (LNURL-bech32)
LNURL itself uses bech32 encoding for the underlying URL:
LNURL1DP68GURN8GHJ7MR... → https://example.com/lnurl/pay/123
Wallets recognize either prefix.
Modern wallets support combined URIs:
bitcoin:bc1q...?amount=0.001&lightning=lnbc100u1p...
The wallet picks based on availability:
Some wallets default to Lightning if both work.
Email-style address:
user@domain.com
Resolution:
GET https://domain.com/.well-known/lnurlp/user
→ returns LNURL-pay metadata
→ wallet asks for amount → POST /callback → receives invoice
Render in QR as lightning:lnurl1... (the LNURL-pay encoded URL).
Bitcoin URIs in QR codes use UPPER CASE for higher density (alphanumeric mode) when possible. Bech32 is already uppercase-friendly. URL params preserve case (URL-encoded).
Example: BITCOIN:BC1QXY2...?AMOUNT=0.001 is denser than mixed-case.
But mixed-case URIs are still valid; both should be accepted.
bitcoinjs-lib: bitcoin-uri package.python-bitcoinlib: bitcoin.bip21.bdk::Address::parse_url().amount= as sats (it's BTC, decimal). Off-by-1e8 errors
are common.message= on receipt without sanitization → XSS in
wallet UI.req- params → security hole if a future
spec adds a req-must-not-pay-to-this-address param.lightning: prefix on LN URIs → wallet doesn't recognize.