I am trying to query the RPC parse operation endpoint
The RPC documentation only states that this endpoint Parse operations
and I can't seem to find example of how to use it on the web.
What I am aim to do is basically reverse what the forge endpoint does in order to get the JSON from an hex encoded operation.
Here are the step I am using to query the endpoint:
Forge operation
Query:
POST
https://alphanet-node.tzscan.io/chains/main/blocks/head/helpers/forge/operations
Body:
{
"branch": "BLpcXF8ADJbGuyUKNv7TypXRd5rqnoPn3PMqJLNBeRSr4VFeUuK",
"contents": [
{
"kind": "transaction",
"source": "tz1NfEiS2uJsX43vowNjau5pdqg3Nvy8whvc",
"destination": "KT1Ec3jNXyxyA54nezwcjGDRoutECJCQjpya",
"fee": "1274",
"counter": "86610",
"gas_limit": "10100",
"storage_limit": "0",
"amount": "5060726"
}
]
}
Response:
"92122a7e654cdff09e22a7be1b7d41bd279ffa197a0137e6fea0d3ed3ce95fc00800002122d44d997e158c36c60649d198c4175dad425efa09d2a405f44e00f6f0b40201420eaa410ac21addf427211cddd6115cba385a940000"
Now trying to reverse the forge operation
Query:
https://alphanet-node.tzscan.io/chains/main/blocks/head/helpers/parse/operations
Body:
{
"operations": [
{
"data": "92122a7e654cdff09e22a7be1b7d41bd279ffa197a0137e6fea0d3ed3ce95fc00800002122d44d997e158c36c60649d198c4175dad425efa09d2a405f44e00f6f0b40201420eaa410ac21addf427211cddd6115cba385a940000",
"branch": "BLpcXF8ADJbGuyUKNv7TypXRd5rqnoPn3PMqJLNBeRSr4VFeUuK"
}
]
}
Response:
[
{
"kind": "branch",
"id": "proto.003-PsddFKi3.operation.cannot_parse"
}
]
Is the parse operation endpoint really doing what I expect? If so how should this endpoint need to be queried to reverse the forge endpoint?