-
Notifications
You must be signed in to change notification settings - Fork 65
feat: Add NUT-XX Payment Request Bech32m Encoding specification #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
72d7088 to
cb418b1
Compare
|
cdk updated to use it here cashubtc/cdk@5388c28 |
Add comprehensive specification for encoding Cashu payment requests using Bech32m format with TLV (Tag-Length-Value) serialization as an alternative to the existing CBOR+base64 format defined in NUT-18. - New specification file: 26.md defining NUT-26 - Updated README.md to include NUT-26 in the specification table The new Bech32m encoding format addresses several limitations of the legacy creqA (CBOR+base64) format: 1. **QR Code Efficiency**: Bech32m uppercase encoding is alphanumeric-mode compatible, resulting in 30-60% smaller QR codes 2. **Better Error Detection**: Built-in Bech32m checksums provide data integrity validation 3. **Improved Human Readability**: Clear `creqb1` prefix identifies the format 4. **Standards Alignment**: Consistent with Bitcoin addresses (BIP-173/350) and Lightning invoices - TLV-based serialization for flexible extensibility - Support for all NUT-18 payment request fields (id, amount, unit, mints, description, transports, NUT-10 conditions) - Compact encoding for common values (e.g., 'sat' as 0x00) - Nested TLV structures for complex types (transports, spending conditions) - Forward compatibility through unknown tag handling - Backward compatibility with legacy creqA format detection - Case-insensitive decoding with uppercase recommended for QR codes The specification is marked as optional and depends on NUT-18.
Co-authored-by: lollerfirst <43107113+lollerfirst@users.noreply.github.com>
Co-authored-by: lollerfirst <43107113+lollerfirst@users.noreply.github.com>
Co-authored-by: lollerfirst <43107113+lollerfirst@users.noreply.github.com>
23ece71 to
6651459
Compare
|
Fully implemented in cashubtc/cashu-ts#436 |
|
We are missing a signal for P2BK as @robwoodgate mentioned here: cashubtc/cashu-ts#436 (review) |
Wondering if some kind of general "tag" is possible that allows extension of the TLV schema without having to redefine it each time? I think this is what TSK was talking about on the p2bk nut pr? |
Add comprehensive specification for encoding Cashu payment requests using Bech32m format with TLV (Tag-Length-Value) serialization as an alternative to the existing CBOR+base64 format defined in NUT-18.
The new Bech32m encoding format addresses several limitations of the legacy creqA (CBOR+base64) format:
creqb1prefix identifies the formatThe specification is marked as optional and depends on NUT-18.