On this page

latest contributor to this doc

Last Edit:

@komodoplatform

Task: Scan for New Addresses

API-v2task::scan_for_new_addresses::init

ParameterTypeDescription
coinstringThe ticker of the coin you want to scan addresses for
account_idintegerOptional, HD wallets only. Generally this will be 0 unless you have multiple accounts registered on your HD wallet
gap_limitintegerOptional. The maximum number of empty addresses in a row. Defaults to the value provided on activation or 20 if no value was provided

ParameterTypeDescription
task_idintegerAn identifying number which is used to query task status.

task::scan_for_new_addresses::init

POST
task::scan_for_new_addresses::init
{
  "userpass": "RPC_UserP@SSW0RD",
  "mmrpc": "2.0",
  "method": "task::scan_for_new_addresses::init",
  "params": {
    "coin": "DGB",
    "account_index": 0,
    "gap_limit": 20
  }
}

{
  "mmrpc": "2.0",
  "result": {
      "task_id": 3
  },
  "id": null
}
API-v2task::scan_for_new_addresses::status

Use the task::scan_for_new_addresses::status method to query the status of a HD address scanning task.

ParameterTypeDescription
task_idintegerThe identifying number returned when initiating the task.
forget_if_finishedbooleanIf false, will return final response for completed tasks. Optional, defaults to true.

ParameterTypeDescription
statusstringStatus of the task. Ok, InProgress or Error.
detailsstring or objectOnce complete, a standard ScanAddressesInfo object.

task::scan_for_new_addresses::status

POST
task::scan_for_new_addresses::status
{
  "userpass": "RPC_UserP@SSW0RD",
  "mmrpc": "2.0",
  "method": "task::scan_for_new_addresses::status",
  "params": {
    "task_id": 3
  }
}

{
  "mmrpc": "2.0",
  "result": {
      "status": "Ok",
      "details": {
          "account_index": 0,
          "derivation_path": "m/44'/141'/0'",
          "new_addresses": []
      }
  },
  "id": null
}

{
  "mmrpc": "2.0",
  "result": {
      "status": "Ok",
      "details": {
          "account_index": 0,
          "derivation_path": "m/44'/141'/0'",
          "new_addresses": [
              {
                  "address": "RXaMK6RtvwPiy67oramBfFXCgMobBofMWv",
                  "derivation_path": "m/44'/141'/0'/0/3",
                  "chain": "External",
                  "balance": {
                      "DOC": {
                          "spendable": "0",
                          "unspendable": "0"
                      }
                  }
              },
              {
                  "address": "RJkjq4DeQ5vTNJxa1gHoS4y31ZU9F3aisu",
                  "derivation_path": "m/44'/141'/0'/0/4",
                  "chain": "External",
                  "balance": {
                      "DOC": {
                          "spendable": "0.444",
                          "unspendable": "0"
                      }
                  }
              }
          ]
      }
  },
  "id": null
}