user118803: I tried to generate wallets by using pywallet and bip32utils (Python). But I noted that the addresses/keys of the 2 wallets, namely wallet_pywallet and wallet_bip39 don't match with each other.
I noted that the addresses/keys of wallet_bip39 match with Exodus, but wallet_pywallet doesn't. We have been using pywallet for such a long time so I believe wallet_pywallet should be correct as well. Why is there such a discrepancy?
Below is the code, while the code for wallet_bip39 is obtained from this post.
from pywallet import wallet
import binascii
import mnemonic
import bip32utils

def bip39(mnemonic_words):
    mobj = mnemonic.Mnemonic("english")
    seed = mobj.to_seed(mnemonic_words)

    bip32_root_key_obj = bip32utils.BIP32Key.fromEntropy(seed)
    bip32_child_key_obj = bip32_root_key_obj.ChildKey(
        44 + bip32utils.BIP32_HARDEN
    ).ChildKey(
        0 + bip32utils.BIP32_HARDEN
    ).ChildKey(
        0 + bip32utils.BIP32_HARDEN
    ).ChildKey(0).ChildKey(0)

    return {
        'mnemonic_words': mnemonic_words,
        'addr': bip32_child_key_obj.Address(),
        'publickey': binascii.hexlify(bip32_child_key_obj.PublicKey()).decode(),
        'privatekey': bip32_child_key_obj.WalletImportFormat(),
        'coin': 'BTC'
    }


mnemonic_words = wallet.generate_mnemonic()
    
wallet_pywallet = wallet.create_wallet(network="BTC", seed=mnemonic_words, children=0)
wallet_bip39 = bip39(mnemonic_words)
    
print(wallet_pywallet)
print()
print(wallet_bip39)


user-1: Derivation paths.
wallet_bip39 is using m/44'/0'/0' while (if I looked at the right pywallet code) pywallet is using m/0'

118803: <p>I tried to generate wallets by using <code>pywallet</code> and <code>bip32utils</code> (Python). But I noted that the addresses/keys of the 2 wallets, namely <code>wallet_pywallet</code> and <code>wallet_bip39</code> don't match with each other.</p>
<p>I noted that the addresses/keys of <code>wallet_bip39</code> match with Exodus, but <code>wallet_pywallet</code> doesn't. We have been using <code>pywallet</code> for such a long time so I believe <code>wallet_pywallet</code> should be correct as well. Why is there such a discrepancy?</p>
<p>Below is the code, while the code for <code>wallet_bip39</code> is obtained from <a href="https://bitcoin.stackexchange.com/questions/76655/how-to-generate-public-and-private-key-pairs-from-the-12-seed-words-in-python">this post</a>.</p>
<pre><code>from pywallet import wallet
import binascii
import mnemonic
import bip32utils

def bip39(mnemonic_words):
    mobj = mnemonic.Mnemonic(&quot;english&quot;)
    seed = mobj.to_seed(mnemonic_words)

    bip32_root_key_obj = bip32utils.BIP32Key.fromEntropy(seed)
    bip32_child_key_obj = bip32_root_key_obj.ChildKey(
        44 + bip32utils.BIP32_HARDEN
    ).ChildKey(
        0 + bip32utils.BIP32_HARDEN
    ).ChildKey(
        0 + bip32utils.BIP32_HARDEN
    ).ChildKey(0).ChildKey(0)

    return {
        'mnemonic_words': mnemonic_words,
        'addr': bip32_child_key_obj.Address(),
        'publickey': binascii.hexlify(bip32_child_key_obj.PublicKey()).decode(),
        'privatekey': bip32_child_key_obj.WalletImportFormat(),
        'coin': 'BTC'
    }


mnemonic_words = wallet.generate_mnemonic()
    
wallet_pywallet = wallet.create_wallet(network=&quot;BTC&quot;, seed=mnemonic_words, children=0)
wallet_bip39 = bip39(mnemonic_words)
    
print(wallet_pywallet)
print()
print(wallet_bip39)
</code></pre>
 -1: <p>Derivation paths.</p>
<p>wallet_bip39 is using m/44'/0'/0' while (if I looked at the right pywallet code) pywallet is using m/0'</p>
