<p>After a lot of trial and error, I figured it out myself.</p>
<h2>TLDR</h2>
<p>The &quot;key&quot; that results from the Yoroi export indeed needs to be encoded with bech32, using the prefix <code>acct_xvk</code>.</p>
<h2>Demonstration/Proof</h2>
<p>To test this, we need multiple things:</p>
<ol>
<li>The seed phrase of our test wallet (for this demonstration we store it in the file <code>phrase.prv</code>): <code>maximum vacuum toe conduct jazz tray romance crawl fossil wisdom disease crazy mountain bird discover</code></li>
<li>The &quot;key&quot; exported by Yoroi (for this demonstration we store it in the file <code>root_yoroi_raw.pub</code>): <code>95e74df114717de17ebfb24c05f9fd1c8019bb6f1de117eec10a43670a692866b837a4a5f51d62f3dc3d630d075c8e39e5294323ba146c386c48123aeef5438a</code></li>
<li>The <a href="https://github.com/input-output-hk/bech32" rel="nofollow noreferrer">bech32 tool</a>.</li>
<li>The <a href="https://github.com/input-output-hk/cardano-addresses" rel="nofollow noreferrer">cardano-addresses tool</a>.</li>
</ol>
<p>We can now test, whether we can get the same results using our seed phrase and the exported key:</p>
<pre><code>./cardano-address key from-recovery-phrase Shelley &lt; phrase.prv &gt; root.xsk
cat root.xsk | ./cardano-address key child 1852H/1815H/0H | ./cardano-address key public --with-chain-code &gt; root.xvk

./bech32 acct_xvk &lt; root_yoroi_raw.pub &gt; root_yoroi.pub

cat root.xvk
cat root_yoroi.pub
</code></pre>
<p>This gives the following result:</p>
<pre><code>acct_xvk1jhn5mug5w977zl4lkfxqt70arjqpnwm0rhs30mkppfpkwznf9pntsday5h636chnms7kxrg8tj8rneffgv3m59rv8pkysy36am658zsh2qnm6
acct_xvk1jhn5mug5w977zl4lkfxqt70arjqpnwm0rhs30mkppfpkwznf9pntsday5h636chnms7kxrg8tj8rneffgv3m59rv8pkysy36am658zsh2qnm6
</code></pre>
<p>This means, that the key exported by Yoroi, when being bech32 encoded with the prefix <code>acct_xvk</code> matches the extended public root key that can be derived from the seed phrase.</p>

CC BY-SA 4.0
2021-05-29T22:42:57.177Z
2021-05-29T22:42:57.177Z
Nos
<p>Yoroi has a feature to export a wallet as a “key” (Options=&gt;Wallet=&gt;Export Wallet=&gt;Export). I guess that it is the public root key, since the description says:</p>
<blockquote>
<p>The below you can find your wallet's public key information.
Public keys allow seeing the wallet history for the wallet, but does not allow to spend or move the funds in any way (private key is not included)</p>
</blockquote>
<p>For testing purposes I created a test wallet and this is the &quot;key&quot; that Yoroi gives me:</p>
<p><code>95e74df114717de17ebfb24c05f9fd1c8019bb6f1de117eec10a43670a692866b837a4a5f51d62f3dc3d630d075c8e39e5294323ba146c386c48123aeef5438a</code></p>
<p>So my question is: How is this key encoded? It does not have any default prefix and seems to be quite long.</p>
<p>I guess that, e.g. for use with the <a href="https://github.com/input-output-hk/cardano-addresses" rel="nofollow noreferrer">cardano-addresses tool</a>, the key maybe just needs to be converted using the <a href="https://github.com/input-output-hk/bech32" rel="nofollow noreferrer">bech32 tool</a>, correct? If so, then what prefix must be used?</p>
<p>Thanks.</p>
<p>PS: This question is part of a <a href="https://cardano.stackexchange.com/questions/819/how-to-derive-addresses-from-a-key-exported-from-yoroi">bigger question</a>, which I split up into sub-questions, as recommended in the original question.</p>

<yoroi><address><cardano-address>
What encoding is used for Yorois Wallet export?
# What encoding is used for Yorois Wallet export?

(Asked by: username_0 on 2021-05-29)

Yoroi has a feature to export a wallet as a “key” (Options=>Wallet=>Export Wallet=>Export). I guess that it is the public root key, since the description says:

> The below you can find your wallet's public key information.
> Public keys allow seeing the wallet history for the wallet, but does not allow to spend or move the funds in any way (private key is not included)

For testing purposes I created a test wallet and this is the "key" that Yoroi gives me:

`95e74df114717de17ebfb24c05f9fd1c8019bb6f1de117eec10a43670a692866b837a4a5f51d62f3dc3d630d075c8e39e5294323ba146c386c48123aeef5438a`

So my question is: How is this key encoded? It does not have any default prefix and seems to be quite long.

I guess that, e.g. for use with the [cardano-addresses tool](https://github.com/input-output-hk/cardano-addresses), the key maybe just needs to be converted using the [bech32 tool](https://github.com/input-output-hk/bech32), correct? If so, then what prefix must be used?

Thanks.

PS: This question is part of a [bigger question](https://cardano.stackexchange.com/questions/819/how-to-derive-addresses-from-a-key-exported-from-yoroi), which I split up into sub-questions, as recommended in the original question.

**Tags:** yoroi, address, cardano-address

---

## 1 answers

### Answer by username_0 on 2021-05-29. Score: 4 | Accepted answer

After a lot of trial and error, I figured it out myself.
TLDR
The "key" that results from the Yoroi export indeed needs to be encoded with bech32, using the prefix acct_xvk.
Demonstration/Proof
To test this, we need multiple things:

The seed phrase of our test wallet (for this demonstration we store it in the file phrase.prv): maximum vacuum toe conduct jazz tray romance crawl fossil wisdom disease crazy mountain bird discover
The "key" exported by Yoroi (for this demonstration we store it in the file root_yoroi_raw.pub): 95e74df114717de17ebfb24c05f9fd1c8019bb6f1de117eec10a43670a692866b837a4a5f51d62f3dc3d630d075c8e39e5294323ba146c386c48123aeef5438a
The bech32 tool.
The cardano-addresses tool.

We can now test, whether we can get the same results using our seed phrase and the exported key:
./cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk
cat root.xsk | ./cardano-address key child 1852H/1815H/0H | ./cardano-address key public --with-chain-code > root.xvk

./bech32 acct_xvk < root_yoroi_raw.pub > root_yoroi.pub

cat root.xvk
cat root_yoroi.pub

This gives the following result:
acct_xvk1jhn5mug5w977zl4lkfxqt70arjqpnwm0rhs30mkppfpkwznf9pntsday5h636chnms7kxrg8tj8rneffgv3m59rv8pkysy36am658zsh2qnm6
acct_xvk1jhn5mug5w977zl4lkfxqt70arjqpnwm0rhs30mkppfpkwznf9pntsday5h636chnms7kxrg8tj8rneffgv3m59rv8pkysy36am658zsh2qnm6

This means, that the key exported by Yoroi, when being bech32 encoded with the prefix acct_xvk matches the extended public root key that can be derived from the seed phrase.


---

