I have an instance of Cardano Wallet running and pointing at testnet. I create/restore a wallet like this:
curl -v -H "Content-Type: application/json" -d '{"name":"My Wallet","mnemonic_sentence":["..."],"passphrase":"..."}' https://myserver.dev/cardano-wallet/v2/wallets
and get a successful response back, which includes a valid walletId
.
For a few minutes, I can successfully query the API using this walletId
. If I hit the /wallets/{walletId}/addresses
endpoint, I get back a list of 20 unused addresses, as expected. However, after a short time (I haven't found the exact time but it seems to be around 5 minutes) I start to get a 404 with a response body similar to:
{"code":"no_such_wallet","message":"I couldn't find a wallet with the given id: ..."}
Is this expected behavior? Is there something else I need to do to ensure the wallet can be found when I need to "create" addresses for it? I know I could always just "restore" it before executing an operation against the wallet, but this seems like it would add a lot of extra potentially unnecessary requests.