A developer building a decentralized application on Solana faces a practical integration challenge: the wallet connection must be secure, the permissions explicit, and the user experience clear enough that people understand what they are authorizing. Solflare, created by Dokia Capital as the first wallet built specifically for Solana, provides a non-custodial foundation and a standardized interface for dApp developers to request and manage wallet access. Unlike wallets designed for multiple blockchains, Solflare’s exclusive focus on Solana allows tighter integration with the network’s transaction model, token standards, and program architecture.
The fundamental question for a developer is not just whether to support Solflare—it is how to use Solflare’s permission system to request only the access needed, sign transactions securely, and handle failures gracefully. A browser extension or mobile app wallet must validate that the dApp requesting permission is actually the dApp the user intended to visit, that the transaction shown on screen matches what will be signed, and that the wallet can revoke access if the user’s trust changes. Solflare’s architecture provides the tools to implement these checks correctly, but the responsibility for using them falls on the developer.
Understanding the Solflare permission model
Solflare implements a permission-based connection model that differs from older wallet designs. Instead of exposing a user’s public key immediately upon connection, or granting blanket access to sign any transaction, Solflare requires developers to request specific capabilities. These capabilities map to discrete actions: reading a connected wallet’s address, signing transactions, approving message signatures, or accessing token data. A developer should request only the permissions needed to accomplish the user’s stated goal.
The permission request appears in the wallet interface, not buried in fine print. The user sees which dApp is asking, what capabilities are being requested, and has the choice to accept, deny, or accept with restrictions. This transparency is both a security feature and a usability requirement. If a user grants a dApp permission to sign transactions but the dApp only needs to read an address, the permission grant becomes a liability: if the dApp is compromised or behaves maliciously, it can sign transactions the user did not intend. Minimal permission scope is therefore not just a best practice; it is essential to reducing the damage from a subsequent breach.
Developers integrating with Solflare should distinguish between connection permissions and transaction permissions. Connecting to a wallet establishes a session and provides the user’s public key. Signing a transaction is a separate action that should require explicit user confirmation. Some developers mistakenly assume that connection is implicit consent to sign anything. It is not. A wallet that shows a transaction preview and requires a separate approval step before signing reduces the risk that a user authorizes something unexpected due to interface confusion or lack of attention.
The permission model also allows developers to request read-only access. This is useful for applications that want to display a user’s balance or transaction history without needing to sign anything. Read-only access is lower-risk because the dApp cannot initiate transactions on the user’s behalf. However, read-only access can still expose data that the user may not expect to be available to external applications. A user portfolio tracking application might use read-only access to monitor holdings, but the dApp can then observe every address the user connects with, every token they hold, and how their portfolio composition changes over time.
Implementing connection and disconnect flows
A Solana dApp should implement a clear connection state machine. When a user first visits the dApp, it should detect whether Solflare (or another Solana dApp wallet) is installed and available. The dApp can then display a “Connect Wallet” button. Upon click, the dApp requests permissions from Solflare by calling the appropriate provider API. Solflare’s browser extension or mobile app intercepts this request and displays the permission prompt to the user.
The connection flow should handle several outcomes gracefully. If the user approves the permission request, the wallet returns the user’s public key and the dApp can store this information in session state. If the user denies the request, the dApp should not retry immediately or resort to degraded functionality that nags the user. If the wallet is not installed, the dApp should provide a clear message with a link to the wallet installation page. Error handling at this stage prevents users from experiencing a broken interface due to a missing wallet or a denied permission request.
Disconnection is equally important. A user should be able to disconnect the wallet from a dApp with a single action. Upon disconnection, the dApp should clear the stored public key from session state and remove any cached data about the user’s balance or transactions. If the dApp implements local storage to remember that a particular address was previously connected, it should allow the user to clear this information and prevent automatic reconnection without explicit action. Some applications try to re-establish wallet connection on page load without prompting the user, which is poor practice: it creates a false impression of persistent authentication when the user may have deliberately disconnected.
The session should also handle timeout and network conditions. If the user’s Solflare connection is interrupted because the browser window was closed or the wallet was uninstalled, the dApp should detect this and update its UI accordingly. Some developers attempt to work around dropped connections by polling the wallet repeatedly, which can overwhelm the wallet provider and degrade performance. A cleaner approach is to monitor the wallet’s connection events and update the UI in response to explicit signals rather than background checks.
Transaction signing and message verification
Once a dApp has a connected wallet, the typical workflow involves constructing a transaction and requesting that Solflare sign it. This is a critical point in the security chain. The developer must ensure that the transaction shown to the user in Solflare’s preview matches the transaction that will actually be submitted to the network. A discrepancy here represents a major vulnerability: an attacker who can manipulate a dApp’s code could show one transaction to the user (a small transfer) while signing a different transaction (a large transfer or program invocation).
The standard pattern is to build the transaction using Solana’s SDK, serialize it into a format that Solflare can inspect, and pass it to the wallet for signature. Solflare’s transaction preview will display the transaction’s structure: the programs being invoked, the accounts being accessed, the amounts being transferred, and the fees. The wallet can also validate that the transaction’s composition is sensible—for example, checking whether the sender and receiver accounts exist and whether the amount being transferred is within a reasonable range. However, the wallet cannot determine whether the user actually intended to transfer to the given address or invoke the given program; that is a verification burden that rests on the dApp and the user’s attention.
Message signing, distinct from transaction signing, is useful for proving ownership of an address without modifying blockchain state. A dApp might ask a user to sign a message such as “I authorize this application on [timestamp]” to confirm that they control the wallet. Solflare displays message signing requests in the wallet interface, showing the message content so the user can verify they are being asked to sign the right thing. Developers should include a timestamp or nonce in the message to prevent replay attacks. Without this, an attacker could intercept a signed message from one session and reuse it in a different context.
Handling token interactions and SPL standard compliance
Solflare has native support for SPL-standard tokens, which are the Solana ecosystem’s equivalent to Ethereum’s ERC-20 standard. A developer building a decentralized exchange, lending protocol, or token-based application will frequently need to request that a user approve token transfers or grant permissions to a program to move their tokens. The flow here is slightly different from native SOL transfers because SPL tokens are managed through separate token accounts, and authorizing a program to move tokens requires an approval transaction.
When a user connects to a dApp that uses SPL tokens, the wallet should display which token accounts will be accessed. A user may hold multiple accounts for the same token, and the dApp should respect the user’s choice of which account to interact with rather than defaulting to an account the user did not intend. Solflare’s token display features allow developers to query the connected wallet’s token balances and present them in a clear, organized way. This reduces the chance that a user will be confused about which tokens they hold or which account they are interacting with.
Token approval transactions are a common pattern in Solana dApps. If a user wants to trade a token on a decentralized exchange, the exchange program needs permission to transfer the token from the user’s account. This requires a separate approval transaction before the actual trade. A well-designed dApp will make this approval step explicit to the user, showing them which program is being granted access and the maximum amount that can be transferred. Some applications bundle the approval and execution into a single transaction, which can be more convenient but also reduces transparency about the permission being granted.
Using Solflare’s built-in dApp connectivity features
Solflare is specifically designed as a Solana dApp wallet, which means it includes features beyond basic connectivity. These include integration with popular Solana dApps, presets for common transaction types, and displays for NFTs and token balances. A developer can leverage these features to provide a better user experience without duplicating functionality. For example, if a dApp integrates with Solflare, users can see their token balances directly in the wallet interface and quickly understand their position without navigating back to the dApp.
The wallet also supports hardware wallet integration with Ledger and Keystone, which matters significantly for developers building applications where users will be authorizing high-value transactions. If a user holds their Solana assets on a hardware wallet connected through Solflare, the dApp must work seamlessly with the hardware wallet’s transaction signing flow. This often means longer confirmation times and different UI patterns for hardware wallet users compared to browser-based private key holders, but the security benefit is substantial.
Developers should be aware that users on hardware wallets may have different performance expectations and constraints. A user signing a transaction on a Ledger device must confirm it on the device itself, which takes longer and requires more deliberate action than clicking “Approve” in a browser. The dApp should not show timeouts or error states that penalize users for this additional latency. If a transaction takes longer to sign because a hardware wallet is involved, that is normal and expected behavior. To download Solflare and get started with wallet integration, click here to access the installation page for supported browsers and platforms.
Testing permission scopes and error handling
A developer should thoroughly test that their dApp requests only the permissions it needs and behaves correctly when permissions are denied. This requires manual testing with Solflare to simulate various scenarios: granting all requested permissions, denying permissions, revoking permissions after initial approval, and switching between different connected wallets. Automated testing frameworks can cover basic integration logic, but the permission flow and wallet interaction are best validated with manual testing and user feedback.
Error handling should cover not just permission denials but also transaction failures, network timeouts, and wallet unavailability. If a user signs a transaction but it fails to confirm on the network due to a slot conflict or network congestion, the dApp should not assume the transaction will eventually succeed. Some developers implement retry logic that automatically resubmits failed transactions, which can lead to accidental double-spending or unintended duplicates. A safer pattern is to show the user the transaction signature, allow them to track it on-chain if desired, and let them decide whether to retry based on the observed state.
The dApp should also handle the case where a user switches wallets or reinstalls their wallet provider. If Solflare is uninstalled, the dApp should gracefully fall back to a disconnected state rather than displaying errors. If the user switches to a different Solana dApp wallet, the dApp should respect that choice and either prompt for reconnection or display a message explaining that the current wallet is not supported. This flexibility improves user experience and prevents frustration when wallet setups change.
Security practices for dApp developers using Solflare
The most critical security practice is keeping the dApp’s domain and HTTPS configuration consistent. Solflare and other wallets can detect and warn about phishing attempts by comparing the requesting domain to known legitimate dApps, but this protection is only as good as the dApp’s actual domain security. A developer should use HTTPS exclusively, implement HSTS (HTTP Strict Transport Security) headers, and monitor for DNS hijacking or certificate issues. If the dApp is compromised and served over an insecure channel, a user’s wallet connection can be intercepted or hijacked despite Solflare’s protection mechanisms.
Developers should also implement content security policies (CSP) to prevent inline script injection and reduce the attack surface if the dApp is hosting user-generated content. A dApp that allows users to create NFTs or custom tokens should sanitize user input carefully to prevent script injection attacks. If an attacker can inject code into the dApp, they can potentially manipulate the transaction that is shown to the user or intercept the wallet connection.
Private key handling should never occur in the dApp itself. The dApp’s role is to construct transactions and request signatures from Solflare; the wallet manages all cryptographic operations. If a dApp asks for a user’s private key or seed phrase, that is an immediate red flag and indicates either a misunderstanding of how wallet integration works or a malicious application. A developer should use the wallet provider API exclusively and never handle raw private keys.
Session management should respect browser security practices. If a user closes the browser or the session times out, the dApp should require re-authentication rather than maintaining access indefinitely. For sensitive operations like large transfers or account configuration changes, developers should consider implementing additional confirmation steps, such as asking the user to re-sign a message or re-enter a PIN, even if the wallet is already connected.
Future integration patterns and ecosystem considerations
The Solana ecosystem is rapidly evolving, and developers should stay informed about changes to the wallet standards, token program interfaces, and dApp frameworks. Solflare’s support for standard protocols like Web3 wallet connections and the Solana dApp standard means that applications built today should remain compatible with future iterations of the wallet. However, developers should monitor Solana Foundation announcements and Solflare’s release notes to ensure they are using current best practices.
The rise of Solana dApp frameworks and libraries means that developers often do not need to implement wallet integration from scratch. Libraries like Web3.js handle much of the boilerplate, and higher-level frameworks abstract away some of the complexity. However, using a library does not eliminate the need to understand the underlying permission model and security implications. A developer who relies entirely on a library without understanding what permissions are being requested or how transactions are being signed is more likely to introduce vulnerabilities through misconfiguration.
As the Solana dApp ecosystem matures, user expectations around wallet security and transaction transparency will likely increase. Developers who implement clear permission scoping, transparent transaction previews, and explicit error messaging today will be better positioned to work with more sophisticated wallet security features as they emerge. The foundation of secure dApp development is respecting the user’s control over their assets and being explicit about every permission and action that requires their authorization. Solflare provides the tools to do this; the developer’s responsibility is to use them correctly.
Frequently asked questions
What is the difference between connection and transaction permissions in Solflare?
Connection permissions allow a dApp to access the user’s public key and read-only data such as token balances. Transaction permissions allow the dApp to request that the wallet sign a transaction or message on the user’s behalf. These are separate permissions, and a dApp should request only the permissions it needs. Requesting transaction signing permission when you only need to read an address is poor practice and increases the security risk if the dApp is compromised.
How should a developer handle a failed transaction signature request?
If a user denies the signature request or the wallet is unavailable, the dApp should gracefully handle this without retrying automatically or nagging the user. Display a clear message explaining that the action was cancelled, and allow the user to try again if they choose. Do not assume the transaction will succeed on the network just because it was signed; monitor the transaction confirmation and handle network failures separately from wallet failures.
Can a dApp see all of a user’s accounts and tokens when connected to Solflare?
Solflare provides the connected wallet’s public key, which identifies the user’s account on the Solana blockchain. The dApp can then query publicly available blockchain data, including token accounts and balances. However, Solflare can also restrict which specific accounts or tokens the dApp can access through permission scoping. Developers should request access only to the accounts and tokens needed for the application’s functionality, and users should grant permissions conservatively.
