Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BitProtect - 1/2 multisig + timelock #55

Open
7-of-9 opened this issue Mar 16, 2021 · 0 comments
Open

BitProtect - 1/2 multisig + timelock #55

7-of-9 opened this issue Mar 16, 2021 · 0 comments

Comments

@7-of-9
Copy link
Member

7-of-9 commented Mar 16, 2021

How to make sure that a friend or family member can access your BTC if Something Bad happens to you... (trustlessly)?

Send your BTC to a non-standard output with a locking script like:

OP_IF
  ${bitcoinJsLib.script.number.encode(lockTime).toString('hex')}
  OP_CHECKLOCKTIMEVERIFY
  OP_DROP
  ${cltvSpender.publicKey.toString('hex')}
  OP_CHECKSIG
OP_ELSE
  ${nonCltvSpender.publicKey.toString('hex')}
  OP_CHECKSIG
OP_ENDIF

Sender is nonCltvSpender, i.e. can spend anytime with redeem script OP_TRUE.
Beneficiary is cltvSpender, i.e. can spend anytime after OP_CHECKLOCKTIMEVERIFY elapses with redeem script OP_FALSE.

Required Wallet Sugar
(1) Wallet will lookup beneficiaries by registered email (hash lookup in DSC) - note: DSC will need to be extended to expose accounts' BTC pubKeys (also can be a nice viral referral flow - beneficiary refers new wallet signups by email prompt...)

(2) Wallet will prompt Benefactors to "roll over" his non-std outputs periodcally to reset OP_CHECKLOCKTIMEVERIFY interval. If and when that fails to happen, output will become spendable by Beneficiary.

WIP... see wallet-btc-p2sh.js (and "DMS" comments in-line, various).

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

No branches or pull requests

1 participant