Skip to content

Add OP_RETURN Support Required for Rosen Bridge#1342

Open
navidR wants to merge 1 commit into
cypherstack:stagingfrom
navidR:release/navidr/add-op_return
Open

Add OP_RETURN Support Required for Rosen Bridge#1342
navidR wants to merge 1 commit into
cypherstack:stagingfrom
navidR:release/navidr/add-op_return

Conversation

@navidR
Copy link
Copy Markdown
Contributor

@navidR navidR commented May 16, 2026

This PR adds OP_RETURN output support to Campfire wallet’s Firo (Firo) transparent send flow, enabling users to participate in Rosen Bridge transfers by pasting bridge payment URIs. When a URI containing the op_return parameter is pasted or scanned, the wallet automatically extracts the hex payload, attaches it as an OP_RETURN output with proper push‑data encoding (supporting payloads up to 80 bytes using OP_PUSHDATA1 for lengths 76–80), and includes the extra output in all fee‑estimation and coin‑selection steps. The feature is currently scoped to Firo’s transparent‑to‑transparent transactions only; Spark and MWEB privacy transactions are unaffected and will not carry OP_RETURN data.

A safety guard has been added to prevent loss of funds when a user pastes a bridge URI while the wallet is set to a private (Spark) balance. In that scenario, a warning message is displayed and the send/preview button is disabled, ensuring that bridge data is never silently omitted from a transaction. The guard clears automatically when the user switches to the public balance or clears the send form. The patch has been reviewed for script correctness, fee estimation accuracy, and internal state cleanliness (OP_RETURN data resets on form clear), making the wallet fully ready for Rosen Bridge transparent Firo transfers with no risk of mis‑bridging.

@navidR navidR force-pushed the release/navidr/add-op_return branch from 4fa4ee8 to a99cba4 Compare May 16, 2026 10:25
@navidR navidR marked this pull request as ready for review May 16, 2026 11:28
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.

1 participant