BeamMW / beam

Beam: Scalable Confidential Cryptocurrency. Leading the way to Confidential DeFi
https://beam.mw
Apache License 2.0
700 stars 205 forks source link

Explorer node: Add kernel search #1988

Open dbadol opened 3 months ago

dbadol commented 3 months ago

Current situation We can request the node explorer for the details of a given block height (using "block" and "&height="), but we cannot request the information if we only have a kernel id (which is what users normally get for the transactions they do with their wallet).

Solution we'd like Allow to request "block" with a "&kernel=" parameter holding a kernel id. The returned information would be the same as if we had requested the block height of the block that contains that kernel.

Alternative Use "&id=" instead of "&kernel=" (as already used for "asset" and "contract" requests).

Remark By allowing two different parameters ("&height=" and "&kernel=") the node explorer needs to manage the possibility to get an inconsistent request. In that case, it should consider only "&height=" and ignore "&kernel=".

Additional context Such a kernel id search capability is probably the main use a standard user can have a block explorer!

dbadol commented 3 months ago

I see now here that this "kernel" option already exist! Or at least existed in 2020... Is it still working? https://github.com/BeamMW/beam/wiki/Beam-Node-Explorer-API