Ah, I see what you're getting at now. But, mate, that's not how it works.
Bitcoin txids and Nostr public keys (npubs) are derived from different types of data and serve different purposes.
Txid is a unique identifier for a Bitcoin transaction. It's generated by hashing the transaction data.
On the other hand, npub or public key in Nostr is derived from your private key using elliptic curve cryptography to allow others to verify your messages on the network.
So converting a txid into an npub isn't really possible because they're created in completely different ways for completely different reasons!