I want to use a mnemonic phrase and BIP 39 to store the keys, and use bitcoin-core, I understand that master private keys cannot be imported at least directly and that mnemonic phrase is not supported.
Also, I know that there is the idea of re-think the wallet format of bitcoin core to use descriptors, that support key derivation using BIP32.
My idea was to use importmulti to generate a basic usable wallet with some addresses generated from the master account key.
Using https://iancoleman.io/bip39/ , I've generated a seed and mnemonic:
rebel image use energy write boil throw okay claw
umbrella advice together clarify water actress
From there I can get the account extended private key (44'/1'/0'):
tprv8fvSBE7NPnC8FJfBwcptSmmgxhQZhsAbbzRWaLo9d9ystozdV7BFUbRHqvYgL18fnV3WfM4GZb2cLKbLq5H8qZqC9XDnq8Mep3RWXfRsZ7o
From there I can build some descriptors to build usable wallet:
External
deriveaddresses "combo(tprv8fvSBE7NPnC8FJfBwcptSmmgxhQZhsAbbzRWaLo9d9ystozdV7BFUbRHqvYgL18fnV3WfM4GZb2cLKbLq5H8qZqC9XDnq8Mep3RWXfRsZ7o/0h/*)#quvrmfad" 0
# => ["myeHNHuNnbk1aG4WcJNkWw6foM2G64AXGF", "myeHNHuNnbk1aG4WcJNkWw6foM2G64AXGF", "tb1qcm233e9h79ntuv4c5mhsvmfhe2umvm0hsgafsf", "2N56BvNBqmkTh1Jic4GbpXSYpbtTNHUdQFw"]
Internal
deriveaddresses "wpkh(tprv8fvSBE7NPnC8FJfBwcptSmmgxhQZhsAbbzRWaLo9d9ystozdV7BFUbRHqvYgL18fnV3WfM4GZb2cLKbLq5H8qZqC9XDnq8Mep3RWXfRsZ7o/1h/*)#6gdaynzv" 0
# => ["tb1q5vgxy6ntsugpdde9ryhst66cz8z4c8ztp4k7qv"]
To generate the wallet, I've created an empty wallet (as I don't want to depend on backups, just the mnemonic I generated earlier), and import some addresses with importmulti
:
createwallet "mnemonic-test" false true
importmulti '[{"desc": "combo(tprv8fvSBE7NPnC8FJfBwcptSmmgxhQZhsAbbzRWaLo9d9ystozdV7BFUbRHqvYgL18fnV3WfM4GZb2cLKbLq5H8qZqC9XDnq8Mep3RWXfRsZ7o/0h/*)#quvrmfad", "range": 10, "timestamp": "now"}, {"desc": "wpkh(tprv8fvSBE7NPnC8FJfBwcptSmmgxhQZhsAbbzRWaLo9d9ystozdV7BFUbRHqvYgL18fnV3WfM4GZb2cLKbLq5H8qZqC9XDnq8Mep3RWXfRsZ7o/1h/*)#6gdaynzv", "range": 10, "internal": true, "timestamp": "now"}]' '{"rescan": false}'
It seems to work, all the generated addresses are generated, there is no HD seed enabled (so the addresses are always derived from the mnemonic seed).
The problems I found is that, those addresses, are never used by bitcoin-wallet, when trying to receive bitcoin it says it cannot generate an address (does not try to use one of the already generated addresses) and when spending it says it does not have any internal address available.
Do you know how to enable those coins?