My question remains, how can I make a descriptor for this, to put in my new legacy wallet, or new wallet in 0.29?
For P2SH descriptor: it depends on the script "
wrapped" in that p2sh.
One simple example for Nested-SegWit:
sh(wpkh(<pubKey>)) or instead of pubKey, use the private key WIF.
But it should be specific to the script that your address represents and getaddressinfo's result using an unrelated wallet is too limited to be able to get any clue.
Since you're asking for the descriptor of it, you must have used an unrelated wallet since otherwise, there should already be a descriptor among the results.
If you have the correct wallet, specify it with
--rpc-wallet (
for cli) or select it in the GUI's console "
Wallet:" drop-down menu first before using the command.
Once you have the descriptor, import it using
importdescriptors command:
bitcoincore.org/en/doc/29.0.0/rpc/wallet/importdescriptorsFor non-descriptor wallet: Just import the private key via
importprivkey command and Bitcoin Core will derive
P2SH-P2WPKH alongside with
P2PKH and
P2WPKH.
it gave scriptPubKey a914 ****87 so I know now that belongs to a P2SH legacy address, used in the first 3 years, just what I said.
That
scriptPubKey shows
0xA9 which is
OP_HASH160 then
0x14 (
length of a 160-bit hash) suggesting that it could be anything that's hashed with
RIPEMD160[SHA256()].
P2SH-P2WPKH usually has that
scriptPubKey result with getaddressinfo command.