I created a signature from a message using my private key. But how do I verify this signed message using my segwit addresses of 3... or bc1...? How do I verify this using the BitcoinJS library?
A Trezor signed message with a 3 address can be verified here:
Or your can verify it with another Trezor wallet.
There is no established standard (yet) for signatures with addresses other than P2PKH (1...) addresses.
So whatever signature you created, it will only verify against the corresponding P2PKH address.
There is some ongoing discussion about new message signatures for this purpose, but nothing concrete.