Skip to content

Commit

Permalink
Dump spark secret key
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 committed Dec 8, 2023
1 parent 39c41e5 commit e17a052
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 e17a052

Please sign in to comment.