libbitcoin / libbitcoin-explorer

Bitcoin Command Line Tool
Other
597 stars 176 forks source link

Add qrcode support for BIP38, WIF and stealth #330

Open skaht opened 8 years ago

skaht commented 8 years ago

Title is self explanatory.

Should also support stealth addresses.

skaht commented 8 years ago

Note the qrcode should also support altcoins. This creates an ambiguity for -v used by altcoins.

evoskuil commented 8 years ago

Given that the encoding accepts a payment address, altcoin versioning is already incorporated. As ek, wif and stealth are not payment addresses they are not supported. The qrcode version remains necessary and independent of these altcoin versions, as they are attached to distinct commands.

thecodefactory commented 6 years ago

Given the various types of formats requested, would it make sense to extend bx to have two additional qr commands such as base16-qr-encode and base58-qr-encode that take arbitrary inputs that are properly encoded and offers all of the options otherwise available on qrcode?

evoskuil commented 6 years ago

If so I wouldn't use those names :) It sounds to me that there is a desire to create qr codes from arbitrary data. This implies a standard data format and a single command to convert that format to an image file. We already have various data formatting options. Those could presumably be applied to the outputs of relevant commands.

thecodefactory commented 6 years ago

Heh, command naming is not a strength of mine :-)

I can personally see the benefit of being able to generate qrcodes for BIP38 encrypted keys, and we already support payment addresses. WIF and stealth (as requested) could be useful too. Unless I'm missing something, I think we could agree on a common base58 format. The qrcode command is already used to convert payment addresses to an image file, so maybe we just need to loosen up the input from payment_address to base58? That does lose the advantage of making sure in the payment case, it's actually a correct payment address though, which might be a fair reason to keep it separate. Not sure.

evoskuil commented 6 years ago

Why base58 encoding?

thecodefactory commented 6 years ago

Why base58 encoding?

There are existing tools for sending to (and retrieving from) QR codes representing base58(check) payment addresses and also importing encrypted BIP38 keys (also in that encoding). Seemed like a decent way to go about it?

I can't really speak to WIF or stealth, as I'm not sure of how useful QR codes would be for those in general.

thecodefactory commented 6 years ago

Ok, so with the exception of stealth (just because I don't know much about them), I guess they're all base58(check) encoded, which seems ok ... ?

evoskuil commented 3 years ago

Stealth is now moot and dropped from v4 server indexing (the linear search would be a problem is it was in fact widely used), but keeping this open for the other formats.