Edit: Please move this thread to the Technical Support section
So let's say you have 100's off addresses from transactions you have received and you want to create a watch-only wallet and use PSBT to move funds.
From what I've read, you must use listdescriptors (or add "false" for extra peace of mind, even tho listdescriptors without "true" does not include private addresses)
Example: I have a testnet wallet and I copy the result in green (imagine the list is way longer, like 100's of addresses):
listdescriptors false
{
"wallet_name": "testnet3wallettest",
"descriptors": [
{
"desc": "redacted",
"timestamp": redacted,
"active": true,
"internal": false,
"range": [
0,
1005
],
"next": 6,
"next_index": 6
},
{
"desc": "redacted",
"timestamp": redacted,
"active": true,
"internal": true,
"range": [
0,
999
],
"next": 0,
"next_index": 0
},
{
"desc": "redacted",
"timestamp": redacted,
"active": true,
"internal": false,
"range": [
0,
999
],
"next": 0,
"next_index": 0
},
{
"desc": "redacted",
"timestamp": redacted,
"active": true,
"internal": true,
"range": [
0,
999
],
"next": 0,
"next_index": 0
},
{
"desc": "redacted",
"timestamp": redacted,
"active": true,
"internal": false,
"range": [
0,
999
],
"next": 0,
"next_index": 0
},
{
"desc": "redacted",
"timestamp": redacted,
"active": true,
"internal": true,
"range": [
0,
999
],
"next": 0,
"next_index": 0
},
{
"desc": "redacted",
"timestamp": redacted,
"active": true,
"internal": false,
"range": [
0,
1000
],
"next": 1,
"next_index": 1
},
{
"desc": "redacted",
"timestamp": redacted,
"active": true,
"internal": true,
"range": [
0,
999
],
"next": 0,
"next_index": 0
}
]
}
Then I go to my online watch-only wallet and paste this with "importdescriptors 'thetextingreen'"
The addresses show up, however you have 100's of addresses that have no labels, so your wallet is unusable because you don't even know what you are moving.
Is there a way to get the labels all imported at once into the online wallet so you know what you are doing? I have found a script, but you have to use RPC with the jq command on linux using listlabels and getaddressesbylabel. However this seems rather cumbersome. Is it really no way to do this within the Bitcoin software? Why not just include the labels by default anyway?