feat: add Firo network support#16
Open
reubenyap wants to merge 10 commits intorosen-bridge:devfrom
Open
Conversation
Add complete Firo chain integration following the established UTXO chain pattern (Doge/Bitcoin): - networks/firo: Network package with client, constants, types, UTXO selection, transaction generation, and BlockCypher API utilities - wallets/firo-wallet: Wallet package with browser extension integration (connect, sign, broadcast) - apps/rosen: App wiring with server actions, lock address config, and wallet registration - packages/constants: Add Firo to NETWORKS (index 7, native token: firo) - packages/icons: Add Firo network SVG icon - packages/utils: Add Firo explorer URLs (address, token, tx) - apps/rosen-service: Gracefully skip unconfigured chains in commitment extractor registration Co-authored-by: Reuben Yap <[email protected]>
- Add networks/firo and wallets/firo-wallet to build.sh (BEK requirement) - Clean up firo.svg: remove XML declaration and unnecessary attributes, keep only viewBox and xmlns (consistent with other network SVGs) - Fix typo: opRetrunDataLength -> opReturnDataLength in getMaxTransfer.ts - Fix incorrect JSDoc @param references in utils.ts Co-authored-by: Reuben Yap <[email protected]>
|
@cursoragent is attempting to deploy a commit to the rosen-bridge Team on Vercel. A member of the Team first needs to authorize it. |
Closed
abdolian
approved these changes
Apr 4, 2026
vorujack
previously approved these changes
Apr 16, 2026
RaaCT0R
previously approved these changes
Apr 16, 2026
Co-authored-by: Reuben Yap <[email protected]>
vorujack
previously approved these changes
Apr 16, 2026
ChainChoices (derived from NETWORKS_KEYS) includes chains like firo that have no entry in the Chains config type nor a data adapter. Using the broader ChainChoices type to index configs.chains / drive the adapter switch made the switch non-exhaustive and caused type-check failures. Narrow the index cast in assetAggregator and the parameter of createChainSpecificDataAdapter to keyof Chains so indexing is valid and the switch is exhaustive, eliminating the inferred undefined in the return type. https://claude.ai/code/session_01MJPsWRuNaJm3GSREcoMDJ5
- Align FiroWallet.performConnect with MyDogeWallet and other sibling wallets by calling this.isConnected() (base-class wrapper that asserts availability and swallows connection-check errors) instead of the raw hasConnection() vendor probe. - Add a changeset covering the full Firo integration plus the rosen-service2 type-narrowing fix so the changeset CI check passes. https://claude.ai/code/session_01MJPsWRuNaJm3GSREcoMDJ5
vorujack
previously approved these changes
Apr 18, 2026
RaaCT0R
previously approved these changes
Apr 18, 2026
abdolian
reviewed
Apr 18, 2026
abdolian
approved these changes
Apr 19, 2026
vorujack
previously approved these changes
Apr 19, 2026
`path.posix.relative` cannot produce a correct relative path from two Windows-absolute paths, so `getKnipCommand` was emitting garbage like `knip --dependencies --workspace ../E:\Github\rosen-ui\packages\X`, which knip rejects as "Workspace is not a directory". This blocked pre-commit hooks on Windows for any commit touching package sources. Use the cross-platform `path.relative` and normalize separators to forward slashes (matching the existing type-check line that already uses `path.relative`).
With firo in NETWORKS_KEYS but not yet in configs.chains, ChainChoices is wider than keyof typeof configs.chains. Adjust the two spots that index configs.chains[chain] so tsc stays green until the backend Firo config lands: - assetAggregator: cast chain to keyof typeof configs.chains at the index site. - assetDataAdapters: narrow createChainSpecificDataAdapter's chain parameter from ChainChoices to keyof typeof configs.chains (the switch never handled firo anyway), removing the now-unused ChainChoices import.
This was referenced Apr 22, 2026
vorujack
approved these changes
Apr 25, 2026
RaaCT0R
requested changes
Apr 26, 2026
| export const getAddressUtxos = async ( | ||
| address: string, | ||
| ): Promise<Array<FiroUtxo>> => { | ||
| const blockcypherUrl = `${process.env.FIRO_BLOCKCYPHER_API}`; |
Member
There was a problem hiding this comment.
❔ Let me know the reason
Do we have a Blockcypher API for Firo? If not, these functions should be implemented with suitable API, such as node RPC, which is used in guard-service and watcher.
Member
There was a problem hiding this comment.
In case of changing to another API, don't forget to remove the FIRO_BLOCKCYPHER_API env var in apps/rosen/.env.example and add new variables for the new API.
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.
Summary
This PR adds complete Firo chain integration to the Rosen Bridge UI, following the established UTXO chain pattern used by Doge and Bitcoin.
Commits
The PR is structured as two commits for easy review:
feat: add Firo network support— The full Firo integration (equivalent to the changes in add firo support #15)fix: address review feedback on Firo integration— Fixes for the issues identified in the add firo support #15 reviewChanges
Firo Integration (commit 1)
networks/firo/: Network package with client class, constants, types, UTXO selection, transaction generation, and BlockCypher API utilitieswallets/firo-wallet/: Wallet package with browser extension integration (connect, sign, broadcast)apps/rosen/: App wiring with server actions, lock address config, and wallet registrationpackages/constants: Add Firo toNETWORKS(index 7, native token:firo)packages/icons: Add Firo network SVG iconpackages/utils: Add Firo explorer URLs (address, token, tx)apps/rosen-service: Gracefully skip unconfigured chains in commitment extractor registrationapps/rosen/.env.example: AddFIRO_BLOCKCYPHER_APIvariableReview Fixes (commit 2)
Addresses the feedback from #15:
build.sh: Addnetworks/firoandwallets/firo-walletworkspaces to the build script (per BEK documentation requirement, as noted by @abdolian)firo.svg: Remove XML declaration and unnecessary attributes; keep onlyviewBoxandxmlnsconsistent with other network SVGs (as noted by @abdolian)getMaxTransfer.ts: Fix typoopRetrunDataLength→opReturnDataLengthutils.ts: Fix incorrect JSDoc@paramreferences