Blockstream / Blockstream/esplora
[Elements] Allow clients to see transactions with unblinded assets and amounts
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 514
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 16
Description
When visiting
blockstream.info/liquid/#unblinding_data
Instead of showing the blinded inputs and outputs, it should show the unblineded inputs and outputs for the outputs that can be unblinded with `unblinding_data`



Before showing the unblinded assets and amounts, the client should verify them against the corresponding output commitments.
`unblinding_data` should contain `asset`, `asset_blinder`, `amount` and `amount_blinder` for some inputs and outputs. These values should be verified against the corresponding commitments in the transaction (or previous transaction).
`unblinding_data` should not be communicated to the server and verification should be done client side, this has similar requirements w.r.t. https://github.com/Blockstream/esplora/issues/82.
Ideally, `unlblinding_data` should be composable, so that we can support swap participants to "pipe" their unblinding data.
If a commitments fails to verify, it should display an error on that input or output only (please ignore error message):

Notes:
- This process does not really unblind the outputs, but rather verifies the commitments, so maybe some names (e.g. `unblinding_data`) should be replaced.
However this achieves the same results of https://github.com/Blockstream/esplora/issues/60 but with different inputs.
This has a (minor) improvement: in case the server is malicious and collects unblinded data, if it has the blinding keys it can unblind any output sent to the corresponding CT address, while if it has asset, asset blinder, amount and amount blinder it can only unblind a single output.
- Verification of a single commitment (e.g. only asset commitment, by providing only asset and asset blinder) does not have to be supported, at least initially.
Issue written with @alessandro-saglimbeni
---
Python example of blinded commitment verification:
```
import wallycore as wally
def verify_commitments(asset, asset_blinder, expected_asset_commitment,
amount, amount_blinder, expected_amount_commitment):
try:
asset_commitment = wally.asset_generator_from_bytes(asset, asset_blinder)
amount_commitment = wally.asset_value_commitment(amount, amount_blinder, asset_commitment)
return (asset_commitment, amount_commitment) == \
(expected_asset_commitment, expected_amount_commitment)
except ValueError:
return False
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.