6

I have just seen that there are some questions here about the unlock_time feature. I never heard about the fact that Monero had something like that enabled, so I was trying to find out more about it, but nothing comes up in the help of either monerod or monero-wallet-cli.

How can I access that feature, and how exactly does it work? I mean, I know the idea that the output would only be used in a transaction after some point in time, or block height, but what are the commands and options, and in what environments is it available?

user141
  • 3,337
  • 14
  • 34

1 Answers1

4

It's a field in the rpc call to send a transaction, see here: https://github.com/monero-project/monero/blob/0edcbf6716cdfd2ea5439a7788cca0041b40a2e2/src/wallet/wallet_rpc_server_commands_defs.h#L124

I think the way it works is if you pass that field a number that is less than the start of UNIX time in seconds, then it is interpreted as a block height that the output will be unlocked after, and if you pass it a number greater than the beginning of UNIX time in seconds, then it is interpreted as a UNIX time that the outputs will unlock after.

jwinterm
  • 4,413
  • 1
  • 21
  • 34