I am trying RPC API. Here is the code which I am using on cmd for testing a dummy transaction.
curl --request POST --url http://localhost:8080/v1/chain/push_transaction --header 'accept: application/json' --header 'content-type: application/json' --data '{"signatures":["EOS4wJVpa8YBT1BnBtGHXM8PgQr9cxD2TuZVGhciLZZwp4AsjStoC"],"compression":false,"packed_context_free_data":"00","packed_trx":"00"}'
But each time I get same error message:
{"code":500,"message":"Internal Service Error","error":{"code":3010010,"name":"packed_transaction_type_exception","what":"Invalid packed transaction","details":[{"message":"Invalid packed transaction","file":"chain_plugin.cpp","line_number":1562,"method":"push_transaction"},{"message":"pivot != std::string::npos: No delimiter in string, cannot determine type: EOS4wJVpa8YBT1BnBtGHXM8PgQr9cxD2TuZVGhciLZZwp4AsjStoC","file":"signature.cpp","line_number":20,"method":"parse_base58"},{"message":"error parsing signature","file":"signature.cpp","line_number":28,"method":"parse_base58"},{"message":"Failed to deserialize variant","file":"abi_serializer.hpp","line_number":697,"method":"from_variant"}]}}
Not sure what is wrong there. I want to use it in one PHP application so RPC is important for me.
UPDATE
Then tried solution with SIG_K1_ and SIG_R1_ also.
curl --request POST --url http://localhost:8080/v1/chain/push_transaction --header 'accept: application/json' --header 'content-type: application/json' --data '{"signatures":["SIG_K1_EOS4wJVpa8YBT1BnBtGHXM8PgQr9cxD2TuZVGhciLZZwp4AsjStoC"],"compression":false,"packed_context_free_data":"00","packed_trx":"00"}'
But it throw some different error like below.
{"code":500,"message":"Internal Service Error","error":{"code":3010010,"name":"packed_transaction_type_exception","what":"Invalid packed transaction","details":[{"message":"Invalid packed transaction","file":"chain_plugin.cpp","line_number":1562,"method":"push_transaction"},{"message":"Unable to decode base58 string EOS4wJVpa8YBT1BnBtGHXM8PgQr9cxD2TuZVGhciLZZwp4AsjStoC","file":"base58.cpp","line_number":625,"method":"from_base58"},{"message":"error parsing signature","file":"signature.cpp","line_number":28,"method":"parse_base58"},{"message":"Failed to deserialize variant","file":"abi_serializer.hpp","line_number":697,"method":"from_variant"}]}}
FYI, I am using cleos wallet keys to see the signature.