The upcoming EU digital wallets in theory could do this kind of thing. They're focused on anonymity preserving age verification right now, but exposing any other government-verified attribute anonymously should be equally possible, including residency and/or citizenship if that's your bag.
I'm extremely mixed on it, overall I expect incredibly over-demanding asks from websites, but Digital Credential API likewise allows for various scoped requests/disclosures. https://developer.chrome.com/blog/digital-credentials-api-sh...