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?

  • Which version of BitcoinLib are you using? – Nikos Baxevanis May 16 '18 at 13:26
  • BitcoinLib Version 1.7.1 – doohder May 17 '18 at 2:16
  • How do you create the coinService instance? Can you provide a Minimal, Complete, and Verifiable example? – Nikos Baxevanis May 18 '18 at 9:01
  • Since I'm using the testnet this is how I created the instance. ICoinService coinService = new LitecoinService(true); – doohder May 20 '18 at 4:27
  • It could be a bug in the LitecoinService. I assume it works fine with the other implementations(?) – Nikos Baxevanis May 21 '18 at 5:42
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.