bitcoind – importmulti native segwit handle to fetch utxos of p2wpkh native segwit handle

0
81
bitcoind – importmulti native segwit handle to fetch utxos of p2wpkh native segwit handle


Thanks @Pieter I will import and segwit handle right into a pockets.

  • Created a pockets with out personal keys.
~$ bitcoin-cli -testnet createwallet test4 true
{
  "title": "test4",
  "warning": ""
}
  • Get descriptor information to acquire hash
~$ bitcoin-cli -testnet getdescriptorinfo "addr(tb1qxhx5gq5gwaju2lh0pxnp7qpn4685cwvsfuejza)"
{
 "descriptor": "addr(tb1qxhx5gq5gwaju2lh0pxnp7qpn4685cwvsfuejza)#h8rwjq0n",
 "checksum": "h8rwjq0n",
 "isrange": false,
 "issolvable": false,
 "hasprivatekeys": false
}
~$ bitcoin-cli -testnet -rpcwallet=test4 importdescriptors '[{"desc": "addr(tb1qxhx5gq5gwaju2lh0pxnp7qpn4685cwvsfuejza)#h8rwjq0n", "timestamp": "now"}]'
[
  {
    "success": true
  }
]

After a few minutes, the testnet bitcoins I’ve despatched to the handle appeared within the pockets.

bitcoin-cli -testnet -rpcwallet=test4 listunspent 
[
  {
    "txid": "c50321fa5a86a281882283b507f33529682158998d32bb335c125ed2e2b6e614",
    "vout": 0,
    "address": "tb1qxhx5gq5gwaju2lh0pxnp7qpn4685cwvsfuejza",
    "label": "",
    "scriptPubKey": "001435cd4402887765c57eef09a61f0033ae8f4c3990",
    "amount": 0.00001000,
    "confirmations": 1,
    "spendable": true,
    "solvable": false,
    "parent_descs": [
      "addr(tb1qxhx5gq5gwaju2lh0pxnp7qpn4685cwvsfuejza)#h8rwjq0n"
    ],
    "protected": true
  }
]

LEAVE A REPLY

Please enter your comment!
Please enter your name here