5

Let's consider a Yoroi test wallet with the following seed phrase: maximum vacuum toe conduct jazz tray romance crawl fossil wisdom disease crazy mountain bird discover

The first address generated by Yoroi is then: addr1q96a42g6ajjhu5gfw8gch2w0vflfxkqw53pxyufgacscal5f0vdmnq834g9upwe2g0cfzwemmwvfnyawg89g8xeqx4kstanhan

However, if I derive the first address using the cardano-addresses tool like this (where phrase.prv holds the seed phrase):

./cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk
cat root.xsk | ./cardano-address key child 1852H/1815H/0H | ./cardano-address key public --with-chain-code > root.xvk
cat root.xvk | ./cardano-address key child 0/0 | ./cardano-address  address payment --network-tag mainnet

I get the following address: addr1v96a42g6ajjhu5gfw8gch2w0vflfxkqw53pxyufgacscals656txx

For direct comparison: addr1q96a42g6ajjhu5gfw8gch2w0vflfxkqw53pxyufgacscal5f0vdmnq834g9upwe2g0cfzwemmwvfnyawg89g8xeqx4kstanhan addr1v96a42g6ajjhu5gfw8gch2w0vflfxkqw53pxyufgacscals656txx

So the first part of the addresses is identical (except for the first letter after the prefix), but there seems to be missing something. What am I doing wrong?

Thanks.

1 Answer 1

3

There is indeed missing a part of the address: the delegation part. For more information, please refer to this partially duplicate question and CIP-0019.

To derive Yoroi addresses from a seed phrase using the cardano-addresses tool:

./cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk
cat root.xsk | ./cardano-address key child 1852H/1815H/0H | ./cardano-address key public --with-chain-code > root.xvk

# Derive the stake key.
cat root.xvk | ./cardano-address key child 2/0 > stake.xvk

# Only the index of the payment address is incremented to yield the next Yoroi address:

# First address
cat root.xvk | ./cardano-address key child 0/0 | ./cardano-address address payment --network-tag mainnet > payment.addr
./cardano-address address delegation $(cat stake.xvk) < payment.addr > payment-delegated.addr

# Second address
cat root.xvk | ./cardano-address key child 0/1 | ./cardano-address address payment --network-tag mainnet > payment.addr
./cardano-address address delegation $(cat stake.xvk) < payment.addr > payment-delegated.addr

# Third address
cat root.xvk | ./cardano-address key child 0/2 | ./cardano-address address payment --network-tag mainnet > payment.addr
./cardano-address address delegation $(cat stake.xvk) < payment.addr > payment-delegated.addr

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.