Add OP_RETURN Support Required for Rosen Bridge#18
Draft
navidR wants to merge 1 commit intofiroorg:stagingfrom
Draft
Add OP_RETURN Support Required for Rosen Bridge#18navidR wants to merge 1 commit intofiroorg:stagingfrom
navidR wants to merge 1 commit intofiroorg:stagingfrom
Conversation
8d4ff98 to
375ae6f
Compare
375ae6f to
1b725ea
Compare
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.
This PR adds
OP_RETURNoutput 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 anOP_RETURNoutput with proper push‑data encoding (supporting payloads up to 80 bytes usingOP_PUSHDATA1for 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 carryOP_RETURNdata.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_RETURNdata resets on form clear), making the wallet fully ready for Rosen Bridge transparent Firo transfers with no risk of mis‑bridging.