<p>A bitcoin address, watchonly or not, represents a public key.  This public key has a corresponding private key.</p>

<p>If you import a watch only address the corresponding private key is not imported.  So you cannot spend any unspent outputs from those addresses.  </p>

<p>If you want to send bitcoin to the watch only address, you have to make sure you know the corresponding private key or your bitcoin will be lost.</p>

<p>Choose an unspent output from another address where you know the private key.  Take this output when you run 'createrawtransaction'.  Sign the transaction with this private key then 'sendrawtransaction'.  </p>

<p>Optionally before you 'sendrawtransaction', decode your hex string with 'decoderawtransaction' and make sure everything is correct.</p>

CC BY-SA 3.0
2017-08-30T22:21:59.837Z
This does not explain why fundrawtransaction doesn't work (which does not need the private key).
Pieter Wuille
CC BY-SA 3.0
2017-08-30T22:40:22.873Z
thanks I didn't know about fundrawtransaction and wrongly assumed user2224893 was mixing up api calls with the english language. Sorry user2224893! I ran the call fundrawtransaction on my node but got an error 'Method not found' I run a node with wallet disabled so I checked https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list and could not see it either.  Meanwhile I can see on github it does exist, my bad.
ubro
CC BY-SA 3.0
2017-08-30T22:48:08.817Z
Don't use that wiki, it's outdated by many years.
Pieter Wuille
CC BY-SA 3.0
2017-08-31T00:30:17.707Z
Thanks it is even mentioned on the wiki but I didn't see it, the new version has fundrawtransaction covered:  https://bitcoin.org/en/developer-reference#fundrawtransaction
ubro
CC BY-SA 3.0
2017-08-30T22:19:19.307Z
2017-08-30T22:19:19.307Z
ubro
<p>I have imported watchonly addresses in Bitcoin and trying to createrawtransaction with input watchonly listunspend which has spendable=false, scriptSig=empty.</p>

<p>after that, I'm getting an error on fundrawtransaction with message "Signing transaction failed"</p>

<p>I know it's unsigned and can't calculate fee but if I put in order
createrawtransaction 
signrawtransaction
fundrawtransaction
sendrawtransaction</p>

<p>still, it gives me an error "Signing transaction failed"?</p>

CC BY-SA 3.0
2017-08-30T16:08:35.867Z
I'm confused - what results do you expect to be able to achieve here?  Of course you can't sign the transaction because you don't have any private keys.
Nate Eldredge
CC BY-SA 3.0
2017-08-30T22:31:17.670Z
`fundrawtransaction` does not sign, and does not need the private key. The error message is confusing. I'll write an answer later.
Pieter Wuille
<transactions><blockchain><bitcoin-core><bitcoind><json-rpc>
What is a workaround to fundrawtransaction for watchonly addresses
user2224893
# What is a workaround to fundrawtransaction for watchonly addresses

(Asked by: username_0 on 2017-08-30)

I have imported watchonly addresses in Bitcoin and trying to createrawtransaction with input watchonly listunspend which has spendable=false, scriptSig=empty.

after that, I'm getting an error on fundrawtransaction with message "Signing transaction failed"

I know it's unsigned and can't calculate fee but if I put in order
createrawtransaction
signrawtransaction
fundrawtransaction
sendrawtransaction

still, it gives me an error "Signing transaction failed"?

**Tags:** transactions, blockchain, bitcoin-core, bitcoind, json-rpc

> **Comments:**
> **username_1**: I'm confused - what results do you expect to be able to achieve here?  Of course you can't sign the transaction because you don't have any private keys.  
> **username_2**: `fundrawtransaction` does not sign, and does not need the private key. The error message is confusing. I'll write an answer later.  

---

## 1 answers

### Answer by username_3 on 2017-08-30. Score: -1

A bitcoin address, watchonly or not, represents a public key. This public key has a corresponding private key.

If you import a watch only address the corresponding private key is not imported. So you cannot spend any unspent outputs from those addresses.

If you want to send bitcoin to the watch only address, you have to make sure you know the corresponding private key or your bitcoin will be lost.

Choose an unspent output from another address where you know the private key. Take this output when you run 'createrawtransaction'. Sign the transaction with this private key then 'sendrawtransaction'.

Optionally before you 'sendrawtransaction', decode your hex string with 'decoderawtransaction' and make sure everything is correct.

> **Comments:**
> **username_2**: This does not explain why fundrawtransaction doesn't work (which does not need the private key).  
> **username_3**: thanks I didn't know about fundrawtransaction and wrongly assumed username_0 was mixing up api calls with the english language. Sorry username_0! I ran the call fundrawtransaction on my node but got an error 'Method not found' I run a node with wallet disabled so I checked https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list and could not see it either.  Meanwhile I can see on github it does exist, my bad.  
> **username_2**: Don't use that wiki, it's outdated by many years.  
> **username_3**: Thanks it is even mentioned on the wiki but I didn't see it, the new version has fundrawtransaction covered:  https://bitcoin.org/en/developer-reference#fundrawtransaction  

---

