wdk_core_flutter is the orchestrator for the Wallet Development Kit (WDK) in
Dart. It lets you manage wallets, protocols, and middleware for
multiple blockchains through a single object.
- Module manager – holds one
WalletManagerper blockchain and connects them to protocol modules - Wallet modules – works with any wallet implementation that
extends
WalletManagerfromwdk_wallet_flutter - Service modules – works with protocol implementations that extend
SwapProtocol,BridgeProtocol,LendingProtocol, andFiatProtocol - Middleware – lets you attach per‑blockchain hooks that run after account derivation but before protocol access is attached
- Manage multiple chains (BTC, EVM, TON, TRON, Solana, …) from one
WDKinstance - Register swap/bridge/lending/fiat protocol modules per chain
- Add middleware for logging, metrics, policy checks, or additional decorators
- Strong, typed interfaces built on top of
wdk_wallet_flutter
dart pub add wdk_core_flutter
dart pub add wdk_wallet_flutterimport 'package:wdk_core_flutter/wdk_core_flutter.dart';
import 'package:wdk_wallet_flutter/wdk_wallet_flutter.dart';
// Your concrete wallet manager implementations should extend WalletManager.
class MyEvmWalletManager extends WalletManager {
MyEvmWalletManager(super.seed);
@override
Future<WalletAccount> getAccount([int index = 0]) async {
// ...
throw UnimplementedError();
}
@override
Future<WalletAccount> getAccountByPath(String path) async {
// ...
throw UnimplementedError();
}
@override
Future<FeeRates> getFeeRates() async {
// ...
throw UnimplementedError();
}
}
Future<void> main() async {
const mnemonic =
'abandon abandon abandon abandon abandon abandon '
'abandon abandon abandon abandon abandon about';
final wdk = WDK(mnemonic)
..registerWallet(
'ethereum',
(seed, config) => MyEvmWalletManager(seed),
);
final account = await wdk.getAccount('ethereum', 0);
final address = await account.getAddress();
print('ETH address: $address');
}WDK(dynamic seed)– create a manager from a BIP‑39 mnemonic or raw seed bytesregisterWallet(String blockchain, WalletManagerFactory factory, [dynamic config])registerProtocol(String blockchain, String label, ProtocolFactory factory, [dynamic config])registerMiddleware(String blockchain, MiddlewareFunction fn)Future<WalletAccountWithProtocols> getAccount(String blockchain, [int index = 0])Future<WalletAccountWithProtocols> getAccountByPath(String blockchain, String path)Future<FeeRates> getFeeRates(String blockchain)void dispose()static String getRandomSeedPhrase({int wordCount = 12})static bool isValidSeedPhrase(String seedPhrase)
Wrapper around a WalletAccount that adds protocol accessors:
registerProtocol(String label, ProtocolFactory factory, [dynamic config])SwapProtocol getSwapProtocol(String label)BridgeProtocol getBridgeProtocol(String label)LendingProtocol getLendingProtocol(String label)FiatProtocol getFiatProtocol(String label)
For an overview of the WDK project and the available modules, see the official WDK documentation.
This project is licensed under the Apache License 2.0 – see the
LICENSE file for details.