Wallet Standard is a chain-agnostic set of interfaces and conventions that aim to improve how applications interact with injected wallets such as Phantom. The standard was pioneered on Solana and is used as the foundation for the Solana Wallet Adapter. Phantom supports the Wallet Standard and is open to working with others to bring this innovation to other ecosystems.
Wallet Standard introduces an event-based model that:
- Standardizes the way wallets attach themselves to the window.
- Defines a set of standard APIs that dapps can rely upon.
At a high-level, Wallet Standard defines the following Window interface for events:
When a wallet is ready to inject into a website, it will dispatch a register-wallet event and listen for an app-ready event. Conversely, an app will dispatch an app-ready event and listen for register-wallet events.
For app developers
Phantom comes with built-in support for Wallet Standard on Solana. To get started, simply update the Solana Wallet Adapter to the latest release. For a demo, check out the Wallet Adapter example.
If you are migrating an existing Solana dapp to use Wallet Standard, please ensure that you are not mutating transactions in place. Failure to do so will result in a breaking change.
Check Solana v1 signing support
Solana version 1 support is a feature on the connected wallet, not a property of the app. Check the feature you are about to call. solana:signTransaction and solana:signAndSendTransaction are separate features. A wallet can advertise one and omit the other.
The selected account must list the chain and solana:signTransaction. A wallet can expose the feature while the connected account does not. A successful browser-extension test does not establish the same behavior for the Phantom mobile app, deep links, or an embedded wallet. If the feature list does not include numeric version 1, show the user that this wallet cannot sign a version 1 transaction and continue with a version 0 transaction when your app allows it.
Use the same check with SolanaSignAndSendTransaction when the app calls that feature. The version 1 transaction recipe shows the extension signing flow after this check.
Further reading
Wallet Standard design document