Context: I am looking for a method in Bitcoin where I can lock my funds for a certain period and have them automatically unlocked after the specified time passes. In most time-locked transactions, such as HTLCs, a second transaction is required to either claim or refund the funds. I’m interested in exploring whether there is a way to automate the unlocking process without the need for an additional transaction.
I don't get the context.
You will need to spend the unspent transaction output(
s) whether it has locktime or not, thus, create an additional transaction to unlock it.
Basically:
Normal: Funds---transaction--->Normal output script---transaction--->refund
Locked: Funds---transaction--->Locked output script---transaction--->refund
This is only doable if the "
Funds" above isn't actually spent; like a simple transaction with "
nlocktime" set.
But that can't be broadcast until the locktime has passed so you can still (
accidentally) spend its input to another transaction, once confirmed it will invalidate the locked txn.
All you can do is keep it locally in the wallet and mark the inputs "
to-be-spent" by that transaction. (
just client side)
It's not automatic but "
claim" involves only one txn (
broadcast the transaction) and refund involves no transaction (
delete the transaction).