Verify and Sign Message

Hi, i want to make login feature similar to metamask sign message function. I can sign and verify message with “chia wallet sign” use m (master public key). But how to know the wallet address? Or maybe how can i check the wallet address from master public key? Any idea?

You need to derive the public keys then generate the puzzle hashes. After that you can convert puzzle hashes to addresses using an implementation of bech32m.