user4375: Is there a way for cardano-cli to generate stake registration certificate using the extended stake address verification key (stake_xvk) that was generated from cardano-address CLI?
Steps to generate extended stake address verification key:
 cardano-address recovery-phrase generate --size 15 > phrase.prv
 cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk
 cardano-address key child 1852H/1815H/0H/2/0 < root.xsk | cardano-address key public --with-chain-code > stake.xvk

Now I have extended stake address verification key stake.xvk.
From here, I want to generate stake registration certificate using cardano-cli like so:
cardano-cli stake-address registration-certificate \
--staking-verification-key-file stake.vkey \
--out-file stake.cert

But this doesn't work because the content of --staking-verification-key-file is much different that of stake_xvk.

user1656: To convert to cardano-cli compatible key files, start with the cardano-address formatted stake.xsk signing key file, then work your way down using the following commands.
cardano-address recovery-phrase generate --size 15 > phrase.prv
cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk
cardano-address key child 1852H/1815H/0H/2/0 < root.xsk > stake.xsk
cardano-cli key convert-cardano-address-key --shelley-stake-key --signing-key-file stake_0_0.xsk --out-file stake.skey

You will then need to generate the non-extended (i.e. without the chain code) stake.vkey file which the cardano-cli accepts.
cardano-address key public --without-chain-code < stake.xsk | tee stake.vk
VKEYHEX=$( cat stake.vk | bech32)
cat << EOF > stake.vkey
{
    "type": "StakeVerificationKeyShelley_ed25519",
    "description": "",
    "cborHex": "5820$VKEYHEX"
}
EOF

Now that you have the cardano-cli compatible stake.skey and stake.vkey, generate the stake registration certificate you can use the same command as before
cardano-cli stake-address registration-certificate --stake-verification-key-file stake.vkey --out-file stake.cert

You should then be able to sign the transaction using the extended stake.skey file.

user2901: To be able to generate the stake.vkey, the process is the following:
cardano-address key child 1852H/1815H/0H/2/0 < root.xsk > stake.xprv
cardano-address address delegation $(cat stake.xprv | cardano-address key public | tee stake.xpub)

SESKEY=$( cat stake.xprv | bech32 | cut -b -128 )\$( cat stake.xpub | bech32)

cat << EOF > stake.skey
{
    "type": "StakeExtendedSigningKeyShelley_ed25519_bip32",
    "description": "",
    "cborHex": "5880\$SESKEY"
}
EOF

cardano-cli shelley key verification-key --signing-key-file stake.skey --verification-key-file stake.evkey
cardano-cli shelley key non-extended-key --extended-verification-key-file stake.evkey --verification-key-file stake.vkey

Once you have the stake.vkey, you can generate the staking certificate with the command that you listed:
cardano-cli stake-address registration-certificate \
--staking-verification-key-file stake.vkey \
--out-file stake.cert

Credits to ilap (I took the commands from his script)

4375: <p>Is there a way for <code>cardano-cli</code> to generate stake registration certificate using the extended stake address verification key (<code>stake_xvk</code>) that was generated from <code>cardano-address</code> CLI?</p>
<p>Steps to generate extended stake address verification key:</p>
<pre><code> cardano-address recovery-phrase generate --size 15 &gt; phrase.prv
 cardano-address key from-recovery-phrase Shelley &lt; phrase.prv &gt; root.xsk
 cardano-address key child 1852H/1815H/0H/2/0 &lt; root.xsk | cardano-address key public --with-chain-code &gt; stake.xvk
</code></pre>
<p>Now I have extended stake address verification key <code>stake.xvk</code>.</p>
<p>From here, I want to generate stake registration certificate using cardano-cli like so:</p>
<pre><code>cardano-cli stake-address registration-certificate \
--staking-verification-key-file stake.vkey \
--out-file stake.cert
</code></pre>
<p>But this doesn't work because the content of <code>--staking-verification-key-file</code> is much different that of <code>stake_xvk</code>.</p>
 1656: <p>To convert to <code>cardano-cli</code> compatible key files, start with the <code>cardano-address</code> formatted <strong>stake.xsk</strong> signing key file, then work your way down using the following commands.</p>
<pre><code>cardano-address recovery-phrase generate --size 15 &gt; phrase.prv
cardano-address key from-recovery-phrase Shelley &lt; phrase.prv &gt; root.xsk
cardano-address key child 1852H/1815H/0H/2/0 &lt; root.xsk &gt; stake.xsk
cardano-cli key convert-cardano-address-key --shelley-stake-key --signing-key-file stake_0_0.xsk --out-file stake.skey
</code></pre>
<p>You will then need to generate the non-extended (i.e. without the chain code) <strong>stake.vkey</strong> file which the <code>cardano-cli</code> accepts.</p>
<pre><code>cardano-address key public --without-chain-code &lt; stake.xsk | tee stake.vk
VKEYHEX=$( cat stake.vk | bech32)
cat &lt;&lt; EOF &gt; stake.vkey
{
    &quot;type&quot;: &quot;StakeVerificationKeyShelley_ed25519&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;cborHex&quot;: &quot;5820$VKEYHEX&quot;
}
EOF
</code></pre>
<p>Now that you have the <code>cardano-cli</code> compatible <strong>stake.skey</strong> and <strong>stake.vkey</strong>, generate the stake registration certificate you can use the same command as before</p>
<pre><code>cardano-cli stake-address registration-certificate --stake-verification-key-file stake.vkey --out-file stake.cert
</code></pre>
<p>You should then be able to sign the transaction using the extended <strong>stake.skey</strong> file.</p>
 2901: <p>To be able to generate the stake.vkey, the process is the following:</p>
<pre><code>cardano-address key child 1852H/1815H/0H/2/0 &lt; root.xsk &gt; stake.xprv
cardano-address address delegation $(cat stake.xprv | cardano-address key public | tee stake.xpub)

SESKEY=$( cat stake.xprv | bech32 | cut -b -128 )\$( cat stake.xpub | bech32)

cat &lt;&lt; EOF &gt; stake.skey
{
    &quot;type&quot;: &quot;StakeExtendedSigningKeyShelley_ed25519_bip32&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;cborHex&quot;: &quot;5880\$SESKEY&quot;
}
EOF

cardano-cli shelley key verification-key --signing-key-file stake.skey --verification-key-file stake.evkey
cardano-cli shelley key non-extended-key --extended-verification-key-file stake.evkey --verification-key-file stake.vkey
</code></pre>
<p>Once you have the stake.vkey, you can generate the staking certificate with the command that you listed:</p>
<pre><code>cardano-cli stake-address registration-certificate \
--staking-verification-key-file stake.vkey \
--out-file stake.cert
</code></pre>
<p>Credits to <a href="https://gist.github.com/ilap/3fd57e39520c90f084d25b0ef2b96894" rel="nofollow noreferrer">ilap</a> (I took the commands from his script)</p>
