importmulti
importmulti “requests” ( “options” )
Import addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options). Requires a new wallet backup.
Arguments:
- requests (array, required) Data to be imported [ (array of json objects) { “scriptPubKey”: "
- options (json, optional) { “rescan”: <false>, (boolean, optional, default: true) Stating if should rescan the blockchain after all imports }
Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported keys, addresses or scripts exists but related transactions are still missing.
Examples:
bitcoin-cli importmulti ’[{ “scriptPubKey”: { “address”: "
" }, “timestamp”:1455191478 }, { “scriptPubKey”: { “address”: “<my 2nd address>” }, “label”: “example 2”, “timestamp”: 1455191480 }]’ bitcoin-cli importmulti ’[{ “scriptPubKey”: { “address”: " " }, “timestamp”:1455191478 }]’ ’{ “rescan”: false}’
Response is an array with the same size as the input that has the execution result : [{ “success”: true } , { “success”: false, “error”: { “code”: -1, “message”: “Internal Server Error”} }, … ]