Bitcoin doesn't really have "smart contracts" per se. It does have a scripting system though, which is generally how timelock transactions are created.
It looks like what you want is possible through the
CreateRawTransaction RPC method available through bitcoin-cli. Just scroll down to
Parameter #3—locktime for details on how to use it.
It's possible there's an easier way to do it, but this is the first thing that I saw looking through the API docs.
So many people wan to use btc in smart-contracts, but i know from that forum, that it is impossible....
Smart contracts it is only Ethereum, or something else?many other cryptocurrencies are smart contract friendly
for example:1. EOS asynchronous smart contracts,their declared aim,by the way, is to be able to process hundreds of thousands if not millions of transactions per second
2.Qtum -POS smart contracts,able to run both Eth and BTC applications
mostly large business oriented
3.ADA -the self proclaimed "ETH killer",next generation smart contract platform,potentially issuing their own credit card too
took the market by the storm and keeps gaining momentum and capitalisation
speaking of bitcoin+smart contracts:
particl.io is managing funds in their trustless escrow ,using smart contracts
https://bitcoinmagazine.com/articles/yes-bitcoin-can-do-smart-contracts-and-particl-demonstrates-how/think there are much more examples,but to use bitcoin blockchain for smart contracts is like if you are hammering nails with a screwdriver-technologically possible,but really unneccessary and awkward