lightninglabs / lightninglabs/taproot-assets
[feature]: update QueryAssetStats asset_name_filter to support substring & case-insensitive matches
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 525
- Forks
- 150
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
**Is your feature request related to a problem? Please describe.**
When using the REST RPC endpoint `/v1/taproot-assets/universe/stats/assets?asset_name_filter=XXX`, the name must be an exact match, including exact upper/lowercasing.
**Describe the solution you'd like**
I would like for the filtering to return assets where the `asset_name_filter` is a substring of the asset's name and to be case-insensitive.
**Describe alternatives you've considered**
Right now, in Terminal, we fetch all assets to do the filtering in the browser. As the amount of assets increases, this becomes unsustainable. We'd like to switch to server-side filtering, and it would be a better UX to allow users to find assets without needing to type the exact full name.
**Additional context**
I mentioned this to @Roasbeef, he said to reference https://www.sqlite.org/fts5.html in regards to text matching at the DB level.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the QueryAssetStats entry point serving /v1/taproot-assets/universe/stats/assets and review how asset_name_filter is applied. Read the referenced SQLite FTS5 documentation before deciding how database-level matching fits the existing query. Done means the endpoint returns assets whose names contain the filter without case sensitivity, with coverage for substring and casing variations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sqlite
- Domain
- api, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100