http://mmgen-wallet.i2p/project/mmgen/mmgen-wallet/src/ea1e8d1228db50c9776998ff50d270af52b35540/mmgen/derive.py
If not, see <http://www.gnu.org/licenses/>. """ derive: coin private key secret derivation for the MMGen suite """ from collections import namedtuple from hashlib import sha512,sha256 from .addrlist import AddrIdxList pk_bytes = namedtuple('coin_privkey_bytes',['idx','pos','data']) def derive_coin_privkey_bytes(seed,idxs): assert isinstance(idxs,AddrIdxList), f'{type(idxs)}: idx list not of type AddrIdxList' t_keys = len(idxs) pos = 0 for idx in range( 1, AddrIdxList.max_len+1 ): #...