To reliably re-create the same wallet from seed, you need to know the algorithm that was used. Using the default algorithm can get you in trouble—for example, it changed between xrpl.js versions, so code that used to work will generate the wrong address from the same input after you update. So it's pretty helpful to know what algorithm your key pair uses, but if you do client.fundWallet() or Wallet.generate() with the default options, the object you get back doesn't tell you what the default algorithm it used was.
To fix this, the Wallet class should have a property that reports the algorithm that was used in instantiating it. I suggest the following:
| Property Name |
Type |
Value |
algorithm |
Enum: ECDSA |
The cryptographic key derivation algorithm that was used to instantiate this wallet. |
To reliably re-create the same wallet from seed, you need to know the algorithm that was used. Using the default algorithm can get you in trouble—for example, it changed between xrpl.js versions, so code that used to work will generate the wrong address from the same input after you update. So it's pretty helpful to know what algorithm your key pair uses, but if you do
client.fundWallet()orWallet.generate()with the default options, the object you get back doesn't tell you what the default algorithm it used was.To fix this, the Wallet class should have a property that reports the algorithm that was used in instantiating it. I suggest the following:
algorithm