-
Notifications
You must be signed in to change notification settings - Fork 512
Wallet Key Types
Elliot Lee edited this page May 23, 2024
·
1 revision
There are two ways (algorithms) to derive a public key from seed (private) material:
- secp256k1 (elliptic curve first widely used by Bitcoin)
- Ed25519 (newer Edwards curve)
If you use the Wallet.fromSeed
method in the xrpl
library, it will default to using the Ed25519 algorithm. (As of xrpl.js v3.)
If your seed was previously used for an existing secp256k1 wallet, then you'll get "RippleError - Account not found" as the method will create an Ed25519 wallet, which will have a different public address.
Popular XRP wallet apps like Xaman default to using secp256k1, resulting in this discrepancy.
When constructing a wallet from seed, if you are using it as a secp256k1 wallet, please specify algorithm = ECDSA.secp256k1
.