(args: string)
| 158 | } |
| 159 | |
| 160 | function handleNetwork(args: string): string { |
| 161 | const parts = args.trim().split(/\s+/) |
| 162 | const network = parts[1] as PaymentNetwork | undefined |
| 163 | |
| 164 | if (!network || !VALID_NETWORKS.includes(network)) { |
| 165 | return `Usage: /x402 network <name>\nValid networks: ${VALID_NETWORKS.join(', ')}` |
| 166 | } |
| 167 | |
| 168 | setX402Network(network) |
| 169 | return `Network switched to ${network}` |
| 170 | } |
| 171 | |
| 172 | function handleRemove(): string { |
| 173 | removeX402PrivateKey() |
no test coverage detected