Hello Cardano Community! I’m new here. Working on a Cardano-rosetta integration since two weeks but I have some stopstopper issues right now.
First of all. I really don’t understand how can I get a private key for an address. For example I have a key generation script (see below):
cat root.prv | ./cardano-address key child 1852H/1815H/0H/0/10 > addr10.prv cat root.prv | ./cardano-address key child 1852H/1815H/0H/2/0 > stake0.prv cat addr10.prv | ./cardano-address key public --with-chain-code | ./cardano-address address payment --network-tag mainnet | ./cardano-address address delegation $(cat stake0.prv | ./cardano-address key public --with-chain-code) echo "public key:" cat addr10.prv | ./cardano-address key public --with-chain-code | ./cardano-address key inspect echo "secret key:" cat addr10.prv | ./cardano-address key inspect
My first problem is with the private key. As I learned it recently, the “extended_key” is a 64 byte long key concatenated the private key and the public key. (first 32 bytes is private, second 32 bytes is the public)
If this information is correct, then the public key result and the second half of privatekey should be identical. But these are different!
Second question: In my example the generated address is a delegated address (addr1q8k9c9n…), but the public and private key only generated from the child’s private info. Is this private key is enough to spend/transfer ADA from the delegated address?