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

[feature]: Add filters to ListAssets #876

Open
GeorgeTsagk opened this issue Apr 11, 2024 · 3 comments · May be fixed by #1199
Open

[feature]: Add filters to ListAssets #876

GeorgeTsagk opened this issue Apr 11, 2024 · 3 comments · May be fixed by #1199
Assignees
Labels

Comments

@GeorgeTsagk
Copy link
Member

Description

We should add filters to the ListAssets call, so that only assets that satisfy certain criteria are returned.
Examples of such filters could be:

  • GroupKey: only return assets that belong to the group with this key
  • MinAmount: only return assets with amount greater or equal to this value
  • MaxAmount: only return assets with amount less or equal to this value
  • ScriptKey: return all assets that use this script key
  • AnchorOutpoint: return all assets that are currently anchored on this outpoint
@habibitcoin
Copy link
Contributor

+1, script_key filtering would be useful in the case of a pocket universe operator. We implemented this in a roundabout way on Tajfi-server by first calling the UTXOs RPC, filtering the response by script_key, and then reconstructing balances accordingly. (this is assuming the Tajfi-serving is responding to a user's request for their balances, whereby the user provides us their pubkey, which is used as the script_key for all their Taproot Asset vUTXOs)

@dstadulis
Copy link
Collaborator

@itsrachelfish how about: start with min amount and have a commit just for that to demonstrate method

@dstadulis dstadulis moved this from 🔖 Ready to 🏗 In progress in Taproot-Assets Project Board Oct 31, 2024
@dstadulis
Copy link
Collaborator

@GeorgeTsagk, @itsrachelfish plans to update the structure for ListAssetRequest in rpcserver.go to include a new filter parameter. Will you ACK/NACK approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

4 participants