Skip to content

Solana: wallet-side metadata overlays (LayeredRegistry parity with Ethereum) #376

Description

@prasanna-anchorage

Context

The Solana decoder currently composes through fixed IDL + preset layers, with no path for a wallet to overlay its own metadata at request time. The Ethereum side already models this as a LayeredRegistry<T> — a request-scoped registry layered over compiled-in defaults — but the wiring is itself incomplete (create_layered_registry in src/chain_parsers/visualsign-ethereum/src/lib.rs uses defaults only; loading wallet-provided token metadata into the request layer is a TODO).

The blog post added in #296 (Composable by design) calls Solana wallet-side overlays "the natural next step," and @-Shahan flagged in review that no tracking issue exists. Filing so it isn't lost.

Scope

  • Define what a Solana wallet overlay can override at request time (e.g. token metadata, program/account labels), bounded by the existing IDL trust model in src/chain_parsers/visualsign-solana/src/idl/ — untrusted caller-supplied data must stay display-only and must not relabel trusted/built-in programs.
  • Introduce a request-scoped overlay composed over the built-in IDL + preset layers, analogous to Ethereum's LayeredRegistry<T>.
  • Plumb wallet-provided metadata from ChainMetadata (Solana variant) into that overlay.
  • Fixtures covering precedence (overlay wins for non-trusted entries) and the security guards (overlay cannot mislabel a trusted program or hide a destination).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions