How to construct a proof?
I want to construct a proof from a connected chain. This should probably be done using closestDescendantMerkleValue and working towards the root?
Do you already have done something similar somewhere? If not, could you give me some example on how I can use the RPC via PAPI to do this?
Do you mean that you want to build the compact proof of a storage entry using the JSON-RPC API? There is an explanation on how to achieve this on this comment. We haven't had the need to do that yet, so we haven't implemented it.
The only place were we are building a proof is on the merkleize-metadata package (in here). We could reuse some of that code to implement the proof construction via the JSON-RPC API.
If you don't mind me asking: what's the use case for this?
There is an explanation on how to achieve this on this comment.
Yeah I had this comment in my head when thinking about this.
I want to write a demo for remote proxies which requires getting a proof from the relay chain and sending it alongside a transaction to a parachain.