[bitcoin-dev] QR code alternatives (was: Proposal: extend bip70 with OpenAlias)

Thomas Voegtlin thomasv at electrum.org
Tue Jul 21 14:58:39 UTC 2015



Le 20/07/2015 16:40, Mike Hearn a écrit :
> 
> If we accept a single payment address i.e. no clever tricks around merge
> avoidance, such a QR code could look like this:
> 
> bitcoin:1aBcD1234....?x=serialized_payment_request
> 
> However this requires text mode and wastes bytes at the front for the URI
> type.
> 

It is possible to be both backward-compatible and to avoid wasting space
in URIs, if we simply assume that the payment request is a single
standard output + amount (that scenario will probably cover 99% of the
cases, and the few other cases may not need QR codes). We generate a
serialized bip70 PR from the parameters found in the URI, sign that
string, and add the signature to the URI.

Example:

bitcoin:1H14AiSc4PqkK9VTmeutZU3edSy3HS5HL8?amount=1&message=here%20is%20a%20test&time=1437489571&exp=604800&name=ecdsa.net&sig=3Quot6m2RsR43NgV8VQQx3Ngf5u8wZY18mu523x3ViLrA3WLwSoQum2Znw3gRsTgfADpHuEiyyjnpxCLKWrkR4RQM

'time' is the timestamp of the request
'exp' is the duration of validity, 1 week here
(it saves a few bits to express it that way)

'name' is the domain name of the signer
'sig' is the signature

The QR code derived from that URI is perfectly scannable with a phone.




More information about the bitcoin-dev mailing list