fix(atomic-swap): allow permissionless release with preimage - #41
fix(atomic-swap): allow permissionless release with preimage#41mimi-esc wants to merge 1 commit into
Conversation
Remove the counterparty signature requirement so relays and watchers can complete HTLCs with a valid preimage while preserving the fixed payout destination.\n\n🤖 Generated with Codebuff\nCo-Authored-By: Codebuff <noreply@codebuff.com>
|
Thanks @mimi-esc — this is the version of BRIDGE-15 I want to take. The contract change is right: the preimage is the authorization, the payout destination stays pinned to One blocker before merge, and it's in the test rather than the contract.
What would actually pin the fix: // authorize only the initiator's lock, then release with nothing authorized
t.env.set_auths(&[]);
t.client().release(&swap_id, &secret);i.e. build the swap under mocked auths, then clear them ( Worth noting the same gap existed in #36, which I've closed in favour of this PR. |
Summary
This matches the delegated-release HTLC approach from Micopay Protocol PR #327: the valid preimage authorizes release, while the stored counterparty controls the destination.
Verification
Closes #36