I have been following the Exploring cardano-wallet doc and have run into a bit of a snag when creating a wallet.

The cardano-wallet recovery-phrase generate command returns a newly created seed phrase. This seed phrase can then be used to create a wallet by sending a post request to the wallet server:

curl --request POST \ --url http://localhost:1337/v2/wallets

Trouble is, that in this request you need to provide the seed phrase in a list with double quotes around each word and a comma between each word.

Is there a way to easily go from this:

bottle hat generate happy...

to this

"bottle", "hat", "generate", "happy",...


  • 1
    Programmatically with any programming language, it's quite straightforward. But for what it's worth, you can also do with some bash primitives: cardano-wallet recovery-phrase generate | sed 's@\([^ ]*\)@"\1",@g' | head -c -2
    – KtorZ
    Sep 13, 2021 at 17:07
  • Yep, that is what I was looking for :) Sep 14, 2021 at 19:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.