Skip to content

multi merkle proof

The branch is on plebeia-v7.2.

API interfaces

  • GET /chains/<chain_id>/blocks/<block_id>/generate?key=<path_1>&key=<path_2>&...&key=<path_n>
  • POST /chains/<chain_id>/blocks/<block_id>/validate?key=<path_1>&key=<path_2>&...&key=<path_n>

How to use

./tezos-client rpc get /chains/main/blocks
[ [ "BMRSdNEGa3jDyDNHSVSzxhvvx2mpnaSQCBrqbxUrLmnsSgLXUm8" ] ]
./tezos-client rpc get '/chains/main/blocks/BMRSdNEGa3jDyDNHSVSzxhvvx2mpnaSQCBrqbxUrLmnsSgLXUm8/merkle_proof/generate?key=big_maps/next&key=version' > proof.json
cat proof.json
[ "budsome", "internal", "internal", "internal", { "segment": "03" },
  "internal",
  { "hash":
      [ "9ee54621026ef1bd81d3259e8ebe2aa99274c25a95a1a195d1777bc8",
        "0b274b35" ] },
  { "hash":
      [ "b62abab48c27887ef4eb202b753f7815bf3818b581bd1213c62ad0bc",
        "0e3d71df" ] },
  { "hash":
      [ "fa73b4597074d1594b2fd5746b7e6a6fefb48c0e523d217ac1130714", "" ] },
  { "hash":
      [ "ba1cf717465993f6afabe5479e13dfc8ace2a85636f6f436ed32db48", "" ] },
  "internal", "internal", "internal",
  { "hash":
      [ "ae1d5cbc0b4a3fce5665736ef287ad22ff47e05e516e2aaab1153ba8", "" ] },
  "internal",
  { "hash":
      [ "fa6ea598c3ec009c177eaa8e950373b6b340df663fa80a544fb946e7",
        "094714eb" ] }, "internal", { "segment": "06cd2dc6" },
  { "value": "616c7068615f303032" },
  { "hash":
      [ "360e159c8289b8c82491eec09206ef4101ccae580aabebc6375b8803",
        "067935c7" ] },
  { "hash":
      [ "8845b50900dc012c588234880eaa5abc398e136f477f4ac88a892944", "02" ] },
  { "hash":
      [ "197a96625aee9a45ee88063ecfa00ea33d9791903351ac64a3ab24c4", "" ] } ]
./tezos-client rpc post '/chains/main/blocks/BMRSdNEGa3jDyDNHSVSzxhvvx2mpnaSQCBrqbxUrLmnsSgLXUm8/merkle_proof/validate?key=big_maps/next&key=version' with "$(cat proof.json)"
true
Edited by yoshihiro503

Merge request reports