bithyve / bitcoin-keeper

Secure today, plan for tomorrow. BIP 85 hot wallets, buy bitcoin, tor privacy.
https://bitcoinkeeper.app
MIT License
32 stars 11 forks source link

Timelock #1024

Open antuz123 opened 1 year ago

antuz123 commented 1 year ago

A user can choose to additionally apply a time lock on their Vault. This can be done from:

  1. Vault settings - a new Vault gets created and transfer happens like any 2. While upgrading or downgrading or changing SD, the user has an additional option to add time lock. Parked for later - pls create an issue.

When the user initiates Timelock, they enter time. The UI shows corresponding blocks as approximation for that time (similar to the fee in Hexa). The user is warned after this that they can't change it once applied. If the user confirms, they do the transfer to the new Vault and the time lock is applied.

A time lock when applied can be seen on the Vault details screen and the Home Screen.

When the user tries to send before the time lock expires, the app suggests that "it seems you have applied a time lock" the user can broadcast anyway or cancel sending. If the user does broadcast/ send, there should be a proper error that is handled. Error message "One or more of the script condition not met".

summikhan11 commented 1 year ago

Vault Settings: https://xd.adobe.com/view/2f898159-6ee5-4b4a-836f-71408f7e5b5a-7ada/screen/bf791a99-c0d8-411a-b5dd-e14eab68ef6a/

Vault Detail: https://xd.adobe.com/view/2f898159-6ee5-4b4a-836f-71408f7e5b5a-7ada/screen/807f3d33-377b-4186-9a43-618321a1915e/

Home Screen: https://xd.adobe.com/view/2f898159-6ee5-4b4a-836f-71408f7e5b5a-7ada/screen/dd3af8e4-4637-4393-8982-a28429edb66c/

Parsh commented 1 year ago

Latest on timelock: https://github.com/bithyve/bitcoin-keeper/commit/0ce31d7bf7adcb61c574edac887655899ef9b2e3

Timelock has been parked in the backlog as finalizing a PSBT w/ a custom bitcoin-script(time-locked multi-sig) is leading to issues as bitcoinjs-lib doesn't provide API for timelock(absolute or relative). There's an example provided by bitcoinjs-lib on how to perform finalization for such custom scripts, however, is not officially supported by the bitcoinjs team.

Parsh commented 1 year ago

Notes:

Time lock(POC):

antuz123 commented 1 year ago

This may have to be done with Ledger and Miniscript. Also, BitBox and Spector it seems - https://twitter.com/StepanSnigirev/status/1231017175546236928?s=20&t=zlekjrEWPComZVUixObfKw

Parsh commented 5 months ago

Note: Given that we've multiple vaults now, the description of this issue should be read with that context in mind.

Parsh commented 4 months ago

Dependency #3864 Tracked via #4007