I want to create a Taproot pockets that meets the next situations:
- Customers can use their keys to spend UTXOs at any time
- There’s a particular key, offered by a restoration service, that may solely be used to spend UTXOs after one 12 months. That is the case when the person loses the seed and so a trusted restoration service can act.
I created the next miniscript to satisfy these necessities:
tr(
dummy_key,
{and_v(
v:pk(recovery_key),
older(52560)
),
pk(user_xpub)}
)
Examples for the above variables:
let dummy_key = "d01115d548e7561b15c38f004d734633687cf4419620095bc5b0f47070afe85a";
let user_xpub = "[6f53d49c/44h/1h/0h]tpubDDjsCRDQ9YzyaAq9rspCfq8RZFrWoBpYnLxK6sS2hS2yukqSczgcYiur8Scx4Hd5AZatxTuzMtJQJhchufv1FRFanLqUP7JHwusSSpfcEp2/0/*";
let recovery_key = "c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5";
So my understanding is:
-
The above script path accurately helps any key derived from user_xpub at anytime OR the recovery_key after one 12 months.
-
For the reason that tr() expression must help the case the place the person has misplaced their seed/signer pockets and may now not signal transactions, user_xpub can’t be in the important thing path and a dummy key have to be used. Subsequently, a dummy key shared between the restoration service and the person is the one technique to make this script work.
-
The above script works interchangeably with private and non-private keys.
Are statements 1,2 and three appropriate?