<p>The <code>PaymentPubKeyHash</code> in <code>Ledger.Address</code> is not the spending key: nothing that is public can be a spending key as spending keys are always private.</p>
<p>The key you are looking for is referenced as <code>PaymentPrivateKey</code> in <code>Ledger.Address</code>.</p>

CC BY-SA 4.0
2024-06-04T08:07:58.913Z
2024-06-04T08:07:58.913Z
Falcon Stakepool
<p>Cardano speaks in its documentation of the 'spending key hash' (see e.g. here: <a href="https://input-output-hk.github.io/cardano-addresses/demo/" rel="nofollow noreferrer">https://input-output-hk.github.io/cardano-addresses/demo/</a>). In Plutus there is no spending key, there is a <code>PaymentPubKeyHash</code> in <code>Ledger.Address</code>. Are these the same ?</p>

CC BY-SA 4.0
2021-12-22T15:38:59.303Z
I found no `PaymentPubKeyHash`, but, from what I know, `PubKeyHash` is the same as spending key hash
Mateus
CC BY-SA 4.0
2021-12-22T16:29:05.927Z
PaymentPubKeyHash is a wrapper around PubKeyHash that was introduced recently to have more type safety and not confound stake and payment key. You can find it defined here: https://github.com/input-output-hk/plutus-apps/blob/main/plutus-ledger/src/Ledger/Address.hs
Jey
CC BY-SA 4.0
2021-12-22T16:40:50.790Z
Interesting... Actually, I think "spending key" is the same as "private key", but "verification key" the same as "public key", so "spending key hash" would probably be "private key hash"
Mateus
<plutus><address>
Spending key hash vs payment key hash (pkh)
# Spending key hash vs payment key hash (pkh)

(Asked by: username_0 on 2021-12-22)

Cardano speaks in its documentation of the 'spending key hash' (see e.g. here: <https://input-output-hk.github.io/cardano-addresses/demo/>). In Plutus there is no spending key, there is a `PaymentPubKeyHash` in `Ledger.Address`. Are these the same ?

**Tags:** plutus, address
> **Comments:**
> **username_1**: I found no `PaymentPubKeyHash`, but, from what I know, `PubKeyHash` is the same as spending key hash  
> **username_0**: PaymentPubKeyHash is a wrapper around PubKeyHash that was introduced recently to have more type safety and not confound stake and payment key. You can find it defined here: https://github.com/input-output-hk/plutus-apps/blob/main/plutus-ledger/src/Ledger/Address.hs  
> **username_1**: Interesting... Actually, I think "spending key" is the same as "private key", but "verification key" the same as "public key", so "spending key hash" would probably be "private key hash"  

---

## 1 answers

### Answer by username_2 on 2024-06-04. Score: 0

The `PaymentPubKeyHash` in `Ledger.Address` is not the spending key: nothing that is public can be a spending key as spending keys are always private.

The key you are looking for is referenced as `PaymentPrivateKey` in `Ledger.Address`.


---

