I’ve made a Safe App to buy NFTs from OpenSea directly from a Safe.
The code is here:
The app is deployed on CloudFlare:
Basically what the app does it connects to OpenSea via its API (using their SDK called SeaPort). You paste an OpenSea link, it fetches the NFT info and the current price, and lets you buy it.
When you press “Buy”, it pops up a Safe modal window that creates a transaction proposal that you need to sign.
How it works: the OpenSea SDK is connected to a Web3 provider called safe-apps-provider. It essentially turns your Safe into a regular wallet like MetaMask. OpenSea thinks it talks to an EoA wallet, but in fact a Safe transaction proposal is created. When the proposal gets enough signatures, the transaction is executed and an NFT is bought.
You might wonder why you can’t just connect a Safe to the OpenSea website via the WalletConnect Safe App. Unfortunately this doesn’t work because OpenSea makes you sign a message which Safe currently doesn’t support well.