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

[WIP] Updated ListAssetRequest to include additional filter options #1199

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

itsrachelfish
Copy link

Resolves #876

Been discussing the architecture for this with @GeorgeTsagk. Currently this PR just adds an additional option to filter by minAmount. Next steps are to refactor fetchRpcAssets to accept a single AssetQueryFilters argument instead of separate arguments for each filter option.

Fortunately the assets SQL file already includes QueryAssetsParams which can be used to provide all of the necessary filter options except for maxAmount. This will also need to be updated.

type QueryAssetsParams struct {
AssetIDFilter []byte
TweakedScriptKey []byte
AnchorPoint []byte
Leased interface{}
Now sql.NullTime
MinAnchorHeight sql.NullInt32
MinAmt sql.NullInt64
Spent sql.NullBool
KeyGroupFilter []byte
AnchorUtxoID sql.NullInt64
GenesisID sql.NullInt64
ScriptKeyID sql.NullInt64
Bip86ScriptKeysOnly bool
}

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

Successfully merging this pull request may close these issues.

[feature]: Add filters to ListAssets
2 participants