rustyrussell / bolt12address Goto Github PK
View Code? Open in Web Editor NEWBOLT12 Lightning Address Format
BOLT12 Lightning Address Format
The README mentions:
But you don't need to reach out to blockstream.com: anyone (including your wallet vendor, or the node claiming to be blockstream.com) can collect all the addressproofs and certificates for you, as they contain a signature using the existing web certificate infrastructure. Bundling these protects your privacy more than having to request to a vendor's website before making a payment.
Websites that use a free service like LetsEncrypt tend to have short expiration, which means in the above example either:
I don't know if (2) is worth the extra privacy gain, because it adds complexity to implementations.
It would be useful to provide instructions for common setups, e.g. a certificate generated by certbot that's renewed every X months. I believe you can give it script to call after renewal, that would update the record.
I created a thing using the Python incantation in #1 (master branch commit c4c55b7)
https://sprovoost.nl/.well-known/bolt12/bitcoin/[email protected]
But the verification fails:
./bolt12address.py check --raw-stdin < /var/www/well-known/bolt12/bitcoin/[email protected]
Traceback (most recent call last):
File "/home/sjimmie/src/bolt12address/python/./bolt12address.py", line 339, in <module>
args.func(args)
File "/home/sjimmie/src/bolt12address/python/./bolt12address.py", line 189, in check
ap = AddressProof(sys.stdin.buffer.read())
File "/home/sjimmie/src/bolt12address/python/./bolt12address.py", line 21, in __init__
super().__init__("lnap", generated.tlv_addressproof, proof)
File "/home/sjimmie/.pyenv/versions/3.9.6/lib/python3.9/site-packages/bolt12/bolt12.py", line 293, in __init__
self.values, self.unknowns = helper_fromwire_tlv(tlv_table, bytestr)
File "/home/sjimmie/.pyenv/versions/3.9.6/lib/python3.9/site-packages/bolt12/bolt12.py", line 56, in helper_fromwire_tlv
raise ValueError('Invalid: Unknown even field number {}'.format(tlv_type))
ValueError: Invalid: Unknown even field number 108
lightning-cli decode
thinks the whole string Is broken: string: Bad bech32 string: invalid token '\"lnap1...5kj6zs\"'"
Maybe you meant a different URL in the README?
Using the following (with NODE_ID replaced with my node id):
./bolt12address.py create [email protected] /.../privkey.pem /.../cert.pem /.../chain.pem NODE_ID --description "Open source development donation" --chain bitcoin
The following cryptic error is thrown:
Traceback (most recent call last):
File "/home/sjimmie/src/bolt12address/python/./bolt12address.py", line 262, in <module>
args.func(args)
File "/home/sjimmie/src/bolt12address/python/./bolt12address.py", line 168, in create
ap = AddressProof.create(args.vendor,
File "/home/sjimmie/src/bolt12address/python/./bolt12address.py", line 31, in create
self = cls(None)
File "/home/sjimmie/src/bolt12address/python/./bolt12address.py", line 19, in __init__
super().__init__("lnap", generated.tlv_addressproof, proof)
File "/home/sjimmie/.pyenv/versions/3.9.6/lib/python3.9/site-packages/bolt12/bolt12.py", line 289, in __init__
self.values, self.unknowns = helper_fromwire_tlv(tlv_table, bytestr)
File "/home/sjimmie/.pyenv/versions/3.9.6/lib/python3.9/site-packages/bolt12/bolt12.py", line 37, in helper_fromwire_tlv
while len(buffer) != 0:
TypeError: object of type 'NoneType' has no len()
I guess it's missing something, but it's not clear what.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.