accounts.kmd_account_manager | Algorand Developer Portal

accounts.kmd_account_manager

Classes

KmdAccount Account retrieved from KMD with signing capabilities, extending base Account.
KmdAccountManager Provides abstractions over KMD that makes it easier to get and manage accounts.

Module Contents

class algokit_utils.accounts.kmd_account_manager.KmdAccount(private_key: str, address: str | None = None)

Bases: algokit_utils.models.account.SigningAccount

Account retrieved from KMD with signing capabilities, extending base Account.

Provides an account implementation that can be used to sign transactions using keys stored in KMD.

class algokit_utils.accounts.kmd_account_manager.KmdAccountManager(client_manager: algokit_utils.clients.client_manager.ClientManager)

Provides abstractions over KMD that makes it easier to get and manage accounts.

kmd() → algosdk.kmd.KMDClient

Returns the KMD client, initializing it if needed.

get_wallet_account(wallet_name: str, predicate: collections.abc.Callable[[dict[str, Any]], bool] | None = None, sender: str | None = None) → KmdAccount | None

Returns an Algorand signing account with private key loaded from the given KMD wallet.

Retrieves an account from a KMD wallet that matches the given predicate, or a random account if no predicate is provided.

get_or_create_wallet_account(name: str, fund_with: algokit_utils.models.amount.AlgoAmount | None = None) → KmdAccount

Gets or creates a funded account in a KMD wallet of the given name.

Provides idempotent access to accounts from LocalNet without specifying the private key.

get_localnet_dispenser_account() → KmdAccount

Returns an Algorand account with private key loaded for the default LocalNet dispenser account.

Retrieves the default funded account from LocalNet that can be used to fund other accounts.