lightninglabs / lightninglabs/taproot-assets

[feature]: `FetchAssetMeta` should accept `group_key` as an input alternative to `asset_id`

Open
#1,504 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

API enhancement group_key
Dominant language
Go
Stars
525
Forks
150
Avg merge
2d 15h
Merged PRs (30d)
31

Description

`FetchAssetMeta` currently requires one of the following

https://github.com/lightninglabs/taproot-assets/blob/e621beefce9d80a5fed091b52534876c23db5e15/taprpc/taprootassets.proto#L1301-L1317

as in input.

We should also accept `group_key` as there can be many `asset_id` in a group. Different each `asset_id` in a group can have different metadata, so we should return an array of metadata for all `asset_id` in the `group_key`.

However, there is a special case of data that is normally embedded in the metadata, the `decimal_display`. This is not supposed to change, so we should decode and return that value in a separate property. See also, https://github.com/lightninglabs/taproot-assets/issues/1503 . Alternatively, if we don't want to include the group's `decimal_display` value in the response to `FetchAssetMeta`, we should create a new RPC that does.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the FetchAssetMeta definition in taprpc/taprootassets.proto at lines 1301–1317, then review the related discussion in issue #1503. Clarify whether group_key support belongs in this RPC or a new one, and define how the metadata array and separate decimal_display value should be returned for every asset in the group.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.