I want to sign a transaction to use it with the rpc endpoint v1/chain/push_transaction
.
Until nodeos v.1.1 its was explained in the docs on how to use nodeos (probably keosd indirectly) to do wallet operations like signing. Now it seems like this is gone. starting a local node still logs:
keosd [...] add api url: /v1/wallet/sign_transaction
But if I try to use this endpoint it gives me a 404 error. Is there any other way of signing the transaction using python?
Edit: My request looks like this
[{
"expiration": "2018-10-26T15:30:32.000",
"ref_block_num": 21149807,
"ref_block_prefix": 3590041248,
"context_free_actions": [],
"actions": [{
"account": "eosio.token",
"name": "transfer",
"authorization": [{
"actor": "testertimohe",
"permission": "active"
}],
"data": "0000000000ea305500000000487a2b9d102700000000000004454f53000000001163726561746564206279206e6f70726f6d"
}],
"signatures": []
},
["EOS6gXwNz2SKUNAZcyjzVvg6KdNgA1bSuVzCr8c5yWkGij52JKx8V"], ""
]
r = requests.post(
f'http://localhost:8888/v1/wallet/sign_transaction', json=data)
response = json.loads(r.text)
I am getting the ref_block_num and ref_block_predix from /get_block and /get_info and the data from /abi_json_to_bin
What I see in the nodeos logs:
nodeosd_1 | debug 2018-10-25T08:29:34.909 thread-0 http_plugin.cpp:296 handle_http_request ] 404 - not found: /v1/wallet/sign_transaction
Generally my understanding is that because you don't send the private key but the public key it probably looks in your keos wallet if this public key exists and then takes the private key from there to sign, is that right?