solana_kit_wallet_standard

pub package CI coverage

Pure Dart contracts for Wallet Standard wallets, accounts, registries, and Solana features. The package contains no Flutter or platform dependencies.

Installation

dependencies:
  solana_kit_wallet_standard: ^0.1.0

Usage

import 'package:solana_kit_wallet_standard/solana_kit_wallet_standard.dart';

Future<List<WalletAccount>> connect(Wallet wallet) async {
  final feature = wallet.feature<StandardConnectFeature>(
    StandardFeatureId.connect,
  );
  if (feature == null) {
    throw const WalletStandardException(
      WalletStandardErrorCode.unsupportedFeature,
      'Wallet does not support standard:connect',
    );
  }
  return (await feature.connect()).accounts;
}

Key APIs

  • Wallet, WalletAccount, and WalletIcon
  • WalletFeature and type-safe feature lookup
  • Standard connect, disconnect, and event contracts
  • Solana transaction, message, sign-in, and offchain-message features
  • WalletRegistry and WalletRegistryController
  • WalletStandardException

Libraries

solana_kit_wallet_standard
Wallet Standard contracts and Solana feature definitions for Dart.