Skip to content

createDelayedTransaction

AxVultis edited this page Nov 29, 2022 · 1 revision

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

Request Format

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 28,
  "method": "createDelayedTransaction",
  "params": {
    "anonymity": 5,
    "fee": 1000,
    "unlockTime": 0,
    "addresses": [
      "ccx7ZR5167Z9AburnDZ3Wu8712yejVd78TCFZKWn1gTidA1hJfwsVWUYLaAhRjv4qwMBzwGakB6VeGWfV9ZZvkAu8j2ehPA3Sv"
    ],
    "transfers": [
      {
        "amount": 20000000,
        "address": "ccx7BtV8DUGNZHxW3k9o2kSzAbwSm33sFMRiR1FRDy2wNuWh5bkFvKeYLaAhRjv4qwMBzwGakB6VeGWfV9ZZvkAu8j2ej6aF7R"
      },
      {
        "amount": 20000000,
        "address": "ccx7V4GWENfe7A38kWpj9EHJ1qHpaztsNNX8x44Kgo6dHKbDwkM6DMnYLaAhRjv4qwMBzwGakB6VeGWfV9ZZvkAu8j2edna4U6"
      },
      {
        "amount": 20000000,
        "address": "ccx7eDWHZTgTZy7gbNL3vPgMiv9CZ1ckaCEQRiBkQmXVGQxAXVXVPunYLaAhRjv4qwMBzwGakB6VeGWfV9ZZvkAu8j2eg6ijCG"
      }
    ],
    "changeAddress": "ccx7dehAGh837bfSfo18wJ1WzeCUWnzv3D23hvR8npyhHxoa6E3WXqNgTfHaWbAYRPdUhEXXEeKeEG7okKGHA8CZ3onHHofFDJ"
  }
}

Request Details:

Argument Mandatory Description Format
addresses No Array of strings, where each string is an address to take the funds from array of strings
transfers Yes Contains (see table below) array
fee Yes Transaction fee. The fee in Conceal is fixed at .001 CCX. This parameter should be specified in minimal available CCX units. For example, if your fee is .001 CCX, you should pass it as 1000 int
unlockTime No Height of the block until which transaction is going to be locked for spending int
anonymity Yes Privacy level (a discrete number from 1 to infinity). Level 5 is recommended int
extra No String of variable length. Can contain A-Z, 0-9 characters string
paymentId No payment_id string
changeAddress No Valid and existing in this container, it will receive the change of the transaction string

Transfer Details:

Argument Mandatory Description Format
address Yes Destination address string
amount Yes Amount to transfer int
message No string

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.

Response Format

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 28,
  "result": {
    "transactionHash": "deed5685efe64f0305ca4a579e41997a2c13e4e36c9d65e97ae4229eb371d543"
  }
}

Response Details:

Argument Description Format
transactionHash Hash of the delayed transaction string
Clone this wiki locally