Skip to content

[feature]: Create "Asset Book" tapcli feature #881

Open
@dstadulis

Description

@dstadulis

Is your feature request related to a problem? Please describe.
As a tapcli user I want to be able to refer to to the notional / nominal name of an asset rather than the obtuse "asset id" in order to make my UX easier

Describe the solution you'd like

Title: Create "Asset Book" Feature


Description

The purpose of this feature will be similar to an address book, allowing users to easily map human-readable, client-side-defined asset names (e.g. USDx, $marketname, stablecoin_x etc) to the Taproot Assets cryptographic protocol identifier asset_id. This will provide a convenient way for users to specify assets when using tapcli without having to use the long assetIDName or asset_id directly.

Feature deliverables:

  • A new ./cmd/tapcli/ will be added to manage the asset book
  • ./cmd/tapcli/* functions, which accept asset IDs, will be enhanced to refer to their personal asset book to map an asset name to asset_id
  • Suggested subcommands:
    a or add to add a new asset-name entry
    e or edit to edit an existing asset-name entry
    d or delete to delete a asset-name entry
    l or list to list all asset-name entries
    s or search to search for specific asset-names by name or keyword
    o or export to export the entire address book to a file
    i or import to import a file of asset-name data into the address book
  • The asset book should: handle multiple asset names and their corresponding asset IDs.
  • The asset book should: provide appropriate error reporting in disallowed cases:
    • Assert that only one asset_id can be assigned/mapped to an asset name in the asset book (e.g.)
  • Consider tapcli providing information if an additional asset name is assigned to an asset_id
    • i.e. an asset_id may have an unconstrained number of names associated with it (Earth, Gaja, Pale blue dot all refer to the same location)

Existing Repo Areas to be incorporate the feature into existing asset_id specification

https://github.com/lightninglabs/taproot-assets/tree/dc8932dc385aca160586a82e94f4113c717d9992/cmd/tapcli

Feature site (Suggested)

  • ./cmd/tapcli/asset-book.go
  • ./cmd/tapcli/commands/asset-book/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🆕 New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions