0.2.1 • Published 1 year ago

solana-mwa-wallet-standard v0.2.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

solana-mwa-wallet-standard

Register the Solana mobile wallet adapter as a wallet-standard standard wallet with solana features on window

Usage

Import and call the registerSolanaMwaWalletStandard function

import { registerSolanaMwaWalletStandard } from "solana-mwa-wallet-standard";

registerSolanaMwaWalletStandard({
  name: "my dapp",
  uri: "https://your-dapp.com",
  icon: "./favicon.ico",
  chains: ["solana:mainnet", "solana:devnet"], // defaults to ["solana:mainnet"] if not specified. Mobile wallets may require a separate auth flow for each chain.
});

The mobile wallet adapter will be registered as a standard wallet:

import { getWallets } from "@wallet-standard/app";
const { get } = getWallets();
const allWallets = get(); // the mobile wallet adapter should be a part of `allWallets`