Private/New-PolymanWallet.ps1

function New-PolymanWallet {
  [CmdletBinding(SupportsShouldProcess)]
  param (
    [Parameter()]
    [ValidateSet('table', 'json')]
    [string]$Output = 'table'
  )

  process {
    if ($PSCmdlet.ShouldProcess("Local Config", "Generate and save new private key")) {
      $key = [PolymarketWallet]::GenerateKey()
      [PolymarketWallet]::SaveKey($key)

      $result = [ordered]@{
        Message    = "New wallet generated and saved successfully."
        PrivateKey = $key
      }

      [PolymarketOutput]::Format($result, $Output)
    }
  }
}