Skip to content

SFT-6915: fix multisig crypto output import - #55

Merged
icota merged 3 commits into
mainfrom
SFT-6915-fix-multisig-crypto-output-import
Apr 27, 2026
Merged

icota merged 3 commits into
mainfrom
SFT-6915-fix-multisig-crypto-output-import

Conversation

@mjg-foundation

@mjg-foundation mjg-foundation commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

additions to #54 , I don't think I can push to @Jacksper13 's fork branch afaik

Jacksper13 and others added 3 commits April 22, 2026 15:13
`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
icota merged commit 99b00a3 into main Apr 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants