Algorithm to go from seed to 20 (or more) addresses I'm currently reading the Electrum sourcecode to figure out how to go from seed (12 words) to addresses (in usual format). Does someone have the big picture of this process in mind?

More precisely I'm looking for Python code (standalone, runnable out of Electrum) that can produce this.


Take a seed s (can be 12 words from the 2048-words dictionary but not necessary)
Let's assume s is a valid seed (i.e. is_new_seed(s) is True, this means that bh2u(hmac_sha_512(b"Seed version", s.encode('utf8'))) has prefix '01'); code for is_new_seed here.
For our goal (get addresses), should we first create the private key from s? How?


or


Should we create a master public key from s? How? 
Given 3. or 4., how to create the 20 first public addresses?




Example of input: s = 'x8' (yes this is a valid (unsecure because too simple)  seed, you can try it in Electrum - Create a wallet from existing seed)

Example of output:

1LNvv5h6QHoYv1nJcqrp13T2TBkD2sUGn1
1P6rnf6VUfSUUWES6wTyjfx9dTFqXdrjLM
1AQ6TNtD2eEdQjwpVpkPSdcvJiiLKziKZz
...
Electrum uses BIP 32 to go from a seed value to private and public keys. Addresses are then derived from those keys. Public keys are also derived from the private keys, except in the case for watch-only wallets.

The full BIP 32 specification is available here.