Skip to content

View XDR page should support decoding XDR streams (multiple concatenated XDR values) #1879

@leighmcculloch

Description

@leighmcculloch

What problem does your feature solve?

The View XDR page currently only decodes a single XDR entity at a time. This makes it difficult to work with XDR streams, such as contract specs, which are a series of XDR values concatenated together and base64-encoded as a single unit.

Today, if a user copies a complete contract spec (which is a single base64-encoded stream of multiple XDR values) to the View XDR page, it cannot decode all the entries. The user would need to somehow split the stream into individual values and decode them one by one, which is impractical.

The Stellar CLI already supports decoding XDR streams (e.g. giving it a spec and getting back a full JSON stream of all entries). The Lab should have equivalent capability.

Related: #1556 (comment)

What would you like to see?

Add the ability for the View XDR page to decode a stream of XDR values (multiple concatenated XDR values encoded together as a single base64 string), displaying all decoded entities at once.

What alternatives are there?

  • Use the Stellar CLI to decode XDR streams instead of the Lab.
  • Manually split XDR streams into individual values and decode them one at a time on the View XDR page (impractical since boundaries between values aren't visible in the base64 encoding).

cc @janewang

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog (Not Ready)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions