Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unblinding UTXO] Ability to detect and spend unblinded addresses #36

Open
i5hi opened this issue Aug 14, 2024 · 4 comments
Open

[Unblinding UTXO] Ability to detect and spend unblinded addresses #36

i5hi opened this issue Aug 14, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@i5hi
Copy link
Collaborator

i5hi commented Aug 14, 2024

Requires testing solutions addressed in:

Blockstream/lwk#38 (comment)

@i5hi i5hi self-assigned this Aug 14, 2024
@i5hi i5hi added the bug Something isn't working label Aug 14, 2024
@delcin-raj
Copy link

Proposed Solution

There are 2 ways to solve this problem.

Case 1: Ability to detect and spend the UTXO

BREAKING CHANGE

This would require adding additional field blinded to the Balance struct to inform the user
whether this asset is blinded or not.

In that case user can call build_unblinded_tx function (to be implemented) to spend that unblinded asset.

Case 2: Ability to spend the UTXO but not detect it

In this case we can query the lwk for external utxos to display the unblinded UTXOs as regular balances.

If the user calls build_asset_tx function to spend any asset we would query for external utxos again and
would check whether that asset is blinded or not.
In case of blinded we would create that corresponding pset else the current implementation of pset.

But the user will NOT be able to detect the unblinded UTXO.

When going for case 1 other refactoring and cleanup could be done.
We can remove AssetId*Map* wrapper types as it is not straightforward to convert from BTreeMap to Balance.
We can rather create helper functions or methods for the Balance type to get that done.

NOTE: AssetId*Map* types are not used in any function signatures. So they are redundant.

@i5hi
Copy link
Collaborator Author

i5hi commented Dec 16, 2024

Case 1 is a more straightforward approach.

We would also want Transactions to show the unblinded tx.

@delcin-raj
Copy link

Working on it.

@delcin-raj
Copy link

#42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants