MCPcopy Create free account
hub / github.com/codeaashu/claude-code / handleNetwork

Function handleNetwork

src/commands/x402/x402.ts:160–170  ·  view source on GitHub ↗
(args: string)

Source from the content-addressed store, hash-verified

158}
159
160function 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
172function handleRemove(): string {
173 removeX402PrivateKey()

Callers 1

callFunction · 0.85

Calls 1

setX402NetworkFunction · 0.85

Tested by

no test coverage detected