<p>I'm sorry but there were missing inputs when I created my Raw transaction. This error has nothing to do with BitcoinLib.</p>

CC BY-SA 4.0
2018-05-29T08:30:24.330Z
2018-05-29T08:30:24.330Z
doohder
<p>This is a repost of (<a href="https://bitcoin.stackexchange.com/questions/20298/json-rpc-signrawtransaction-returns-false-when-using-private-keys">JSON-RPC signrawtransaction returns false when using private keys</a>) but I could not comment because of my reputation (new user).</p>

<p>I've been using BitcoinLib via Litecoin Testnet for a week now and I got stuck with SignRawTransaction. It returns false but when I use the RPC call via litecoin-cli</p>

<pre><code>litecoin-cli.exe signrawtransaction 020000000152cf5e76f1ac0fd42e97ec60db30406b019621da497601b430e7adf5642e1fa20000000000ffffffff02e09c4100000000001976a914fbb4b6ef02914490e99f899cb8538b03105331df88acc095a905000000001976a91471efff92af2740dd4fe088fc3de98ceebaa4c13488ac00000000 "[]" "[\"cQ3HSi45qrfGGZjYAci22gATWfhb1QhWR8JGBHBbzbPsD8Uuu2n2\"]"
</code></pre>

<p>the result is OK.</p>

<p>This is how I use the SignRawTransaction (Sample):</p>

<pre><code>SignRawTransactionRequest signRawRequest = new SignRawTransactionRequest("020000000152cf5e76f1ac0fd42e97ec60db30406b019621da497601b430e7adf5642e1fa20000000000ffffffff02e09c4100000000001976a914fbb4b6ef02914490e99f899cb8538b03105331df88acc095a905000000001976a91471efff92af2740dd4fe088fc3de98ceebaa4c13488ac00000000");
signRawRequest.AddKey("cQ3HSi45qrfGGZjYAci22gATWfhb1QhWR8JGBHBbzbPsD8Uuu2n2");

SignRawTransactionResponse signRawResponse = coinService.SignRawTransaction(signRawRequest);
</code></pre>

<p>Has anyone encountered this problem before? </p>

CC BY-SA 4.0
2018-05-16T13:26:27.700Z
Which version of BitcoinLib are you using?
Nikos Baxevanis
CC BY-SA 4.0
2018-05-17T02:16:43.750Z
BitcoinLib Version 1.7.1
doohder
CC BY-SA 4.0
2018-05-18T09:01:39.927Z
How do you create the `coinService` instance? Can you provide a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve)?
Nikos Baxevanis
CC BY-SA 4.0
2018-05-20T04:27:16.057Z
Since I'm using the testnet this is how I created the instance.
ICoinService coinService = new LitecoinService(true);
doohder
CC BY-SA 4.0
2018-05-21T05:42:56.283Z
It could be a bug in the `LitecoinService`. I assume it works fine with the other implementations(?)
Nikos Baxevanis
CC BY-SA 4.0
2018-05-26T18:49:51.853Z
I can't reproduce this on my local. Can you provide a sample? It could be a .ZIP file, a GitHub repo, a Gist or whatever.
Nikos Baxevanis
<signrawtransaction>
BitcoinLib SignRawTransaction JSON-RPC returns false when using private key
doohder
# BitcoinLib SignRawTransaction JSON-RPC returns false when using private key

(Asked by: username_0 on 2018-05-16)

This is a repost of ([JSON-RPC signrawtransaction returns false when using private keys](https://bitcoin.stackexchange.com/questions/20298/json-rpc-signrawtransaction-returns-false-when-using-private-keys)) but I could not comment because of my reputation (new user).

I've been using BitcoinLib via Litecoin Testnet for a week now and I got stuck with SignRawTransaction. It returns false but when I use the RPC call via litecoin-cli

```
litecoin-cli.exe signrawtransaction 020000000152cf5e76f1ac0fd42e97ec60db30406b019621da497601b430e7adf5642e1fa20000000000ffffffff02e09c4100000000001976a914fbb4b6ef02914490e99f899cb8538b03105331df88acc095a905000000001976a91471efff92af2740dd4fe088fc3de98ceebaa4c13488ac00000000 "[]" "[\"cQ3HSi45qrfGGZjYAci22gATWfhb1QhWR8JGBHBbzbPsD8Uuu2n2\"]"

```

the result is OK.

This is how I use the SignRawTransaction (Sample):

```
SignRawTransactionRequest signRawRequest = new SignRawTransactionRequest("020000000152cf5e76f1ac0fd42e97ec60db30406b019621da497601b430e7adf5642e1fa20000000000ffffffff02e09c4100000000001976a914fbb4b6ef02914490e99f899cb8538b03105331df88acc095a905000000001976a91471efff92af2740dd4fe088fc3de98ceebaa4c13488ac00000000");
signRawRequest.AddKey("cQ3HSi45qrfGGZjYAci22gATWfhb1QhWR8JGBHBbzbPsD8Uuu2n2");

SignRawTransactionResponse signRawResponse = coinService.SignRawTransaction(signRawRequest);

```

Has anyone encountered this problem before?

**Tags:** signrawtransaction

> **Comments:**
> **username_1**: Which version of BitcoinLib are you using?  
> **username_0**: BitcoinLib Version 1.7.1  
> **username_1**: How do you create the `coinService` instance? Can you provide a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve)?  
> **username_0**: Since I'm using the testnet this is how I created the instance. ICoinService coinService = new LitecoinService(true);  
> **username_1**: It could be a bug in the `LitecoinService`. I assume it works fine with the other implementations(?)  
> **username_1**: I can't reproduce this on my local. Can you provide a sample? It could be a .ZIP file, a GitHub repo, a Gist or whatever.  

---

## 1 answers

### Answer by username_0 on 2018-05-29. Score: 1 | Accepted answer

I'm sorry but there were missing inputs when I created my Raw transaction. This error has nothing to do with BitcoinLib.


---

