Bitcoin
python – Efficient algorithm for multi-address transactions in deterministic wallets – Stack Overflow
I am developing a Bitcoin wallet (testnet) in Python using the Cryptos library. I started integrating support for deterministic wallets and mnemonic words. Now users can generate addresses, addresses and private keys stored in an encrypted sqlite3 database file, and generate addresses and public keys in a simple sqlite3 file.
How can I effectively implement an algorithm that generates trades using multiple inputs? The library has built-in features such as unused (addresses are represented as UTXOs). I understand that I need to loop through the utxo and then select a private key for signing. But is there a more efficient way?