include child derivations in output descriptor for bip 129 wallet export

This commit is contained in:
Craig Raw 2025-06-24 10:52:52 +02:00
parent 3aae26b196
commit 33e043fd9a

View file

@ -192,7 +192,7 @@ public class Bip129 implements KeystoreFileExport, KeystoreFileImport, WalletExp
public void exportWallet(Wallet wallet, OutputStream outputStream, String password) throws ExportException { public void exportWallet(Wallet wallet, OutputStream outputStream, String password) throws ExportException {
try { try {
String record = "BSMS 1.0\n" + String record = "BSMS 1.0\n" +
OutputDescriptor.getOutputDescriptor(wallet) + OutputDescriptor.getOutputDescriptor(wallet, KeyPurpose.DEFAULT_PURPOSES, null) +
"\n/0/*,/1/*\n" + "\n/0/*,/1/*\n" +
wallet.getNode(KeyPurpose.RECEIVE).getChildren().iterator().next().getAddress(); wallet.getNode(KeyPurpose.RECEIVE).getChildren().iterator().next().getAddress();
outputStream.write(record.getBytes(StandardCharsets.UTF_8)); outputStream.write(record.getBytes(StandardCharsets.UTF_8));