Skip to content

Commit

Permalink
Dump spark secret key (#1377)
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 authored Dec 21, 2023
1 parent 6946bf3 commit efce66a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/wallet/rpcdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,19 @@ UniValue dumpwallet(const JSONRPCRequest& request)
}
}

if (pwallet->sparkWallet) {
file << "\n";
CKey key;
uint32_t nCount;
{
LOCK(pwalletMain->cs_wallet);
nCount = GetArg("-sparkncount", 1);
pwalletMain->GetKeyFromKeypath(BIP44_SPARK_INDEX, nCount, key);
}

file << strprintf("# Spark key secret %s\n", CBitcoinSecret(key).ToString());
}

file << "\n";
file << "# End of dump\n";
file.close();
Expand Down

0 comments on commit efce66a

Please sign in to comment.