solana_kit_wallet_standard 0.1.3
solana_kit_wallet_standard: ^0.1.3 copied to clipboard
Pure Dart Wallet Standard and Solana wallet feature contracts.
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