solana_kit_wallet_standard
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, andWalletIconWalletFeatureand type-safe feature lookup- Standard connect, disconnect, and event contracts
- Solana transaction, message, sign-in, and offchain-message features
WalletRegistryandWalletRegistryControllerWalletStandardException
Libraries
- solana_kit_wallet_standard
- Wallet Standard contracts and Solana feature definitions for Dart.