I use example in docs solana for python
I try get key pair and import to phantom by private key:
from solders.keypair import Keypair
from mnemonic import Mnemonic
mnemo = Mnemonic("english")
words = mnemo.generate(strength=256)
seed = mnemo.to_seed(words)
keypair1 = Keypair.from_bytes(seed)
print("keypair1: {}".format(keypair1))
keypair2 = Keypair()
print("keypair2: {}".format(keypair2))
Output:
keypair1: 4pqdZVgkCaALGNqvumkcC9gH5ZRj13DupL9go2DfZMhX9c7Mi9cei9AySWHNdcaxf5cnpZ2yyHtc5dvqW9qof2LX
keypair2: 4af72sYDF4ugnoMpNjoyBTmrDpgBKJqNUJGq8Lpy6vsao9kV9nxHtKiExqSwSkgKebJQHMeYWCQbH5JscbckkMck
Keypair1 was created by seed phrase and when i try import in phantom app i get error "bad format".
Keypair2 was created without seed phrase and when i try import in phantom app i not get error and import success
Why can't i import keypair1 and get error "bad format"?