Skip to content

feat: add Firo blockchain integration#3196

Draft
bernd2022 wants to merge 4 commits intodevelopfrom
feat/firo-blockchain-integration
Draft

feat: add Firo blockchain integration#3196
bernd2022 wants to merge 4 commits intodevelopfrom
feat/firo-blockchain-integration

Conversation

@bernd2022
Copy link
Collaborator

Summary

  • Refactor Bitcoin services into shared bitcoin-based abstractions (BitcoinBasedFeeService, BitcoinBasedClient) for UTXO blockchain reuse
  • Add full Firo blockchain integration: node client, PayIn (register/send), PayOut (prepare/payout), DEX strategies, deposit addresses
  • Add Firo asset seed data and infrastructure config (Docker, node config)

Test plan

  • TypeScript typecheck passes
  • All unit tests pass
  • Local e2e: buy-crypto (fiat → FIRO)
  • Local e2e: sell-crypto (FIRO → fiat)
  • Local e2e: payment-link payment (FIRO)

Refactor Bitcoin services into shared bitcoin-based abstractions
(BitcoinBasedFeeService, BitcoinBasedClient) for UTXO blockchain reuse.
Add full Firo support: node client, PayIn (register/send), PayOut
(prepare/payout), DEX strategies, deposit addresses, asset seed data,
and infrastructure config.
Firo is UTXO-based like Bitcoin and requires forwarding from deposit
addresses to the liquidity address before payouts.
- Rewrite send() to use explicit UTXO input via createrawtransaction
  instead of sendmany (ensures only the specified deposit UTXO is spent)
- Rewrite sendMany() with manual coin selection from liquidity address
  only (listunspent filtered by address) to prevent spending deposit/
  payment UTXOs
- Extract buildSignAndBroadcast() for shared raw TX building logic
- Fix getBalance() to use listunspent on liquidity address instead of
  getbalance with default account (which returns negative due to Firo's
  legacy account system)
- Remove unused FiroController and clean up FiroModule
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