KMD Client
Key Management Daemon operations for wallet and key management.
Examples (13)
Section titled “Examples (13)”| Example | Description |
|---|---|
| KMD Version Information | This example demonstrates how to retrieve version information from the KMD (Key Management Daemon) server using the version() method. Prerequisites: |
| Wallet Creation and Listing | This example demonstrates how to create, list, rename, and get info about wallets using the KMD (Key Management Daemon) client. Prerequisites: Covered operations:
|
| Wallet Session Management | This example demonstrates how to manage wallet sessions using KMD handle tokens. Handle tokens are used to unlock wallets and perform operations on them. They have an expiration time and should be released when no longer needed. Prerequisites: Covered operations:
|
| Key Generation | This example demonstrates how to generate new keys in a wallet using the KMD generate_key() method. Keys are generated deterministically from the wallet’s master derivation key, which means they can be recovered if you have the wallet’s mnemonic or master derivation key. Prerequisites: Covered operations:
|
| Key Import and Export | This example demonstrates how to import and export keys using the KMD import_key() and export_key() methods. Key concepts:
Prerequisites: Covered operations:
|
| Key Listing and Deletion | This example demonstrates how to list all keys in a wallet and delete specific keys using the KMD list_keys() and delete_key() methods. Prerequisites: Covered operations:
|
| Master Key Export | This example demonstrates how to export the master derivation key (MDK) for wallet backup using the KMD export_master_key() method. Key concepts:
generate all keys in the wallet
Prerequisites: Covered operations:
|
| Multisig Account Setup | This example demonstrates how to create multisig accounts using the KMD import_multisig() method. Key concepts:
public keys, threshold, and version Prerequisites: Covered operations:
|
| Multisig Account Management | This example demonstrates how to manage multisig accounts using KMD:
Key concepts:
Prerequisites: Covered operations:
|
| Transaction Signing with KMD | This example demonstrates how to sign transactions using the KMD sign_transaction() method. It shows the complete workflow of creating a wallet, generating a key, funding it, signing a transaction, and submitting it to the network. Prerequisites: Covered operations:
|
| Multisig Transaction Signing with KMD | This example demonstrates how to sign multisig transactions using the KMD sign_multisig_transaction() method. It shows:
Prerequisites: Covered operations:
|
| Program Signing (Delegated Logic Signatures) with KMD | This example demonstrates how to sign programs/contracts using the KMD sign_program() method. It shows:
What is Program Signing? Program signing creates a “delegated logic signature” (delegated lsig). This allows an account holder to authorize a smart contract (TEAL program) to sign transactions on their behalf. When you sign a program: 1. You’re attesting that you authorize this program to act for your account 2. Transactions signed by this delegated lsig will be authorized by your account 3. The program logic determines which transactions are approved Use cases for delegated logic signatures:
Prerequisites: Covered operations:
|
| Multisig Program Signing (Delegated Multisig Logic Signatures) with KMD | This example demonstrates how to sign programs with multisig using the KMD sign_multisig_program() method. It shows:
What is Multisig Program Signing? Multisig program signing creates a “delegated multisig logic signature”. This combines two powerful concepts: 1. Multisig: Requiring multiple parties to approve 2. Delegated Logic Signatures: Authorizing a program to act on behalf of an account With a delegated multisig lsig:
Use cases for delegated multisig logic signatures:
Prerequisites: Covered operations:
|
Quick Start
Section titled “Quick Start”Run any example from the repository’s examples directory:
cd examplesuv run python kmd_client/01_version.py