Skip to content

Add OP_RETURN Support Required for Rosen Bridge#18

Draft
navidR wants to merge 1 commit intofiroorg:stagingfrom
navidR:dev/navidr/add-op_return
Draft

Add OP_RETURN Support Required for Rosen Bridge#18
navidR wants to merge 1 commit intofiroorg:stagingfrom
navidR:dev/navidr/add-op_return

Conversation

@navidR
Copy link
Copy Markdown

@navidR navidR commented May 7, 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 or MWEB) 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 changed the title Add OP_RETURN support equired for Rosen Bridge Add OP_RETURN Support Required for Rosen Bridge May 7, 2026
@navidR navidR force-pushed the dev/navidr/add-op_return branch 5 times, most recently from 8d4ff98 to 375ae6f Compare May 8, 2026 09:28
@navidR navidR force-pushed the dev/navidr/add-op_return branch from 375ae6f to 1b725ea Compare May 8, 2026 10:52
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