Installation
No additional peer dependencies required. KMD is included with the Algorand SDK.Basic usage
Configuration
KMD API token. Defaults to a standard 64-character token for local development.
KMD server base URL.
KMD server port.
Additional HTTP headers to include in requests.
Name of the KMD wallet to use.
Async function that returns the wallet password. Defaults to a browser prompt.Example:
Type definition
Features
Local development
KMD is perfect for local development with AlgoKit LocalNet or other local Algorand nodes. It provides quick access to test accounts without manual key management.Password protection
KMD wallets can be password-protected. ThepromptForPassword function is called whenever password authentication is needed.
Direct signing
Transactions are signed directly using the private keys stored in KMD, without user interaction prompts.Methods
connect()
Connects to the KMD wallet and fetches available accounts. Prompts for the wallet password if required. Returns:Promise<WalletAccount[]>
disconnect()
Disconnects from KMD and clears the session. Returns:Promise<void>
signTransactions()
Signs transactions using KMD. Signs silently without user prompts. Parameters:txnGroup: Transaction or array of transactions to signindexesToSign?: Optional array of indexes to sign
Promise<(Uint8Array | null)[]>
Session management
KMD sessions are managed via wallet handle tokens. Tokens are acquired during connection and signing operations, then immediately released after use.Wallet discovery
KMD can manage multiple wallets. The provider will:- List all available KMD wallets
- Find the wallet matching the configured name
- Initialize a handle token with the password
- Fetch accounts from the wallet
Default configuration
The default configuration works with AlgoKit LocalNet:Platform support
- Web: Full support (local development)
- Mobile: Not applicable
- Desktop: Full support (local development)