I would like to sign my transaction on an offline computer with bitcoin core. I already created the raw transaction (testnet) on an online computer with
createrawtransaction "[{\"txid\":\"11307beeced6797a9d84c9d2431f013dab2a1f5449e9459208fbd156dfb6e9b4\",\"vout\":0}]" "{\"mfeUWfwmuMPoLuANMFPHQhJ1YFYVtWnaqT\":0.01}"
Output
0200000001b4e9b6df56d1fb089245e949541f2aab3d011f43d2c9849d7a79d6ceee7b301100000 00000ffffffff0140420f00000000001976a914016c22d6025803eec522e04161e0cdf9d813d410 88ac00000000
The next step would be to sign the transaction on an offline computer, therefor I tried to execute this code
signrawtransaction "0200000001b4e9b6df56d1fb089245e949541f2aab3d011f43d2c9849d7a79d6ceee7b30110000000000ffffffff0140420f00000000001976a914016c22d6025803eec522e04161e0cdf9d813d41088ac00000000"
Unfortunately I get this error
{
"hex": "0200000001b4e9b6df56d1fb089245e949541f2aab3d011f43d2c9849d7a79d6ceee7b301100000 00000ffffffff0140420f00000000001976a914016c22d6025803eec522e04161e0cdf9d813d410 88ac00000000",
"complete": false,
"errors": [
{
"txid": "11307beeced6797a9d84c9d2431f013dab2a1f5449e9459208fbd156dfb6e9b4",
"vout": 0,
"witness": [
],
"scriptSig": "",
"sequence": 4294967295,
"error": "Input not found or already spent"
}
]
}
"Input not found or already spent" - I thought I need only to provide the transaction id when I create the transaction.
This is the help output from the console.
Arguments:
1. "hexstring" (string, required) The transaction hex string
2. "prevtxs" (string, optional) An json array of previous dependent transaction outputs
[ (json array of json objects, or 'null' if none provided)
{
"txid":"id", (string, required) The transaction id
"vout":n, (numeric, required) The output number
"scriptPubKey": "hex", (string, required) script key
"redeemScript": "hex", (string, required for P2SH or P2WSH) redeem script
"amount": value (numeric, required) The amount spent
}
,...
]
3. "privkeys" (string, optional) A json array of base58-encoded private keys for signing
[ (json array of strings, or 'null' if none provided)
"privatekey" (string) private key in base58-encoding
,...
]
4. "sighashtype" (string, optional, default=ALL) The signature hash type. Must be one of
"ALL"
"NONE"
"SINGLE"
"ALL|ANYONECANPAY"
"NONE|ANYONECANPAY"
"SINGLE|ANYONECANPAY"
Do I have to provide additional parameters?