Bitcoin Forum

Bitcoin => Project Development => Topic started by: vinny23312 on February 18, 2021, 06:11:12 PM



Title: How to execute bitcoin transactions in a decentralized way?
Post by: vinny23312 on February 18, 2021, 06:11:12 PM
I'm working on a project to automate donating bitcoins to charity every time a specific user mentions #Bitcoin on Twitter. To make this possible, people who want to donate would need to send bitcoins to an address holding all the coins in the meantime. And then when the condition is met (person mentions #bitcoin in a tweet), the bitcoins would be sent to the bitcoin address of a charity.

Obviously for security reasons, I shouldn't know the private key of the address holding the donations or that would allow me to control the donations. So I'm trying to figure out how can the donations be sent to charity without any one person knowing the private key of the wallet?

Thank you



Title: Re: How to execute bitcoin transactions in a decentralized way?
Post by: bitmover on February 18, 2021, 06:28:40 PM
I'm working on a project to automate donating bitcoins to charity every time a specific user mentions #Bitcoin on Twitter. To make this possible, people who want to donate would need to send bitcoins to an address holding all the coins in the meantime. And then when the condition is met (person mentions #bitcoin in a tweet), the bitcoins would be sent to the bitcoin address of a charity.

Obviously for security reasons, I shouldn't know the private key of the address holding the donations or that would allow me to control the donations. So I'm trying to figure out how can the donations be sent to charity without any one person knowing the private key of the wallet?

Thank you



You cannot spend bitcoins without knowing the private key.
So, you cannot spend my bitcoins when you mention #bitcoin in your twitter account.

But you can fire up emails with your tweet/public address (and qr code) when you mention #bitcoin. The user would only have to scan your QR code in the e-mail to send the donation


You can also generate a full Payment Request using blockchain.com website and email it to your donators, like this one ( i requested 50 usd for this address)

https://i.imgur.com/psBNVOo.png
https://www.blockchain.com/btc/payment_request?address=191sNkKTG8pzUsNgZYKo7DH2odg39XDAGo&message=Donate%20here&amount=0.00096199

To create a payment request like this, just click this button in your address page in blockchain.com explorer:
https://i.imgur.com/eZNmCi2.png

When you click in Create payment you will receive a URL which you can share.


Title: Re: How to execute bitcoin transactions in a decentralized way?
Post by: ~DefaultTrust on February 18, 2021, 06:38:36 PM
I'm working on a project to automate donating bitcoins to charity every time a specific user mentions #Bitcoin on Twitter. To make this possible, people who want to donate would need to send bitcoins to an address holding all the coins in the meantime. And then when the condition is met (person mentions #bitcoin in a tweet), the bitcoins would be sent to the bitcoin address of a charity.

Obviously for security reasons, I shouldn't know the private key of the address holding the donations or that would allow me to control the donations. So I'm trying to figure out how can the donations be sent to charity without any one person knowing the private key of the wallet?

Thank you


You cannot send bitcoins anywhere without knowing the conditions. The condition may not by only "private key" but more complicated (or simple).

BTW
I thought better and seems there is a bit complicated way for your request.
Read about Azure key Vault (https://docs.microsoft.com/en-us/azure/key-vault/general/overview). Your donator can store his keys there and your program can sign transactions without knowing actual private keys. But your program, of course, can send all the money to any address instead of the address where the donor wanted.



Title: Re: How to execute bitcoin transactions in a decentralized way?
Post by: Maus0728 on February 18, 2021, 07:16:07 PM
I'm working on a project to automate donating bitcoins to charity every time a specific user mentions #Bitcoin on Twitter. To make this possible, people who want to donate would need to send bitcoins to an address holding all the coins in the meantime. And then when the condition is met (person mentions #bitcoin in a tweet), the bitcoins would be sent to the bitcoin address of a charity.

Obviously for security reasons, I shouldn't know the private key of the address holding the donations or that would allow me to control the donations. So I'm trying to figure out how can the donations be sent to charity without any one person knowing the private key of the wallet?

Thank you



You're just basically making your own bank where you make people send you their coins as a donation and your project act as a middle-man or an escrow. And no, there is no way that you can publish an online donatable address without knowing your private key, and even the fact that not knowing an address' private key makes this concept much worse. Hence, if you wanted to have an automated charity donations with every twitter bitcoin hashtags, better instead just make it a clear direct charity. There is no such thing as "Decentralized Charity Platform" that can accept Bitcoin Donation without the safety and security of the funds being considered.


Title: Re: How to execute bitcoin transactions in a decentralized way?
Post by: dkbit98 on February 19, 2021, 10:44:53 AM
I'm working on a project to automate donating bitcoins to charity every time a specific user mentions #Bitcoin on Twitter. To make this possible, people who want to donate would need to send bitcoins to an address holding all the coins in the meantime. And then when the condition is met (person mentions #bitcoin in a tweet), the bitcoins would be sent to the bitcoin address of a charity.

Obviously for security reasons, I shouldn't know the private key of the address holding the donations or that would allow me to control the donations. So I'm trying to figure out how can the donations be sent to charity without any one person knowing the private key of the wallet?

You can't do this directly with Bitcoin blockchain but maybe it would be possible with some second layer solution and smart contracts built on top of Bitcoin.
Problem is that most of this solutions are not popular with only few people really using them, and one person holding and collecting all bitcoins is never a good idea without some multisig solution.

I am not sure if tweeter is still allowing posting of bitcoin addresses or they are deleting them all by default, and they are changing stuff all the time making your idea even harder to work in reality.


Title: Re: How to execute bitcoin transactions in a decentralized way?
Post by: Harlot on February 19, 2021, 07:48:59 PM
Other than what others have mentioned already I came to a news (https://cryptopotato.com/bitcoin-addresses-are-now-restricted-on-twitter/) about Twitter disabling you to post a Tweet when you include a Bitcoin address on your Tweet so I guess this is not a good option for your project. I won't also recommend you posting a QR code for a payment request because if someone reported your QR code for being a BTC address then chances are your account will be blocked. Also I don't have any Twitter account so I don't have any way of confirming if this is still the case or it is just a temporary ban for addresses given by the recent Twitter hack.