BitcoinLib SignRawTransaction JSON-RPC returns false when using private key

1

This is a repost of (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?

doohder

Posted 2018-05-16T10:49:48.633

Reputation: 21

Which version of BitcoinLib are you using?Nikos Baxevanis 2018-05-16T13:26:27.700

BitcoinLib Version 1.7.1doohder 2018-05-17T02:16:43.750

How do you create the coinService instance? Can you provide a Minimal, Complete, and Verifiable example?

Nikos Baxevanis 2018-05-18T09:01:39.927

Since I'm using the testnet this is how I created the instance. ICoinService coinService = new LitecoinService(true);doohder 2018-05-20T04:27:16.057

It could be a bug in the LitecoinService. I assume it works fine with the other implementations(?)Nikos Baxevanis 2018-05-21T05:42:56.283

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 2018-05-26T18:49:51.853

Answers

1

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

doohder

Posted 2018-05-16T10:49:48.633

Reputation: 21