foundry icon indicating copy to clipboard operation
foundry copied to clipboard

feat(cast): add `--json` flag in `cast wallet new-mnemonic`

Open leovct opened this issue 4 months ago • 0 comments

Component

Cast

Describe the feature you would like

I'd like to be able to format the output of cast wallet new-mnemonic to JSON to use it in scripts with jq.

Expected behaviour:

$ cast wallet new-mnemonic --json
{
  "seed": "income audit segment diary suffer stumble real legal boy subject crash require",
  "accounts": [
    {
      "address": "0x6398F866b146d6A73f38E3D2faeA39c68a7a73f0",
      "private_key": "0xc0e4c0ab5ba0d2844bc10ceffb0ed6c5c86e09187b76bd61984667f341a19de3"
    }
  ]
}

I'm open to work on it if you find the feature useful! :)

Additional context

No response

leovct avatar Oct 18 '24 07:10 leovct