This can be accomplished with a simple smart contract between you and the recipient using a transaction's locktime
. Here are the steps:
- Create a transaction to the recipient's address spending UTXO's (unspent transaction outputs) that you own, and setting the
locktime
to the start date of your grace period.
- Create a second transaction spending the exact same UTXO's back to an address that you own, but without any
locktime
restriction.
- Sign the first transaction, and give it to the recipient.
- When the grace period begins, the recipient can broadcast the transaction and receive the coins.
- When the grace period is over, sign and broadcast the second transaction. If the first transaction has already been broadcast, it will be invalid and not relayed or included into a block. If the first transaction has not been broadcast, then you will want to reclaim the coins, thus invalidating the first transaction.
This plan assumes that you are in control of the second transaction and paying attention, such that you remember to broadcast the second transaction. It also assumes that the recipient trusts you to respect the grace period, and not broadcast your transaction until the time is up. Problems like these could be solved with a more complex scheme involving multi-sig transactions and setting locktime
on both transactions, but it doesn't sound like you need anything that complex.
See also:
https://en.bitcoin.it/wiki/Protocol_documentation#tx
https://bitcoin.org/en/developer-guide#signature-hash-types