AlexanderBuzz / xrpl-php

A PHP library to interact with the XRP Ledger (XRPL) blockchain
ISC License
5 stars 3 forks source link

Not able to retreive an account with seed #19

Closed nicoeni closed 7 months ago

nicoeni commented 8 months ago

Hi, I created a wallet with Xumm, and when I try to retrieve the account with your API, I have this error:

Fatal error: Uncaught Exception: Checksum does not validate in C:\xampp\htdocs\AD\vendor\hardcastle\xrpl_php\src\Core\RippleAddressCodec\Codec.php:86 Stack trace: #0 C:\xampp\htdocs\AD\vendor\hardcastle\xrpl_php\src\Core\RippleAddressCodec\Codec.php(35): XRPL_PHP\Core\RippleAddressCodec\Codec->decodeChecked('s.......') #1 C:\xampp\htdocs\AD\vendor\hardcastle\xrpl_php\src\Core\RippleAddressCodec\CodecWithXrpAlphabet.php(70): XRPL_PHP\Core\RippleAddressCodec\Codec->decode('s.......', Array) #2 C:\xampp\htdocs\AD\vendor\hardcastle\xrpl_php\src\Core\CoreUtilities.php(111): XRPL_PHP\Core\RippleAddressCodec\CodecWithXrpAlphabet->decodeSeed('s.......') #3 C:\xampp\htdocs\AD\vendor\hardcastle\xrpl_php\src\Wallet\Wallet.php(85): XRPL_PHP\Core\CoreUtilities::decodeSeed('s.......') #4 C:\xampp\htdocs\AD\vendor\hardcastle\xrpl_php\src\Wallet\Wallet.php(73): XRPL_PHP\Wallet\Wallet::deriveWallet('s.......') #5 C:\xampp\htdocs\AD\a1.php(32): XRPL_PHP\Wallet\Wallet::fromSeed('s.......') #6 {main} thrown in C:\xampp\htdocs\AD\vendor\hardcastle\xrpl_php\src\Core\RippleAddressCodec\Codec.php on line 86

I don't know why it's not work

Thank you for your great job

Nicolas

AlexanderBuzz commented 8 months ago

I'll have a look at it and fix whatever is there to fix

AlexanderBuzz commented 8 months ago

@nicoeni As the Wallet::fromSeed takes a secret value and we obviously can't share this here, lets try it in Javascript. It would look like this:

const xrpl =  require('xrpl');

const wallet = xrpl.Wallet.fromSeed(''your-secret-seed);

console.log(wallet.address);
AlexanderBuzz commented 8 months ago

If we can rule out a typo that way, it would be interesting which network on XUMM (Main, Test, XAHAU etc.) you've used, so I can try to reproduce the error.

nicoeni commented 7 months ago

Hi, I wasn't able to have the same issue again. I close the ticket. Thank you