<p>You first need to create a registration certificate for the stake key, before being able to delegate it.
You can submit all 3 certificates in the same transaction, just add the key registration certificate between the other 2 certificates.
You can see all the steps in my documentation here: <a href="https://apexpool.gitbook.io/stake-pool-scripts/stake-pool-registration/stake-pool-scripts/stake-key-registration" rel="nofollow noreferrer">https://apexpool.gitbook.io/stake-pool-scripts/stake-pool-registration/stake-pool-scripts/stake-key-registration</a></p>

CC BY-SA 4.0
2022-11-07T09:25:52.240Z
After following your documentation, it worked. Really appreciate it, thank you.
Raphaël Etang-Salé
CC BY-SA 4.0
2022-11-03T12:48:14.043Z
2022-11-03T12:48:14.043Z
George - APEX Stake Pool
<p>I'm following the official process here on the <a href="https://developers.cardano.org/docs/stake-pool-course/handbook/register-stake-pool-metadata" rel="nofollow noreferrer">Cardano tutorial</a>.</p>
<p>Firstly, I have to show you I already have the fund here:</p>
<pre><code>// cardano-cli query utxo --address $(cat payment.addr) --mainnet

                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
4c782ea34b517b99e508f675ea1019bc6c60738570ae7dbf074d3ad2d44e8eef     0        600000000 lovelace + TxOutDatumNone
75e262eb49ba1237b1ee00a4854935d67bd05988baed5472a7ff97b49551d386     0        17648934 lovelace + TxOutDatumNone
e663b2e14f180ae341a49bcbde247d074d944942cc3b8794277645ac1e49d377     0        8336205 lovelace + TxOutDatumNone
</code></pre>
<p>In the process, I've already created my <code>pool-registration.cert</code> file.</p>
<p>We can double-check thanks to this:</p>
<pre><code>// cat pool-registration.cert
{
    &quot;type&quot;: &quot;CertificateShelley&quot;,
    &quot;description&quot;: &quot;Stake Pool Registration Certificate&quot;,
    &quot;cborHex&quot;: &quot;8a03581ce9c55b1910e7fdcacf2db1be6f20fadff0e5d68d6566b223698031ab58208ad95d9965ca817e7d7d5d6985ba4c92b77a206250fa59f52acb6ab36507c79b1a001e84801a1443fd00d81e820001581de1084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a00981581c084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009818400190bb9449e8cc08ff682783d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6574737261706861656c2f43617264616e6f2f702f702e6a736f6e5820dee0758d3212808f99698e96446dd9400b4455d5c44286f91f66dd6c5796d064&quot;
}

// cat delegation.cert 
{
    &quot;type&quot;: &quot;CertificateShelley&quot;,
    &quot;description&quot;: &quot;Stake Address Delegation Certificate&quot;,
    &quot;cborHex&quot;: &quot;83028200581c084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009581ce9c55b1910e7fdcacf2db1be6f20fadff0e5d68d6566b223698031ab&quot;
}

</code></pre>
<p>Then after calculating my fees and taking a look at the hereafter, I'm building my transaction like this:</p>
<pre><code>cardano-cli transaction build-raw \
    --tx-in 4c782ea34b517b99e508f675ea1019bc6c60738570ae7dbf074d3ad2d44e8eef#0 \
    --tx-out $(cat payment.addr)+99802951 \
    --invalid-hereafter 75915180 \
    --fee 197049 \
    --out-file tx.raw \
    --certificate-file pool-registration.cert \
    --certificate-file delegation.cert
</code></pre>
<p>Finally, I'm signing and sending my message like this:</p>
<pre><code>cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --signing-key-file cold.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet
</code></pre>
<p>My result after this is:</p>
<pre><code>Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [DelegsFailure (DelplFailure (DelegFailure (StakeDelegationImpossibleDELEG (KeyHashObj (KeyHash &quot;084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009&quot;)))))])
</code></pre>
<p>Thank you if somebody can help, I will add more information if needed.</p>

<cardano-cli><cardano-node><ada>
Can't register my stake pool on Cardano (StakeDelegationImpossibleDELEG)
# Can't register my stake pool on Cardano (StakeDelegationImpossibleDELEG)

(Asked by: username_0 on 2022-11-03)

I'm following the official process here on the Cardano tutorial.
Firstly, I have to show you I already have the fund here:
// cardano-cli query utxo --address $(cat payment.addr) --mainnet

                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
4c782ea34b517b99e508f675ea1019bc6c60738570ae7dbf074d3ad2d44e8eef     0        600000000 lovelace + TxOutDatumNone
75e262eb49ba1237b1ee00a4854935d67bd05988baed5472a7ff97b49551d386     0        17648934 lovelace + TxOutDatumNone
e663b2e14f180ae341a49bcbde247d074d944942cc3b8794277645ac1e49d377     0        8336205 lovelace + TxOutDatumNone

In the process, I've already created my pool-registration.cert file.
We can double-check thanks to this:
// cat pool-registration.cert
{
    "type": "CertificateShelley",
    "description": "Stake Pool Registration Certificate",
    "cborHex": "8a03581ce9c55b1910e7fdcacf2db1be6f20fadff0e5d68d6566b223698031ab58208ad95d9965ca817e7d7d5d6985ba4c92b77a206250fa59f52acb6ab36507c79b1a001e84801a1443fd00d81e820001581de1084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a00981581c084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009818400190bb9449e8cc08ff682783d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6574737261706861656c2f43617264616e6f2f702f702e6a736f6e5820dee0758d3212808f99698e96446dd9400b4455d5c44286f91f66dd6c5796d064"
}

// cat delegation.cert 
{
    "type": "CertificateShelley",
    "description": "Stake Address Delegation Certificate",
    "cborHex": "83028200581c084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009581ce9c55b1910e7fdcacf2db1be6f20fadff0e5d68d6566b223698031ab"
}


Then after calculating my fees and taking a look at the hereafter, I'm building my transaction like this:
cardano-cli transaction build-raw \
    --tx-in 4c782ea34b517b99e508f675ea1019bc6c60738570ae7dbf074d3ad2d44e8eef#0 \
    --tx-out $(cat payment.addr)+99802951 \
    --invalid-hereafter 75915180 \
    --fee 197049 \
    --out-file tx.raw \
    --certificate-file pool-registration.cert \
    --certificate-file delegation.cert

Finally, I'm signing and sending my message like this:
cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --signing-key-file cold.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet

My result after this is:
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [DelegsFailure (DelplFailure (DelegFailure (StakeDelegationImpossibleDELEG (KeyHashObj (KeyHash "084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009")))))])

Thank you if somebody can help, I will add more information if needed.

**Tags:** cardano-cli, cardano-node, ada

---

## 1 answers

### Answer by username_1 on 2022-11-03. Score: 3 | Accepted answer

You first need to create a registration certificate for the stake key, before being able to delegate it.
You can submit all 3 certificates in the same transaction, just add the key registration certificate between the other 2 certificates.
You can see all the steps in my documentation here: <https://apexpool.gitbook.io/stake-pool-scripts/stake-pool-registration/stake-pool-scripts/stake-key-registration>

> **Comments:**
> **username_0**: After following your documentation, it worked. Really appreciate it, thank you.  

---

