cardano-addresses
cardano-addresses copied to clipboard
Bug - cardano-addresses and cardano-rosetta do not generate the same payment address when using the same derivation path
Using the same utxo.prv file I expect cardano-addresses
and cardano-rosetta
to generate the same payment address. This is not the case. Is this a bug or have I made a mistake?
Steps to reproduce:
- phrase.prv
cardano-address recovery-phrase generate --size 15 > phrase.prv
- phrase.prv -> root.xsk
cat phrase.prv | cardano-address key from-recovery-phrase Shelley | tee root.xsk
- root.xsk -> utxo.prv
cardano-address key child 1852H/1815H/0H/0/0 < root.xsk | tee utxo.prv
- utxo.prv -> addr.xvk
cardano-address key public --with-chain-code < utxo.prv | tee addr.xvk
- addr.xvk -> payment
addr cardano-address address payment --network-tag testnet < addr.xvk > payment.addr
Then using cardano-rosetta
:
- Inspect utxo.prv to show the extended private key.
cardano-address key inspect < utxo.prv
- Use this in the
send-transaction-example.ts
cardano-rosetta script (it replaces the private key in the example scripts). - The public key derived by cardano-rosetta is the second half of the extended private key.
- cardano-rosetta calls
/construction/derive
using the public key and receives a valid payment addressadd1
which is not the same aspayment.addr
.
I think that add1
should be the same as payment.addr
, but it is not. Have I misunderstood something?