Bitcoin Forum

Bitcoin => Project Development => Topic started by: BTCapsule on November 12, 2022, 03:55:42 AM



Title: BTCapsule is a GUI to timelock your BTC, and allows you to change your mind
Post by: BTCapsule on November 12, 2022, 03:55:42 AM
How it works

BTCapsule is an open-source program that can help timelock your bitcoin to a date of your choosing. You simply generate a P2SH address, add a date, the txid and vout number of your transaction, and the amount of BTC you sent to the address (minus miner fees).

https://btcapsule.com/images/mainFilled.png

This will create two folders with several files. You will get two separate paper wallets (sender_wallet.txt and receiver_wallet.txt).

The senders_wallet will contain a redeem script that can be used at any time to get your bitcoin back, just in case you ever change your mind. It also contains the master private key used to create the transactions.

The receiver_wallet will contain a timelocked redeem script that is not redeemable until the date you chose. They will also have their own private key to sweep the wallet.

Just copy the receiver_files folder to a flash drive and give it to your loved one. They will not get the bitcoin until you choose, and if you’re (hopefully) still alive when the timelock expires, just redeem from your sender_wallet and create a new transaction.

When you’re ready to redeem, just visit a blockchain explorer and broadcast the redeem script. Once it’s been confirmed, you can use BTCapsule’s Sweep Wallet feature.

Sweep Wallet

To sweep your wallet, make sure the wallet with your particular redeem script is in the same folder as BTCapsule. Run BTCapsule, enter an address and the amount of BTC you want to redeem (a little less than available if you want to pay miner fees), and it will create a new file called redeem.txt that can be broadcast on a block explorer.

You can download BTCapsule for Linux and learn more at:

https://btcapsule.com/

You can view the source code at:

https://github.com/BTCapsule/BTCapsule

I have also included a testnet version of the code, so if you have Python, feel free to test it out and see how it works.

UPDATE 11-15-2022

BTCapsule now creates two folders, sender_files and receiver_files, and puts the appropriate files in each folder. So now you just have to copy the receiver_files folder and paste it into a seperate USB flashdrive.

UPDATE 11-18-2022

BTCapsule (testnet) is now available for Linux! Try it out and let me know what you think.

When you download BTCapsule, you will have to right-click the file, select "Properties>Permissions" and check the box that says "Allow executing file as program" (Ubuntu). When you generate an address, Google "Bitcoin testnet faucet" and have coins sent to the generated P2SH address.

UPDATE 11-22-2022

BTCapsule (testnet) is now available for Windows!

Windows Defender may flag BTCapsule because it was made with PyInstaller. I do not have $500 for a signed-certificate right now. When you generate an address, Google "Bitcoin testnet faucet" and have coins sent to the generated P2SH address.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: ABCbits on November 12, 2022, 10:33:13 AM
If you’re tired of seeing threads about BTCapsule, please keep reading because it has been completely rebuilt.

If so, i would recommend you to edit (to let people know about this thread) and lock older thread.

I have also included a testnet version of the code, so if you have Python, feel free to test it out and see how it works.

I tested for a bit and found out clicking "Generate" button multiple times caused multiple address/private key shown on text box without separator. You might want to change the behavior.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: BTCapsule on November 12, 2022, 10:55:22 AM
If you’re tired of seeing threads about BTCapsule, please keep reading because it has been completely rebuilt.

If so, i would recommend you to edit (to let people know about this thread) and lock older thread.

Okay, I have edited and locked the previous threads

I have also included a testnet version of the code, so if you have Python, feel free to test it out and see how it works.

I tested for a bit and found out clicking "Generate" button multiple times caused multiple address/private key shown on text box without separator. You might want to change the behavior.

Thanks for trying it out and letting me know. This has now been fixed.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: DaveF on November 12, 2022, 12:31:51 PM
I am running out to a client site (Yeah...working on a Saturday) but from the tl;dr it looks like from what you are saying on the website that you are generating a raw TX to be transmitted.

How large a fee are you using? I'll look / test later or tomorrow but I can see that may be an issue way in the future if things change as to what will get mined.

Also, a statement somewhere on the website to print it out as an emergency backup would also be good.

Media standards change a lot, and since this could be over years and years I can see that being an issue. Try finding a 3.5" drive today, every machine had one 20 years ago, or a compact plash reader which was the most popular portable digital media 15 years ago, there are machines that only come with USB C ports now with no USB A. Plugging in that USB stick may just be an issue in 2040.......

Also, you don't want to not have your kids not get their BTC because that electronic storage device died.

Still, a really good project. Thanks for keeping up with it and updating it.

-Dave


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: BTCapsule on November 12, 2022, 01:09:35 PM
I am running out to a client site (Yeah...working on a Saturday) but from the tl;dr it looks like from what you are saying on the website that you are generating a raw TX to be transmitted.

How large a fee are you using? I'll look / test later or tomorrow but I can see that may be an issue way in the future if things change as to what will get mined.

Yes, this generates a raw transaction, so it is absolutely nothing like what I had before.

I do not calculate the fees within the program. On my website I mention that you must input a smaller amount of bitcoin in the BTC section than you originally added to the address.

Also, a statement somewhere on the website to print it out as an emergency backup would also be good.

Media standards change a lot, and since this could be over years and years I can see that being an issue. Try finding a 3.5" drive today, every machine had one 20 years ago, or a compact plash reader which was the most popular portable digital media 15 years ago, there are machines that only come with USB C ports now with no USB A. Plugging in that USB stick may just be an issue in 2040.......

Also, you don't want to not have your kids not get their BTC because that electronic storage device died.

Urging the user to print the wallet as a backup is a good idea. The txt files are required to use BTCapsules Sweep Wallet feature, but if something happens in the future, then a paper backup would be good to have.

I’m not too concerned with media standards changing. The program and files can easily be copied and moved to any storage device. It will be the responsibility of the users to make sure they keep those things updated; but if they don’t and they’re sitting on a few thousand $$ in BTC, the fact that it’s still possible to find a computer that uses 3.5" drives is reassuring.

Still, a really good project. Thanks for keeping up with it and updating it.

-Dave

Thanks for the encouragement! I learned a lot about Bitcoin working on this. I was ready to give up, but I’m determined to provide something for this community and hopefully get a Bitcoin job. I think you will like it. In case you didn’t see, there’s a testnet option on my GitHub.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: dkbit98 on November 12, 2022, 05:41:33 PM
If you’re tired of seeing threads about BTCapsule, please keep reading because it has been completely rebuilt.
It was rebuilt how exactly, and what was changed compared to older version of btcapsule?
I would like to see how the problem with exact time and time servers was sold, and is it still possible to fake date and time to release lock.
Maybe it's better that you release code on github or gitlab since this is now open source software.

Since BTCapsule is now open source I think member BlackHatCoiner should consider changing his feedback on your profile.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: buwaytress on November 12, 2022, 07:18:09 PM
Hands up here I never heard of you yet but I've mentioned several times now in the past about inheritance and the lack of ease of use of timelock (for me anyway) -- think the only practical part for me to deal with is to fix the readiness of destination wallet (the receiver). Some of DaveF's points really valid, I think we underestimate how quickly devices get obsolete or difficult to use with newer ones. They're okay for me to figure out, but for the inheritor...

You don't happen to have any proven use case already (I want to say testimonial)? Can foresee how useful that is.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: BlackHatCoiner on November 12, 2022, 07:48:03 PM
You're using a lot of empty lines, which makes it difficult to read. I fixed that for you: BTCapsule.py (https://pastebin.com/raw/dMGueLLi)

Which version of python is this program based on?

It was rebuilt how exactly, and what was changed compared to older version of btcapsule?
As far as I can judge, nearly everything. It's now free, open-source, and perhaps even simple to use too. However, it's not reviewed and I'd avoid it when it comes to some serious thing as inheritance.

Since BTCapsule is now open source I think member BlackHatCoiner should consider changing his feedback on your profile.
Done.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: BTCapsule on November 13, 2022, 03:31:52 AM
Hands up here I never heard of you yet but I've mentioned several times now in the past about inheritance and the lack of ease of use of timelock (for me anyway) -- think the only practical part for me to deal with is to fix the readiness of destination wallet (the receiver). Some of DaveF's points really valid, I think we underestimate how quickly devices get obsolete or difficult to use with newer ones. They're okay for me to figure out, but for the inheritor...

You don't happen to have any proven use case already (I want to say testimonial)? Can foresee how useful that is.

Hopefully people will try out the testnet version and post their experience here soon. The problem with a program that requires the future is it will take some time to get feedback.

However, if you’re interested, I have two transactions that I completed so you can see for yourself that BTCapsule indeed works on mainnet.

This transaction had a locktime of 500000001. That is the minimum for a timestamped transaction with Bitcoin. Technically the minimum is 0, but since I’m creating two transactions within one timelocked address, I had to use 500M1. So this would be the sender_wallet:

https://blockstream.info/tx/35a9f0cfac3ec0acea1e67edb1419098a1274f4d150d0c4686de04edf9dcdd77

This is a transaction with a redeem date of 11-11-2022. BTCapsule takes the date and converts it to a UNIX timestamp, and blockstream converted the timestamp into a block height of 762710. This would be the receiver_wallet:

https://blockstream.info/tx/19ca6ceea6e150d37b5fab8b6491d882512c6465bed5f535f168e7fc8d20e529?expand

You're using a lot of empty lines, which makes it difficult to read. I fixed that for you: BTCapsule.py (https://pastebin.com/raw/dMGueLLi)

Which version of python is this program based on?

It was rebuilt how exactly, and what was changed compared to older version of btcapsule?
As far as I can judge, nearly everything. It's now free, open-source, and perhaps even simple to use too. However, it's not reviewed and I'd avoid it when it comes to some serious thing as inheritance.

Since BTCapsule is now open source I think member BlackHatCoiner should consider changing his feedback on your profile.
Done.


Thank you very much for cleaning up the code! Looks great and my GitHub has been updated. BTCapsule was built with Python 3.9 on Windows.

I posted some transactions I made with BTCapsule to buwaytress if you’d like to check them out.

I didn’t realize there was even feedback on my profile lol. Thanks for removing it though. You were my biggest critic (rightfully so!) and I hope this version can offer me some redemption.

If you’re tired of seeing threads about BTCapsule, please keep reading because it has been completely rebuilt.
It was rebuilt how exactly, and what was changed compared to older version of btcapsule?
I would like to see how the problem with exact time and time servers was sold, and is it still possible to fake date and time to release lock.
Maybe it's better that you release code on github or gitlab since this is now open source software.

Since BTCapsule is now open source I think member BlackHatCoiner should consider changing his feedback on your profile.

BTCapsule no longer uses time servers or stores your personal private key. It now creates paper wallets and uses Bitcoin’s OP_CHECKLOCKTIMEVERIFY feature to timelock your bitcoin until any date you choose. So there’s no longer anything to hack into, and it’s impossible to redeem the timelock script before the date because the network won’t accept it.

The code is available on GitHub. Check it out:

https://github.com/BTCapsule/BTCapsule


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: buwaytress on November 15, 2022, 03:14:22 PM
Hopefully people will try out the testnet version and post their experience here soon. The problem with a program that requires the future is it will take some time to get feedback.

However, if you’re interested, I have two transactions that I completed so you can see for yourself that BTCapsule indeed works on mainnet.

Thank you! I'll have to remind myself to come to test it out myself, as mentioned, one of the things on my mind (even if on the backburner) is to really work out how to pass my things on, and at the same time work out a way to make it legible to the receiver. The part on fees concerns me at the moment, impossible to foresee what the network and price would look like in 5 years, never mind decades.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: BTCapsule on November 15, 2022, 09:33:24 PM
Hopefully people will try out the testnet version and post their experience here soon. The problem with a program that requires the future is it will take some time to get feedback.

However, if you’re interested, I have two transactions that I completed so you can see for yourself that BTCapsule indeed works on mainnet.

Thank you! I'll have to remind myself to come to test it out myself, as mentioned, one of the things on my mind (even if on the backburner) is to really work out how to pass my things on, and at the same time work out a way to make it legible to the receiver. The part on fees concerns me at the moment, impossible to foresee what the network and price would look like in 5 years, never mind decades.

The paper wallet that is generated by BTCapsule is not like most paper wallets you see on Google images. The BTCapsule paper wallet is literally a .txt file that can be accessed and read by any computer. I chose this format because it is one of the oldest and platform-independent files that exists.

Because it’s a .txt file, I have also included instructions within the paper wallet on how to sweep the wallet and handle miner fees. This is to ensure that directions are available even if my website is not.

Miner fees must be covered by inputting a smaller amount in the BTC field than you sent to the address. Although transaction fees may cost more fiat in the future, as the price of Bitcoin increases, choosing the current standard miner fee will be more than enough to ensure success.

I am not concerned with the network changing drastically enough to make the redeem script invalid. That would require a hard fork and millions (billions?) of people accepting the new network. Of course, you can still set up a method of passing on your sender_wallet private keys so they can redeem at any time, but the timelocked script is meant to ensure that there is nothing the recipient needs to remember (passwords, PIN codes) in order to access your coins.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: dkbit98 on November 17, 2022, 08:28:20 PM
BTCapsule no longer uses time servers or stores your personal private key. It now creates paper wallets and uses Bitcoin’s OP_CHECKLOCKTIMEVERIFY feature to timelock your bitcoin until any date you choose. So there’s no longer anything to hack into, and it’s impossible to redeem the timelock script before the date because the network won’t accept it.
This is a nice improvement but you might want to add version number to make clear difference compared with older version.
For example you can name current version BTCapsule 2.0 or something like that, and older one should be deprecated.
When I go to your website to download BTCapsule I see comming soon notification, so this is it not released yet?

I am not concerned with the network changing drastically enough to make the redeem script invalid. That would require a hard fork and millions (billions?) of people accepting the new network.
I would not totally exclude possibility for Bitcoin hard fork happening in future, and I would fully support it if this change would improve privacy for Bitcoin.


Title: Re: BTCapsule is a program to easily timelock your bitcoin for inheritance
Post by: BTCapsule on November 17, 2022, 09:52:00 PM
BTCapsule no longer uses time servers or stores your personal private key. It now creates paper wallets and uses Bitcoin’s OP_CHECKLOCKTIMEVERIFY feature to timelock your bitcoin until any date you choose. So there’s no longer anything to hack into, and it’s impossible to redeem the timelock script before the date because the network won’t accept it.
This is a nice improvement but you might want to add version number to make clear difference compared with older version.
For example you can name current version BTCapsule 2.0 or something like that, and older one should be deprecated.
When I go to your website to download BTCapsule I see comming soon notification, so this is it not released yet?

I can make an executable if you’re interested. Most people don’t trust executables, and I was waiting until people left feedback on the Python code before putting the program on the site. I think I’m going to use PyInstaller, and add directions to hack the executable so that you can read the source code and see that I haven’t changed anything. It’s not the easiest thing to do, but it should only take a few people doing it to vouch that the executable is safe.

I believe this version should be BTCapsule 1.0 because the older code is irrelevant to what BTCapsule is now. I will add version numbers when I make significant changes to this new program. It works as expected, but I want to see if there are any suggestions to make it better, or if anyone finds any bugs that need to be addressed.

I am not concerned with the network changing drastically enough to make the redeem script invalid. That would require a hard fork and millions (billions?) of people accepting the new network.
I would not totally exclude possibility for Bitcoin hard fork happening in future, and I would fully support it if this change would improve privacy for Bitcoin.


Yes, I’ve heard Adam Back talk about the possibility of a hard fork, and even increasing the block size, if privacy becomes an issue. People can use BTCapsule how they wish, but it might be a good idea to warn people that they should not make their redeem script too far into the future. They can always redeem their own immediate script and make another timelocked transaction every few years.


Title: Re: BTCapsule can timelock your bitcoin, while giving you full access to your coins
Post by: BTCapsule on November 18, 2022, 09:04:21 PM
BTCapsule (testnet) is now available for Linux! Try it out and let me know what you think.

When you download BTCapsule, you will have to right-click the file, select "Properties>Permissions" and check the box that says "Allow executing file as program" (Ubuntu). When you generate an address, Google "Bitcoin testnet faucet" and have coins sent to the generated P2SH address.

https://btcapsule.com/download.html


Title: Re: BTCapsule can timelock your bitcoin, while giving you full access to your coins
Post by: BTCapsule on November 22, 2022, 10:26:42 AM
BTCapsule (testnet) is now available for Windows!

Windows Defender may flag BTCapsule because it was made with PyInstaller. I do not have $500 for a signed-certificate right now. When you generate an address, Google "Bitcoin testnet faucet" and have coins sent to the generated P2SH address.


Title: Re: BTCapsule can timelock your bitcoin, while giving you full access to your coins
Post by: dkbit98 on November 22, 2022, 10:27:15 PM
Windows Defender may flag BTCapsule because it was made with PyInstaller. I do not have $500 for a signed-certificate right now. When you generate an address, Google "Bitcoin testnet faucet" and have coins sent to the generated P2SH address.
This is fine because windows defender is not very smart piece of software and it false flags a bunch of things.
Everything should be fine as long as the source code matches with windows version of BTCapsule and if this can be verified.
I would suggest everyone to switch to Linux OS anyway.


Title: Re: BTCapsule can timelock your bitcoin, while giving you full access to your coins
Post by: BTCapsule on November 23, 2022, 04:08:19 AM
Windows Defender may flag BTCapsule because it was made with PyInstaller. I do not have $500 for a signed-certificate right now. When you generate an address, Google "Bitcoin testnet faucet" and have coins sent to the generated P2SH address.
This is fine because windows defender is not very smart piece of software and it false flags a bunch of things.
Everything should be fine as long as the source code matches with windows version of BTCapsule and if this can be verified.
I would suggest everyone to switch to Linux OS anyway.

Yes, Linux all the way. I‘ve been using Windows because I wanted to make an .exe, and it’s been a nightmare. I finally got the hang of it, but I’m ready to develop on Linux again. Here is a tutorial to decompile the source code if anyone is interested…

https://stackoverflow.com/a/68492985

Thank you! I'll have to remind myself to come to test it out myself, as mentioned, one of the things on my mind (even if on the backburner) is to really work out how to pass my things on, and at the same time work out a way to make it legible to the receiver. The part on fees concerns me at the moment, impossible to foresee what the network and price would look like in 5 years, never mind decades.

I am running out to a client site (Yeah...working on a Saturday) but from the tl;dr it looks like from what you are saying on the website that you are generating a raw TX to be transmitted.

I tested for a bit and found out clicking "Generate" button multiple times caused multiple address/private key shown on text box without separator. You might want to change the behavior.

I’m wondering if anyone has tried out BTCapsule. I would love to hear any feedback/criticism. Thank you.


Title: Re: BTCapsule can timelock your bitcoin, while giving you full access to your coins
Post by: dkbit98 on November 23, 2022, 09:21:59 PM
I’m wondering if anyone has tried out BTCapsule. I would love to hear any feedback/criticism. Thank you.
Can this be tried and tested with Bitcoin testnet or only with mainnet coins?
I would be interested in testing how everything works with testnet coins first, but I can't promise anything right now...because life stuff have priority.
My suggestion is to first ask for code review from known bitcoin developers, and maybe record demo video showing how everything works for you.


Title: Re: BTCapsule can timelock your bitcoin, while giving you full access to your coins
Post by: BTCapsule on November 24, 2022, 05:47:52 AM
I’m wondering if anyone has tried out BTCapsule. I would love to hear any feedback/criticism. Thank you.
Can this be tried and tested with Bitcoin testnet or only with mainnet coins?
I would be interested in testing how everything works with testnet coins first, but I can't promise anything right now...because life stuff have priority.
My suggestion is to first ask for code review from known bitcoin developers, and maybe record demo video showing how everything works for you.

I think a video is a great idea. I will try to work on one soon.

Right now, the testnet version is the only option I’ve made available (unless you build it from the Python code). I don’t want to release the mainnet version until I’m sure everything is working as it should. I’ve tried to mess things up and catch any bugs, but a fresh set of eyes would be very helpful.


Title: Re: BTCapsule is a GUI to timelock your BTC, and allows you to change your mind
Post by: BTCapsule on November 26, 2022, 10:50:15 AM
I have added directions to build BTCapsule from the Python code on my GitHub. There are a few dependencies that people might have trouble with, so hopefully that makes it easier.

Also, there is a neat app on Android called testnet wallet that lets you send and receive testnet coins. You can use it to scan the QR code generated by BTCapsule to easily send coins to the P2SH address.


Title: Re: BTCapsule is a GUI to timelock your BTC, and allows you to change your mind
Post by: BTCapsule on December 07, 2022, 02:58:58 AM
I have added a video on my website with directions to use BTCapsule. In less than 5 minutes, you can timelock your Bitcoin for inheritance without trusting a third party. Check it out at:

https://btcapsule.com