Loops HouseUndo for Bitcoin: a cancel button for a stolen key

NEAR HACKATHON
Team
1 member- TEOwner
Ted Chen
Overview
Undo for Bitcoin is a cancel button for native Bitcoin, where a stolen spend key means stolen coins. It is for keys kept in reach: a phone's, or an AI agent's.
Each coin sits in a two-branch P2WSH script. Branch one needs two signatures: the owner's spend key, and a second key only NEAR Chain Signatures can produce. A public NEAR contract asks for that signature only after a public wait, longer for new addresses. Meanwhile the owner's phone passkey can cancel the request and stop the stolen key from asking again. Branch two: a cold key alone after a Bitcoin timelock, so without NEAR the owner still gets the coins out.
How NEAR fits: only the contract's account can ask for the second signature. The contract can refuse, but never take: it holds no key that spends alone. It checks passkey (WebAuthn P-256) signatures on chain; a relay pays gas, so the phone needs no wallet. An AI agent with the spend key and a NEAR function-call key can propose, but not cancel, rotate or shorten the wait.
Evidence, final build, test coins on NEAR testnet and Mutinynet: a co-signed spend and a cold-key escape mined; the agent's key refused for cancel, rotate and policy calls. The 68 s film (synthetic voice) shows a live run: a scripted thief tab on a Mac, the spend key alone refused by the node, a 5:00 wait, and an iPhone in Safari with Face ID (the author's report; on chain, user verified) cancelling in a block 271 s before unlock. ./verify.sh A re-fetches recorded transactions and re-verifies every MPC signature; ./demo.sh makes a vault, cancels by passkey and gets a live MPC signature in 1.5 to 3 minutes. No wallet, no key. undo-btc.pages.dev/try/ runs it all on one phone; the page plays the thief.
Limits: test networks only, unaudited.
Tests: 151 sandbox tests on NEAR protocols 86 and 88; all 187 core and 200 contract mutants killed.
Built in the hackathon window, with AI coding assistance (Claude).