keypair with solana's Ed25519 standard
Hello, I'm trying to generate the keypair with solana's Ed25519 standard, but when I generating it with "Keypair" of "python.py" generates a different key. I would like to know with "python.py" how can I achieve the same result with solana standard Ed25519.
Ref: https://yihau.github.io/solana-web3-demo/tour/create-keypair.html#bip44
Code;
#memo
mnemo = Mnemonic("english")
seed = mnemo.to_seed("ball job print luggage agent list ride awful quantum stamp month school")
# with bip_utils - Ed25519
bip44_mst_ctx = Bip44.FromSeed(seed, Bip44Coins.SOLANA)
bip44_acc_ctx = bip44_mst_ctx.Purpose().Coin().Account(0)
bip44_chg_ctx = bip44_acc_ctx.Change(Bip44Changes.CHAIN_EXT)
print(bip44_chg_ctx.PublicKey().ToAddress())
# with Keypair "python.py"
keypair = Keypair.from_secret_key(seed[0:32])
print(keypair.public_key)
Results:
result with bip_utils - Ed25519
H6jk4FuVfTj4A5kT3hqJLa7pgHrdPN6BF7ur9Ea8wctu
result with Keypair
3sxS3BBsNgJwwxojFYrNdywPKDC9P7ZNHPFNG91zH44i
Can someone help me?
Thanks Angelo
What version of solana-py did you download?
What version of solana-py did you download?
V. 0.28.0
@napangelo our library uses https://crates.io/crates/curve25519-dalek under the hood. Can you check what the underlying Ed25519 library is used for your bip_utils library?
From documentation: https://pypi.org/project/bip-utils/
ed25519-blake2b for ed25519-blake2b curve pynacl for ed25519 curve
With standard BIP44
https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki
😬 see https://github.com/solana-labs/solana/issues/17106. Unfortunately we don't have a good solution for this incompatibility.
Ok thanks. Nice weekend