I'm not that technical, but is it possible to run a script that automatically signs a Bitcoin transaction once some conditions are met? For example, a date -I understand that with Bitcoin smart contracts you can play with dates via block height, but what if you are looking for a precise date-, or a fiat payment gateway, or any kind of external input (or the absence of it).

1 Answer 1


Sure. Here’s a real world example for you: Greenwallet has a wallet type called “multisig-shield” where your wallet is a 2/2 multisig with one key on your phone/computer and the other key is on a server that blockstream runs. You can turn on MFA for your wallet. So then what happens is when you want to make a spend, your phone/computer sends the transaction to the blockstream server, and if you have passed an MFA check, then the server signs the transaction. If you haven’t done the MFA challenge, then the server refuses to sign.

You can write your own signing servers/oracles that can decide to sign or not sign based on whatever logic or rules you want!

  • Oh thank you so much!! Yeah I was imagining something like this. What kind of tools could be useful to build an oracle like this?
    – Davd Rzz
    Feb 27, 2022 at 2:46
  • can be pretty much whatever you want. At the end of the day, you need to be able to have users send you a psbt, you need to evaluate it against whatever policy/logic you want, then sign it (or not) and send back the psbt. So a reasonable toolkit could be something like bitcoindevkit.org to write your signing oracle and then host it as a web-app or a serverless app or whatever.
    – Alex
    Feb 27, 2022 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.