<p><code>mockWalletPaymentPubKey</code> gives you the public key for a wallet.</p>
<p>For <code>Vesting.hs</code>, you need to use the public key <strong>hash</strong>.</p>
<p>Try <code>mockWalletPaymentPubKeyHash $ knownWallet 1</code> instead.</p>

CC BY-SA 4.0
2022-01-28T02:09:28.547Z
2022-01-28T02:14:33.723Z
2022-01-28T02:14:33.723Z
Travis
<p>I am getting incorrect pubkeys by running <code>mockWalletPaymentPubKey $ knownWallet 1</code> and <code>mockWalletPaymentPubKey $ knownWallet 2</code> (from here <a href="https://youtu.be/ae7U_yKIQ0Y?t=1390" rel="nofollow noreferrer">https://youtu.be/ae7U_yKIQ0Y?t=1390</a>).</p>
<p>I checked that</p>
<ul>
<li>I am in the correct directory</li>
<li>I imported the wallet emulator using <code>import Wallet.Emulator</code></li>
<li>and the <code>cabal build</code> command ran successfully.</li>
</ul>
<p>On restarting the repl, I get the same incorrect wallet pub keys.</p>
<p>Note: I was able to get the correct pub keys by looking at the transactions in the simulator.</p>

<plutus-pioneer-program><plutus-playground><cabal><repl>
Incorrect Pub Key from Wallet Emulator
# Incorrect Pub Key from Wallet Emulator

(Asked by: username_0 on 2022-01-27)

I am getting incorrect pubkeys by running `mockWalletPaymentPubKey $ knownWallet 1` and `mockWalletPaymentPubKey $ knownWallet 2` (from here <https://youtu.be/ae7U_yKIQ0Y?t=1390>).

I checked that

* I am in the correct directory
* I imported the wallet emulator using `import Wallet.Emulator`
* and the `cabal build` command ran successfully.

On restarting the repl, I get the same incorrect wallet pub keys.

Note: I was able to get the correct pub keys by looking at the transactions in the simulator.

**Tags:** plutus-pioneer-program, plutus-playground, cabal, repl

---

## 1 answers

### Answer by username_1 on 2022-01-28. Score: 4 | Accepted answer

`mockWalletPaymentPubKey` gives you the public key for a wallet.

For `Vesting.hs`, you need to use the public key **hash**.

Try `mockWalletPaymentPubKeyHash $ knownWallet 1` instead.


---

