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://www.blockchain.com/btc/payment_request?address=191sNkKTG8pzUsNgZYKo7DH2odg39XDAGo&message=Donate%20here&amount=0.00096199To create a payment request like this, just click this button in your address page in blockchain.com explorer:
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FeZNmCi2.png&t=665&c=41-c4IoXJ9Tz4w)
When you click in Create payment you will receive a URL which you can share.