Let's say your extended signing key is named payment.xkey
, in the following format:
{
"type": "PaymentExtendedSigningKeyShelley_ed25519_bip32",
"description": "",
"cborHex": "5880687fda2ea05211f09e1544efd4e2da4f5c607dddd06051e6471a754a7efe02411ca42fca7e8e17821485144ba42a12a9814279caf665cb9026faaaf85dffeceb8f206b4eaec7ee07722deab4f17e8705afa7fce7d58b347e1e24ff4f031cdc8ce0c1e06e4934512cc678314402f6c04a7cb999d4efdb324f03a416dfcbda498f"
}
Run the following command:
cat payment.xkey | cardano-address key inspect
It will output a 64 byte chain code, and a 128 byte extended signing key. The first 64 bytes of this extended key is what you are looking for. You can manually create the non-extended signing key by copy-pasting these first 64 bytes (exactly half) of the "extended_key" section into an appropriately formatted normal signing-key file. For example, if I run the above command and I get the following:
{
"chain_code": "e0c1e06e4934512cc678314402f6c04a7cb999d4efdb324f03a416dfcbda498f",
"extended_key": "687fda2ea05211f09e1544efd4e2da4f5c607dddd06051e6471a754a7efe02411ca42fca7e8e17821485144ba42a12a9814279caf665cb9026faaaf85dffeceb",
"key_type": "private"
}
The string you're looking for would be: 687fda2ea05211f09e1544efd4e2da4f5c607dddd06051e6471a754a7efe0241
Now, use cardano-cli to generate a random, normal signing key file:
cardano-cli address key-gen --signing-key-file payment.skey --verification-key-file payment.vkey
Now, discard the vkey (it is irrelevant), open the payment.skey
in an editor, and delete everything in the cborHex field following the 5820
, replacing it with the first 64 bytes of the xprv above. This is your non-extended signing key. Final result should look like:
{
"type": "PaymentSigningKeyShelley_ed25519",
"description": "Payment Signing Key",
"cborHex": "5820687fda2ea05211f09e1544efd4e2da4f5c607dddd06051e6471a754a7efe0241"
}
Repeat the same process for stake-keys, as well as for any other key indexes that are needed.