Wallet Standard
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 will result in a breaking change.