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?

5

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.

  • If you want some libraries to help out see here: monero.stackexchange.com/questions/877/… – jwinterm Sep 29 '16 at 22:16
  • That is very interesting information, but could you tell me how exactly can I make such transaction? Perhaps what I am asking is how to use the RPC, assuming there is no simple way to pass the unlock_time as parameter when forming a new transaction. – user141 Sep 30 '16 at 15:12
  • You need start the wallet in RPC mode by passing it the --rpc-bind-port and --user-agent flags, then use curl or Python or another way to make RPC calls to the wallet. – jwinterm Sep 30 '16 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.