Skip to main content

importmulti

Overview

The 'importmulti' method allows you to import addresses/scripts (with private or public keys, redeem script (P2SH)), optionally rescanning the blockchain from the earliest creation time of the imported scripts. Requires a new wallet backup.

Request

wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY' \
--body-data '{"jsonrpc":"2.0","id":1,"method":"importmulti","params": [ ]}' \
'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

  • desc: Descriptor to import. If using descriptor, do not also provide address/scriptPubKey, scripts, or pubkeys
  • scriptPubKey: Type of scriptPubKey (string for script, json for address). Should not be provided if using a descriptor
  • timestamp: Creation time of the key expressed in UNIX epoch time, or the string "now" to substitute the current synced blockchain time.
  • redeemscript: Allowed only if the scriptPubKey is a P2SH or P2SH-P2WSH address/scriptPubKey
  • witnessscript: Allowed only if the scriptPubKey is a P2SH-P2WSH or P2WSH address/scriptPubKey
  • pubkeys: Array of strings giving pubkeys to import. They must occur in P2PKH or P2WPKH scripts. They are not required when the private key is also provided (see the "keys" argument).
  • keys: Array of strings giving private keys to import. The corresponding public keys must occur in the output or redeemscript.

Response

{
// Response structure here
}