So far when I try to create a wallet with a recovery phrase that already exist the server returns 409 conflict and an error message saying: "This operation would yield a wallet with the following id: {id} However, I already know of a wallet with this id."
So the question is: Is there another way rather than extracting the id from the response message? I mean hopefully there is a better way to get the wallet Id, from the recovery phrase maybe?
Not at present, POST /v2/wallets is the only way the app allows a user to provide a mnemonic phrase, and as you've found it doesn't return the ID as a separate field.
If you're using cardano-wallet to handle only a single wallet, one could just 'List' all wallets, and pick it from the list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With