<p>There's no endpoint to do this in the wallet. If you import an account public key, it's assumed you'll be generating and signing the tx offline and only using the wallet to get the utxos needed to do so. There's no technical reason the wallet couldn't allow importing an account private key, it just doesn't have that functionality developed. If it's something you need, I'd recommend opening an issue on the GH repository (or submit a PR if you have the Haskell expertise to add it).</p>

CC BY-SA 4.0
2022-01-23T18:29:13.307Z
2022-01-23T18:29:13.307Z
Samuel Leathers
<p>I am playing around with cardano-wallet key derivation, and I have a mnemonic from which I've derived the root key, as well as account 0 public/private keys. Then, I imported a wallet using <code>cardano-wallet</code> using the account <em>extended verification key</em> running the following command:</p>
<p><code>cardano-wallet wallet create from-public-key &lt;WALLET_NAME&gt; &lt;EXTENDED_KEY&gt;&lt;CHAIN_CODE&gt;</code></p>
<p>Once the wallet finished syncing, I found there was some tADA in a few of the first addresses. I am now trying to create a transaction using cardano-wallet to spend the tADA. I run:</p>
<p><code>cardano-wallet transaction create &lt;WALLET_ID&gt; --payment 1000000@&lt;RECIEVING_ADDRESS&gt;</code></p>
<p>However, it then prompts me for a passphrase which I never set up, seeing as all I did was import the account public key. I try entering 10 random characters and it tells: <code>I couldn't find a root private key for the given wallet: &lt;WALLET_ID&gt;. However, this operation requires that I do have such a key. Either there's no such wallet, or I don't fully own it</code></p>
<p>Is there any way I can import the root private key or (even better) the account extended signing key so that cardano-wallet can handle transaction creation for me, or do I need to manually derive private keys for each address?</p>

<wallet><transaction>
How to import root private key or account private key to cardano-wallet
# How to import root private key or account private key to cardano-wallet

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

I am playing around with cardano-wallet key derivation, and I have a mnemonic from which I've derived the root key, as well as account 0 public/private keys. Then, I imported a wallet using `cardano-wallet` using the account *extended verification key* running the following command:

`cardano-wallet wallet create from-public-key`

Once the wallet finished syncing, I found there was some tADA in a few of the first addresses. I am now trying to create a transaction using cardano-wallet to spend the tADA. I run:

`cardano-wallet transaction create  --payment 1000000@`

However, it then prompts me for a passphrase which I never set up, seeing as all I did was import the account public key. I try entering 10 random characters and it tells: `I couldn't find a root private key for the given wallet: . However, this operation requires that I do have such a key. Either there's no such wallet, or I don't fully own it`

Is there any way I can import the root private key or (even better) the account extended signing key so that cardano-wallet can handle transaction creation for me, or do I need to manually derive private keys for each address?

**Tags:** wallet, transaction

---

## 1 answers

### Answer by username_1 on 2022-01-23. Score: 2 | Accepted answer

There's no endpoint to do this in the wallet. If you import an account public key, it's assumed you'll be generating and signing the tx offline and only using the wallet to get the utxos needed to do so. There's no technical reason the wallet couldn't allow importing an account private key, it just doesn't have that functionality developed. If it's something you need, I'd recommend opening an issue on the GH repository (or submit a PR if you have the Haskell expertise to add it).


---

