I am trying to get the skey, vkey and address of the first payment address in a wallet I created in cardano-wallet. I need them because I would like to make transactions with cardano-cli on the same wallet. I am working on the testnet.
With cardano-wallet I created the wallet using
cardano-wallet wallet create from-recovery-phrase "test"
I entered my mnemonic phrase, let the second factor empty and set a passphrase. Everything seems fine and I can have a list of addresses
{
"derivation_path": [
"1852H",
"1815H",
"0H",
"0",
"0"
],
"id": "addr_test1qzwk908vw9lkpvuth4ch9xlmqxk593xtg7060ve775ja300ur5hrj7gda3wde08v8wx9k8dnf0n9ng0hh4ktmr3hjhts7yurnm",
"state": "used"
},
...
So the first address is addr_test1qzwk908vw9lkpvuth4ch9xlmqxk593xtg7060ve775ja300ur5hrj7gda3wde08v8wx9k8dnf0n9ng0hh4ktmr3hjhts7yurnm
I thought I could find the same address by doing:
cardano-wallet key from-recovery-phrase Shelley < phrase.prv > test.xsk
cat test.xsk | cardano-wallet key child 1852H/1815H/0H/0/0 > test.prv
cat test.prv | cardano-wallet key public --with-chain-code > test.pub
cat test.pub | cardano-address address payment --network-tag testnet > test.addr
But I got this address: addr_test1vzwk908vw9lkpvuth4ch9xlmqxk593xtg7060ve775ja30gg6szrd
I tried with cardano-address I got the same address.
I also try this with cardano-cli:
cardano-cli key convert-cardano-address-key --shelley-payment-key --signing-key-file test.prv --out-file test.skey
cardano-cli key verification-key --signing-key-file keys/test1.skey --verification-key-file test.vkey
cardano-cli address build --payment-verification-key-file test.vkey --out-file test.addr --testnet-magic 1097911063
And I also got addr_test1vzwk908vw9lkpvuth4ch9xlmqxk593xtg7060ve775ja30gg6szrd
When I tried to make a transaction from my wallet to this address, it's seems to be a valid derivative address because all utxo appears when I am checking with
cardano-wallet wallet utxo-snapshot
But I don't understand why I don't have the same address with the same derivative path. I also checked with yoroi and nami wallet and addr_test1qzwk908vw9lkpvuth4ch9xlmqxk593xtg7060ve775ja300ur5hrj7gda3wde08v8wx9k8dnf0n9ng0hh4ktmr3hjhts7yurnm is the usual address for them
Can someone tell me what I am missing ? Thank you