I am trying to manually parse an operation. By asking the (testnet) tezos node to parse an operation, one can get data to compare:
tezos-client -P 18732 rpc post chains/main/blocks/head/helpers/parse/operations \
with '{ "operations": [{"branch":"BMUQYkq83VVyhgRLjsWqJZhmEVKyzj22ogLP3QTNC4ziEwqaLHU",
"data":"6c00b07ee75b490cfd65c4fe5cef27888754c76751418c0bc2b724e852ac02c48aa401000011dbc55dddc843df043d6f36a162d2f4a8c2176d004bd63386731a940609ded1d37bef4ea373304c05389000eb1d16fd44480a9b6231c8859fd26b78d98ab410cfd399f329495caa64a1856b53a13c19f141168306" }]}'
which gives:
[ { "branch": "BMUQYkq83VVyhgRLjsWqJZhmEVKyzj22ogLP3QTNC4ziEwqaLHU",
"contents":
[ { "kind": "transaction",
"source": "tz1bjFeJnrEU3zjhDW8uG1Xtd7MRyHkp5VQd", "fee": "1420",
"counter": "596930", "gas_limit": "10600", "storage_limit": "300",
"amount": "2688324",
"destination": "tz1MGTTLMhikC7qkfduaS9XKNMvHEkSxMq4X" } ],
"signature":
"sigXukL1KWLCddQtZYPxp3NdXpqSVufPQBU1QwdYQCM8dsFvow6UwdBoFgJynfdDUNuwDPguTK6Jq9YyoFgi5PtrQ8cs4c8e" } ]
Converting the source, tz1bjFeJnrEU3zjhDW8uG1Xtd7MRyHkp5VQd
from Base58 to hex gives 06a19fb07ee75b490cfd65c4fe5cef27888754c76751419acb5dba
. When I remove the first three and the last four bytes I get a match: b07ee75b490cfd65c4fe5cef27888754c7675141
.
Similarly with the destination.
The tezos node however requires branch
as an input and I do not understand why. Now, I have not decoded the amount yet, but so far I cannot see what I need branch
for. What is it I do not understand? What piece of the puzzle do I not get by omitting that in my effort to parse the operation?