Motivation:
I was reading @HeptaSean’s post: Please use `cardano-cli transaction build` instead of `cardano-cli transaction build-raw`
And noticed that he had two different types of --tx-out addresses with one much shorter than the other. Also, I understand that providing only the payment address (without stake address) could be more private since payees would be unable to see the wallet’s total controlled stake on blockchain explorers.
Experimentation
In trying to understand how this works better, I read CIP-0019 document: https://github.com/cardano-foundation/CIPs/blob/master/CIP-0019/README.md
I then thought I could use the longer address in @HeptaSean’s post since I know there were transactions on that address.
I then tried to split this address, “addr1q89vv6r6e7040j7lm5m3s9c9cv7l0hdchwrwt62xm4v7h2df36408rhdrmchm7pxj8huuyz4jsgzqjllta5xfgrjysqsznluu4”, into its components.
bech32 <<< addr1q89vv6r6e7040j7lm5m3s9c9cv7l0hdchwrwt62xm4v7h2df36408rhdrmchm7pxj8huuyz4jsgzqjllta5xfgrjysqsznluu4
01cac6687acf9f57cbdfdd37181705c33df7ddb8bb86e5e946dd59eba9a98eaaf38eed1ef17df82691efce10559410204bff5f6864a0722401
CIP-0019 states that the first byte (first 2 characters in above hex output = 01) means:
PaymentKeyHash and StakeKeyHash on mainnet
So then I tried to create only the payment address as follows:
Remove the first 2 hex characters, then take the next 28 bytes (56 hex characters)
echo -n 'cac6687acf9f57cbdfdd37181705c33df7ddb8bb86e5e946dd59eba9a98eaaf38eed1ef17df82691efce10559410204bff5f6864a0722401' | head -c 56
cac6687acf9f57cbdfdd37181705c33df7ddb8bb86e5e946dd59eba9
Then recreate just the payment address but this time with ‘61’ as first 2 characters since CIP-0019 says this means:
PaymentKeyHash and no delegation part on mainnet
bech32 addr <<< '61cac6687acf9f57cbdfdd37181705c33df7ddb8bb86e5e946dd59eba9'
addr1v89vv6r6e7040j7lm5m3s9c9cv7l0hdchwrwt62xm4v7h2gpts87v
But cardanoscan doesn’t show the transactions that do exist at that address: Address addr1v89vv6r6e7040j7lm5m3s9c9cv7l0hdchwrwt62xm4v7h2gpts87v - Cardanoscan
To be clear, what I want to be able to do is take an address from a wallet like Daedalus, Yoroi etc. and only give out the payment address part.
Questions
Would someone please explain how to do this properly?
Is there a privacy benefit in handing out only payment addresses (without the stake address part)?