Found a reference to these wkey's here:
https://renenyffenegger.ch/notes/development/Crypto-Currencies/Bitcoin/walletIt seems they are no longer used:
wkey: Public key (class CPubKey) followed by a wallet key (class CWalletKey). Apparently no longer used.
Indeed, the most recent versions seem to have removed support completely:
} else if (strType == DBKeys::OLD_KEY) {
strErr = "Found unsupported 'wkey' record, try loading with version 0.18";
return false;
Support was dropped in this commit:
https://github.com/bitcoin/bitcoin/commit/0b1f4b3c6685d0a6307926d43d166add538061b7#diff-49a07da77d79017222ba989b99048c0a629d3230988ce7b6b74df0d14f727626Anyway... it looks like this "wkey" may indeed contain a Private key:
...
CKey key;
CPrivKey pkey;
uint256 hash;
if (strType == DBKeys::KEY) {
wss.nKeys++;
ssValue >> pkey;
} else {
OldKey wkey;
ssValue >> wkey;
pkey = wkey.vchPrivKey;
}
...
You can see the privkey being read out of the wkey object.
The definition of the "OldKey" struct is here:
https://github.com/bitcoin/bitcoin/blob/914923d125f5d17b39b4dc05f666d130e80a68b2/src/wallet/wallet.h#L679Not quite sure how that relates to the raw hex in the wallet file tho... Seems you might just be better off attempting to load the wallet file with an old version of Bitcoin Core (ie. <= 0.18) which should be able to handle the wkey records properly.