By default this function only works for mempool transactions. When called with a blockhash argument, getrawtransaction will return the transaction if the specified block is available and the transaction is found in that block. When called without a blockhash argument, getrawtransaction will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction is in a block in the blockchain.
Hint: Use gettransaction for wallet transactions.
If verbose is ‘true’, returns an Object with information about ‘txid’.
If verbose is ‘false’ or omitted, returns a string that is serialized, hex-encoded data for ‘txid’.
Submit a raw transaction (serialized, hex-encoded) to local node and network.
Note that the transaction will be sent unconditionally to all peers, so using this for manual rebroadcast may degrade privacy by leaking the transaction’s origin, as nodes will normally not rebroadcast non-wallet transactions already in their mempool.
Also see createrawtransaction and signrawtransactionwithkey calls.
{"result":null,"error": {"code":-22,"message":"TX decode failed. Make sure the tx has at least one input." },"id":"curltest"}
signrawtransactionwithkey
Sign inputs for raw transaction (serialized, hex-encoded).
The second argument is an array of base58-encoded private keys that will be the only keys used to sign the transaction.
The third optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.
{"result":null,"error": {"code":-3,"message":"Wrong type passed:\n{\n \"Position 2 (privkeys)\": \"JSON value of type string is not of expected type array\"\n}" },"id":"curltest"}