🦀 Wasi Sol
| Framework | Demo | Live Demo |
|---|---|---|
| Yew | ||
| Dioxus | ||
| Leptos |
A Solana Wallet adapter for WASM frameworks.
🔒 Wallets Support
| Wallet | Supported | Features |
|---|---|---|
| Phantom | ✅ | All |
| Solflare | ✅ | All |
| Backpack | ✅ | All |
🌐 Wasm Frameworks Support
| Framework | Supported |
|---|---|
| Yew | ✅ |
| Dioxus | ✅ |
| Leptos | ✅ |
⚙️ Features
| Method | Supported | Tested |
|---|---|---|
connect |
✅ | ✅ |
disconnect |
✅ | ✅ |
sign_in |
✅ | ✅ |
sign_message |
✅ | ✅ |
sign_transaction |
✅ | ✅ |
send_transaction |
✅ | ✅ |
🔥 Getting Started
Wasi Sol provides providers and hooks that you can use to bring all wallet adapter functionalities to your app. To begin, wrap your main App component with the corresponding providers:
// Yew Component
This will allow you to use the hooks to create the wallet adapter that exists in the wallets vector:
// Yew Component
Now you can choose the wallets you want to add to allow users to connect to. Wasi Sol comes with built-in reusable components that encapsulate all connect and disconnect logic so that you can develop web apps quickly:
// Yew Component
This will select the Phantom and Solflare wallets and allow users to connect them to the app. The Backpack wallet is disabled in this case.
More detailed implementations can be found in the examples below.
🚀 Examples
| Framework | Example |
|---|---|
| Yew | |
| Dioxus | |
| Leptos |
🎧 Event Listener
This crate implements a handy event listener pattern with a built-in emitter object that you can use to subscribe to particular events. This functionality allows you to set state in the UI, perform actions on wallet connect, and more.
// Yew Component
// ...snip...
👥 Contributing
Contributions and feedback are welcome! If you'd like to contribute, report an issue, or suggest an enhancement, please engage with the project on GitHub. Your contributions help improve this library for the community.
📝 License
This project is licensed under the MIT License.