XRPLF / xrpl-py

A Python library to interact with the XRP Ledger (XRPL) blockchain
ISC License
144 stars 81 forks source link

Cannot convert mnemonic to seed #714

Closed Erfansol21 closed 1 day ago

Erfansol21 commented 3 weeks ago

Hi, I'm trying to add a code that import wallet from mnemonic. I tried using the code that was in this issue: https://github.com/XRPLF/xrpl-py/issues/419 but it couldn't sign a transaction and gave this error: xrpl.asyncio.clients.exceptions.XRPLRequestFailureException: Request failed, invalidTransaction: fails local checks: Invalid signature. and I tried making a seed from entropy using addresscodec.encode_seed but it gave the wrong seed and address in both ED25519 and SECP256K1

ckeshava commented 3 weeks ago

Hello, Here is a xrpl.js utility function for generating a wallet using a mnemonic phrase: https://js.xrpl.org/classes/Wallet.html#fromMnemonic We do not have an equivalent utility function in xrpl-py yet.

Here is a script written by @LimpidCrypto for this purpose: https://github.com/XRPLF/xrpl-py/issues/419#issuecomment-1213204776 -- I am not familiar with the bip_utils library myself, but this script appears to fit your requirement.