Skip to content

Move bitcoin signer to rust#361

Merged
0xh3rman merged 6 commits into
mainfrom
bitcoin-signer
Jun 4, 2026
Merged

Move bitcoin signer to rust#361
0xh3rman merged 6 commits into
mainfrom
bitcoin-signer

Conversation

@0xh3rman
Copy link
Copy Markdown
Collaborator

@0xh3rman 0xh3rman commented May 21, 2026

Transfer Matrix

ID Coverage Builder / branch Example Status
T1 Native segwit P2WPKH transfer with change sign_bitcoin_like + UtxoPlanner::Exact BTC bc1q → bc1q Tested (9f71a30b…)
T2 Max-send (sweep) leaving no change UtxoPlanner::Max BTC/LTC max-send Tested — BTC/LTC/Doge (5072b15a…)
T4 Transfer with memo (OP_RETURN at output index 1) op_return_output + spend_outputs Covered by W5/W6 Maya swaps Tested live (OP_RETURN at index 1 in W5/W6)
T5 Legacy P2PKH transfer sign_bitcoin_like legacy path Doge D… → D… Tested (b99c4551…)
T6 Bitcoin Cash P2PKH with FORKID sighash bitcoin_cash::sign_plan (BIP143 + 0x41) BCH bitcoincash:q… → bitcoincash:q… Tested (7360dbab…)
T7 Zcash t1 → t1 transparent transfer zcash::sign_transparent ZIP-244 v5 Zcash t1… → t1… Tested (09cc92df…)
T8 Zcash max-send Zcash branch in UtxoPlanner::Max + ZIP-317 fee Zcash sweep Tested (e5d68d6b…)

Swap Matrix

ID Coverage Builder / branch Example Status
W1 Swap via Transfer path (memo OP_RETURN), exact amount SpendRequest::swap Transfer BTC → ETH via Thorchain Validated live via Maya — max-send (W5/W6) + exact-amount with change (W7); exact-amount gap closed by W7. Pure-Thorchain route still pending (Thorchain paused)
W2 Swap via Transfer path, max amount (memo optional) Transfer + use_max_amount BCH → SOL via NEAR Intents max Tested (7360dbab…, intent)
W3 Swap via Contract path (hex-decoded nulldata), exact amount SpendRequest::swap Contract (request.rs:42-58) BTC → SOL via Chainflip Tested + credited (scan, 9931d6dd…)
W4 Swap via Contract path, max-intent (must still emit change as refund) Contract + exact-amount with change BTC → SOL via Chainflip max Fixed + tested (scan, 759ef7a6…)
W5 Swap via Transfer path (memo OP_RETURN), Zcash source — first UTXO swap routed through MayaChain (a THORChain fork, added while Thorchain is paused) SpendRequest::swap Transfer + ThorChain::new_mayachain ZEC → BTC via Maya (no affiliate) Tested + swapped — ZIP-244 max-send, block 3,364,512, memo =:b:…:0/1/0 (94e64344…)
W6 Swap via Transfer path (memo OP_RETURN), max amount, with g1 affiliateMayaChain SpendRequest::swap Transfer + ThorChain::new_mayachain BTC → ETH via Maya (g1:50) Tested + swapped — P2WPKH max-send, block 952,309, RBF-signaled, memo =:e:…:0/1/0:g1:50 (98b10ec1…, mayascan)
W7 Swap via Transfer path (memo OP_RETURN), exact amount with changeMayaChain; first real RBF replacement SpendRequest::swap Transfer + build_exact_plan BTC → ARB via Maya (g1:50) Tested + swapped — exact-amount P2WPKH, block 952,318, 3 out [vault 20,000, OP_RETURN =:a:…:g1:50, change 7,863], RBF-replaced original f0a6365f… (846→1,260 sat) (0f6f0bfc…, mayascan)

@0xh3rman 0xh3rman marked this pull request as ready for review May 22, 2026 12:57
@0xh3rman 0xh3rman force-pushed the bitcoin-signer branch 2 times, most recently from 479d3b4 to 403aebb Compare May 30, 2026 08:17
@0xh3rman 0xh3rman self-assigned this May 30, 2026
Comment thread core/crates/gem_bitcoin/src/signer/planner/request.rs Outdated
Comment thread core/crates/gem_bitcoin/src/testkit/signer_mock.rs Outdated
Comment thread core/crates/gem_bitcoin/src/testkit/planner_mock.rs Outdated
Comment thread core/crates/gem_bitcoin/src/signer/zcash.rs Outdated
Comment thread core/crates/gem_bitcoin/src/signer/planner/fee.rs Outdated
Comment thread core/crates/gem_bitcoin/src/signer/planner/fee.rs Outdated
Comment thread core/crates/gem_bitcoin/src/signer/planner/fee.rs Outdated
Comment thread core/crates/gem_bitcoin/src/testkit/signer_mock.rs Outdated
Comment thread core/Cargo.toml
@0xh3rman 0xh3rman merged commit 50b582b into main Jun 4, 2026
7 checks passed
@0xh3rman 0xh3rman deleted the bitcoin-signer branch June 4, 2026 09:48
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.

2 participants