I have created a key from using coinstring, and then imported it into my wallet. Then I ran:
bitcoin-cli signrawtransactionwithkey "$rawtxhex" "[\"$mykey$\"]"
But it results in:
Unable to sign input, invalid stack size (possibly missing key)
Any ideas? My
mykey is not actually a variable, I am hardcoding it in my specific case so I know it is present.