Sui.

Post

Share your knowledge.

Thorfin.
Jul 21, 2025
Expert Q&A

How to Integrate Slush Wallet with a Telegram Mini App

Hi! I'm currently developing a test Telegram mini app and looking to integrate a SUI wallet into it. I'm attempting to use the SDK, but since it's within the Telegram mini app window and not a browser, I can't use solutions like the Chrome extension. How can I connect a SUI wallet to my app, or guide users to create a new wallet?

  • Sui
  • SDKs and Developer Tools
7
6
Share
Comments
.

Answers

6
Morgan.
Jul 21 2025, 14:36

The best solution for your scenario would be to prompt users to manually input their private key or mnemonic phrase directly within the app. This method avoids the complexity of integrating external wallet services, while still enabling wallet access within the Telegram mini app.

Implement below

  1. User Interface: Design a simple and clear input field where users can manually type their private key or 12/24-word mnemonic phrase.
  2. Validation: Ensure that the input is validated for correctness (e.g., checking that the mnemonic phrase has the correct number of words, and the private key is in the correct format).
  3. Wallet Creation: Use the input data to generate the SUI wallet using the SUI SDK.
  4. Security Measures:
    • In-memory Storage: Keep the private key or mnemonic only in memory during the session. Never store it locally or on the server.
    • Encryption: If needed, encrypt the mnemonic/private key while it’s in memory for added security.
5
Best Answer
Comments
.
Momemtum.
Sep 7 2025, 22:27

Hi! Since browser extensions are out, you'll need a different approach. The most common and secure way to connect existing wallets is using WalletConnect. Your mini-app can generate a QR code or deep link that users scan or tap, connecting their Sui mobile wallet (like the official Sui Wallet app) directly. For new users, you can programmatically generate a new Sui keypair within your mini-app using the @mysten/sui.js SDK. Just be sure to handle key storage extremely securely (e.g., encrypted and password-protected locally) and provide a way for users to back up their seed phrase. Another excellent option, especially for new users, is integrating a social login wallet solution like Sui's upcoming zkLogin or services like Web3Auth, which can create a wallet for the user linked to their Telegram or Google account, making onboarding much smoother.

8
Comments
.
290697tz.
Jul 22 2025, 22:03

To integrate a Sui wallet like Slush Wallet into your Telegram Mini App, you’ll need to bypass browser extension-based methods (like Chrome plugins) since Telegram Mini Apps run inside a restricted webview that doesn't support browser extensions or persistent local storage in the usual way. Instead, you should implement a mobile-friendly wallet integration using deep linking, QR codes, or embedded wallet SDKs that support mobile and in-app contexts. Here’s how you can do it step-by-step:


✅ 1. Choose a Mobile-Compatible Sui Wallet (Slush or Others)

Slush Wallet, while still early, is being positioned as a mobile-first Sui wallet. Since browser extensions won’t work in Telegram, you need a wallet that supports:

Mobile deep links

QR code-based signing (like WalletConnect-style)

Embedded wallet SDK or hosted web-wallet iframe

As of now, Slush is working on supporting embedded dApp usage via deep links or QR-based connect, so if you’re targeting Slush specifically, monitor their SDK or API roadmap closely: 🔗 https://slushwallet.xyz


✅ 2. Implement Wallet Deep Link or QR Connect in Your Telegram Mini App

Here’s what you can do inside the mini app:

Option A (recommended for mobile): Use deep links to Slush or other Sui wallets. These links can trigger the wallet to open, request signing, and redirect back to your app using Telegram’s internal routing.

// pseudo-code for Slush deep link (example, confirm their actual schema) const deepLink = slush://connect?dapp=${encodeURIComponent('https://your-mini-app-url')}; // Open in mobile Telegram window.open(deepLink, "_blank");

Option B: Generate a QR code containing a connection request (if the wallet supports WalletConnect-style flows). You’d show this in your app and have users scan it in Slush or another wallet that supports QR-based signing.


✅ 3. Use the Sui SDK for Transaction Preparation

Inside your Telegram Mini App (likely a React/JS app), use the Sui SDK to construct transactions, and hand off the signing to the wallet:

import { TransactionBlock } from '@mysten/sui.js/transactions';

const tx = new TransactionBlock(); tx.moveCall({ target: '0x2::devnet_nft::mint', arguments: [ tx.pure('NFT Name'), tx.pure('NFT Description'), tx.pure('https://image.link') ], });

// Instead of signing directly, serialize and pass to wallet const txBytes = await tx.build({ client });

You'd send this txBytes via the deep link or embedded signing flow for the user to approve and sign in their wallet.


✅ 4. Store or Create a Wallet (If Not Connected)

If your user doesn’t have a Sui wallet yet:

Guide them to install Slush Wallet (link to Play Store or App Store)

On first visit, show a "Create Wallet" button that redirects them to Slush Wallet’s onboarding screen via a deep link

Once installed, guide them to connect via QR or deep link


⚠️ Common Pitfalls to Avoid

Don't expect window.sui to be available in Telegram—it’s not a browser extension.

Session storage can be limited inside Telegram Mini App—use Telegram WebApp API for persistent auth/token handling.

Always test deep linking on real mobile devices, as Telegram iOS and Android WebViews can behave differently.


🛠️ Tools & Libraries You May Use

@mysten/sui.js for transaction building

qrcode.react to render QR codes

Telegram Mini App API Docs

Slush GitHub or dev support if public SDK becomes available


📚 Read More

Telegram Mini App Integration: https://core.telegram.org/bots/webapps

Sui Wallet SDK concepts: https://docs.sui.io/build/wallets

Mysten's wallet adapter ideas: https://github.com/MystenLabs/wallet-adapter


If Slush doesn’t yet support embedded wallet or mobile SDK flows, consider supporting other mobile-friendly wallets like Surf Wallet, Ethos Wallet, or even integrating a basic custodial key management solution for dev testing.

4
Comments
.
theking.
Jul 25 2025, 02:02

To integrate a Sui wallet like Slush into your Telegram Mini App, you’ll need to work with deep linking, embedded wallet SDKs, or wallet connect protocols that are compatible with mobile environments and in-app browsers, since traditional browser extensions (like the Sui Wallet Chrome plugin) won’t work inside Telegram's WebView. Slush supports wallet integration through its own SDK and APIs, making it more suitable for mobile-first dApps or mini apps like yours.

Here’s how to approach it:

You can guide users to connect their Slush wallet by generating a deep link that triggers wallet authorization in a standalone browser or Slush mobile app. When the user clicks the connect button in your Telegram app, redirect them to a Slush connect URL containing a redirect URI to return with a wallet address or session token. If the user doesn’t have a wallet yet, you can direct them to a "Create Wallet" flow using Slush’s onboarding page.

Example connection flow:

  1. User clicks "Connect Wallet" in your Telegram app.
  2. Your app generates a deep link to Slush (e.g., https://wallet.slush.id/connect?redirect_uri=https://yourapp.com/callback)
  3. User is redirected out of Telegram to connect and approve.
  4. Slush sends the wallet address or token back to your app via the redirect URI.
  5. You store that session info and use it to sign transactions via API or mobile bridge.

You can also use the Slush SDK to:

  • Trigger wallet connection
  • Request signing
  • Manage sessions
  • Interact with Sui objects

Since Telegram’s mini app environment uses an embedded WebView, always test wallet interaction with mobile fallback options and avoid extension-based flows.

For full docs and examples: https://docs.slush.id

2
Comments
.
justsui.
Oct 21 2025, 00:39

You can integrate Slush Wallet with a Telegram Mini App (built using the Mini Apps API) by following these steps. Since Telegram’s Mini App environment runs inside a WebView (rather than a full browser with extensions), you’ll need to adopt mobile-compatible flows (deep links, QR codes, SDKs) rather than browser-extension methods.

Here’s a simplified, rephrased walkthrough:

Integration steps

First, pick up the official Slush Wallet “Connect to apps” documentation. slush.app

Then proceed:

  1. Ensure your Mini App is set up properly inside Telegram Use the Telegram WebApp API (e.g., window.Telegram.WebApp) to initialise your Mini App environment, get context, handle sizes, etc. See Telegram’s developer docs for Mini Apps.

  2. Choose your wallet-connection method compatible with mobile/in-app Because browser extensions won’t work in Telegram’s WebView, use one of these:

A deep-link to Slush Wallet: e.g., slush://connect?redirect_uri= (confirm exact scheme in Slush docs).

A QR code that the user scans with their mobile Slush Wallet, invoking a WalletConnect-style handshake if supported.

Use Slush’s SDK or API (if available) to trigger connection, sign, etc.

  1. In your Mini App, create a “Connect Wallet” button When the user taps “Connect Wallet”, trigger the deep link or display the QR code. Once the wallet is connected, you’ll receive the user’s wallet address or session token via your redirect URI. Store the session (in memory or securely) so you can make subsequent calls.

  2. Build transactions and send them via Slush Wallet Inside your Mini App you can use the @mysten/sui.js SDK (if you’re working on the Sui ecosystem) to create transactions (e.g., TransactionBlock). Then you serialize the transaction and hand it off to Slush Wallet for signing. After the user approves, you submit it on-chain.

  3. Handle users without a wallet yet If the user doesn’t have Slush installed or a wallet set up, your Mini App should detect that and show a “Create Wallet” or “Install Slush” option. After installation/setup they can return and connect.

  4. Security & environment considerations

Don’t rely on window.sui or browser-extension features inside Telegram WebView — they may not be available.

Use Telegram WebApp APIs to open links (e.g., utils.openLink(url)) so that deep links trigger correctly inside Telegram.

Always encrypt or protect any sensitive data (even though you ideally won’t handle private keys).

Test on both Android & iOS inside the Telegram app because WebView behaviours differ.

0
Comments
.

Do you know the answer?

Please log in and share it.