Skip to content

createDeposit

AxVultis edited this page Nov 12, 2022 · 11 revisions

The createDeposit method creates a new deposit with a source address and a term. The output will return the transactionHash of the creating transaction. The deposit will only reflect in the count and deposit index when the tx is confirmed. This method is available from version 6.3.0 and newer versions only.

Request Format

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "createDeposit",
  "params": {
    "sourceAddress": "ccx7dehAGh837bfSfo18wJ1WzeCUWnzv3D23hvR8npyhHxoa6E3WXqNgTfHaWbAYRPdUhEXXEeKeEG7okKGHA8CZ3onHHofFDJ",
    "amount": 1000000000,
    "term": 21900
  }
}

Request Details:

Argument Mandatory Description Format
sourceAddress Yes Wallet address string
amount Yes The amount to deposit int
term Yes The length of the deposit (Minimum 21,900) int

Response Format

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "transactionHash": "0a80b8f3362fe6e79fa057e9bb6815f0d994330399ea7e8adf6e08e65be9be85"
  }
}

Response Details:

Argument Description Format
transactionHash Transaction hash of the creating transaction string

Possible Errors

  • Object not found - The wallet address does not exist in this container.
  • Invalid address - The source address is not a valid Conceal wallet address.
  • Parse error - Incorrect formatting, JSON, or quotation marks used.
  • Deposit term is too small - The term is less than the minimum 21,900 blocks (one month).
  • Deposit term is too big - The term is larger tan the maximum 262,800 blocks (one year).
  • Deposit amount is too small - The amount is less than the minimum of 1000000 (1 CCX).
Clone this wiki locally