Skip to content

asset search and registry data endpoints#151

Merged
wiz merged 3 commits into
mempoolfrom
mononaut/asset-search
May 30, 2026
Merged

asset search and registry data endpoints#151
wiz merged 3 commits into
mempoolfrom
mononaut/asset-search

Conversation

@mononaut

@mononaut mononaut commented May 25, 2026

Copy link
Copy Markdown
Contributor

adds two new endpoints for liquid instances:

/assets/registry/search

efficient typeahead-style substring search for liquid asset registry items, supporting query parameters:

  • q: search string (max 64 characters)
  • limit: max items to return (default 15, max 100)

/assets/registry/:asset

returns just the off-chain asset registry data for a specific asset ID, without the expensive history lookups.

Like the existing /assets/registry endpoint, these require --asset-db-path to be configured.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Liquid asset registry endpoints to support faster client-side asset discovery and lightweight metadata fetches without on-chain history lookups.

Changes:

  • Add /assets/registry/search for substring typeahead search with q + limit query params.
  • Add /assets/registry/:asset to return off-chain registry metadata only for a given asset id.
  • Implement registry-side search and add query-layer helpers for registry lookup/search.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/rest.rs Adds the two new REST routes and response shaping for search results + per-asset registry lookup.
src/new_index/query.rs Adds query methods to fetch a single registry entry and to run registry searches.
src/elements/registry.rs Implements the underlying in-memory search across cached registry metadata fields.
src/elements/mod.rs Re-exports AssetMeta so REST/query code can use it via crate::elements::*.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/elements/registry.rs
Comment thread src/elements/registry.rs
Comment thread src/new_index/query.rs
Comment thread src/rest.rs
Comment thread src/elements/registry.rs

@junderw junderw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor things found by Copilot. Feel free to fix them if needed.

LGTM 237a2df

@mononaut mononaut force-pushed the mononaut/asset-search branch from 2a5af30 to f11f6ab Compare May 29, 2026 09:35
@wiz wiz merged commit b0774e5 into mempool May 30, 2026
12 checks passed
@wiz wiz deleted the mononaut/asset-search branch May 30, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants