I used xpub to generate btc addresses.
“xpub” means several different things. Lets assume you refer to the “xpub-cli” application named xpub
published by swan-bitcoin four years ago
How do work out the correct derivation path to use?
Only you know what derivation path you specified back in 2020. The derivation path used by swan’s xpub
depends on what command-line arguments you provided.
They give several examples such as
$ xpub derive \
ypub6XFA3jGfowZ6umedCYjPiMUeFetNQYDpUpHKqbrE3bzwawLmLbvYCYaUpiwZ6FHwU951b9dLd6hSvFJwHv763vvpXUV44PW62rtesm5g4wa \
-n3 -c5 --purpose p2sh
[
{
path: "m/49'/0'/5'/0/0",
address: '3PEpUeFZUWJPrbdKGzaNeEpekSPpSbVSzL'
},
{
path: "m/49'/0'/5'/0/1",
address: '3AedcVmzeoUF4tHkzDHM6wp7WLoo668KwT'
},
{
path: "m/49'/0'/5'/0/2",
address: '3BpPnS79WUzRQMG2DCNUKHgSKCaNoAMPCu'
}
]
Note that the 5
in the path comes from the BIP-44 account number specified in -c5
Only you know what exact command line you used in 2020.