2

I'd like to transfer files between cold and hot wallets via QR codes. Python can't seem to decode/encode the bytes in the unsigned tx file. Can someone confirm they are mostly binary, and some sort of encryption scheme? Is there a way to decrypt then before rendering in QR?

I'm able to use the bitstring library to make the files into ones and zeroes, and make QR of that, but I don't know how to go in reverse to reconstitute the file on the other side. Is there a method for covering from 10001101... To the file again?

1 Answers1

2

Credit to @JollyMort

the python base64 module can encode/decode the unsigned_tx file into ascii for transmission via QR code:

import base64
...
...
with open(args.infile, "rb") as source:
    with open(bitPath, 'wb') as dest:
        dest.write(base64.b64encode(source.read()))
<transmit sliced up bitpath file via qr codes as is now ASCII>

<on receive side, concatenate ascii qr codes to one file>
with open(asciiPath, "rb") as source:
    with open(stitchPath, 'wb') as dest:
        dest.write(base64.b64decode(source.read()))

file stitchPath should match original unsiged_monero_tx file