SFT-6915: fix multisig crypto output import - #55
Merged
Merged
Conversation
`Value::from_ur` can't hold a `Terminal` because its two-lifetime, arena-allocated shape doesn't fit the single-lifetime `Value<'a>` enum. Expose a dedicated `decode_output_descriptor` free function that takes a caller-provided `TerminalContext` arena and dispatches on the UR type string. Accepts the legacy `crypto-output` spelling (BCR-2020-010, still emitted by Sparrow) plus the newer `output-descriptor` and `output` aliases. Also adds `Value::is_output_descriptor` so callers can route on type without re-implementing the alias list. Ref SFT-6915.
Addresses review feedback on PR #54. The helper used to also accept `output-descriptor` and bare `output` as aliases and route them through the legacy BCR-2020-010 decoder, but: - BCR-2023-010 `output-descriptor` is a different wire format (a CBOR tag-40308 map wrapping a text descriptor), not the tag-400..410 recursive tree. Feeding a spec-compliant `output-descriptor` payload to `decode_output_descriptor` produces `InvalidCbor(invalid tag)`. - Bare `output` is not a registered UR type at all. Keep only `crypto-output`, update the rustdoc to call out the distinction, and add tests that assert the other type strings now cleanly surface `UnsupportedResource` at the dispatch layer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
icota
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
additions to #54 , I don't think I can push to @Jacksper13 's fork branch afaik