The createDelayedTransaction method creates a delayed transaction. Such transactions are not sent into the network automatically and should be pushed using sendDelayedTransaction method method

back to methods summary

Input:

ArgumentMandatoryDescriptionFormatExample
addresses No Array of strings, where each string is an addressarray
transfers Yes Array of address,amountarray“amount”: 10000000000,“address”: “ir2HYyQRq3NZnsTqmHjBev2j5go5u4jMeNKwmVxtqhBE3nGomdk6a2tZ84b8EVBtYLGCBpMdjCDhZjc5ZwjfM8Hc2ryrsKXed”
fee Yes Transaction fee1)uint645000
unlockTime No Height of the block until which transaction is locked.uint6420
anonymity Yes Privacy level (mixin). Min is 3, 10 is the higher.uint643
extra No String of variable length. Can contain A-Z, 0-9 characters.string
paymentId No payment_idstring372209c11ea6f6563ff319285fb2625dfbcde2573d1c32a585b1898639072912
changeAddress No Valid and existing in this container address.string ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j

Note: if container contains only 1 address, changeAddress field can be left empty and the change is going to be sent to this address

Note: if addresses field contains only 1 address, changeAddress can be left empty and the change is going to be sent to this address

Note: in the rest of the cases, changeAddress field is mandatory and must contain an address.

Note: outputs that were used for this transactions will be locked until the transaction is sent or cancelled

Output:

ArgumentDescriptionFormatExample
transactionHashHash of the sent transaction.string8d289898915e174e328ea6fec23a82ad8eff9d87487a982611ab750ab8bf028c

Sending 10 IRD from a walletd with only one address:

Input Example:

{  
  "params":{  
     "anonymity":3,
     "fee":5000,
     "transfers":["amount":1000000000,"address":"ir2HYyQRq3NZnsTqmHjBev2j5go5u4jMeNKwmVxtqhBE3nGomdk6a2tZ84b8EVBtYLGCBpMdjCDhZjc5ZwjfM8Hc2ryrsKXed"]
  },
  "jsonrpc":"2.0",
  "id":"test",
  "method":"createDelayedTransaction"
}

$ curl -s -X POST -d '{"params":{ "anonymity":3,"fee":5000,"transfers":[{"amount":1000000000,"address":"ir2HYyQRq3NZnsTqmHjBev2j5go5u4jMeNKwmVxtqhBE3nGomdk6a2tZ84b8EVBtYLGCBpMdjCDhZjc5ZwjfM8Hc2ryrsKXed"}]},"jsonrpc":"2.0","id":"test","method":"createDelayedTransaction"}' localhost:14101/json_rpc | jq

Output Example:

{
  "id": "test",
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "dca0f21fb13453f2b683706dc84422e85c15319081738b21e6654c3e458331e1"
  }
}

Sending 20 IRD from an address in walletd to 2 others address (10 IRD each):

Input Example:

{  
  "params":{  
     "anonymity":3,
     "fee":5000,
     "unlockTime":20,
     "paymentId":"372209c11ea6f6563ff319285fb2625dfbcde2573d1c32a585b1898639072912",
     "addresses":[  
        "ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j"
     ],
     "transfers":[  
        {  
           "amount":1000000000,
           "address":"ir2HYyQRq3NZnsTqmHjBev2j5go5u4jMeNKwmVxtqhBE3nGomdk6a2tZ84b8EVBtYLGCBpMdjCDhZjc5ZwjfM8Hc2ryrsKXed"
        },
        {  
           "amount":1000000000,
           "address":"ir2SVdtNDnM4tCMkoFf9DqaAgx9qw9Qbxd78FABp6TGu4tvdhtVycdtbtDRpXJYAV8X43cy2vkw2QeP6P5cUxiMH33Lepab3v"
        }
     ],
     "changeAddress":"ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j"
  },
  "jsonrpc":'2.0',
  "id":'test',
  "method":"createDelayedTransaction"
}

Output Example:

{
  "id": "test",
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "dca0f21fb13453f2b683706dc84422e85c15319081738b21e6654c3e458331e1"
  }
}

back to methods summary


1)
Minimal fee in Iridium is 0.00005 IRD. This parameter should be specified in minimal available IRD units. For example, if your fee is 0.00005 IRD, you should pass it as 5000