I followed the steps above, but ended up doing some changes along the way that I’d like to share, here, so maybe others (mostly Linux users) that are experiencing the same difficulties that I was experiencing may benefit from it.
-
Instead of downloading the cardano wallet tarball (i.e. compressed package) from here, which was released back in 2020-07-28, I downloaded this one, released for 64-bit Linux on 2021-09-17. The corresponding 64-bit Windows ZIP package is this and the corresponding 64-bit macOS tarball is this.
On 64-bit Linux, the command below (which requires both wget
and tar
in order to work) makes the shell (i.e. Bash) automatically access your personal (i.e. home) folder/directory, then the shell downloads that 64-bit Linux tarball released on 2021-09-17, extracts its contents to a folder, deletes the tarball, renames such folder to adatools and then accesses such adatools folder/directory:
cd ; wget https://hydra.iohk.io/build/7662582/download/1/cardano-wallet-v2021-09-09-linux64.tar.gz -O ./adatools.tgz ; tar -xvf ./adatools.tgz ; rm ./adatools.tgz ; mv ./cardano-wallet-v2021-09-09-linux64 ./adatools; cd ./adatools
If the command above worked, your shell is now connected to the adatools folder in your personal (a.k.a. home) directory.
-
After starting Daedalus, I selected my wallet, then clicked on More, then on Settings, then at Wallet public key I clicked on (the Reveal button), provided the wallet’s password and then clicked on the Show QR code button. After doing it, I not only copied the public key but also the code of the Derivation path, because it’s also required to generate the “Yoroi QR code key” correctly. E.g. if the derivation path is shown as M/2147'/2136'/0'
, then its corresponding code is 2147,2136,0
.
-
Suppose that my wallet’s public key is indeed acct_xvk1d2j42tjmp5v3n744jxzznvlt4ef4n65cd33tzc5y7nk4h8tyk7hrtvz8nz5mq3razm6rrltkqmrnkyy6vfqq2yj05evjau7w40q5ulsnuruz5
. Instead of running:
echo acct_xvk1d2j42tjmp5v3n744jxzznvlt4ef4n65cd33tzc5y7nk4h8tyk7hrtvz8nz5mq3razm6rrltkqmrnkyy6vfqq2yj05evjau7w40q5ulsnuruz5 | ./bech32
…I ran the command in this (equivalent) format (it produces/outputs the same result):
./bech32 <<< acct_xvk1d2j42tjmp5v3n744jxzznvlt4ef4n65cd33tzc5y7nk4h8tyk7hrtvz8nz5mq3razm6rrltkqmrnkyy6vfqq2yj05evjau7w40q5ulsnuruz5
-
Because the output of the previous bech32
command was 6aa5552e5b0d1919fab5918429b3ebae5359ea986c62b16284f4ed5b9d64b7ae35b04798a9b0447d16f431fd7606c73b109a624005124fa6592ef3ceabc14e7e
and the code of the derivation path in this example is 2147,2136,0
, the final string to be used when generating the corresponding QR code for the Yoroi wallet app is this:
{\"publicKeyHex\":\"6aa5552e5b0d1919fab5918429b3ebae5359ea986c62b16284f4ed5b9d64b7ae35b04798a9b0447d16f431fd7606c73b109a624005124fa6592ef3ceabc14e7e\",\"path\":[2147,2136,0]}
It’s extremely important to add the character \
before each instance (occurrence) of the "
character, because the \
character “tells” (instructs) the shell (i.e. Bash) not to parse (i.e. “interpret”) any of those "
characters as “comment” characters (notice how "
and " look different: they also cause the shell to behave differently with each one of them). Hence, using \
is very important to guarantee that the Yoroi QR code will be generated correctly, otherwise the Yoroi app will reply that the QR code that it’s read is incorrect.
For easy of use, you may store the above string in a temporary environment variable such as e.g. keypath
:
keypath={\"publicKeyHex\":\"6aa5552e5b0d1919fab5918429b3ebae5359ea986c62b16284f4ed5b9d64b7ae35b04798a9b0447d16f431fd7606c73b109a624005124fa6592ef3ceabc14e7e\",\"path\":[2147,2136,0]}
If the command above worked, then the output of the echo $keypath
command must be that previous string without the \
characters, i.e.:
{"publicKeyHex":"6aa5552e5b0d1919fab5918429b3ebae5359ea986c62b16284f4ed5b9d64b7ae35b04798a9b0447d16f431fd7606c73b109a624005124fa6592ef3ceabc14e7e","path":[2147,2136,0]}
-
After the above string was created and stored in that temporary variable, I installed a Linux utility called qrencode
. On Debian and Debian-based Linux distros (i.e. Ubuntu, Linux Mint etc.), you install it by issuing the command sudo apt install qrencode
. On Arch and Arch-based distros (e.g. Manjaro), a command such as sudo pamac -S qrencode
installs it. Other Linux distros use other package managers, so maybe sudo yum install qrencode
, sudo dnf install qrencode
etc. may be necessary.
-
Once qrencode
was installed, all I had to do was to run the command below, which uses the keypath
variable (which contains the string stored in it) in order to create the Yoroi QR code into the image file qrcode.png
:
qrencode $keypath -o qrcode.png
…and then the qrcode.png
image file was created into the adatools directory.
-
Moreover, a command such as:
firefox qrcode.png
…or:
xdg-open qrcode.png
…or:
x-www-browser qrcode.png
…or anything for that matter shows the QR Code on the screen.
-
Once the QR Code is visible on the screen, all you have to do is open the Yoroi app for Android (or iOS), tap ADD WALLET (SHELLEY-ERA), tap RESTORE WALLET, then tap READ-ONLY WALLET and then use the Yoroi app to read the QR Code that is visible on the screen.
-
Finally, edit the wallet’s name and then tap the SAVE button. Done.