Integrate Morsel
The ways a dApp can work with Morsel on Cookie Chain and Solana, and which one to choose.
Morsel works with dApps the way other Solana wallets do, on both Cookie Chain and Solana. If your dApp already supports Solana wallets through the Wallet Standard, Morsel shows up in your wallet list with no extra work.
Where Morsel runs
| Where your user is | How your dApp reaches Morsel |
|---|---|
| Chrome with the Morsel extension | Injected provider and Wallet Standard, on every page and frame |
| Inside the Morsel app's browser (iPhone, Android) | The same injected provider and Wallet Standard |
| A desktop browser without the extension | QR connect to the Morsel app on their phone, through the connect kit |
| A phone browser outside Morsel | A deep link that opens your site inside Morsel's browser |
Choose an approach
Use the Wallet Standard if you already use @solana/wallet-adapter or another Wallet Standard library. Morsel registers itself as Morsel. See Wallet Standard.
Use the Morsel connect kit for a React dApp that wants a ready connect button and modal, QR connect for desktop users, and deep links for phones, all in one package. See Connect kit.
Use the injected provider for low-level control without a library. See Provider API.
Add deep links so phone users can open your dApp inside Morsel. See Deep links.
What users see
Every request your dApp makes goes through Morsel's approval screen. On iPhone and Android, Morsel also:
- checks which network each transaction really belongs to, whatever your dApp says, and shows it as [network] confirmed;
- simulates the transaction and shows the balance changes;
- blocks unlimited token approvals and authority changes;
- refuses to sign a transaction disguised as a message.
Build transactions that preview cleanly, ask for the narrowest permissions you need, and sign messages as readable text. See Approve and sign safely for what your users see.
Networks
Morsel shows users one network at a time, Cookie Chain or Solana, with the same address on both. Your dApp sees the user's address, and each transaction is checked against the network it was built for. Build Cookie Chain transactions with a Cookie Chain RPC connection and Solana transactions with a Solana one.