4

I followed this article to construct operation. But when I try to construct a reveal operation, it always failed. enter image description here

params:

{
    "contents": [
        {
            "kind": "reveal",
            "source": "tz1buwfQ3j7gTSM5QU8bmG2YnfH8zEnsjm92",
            "fee": "1000000",
            "counter": "540140",
            "gas_limit": "100000",
            "storage_limit": "100000",
            "phk": "edpkvJ4LqnbAVXoK12Q1HFuP42UTWcfJtixgKVimCEeStCZwi91x9B"
        }
    ],
    "branch": "BM42s1GKSg6zSyNunMWEiix6weFcynCCUS3QwJ246hvb81uSCCW"
}

response:

Failed to parse the request body: No case matched:
  At /kind, unexpected string instead of endorsement
  At /kind, unexpected string instead of seed_nonce_revelation
  At /kind, unexpected string instead of double_endorsement_evidence
  At /kind, unexpected string instead of double_baking_evidence
  At /kind, unexpected string instead of activate_account
  At /kind, unexpected string instead of proposals
  At /kind, unexpected string instead of ballot
  Missing object field public_key
  At /kind, unexpected string instead of transaction
  At /kind, unexpected string instead of origination
  At /kind, unexpected string instead of delegation

and my source and phk is correct.

1
  • It could be that their public RPC does not allow reveal operations. Try your operation against a local node. What you have looks correct. I'd suggest using the tezos-client to do a reveal and use the -l flag which will show you all the debug input/output that it does. Might give you some insight as to what you are missing.
    – utdrmac
    Mar 3 '20 at 3:52
4

Rename pkh to public_key, edpk.. is a public key and not a public key hash (pkh). You can find the expected json format in the documentation. You also have to decrease the value of storage_limit to 60 000 or less. Hard limits can be fetched from the ../context/constant endpoint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.