1 min read

Step-by-Step Guide to Importing a Blackcoin Legacy Address into a Descriptor Wallet

Since Blackcoin More 26.2, only new Descriptor wallets are being created. This guide will walk you through the process of importing a Blackcoin private key for a legacy address into a Descriptor wallet and verifying the associated address using a series of commands in the Debug Console.

For example, let's say you have a P2PKH Blackcoin address: BCMV1mkLF5K6xcX4LroooX2vesJXaCdzN5.


Step 1: Retrieve the Private Key for the Legacy Address

To retrieve the private key for the address, use the dumpprivkey command in the Debug Console:

dumpprivkey BCMV1mkLF5K6xcX4LroooX2vesJXaCdzN5

You will receive the private key:

PgzuYcQPCUbkgiJUCn8U5iSvLAAnRmc4soBiG7wpXGNuqrQVsStE

Step 2: Retrieve Descriptor Information

The next step is to retrieve information about the descriptor using the getdescriptorinfo command. This command helps generate the necessary checksum for the descriptor.

getdescriptorinfo "pkh(PgzuYcQPCUbkgiJUCn8U5iSvLAAnRmc4soBiG7wpXGNuqrQVsStE)"

Result:

{
  "descriptor": "pkh(024406a6cb75df65076cb41688fddbef2656e215189e11c90c8a3b60a036476309)#tur5khnl",
  "checksum": "uc742slu",
  "isrange": false,
  "issolvable": true,
  "hasprivatekeys": true
}

The checksum value (uc742slu) is crucial for ensuring the integrity of the descriptor when importing it.


Step 3: Import the Descriptor

Next, import the descriptor using the importdescriptors command. Append the descriptor with the checksum obtained in the previous step, and set the timestamp to "now" to indicate that the descriptor should be considered valid from the current time.

importdescriptors '[{"desc":"pkh(PgzuYcQPCUbkgiJUCn8U5iSvLAAnRmc4soBiG7wpXGNuqrQVsStE)#uc742slu","timestamp":"now"}]'

At this point, the address associated with the descriptor should appear under the list of receiving addresses in your wallet.


Step 4: Verify Address Information

To verify the details of the imported address, use the getaddressinfo command with the specific address:

getaddressinfo BCMV1mkLF5K6xcX4LroooX2vesJXaCdzN5

Result:

{
  "address": "BCMV1mkLF5K6xcX4LroooX2vesJXaCdzN5",
  "scriptPubKey": "76a91456b20ab1c4cc51994121a17a1d717fa82171500288ac",
  "ismine": true,
  "solvable": true,
  "desc": "pkh([56b20ab1]024406a6cb75df65076cb41688fddbef2656e215189e11c90c8a3b60a036476309)#zmdp7p72",
  "parent_desc": "pkh(024406a6cb75df65076cb41688fddbef2656e215189e11c90c8a3b60a036476309)#tur5khnl",
  "iswatchonly": false,
  "isscript": false,
  "iswitness": false,
  "pubkey": "024406a6cb75df65076cb41688fddbef2656e215189e11c90c8a3b60a036476309",
  "iscompressed": true,
  "ischange": false,
  "timestamp": 1393221600,
  "hdkeypath": "m",
  "hdseedid": "0000000000000000000000000000000000000000",
  "hdmasterfingerprint": "56b20ab1",
  "labels": [
    ""
  ]
}

Conclusion

By following these steps, you can successfully import a private key for a legacy Blackcoin address into a Descriptor wallet, verify its checksum, and confirm the associated address details.